Initialization processing for video coding

By simplifying the initialization steps in video encoding, especially by performing initialization only under specific conditions, the problems of low encoding efficiency and parallel processing latency in existing technologies are solved, resulting in a more efficient video encoding and decoding process.

CN121509682AActive Publication Date: 2026-02-10GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511400644.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2021-11-11
Filing Date
2022-11-11
Publication Date
2026-02-10
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

Existing video coding technologies contain unnecessary steps in the initialization process, resulting in low coding efficiency and latency in parallel processing. This is especially true in the HEVC and VVC specifications, where the existing strip and tile initialization, as well as the wavefront parallel processing initialization, are not optimized enough.

Method used

By eliminating unnecessary initialization steps, the initialization of context-adaptive binary arithmetic coding, Rice parameter variables, and palette predictor variables in video partitioning is performed only under specific conditions. A unified initialization scheme is adopted for all coding tree units that meet the conditions, simplifying the initialization process in parallel processing.

Benefits of technology

It improves encoding efficiency, reduces the complexity of video encoders and decoders, reduces resource consumption, reduces encoding latency, and optimizes latency in parallel processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121509682A_ABST
    Figure CN121509682A_ABST
Patent Text Reader

Abstract

In some embodiments, a video decoder decodes video from a bitstream. A video decoder accesses a binary string representing a partition of the video and processes each coding tree unit (CTU) in the partition to generate decoded values in the CTUs. The process includes initializing a context variable, a Rice parameter variable, and a palette predictor variable for context adaptive binary arithmetic coding (CABAC) only when the CTU is a first CTU in a tile, or the CTU is a first CTU in a slice, or parallel coding is enabled and the CTU is a first CTU in a CTU row of the tile. Other initializations are not performed on these variables. The video decoder decodes the CTU based on the initialized context variable, the Rice parameter variable, and the palette predictor variable.
Need to check novelty before this filing date? Find Prior Art

Description

Cross-references to related applications

[0001] This application claims priority to U.S. Provisional Patent Application No. 63 / 263,941, filed November 11, 2021, entitled “Initialization Process for Video Coding,” the entire contents of which are incorporated herein by reference. Technical Field

[0002] This disclosure generally relates to computer-implemented methods and systems for video processing. Specifically, this disclosure relates to initialization processes for video encoding. Background Technology

[0003] The ubiquitous presence of camera-enabled devices such as smartphones, tablets, and computers has made capturing video or images easier than ever before. However, even short videos can generate a very large amount of data. Video encoding technologies (including video encoding and video decoding) can compress video data to smaller sizes, enabling the storage and transmission of various types of video. Video encoding is widely used in applications such as digital television broadcasting, video transmission over the internet and mobile networks, real-time applications (e.g., video chat, video conferencing), DVDs, and Blu-ray discs. To reduce the storage space used to store video and / or the network bandwidth consumed for transmitting video, it is necessary to improve the efficiency of video encoding schemes. Summary of the Invention

[0004] Some embodiments relate to initialization processes for video encoding. In one example, a method for decoding video from a video bitstream includes: accessing a binary string representing a partition of the video, the partition comprising a plurality of CTUs forming one or more rows of coding tree units (CTUs); for each CTU in the partition, determining whether the CTU is the first CTU in a tile; and in response to determining that the CTU is the first CTU in a tile, initializing for context-adaptive binary arithmetic encoding according to a first context variable initialization procedure. The context variables of coding (CABAC) are initialized according to the first Rice parameter variable initialization process, and the palette predictor variable is initialized according to the first palette predictor initialization process; in response to determining that the CTU is not the first CTU in the tile, it is determined whether parallel coding is enabled and whether the CTU is the first CTU in the CTU row of the tile; in response to determining that parallel coding is enabled and the CTU is the first CTU in the CTU row of the tile, the availability flag of the upper neighbor block of the CTU is determined; in response to determining that the availability flag of the upper neighbor block of the CTU indicates that the upper neighbor block is available, the context variables are initialized according to the second context variable initialization process, the Rice parameter variables are initialized according to the second Rice parameter variable initialization process, and the palette predictor variable is initialized according to the second palette predictor initialization process; and in response to determining that the availability flag of the upper neighbor block of the CTU indicates that the upper neighbor block is unavailable, the context variables are initialized according to the first context variable initialization process, and the first Rice parameter variable is initialized according to the first Rice parameter variable initialization process. The initialization process initializes the Rice parameter variables and the palette predictor variables according to the first palette predictor initialization process; in response to determining that parallel coding is not enabled or that the CTU is not the first CTU in a row of CTUs in a tile, it determines whether the CTU is the first CTU in a strip and whether the strip is a dependent strip; in response to determining that the CTU is the first CTU in a strip and the strip is a dependent strip, it initializes the context variables according to the third context variable initialization process, initializes the Rice parameter variables according to the third Rice parameter variable initialization process, and initializes the palette predictor variables according to the third palette predictor initialization process; and in response to determining that the CTU is not the first CTU in a strip or the strip is not a dependent strip, it does not perform initialization on the context variables, Rice parameter variables, and palette predictor variables; and decodes the CTU, including: decoding the binary string corresponding to the CTU into coefficient values ​​of the CTU based on the Rice parameter variables and the context variables, and determining the pixel values ​​of the CTU from the coefficient values.

[0005] In another example, a method for decoding video from a video bitstream includes: accessing a binary string representing a partition of the video, the partition comprising a plurality of CTUs forming one or more CTU rows; for each CTU in the partition, initializing a Rice parameter variable to an initial value; determining whether the CTU is the first CTU in a stripe or tile; in response to determining that the CTU is the first CTU in a stripe or tile, initializing a context variable for CABAC according to a first context variable initialization procedure, and initializing a palette predictor variable according to a first palette predictor initialization procedure; in response to determining that the CTU is not the first CTU in a stripe or tile, determining whether parallel coding is enabled and whether the CTU is the first CTU in a tile's CTU row; in response to determining that parallel coding is enabled and the CTU is the first CTU in a tile's CTU row, determining C... The availability flag of the upper neighbor block of the CTU, in response to determining that the availability flag of the upper neighbor block of the CTU indicates that the upper neighbor block is available, initializes the context variable according to the second context variable initialization process and initializes the palette predictor variable according to the second palette predictor initialization process, and in response to determining that the availability flag of the upper neighbor block of the CTU indicates that the upper neighbor block is unavailable, initializes the context variable according to the first context variable initialization process and initializes the palette predictor variable according to the first palette predictor initialization process; in response to determining that parallel coding is not enabled or that the CTU is not the first CTU in the CTU row of tiles, does not perform initialization of the context variable and the palette predictor variable; and decodes the CTU, including: decoding the binary string corresponding to the CTU into the coefficient value of the CTU based on the Rice parameter variable and the context variable, and determining the pixel value of the CTU from the coefficient value.

[0006] In another example, a method for decoding video from a video bitstream includes: accessing a binary string representing a partition of the video, the partition including a plurality of CTUs forming one or more rows of CTUs; for each CTU in the partition, determining whether an initialization condition is satisfied, the initialization condition including (a) the CTU is the first CTU in a tile, or (b) the CTU is the first CTU in a stripe, or (c) parallel coding is enabled and the CTU is the first CTU in the row of CTUs in the tile; in response to determining that the initialization condition is satisfied, initializing a context variable for CABAC according to an initialization procedure for a context variable, initializing a Rice parameter variable according to an initialization procedure for a Rice parameter variable, and initializing a palette predictor variable according to an initialization procedure for a palette predictor entry; in response to determining that the initialization condition is not satisfied, not performing initialization on the context variable, the Rice parameter variable, and the palette predictor variable; and decoding the CTU, including: decoding the binary string corresponding to the CTU into coefficient values ​​of the CTU based on the Rice parameter variable and the context variable, and determining the pixel value of the CTU from the coefficient values.

[0007] In another example, a method for encoding video includes: accessing a partition of the video, the partition comprising a plurality of CTUs forming one or more rows of CTUs; processing the partition of the video to generate a binary representation of the partition, the processing including: for each CTU in the plurality of CTUs in the partition, determining whether the CTU is the first CTU in the tile; in response to determining that the CTU is the first CTU in the tile, initializing a context variable for CABAC according to a first context variable initialization procedure, initializing a Rice parameter variable according to a first Rice parameter variable initialization procedure, and initializing a palette predictor variable according to a first palette predictor initialization procedure; in response to determining that the CTU is not the first CTU in the tile, determining whether parallel coding is enabled and whether the CTU is the first CTU in the row of CTUs in the tile; in response to determining that parallel coding is enabled and the CTU is the first CTU in the row of CTUs in the tile, determining an availability flag for the upper neighbor block of the CTU; in response to determining that the availability flag for the upper neighbor block of the CTU indicates that the upper neighbor block is available, initializing a context variable according to a second context variable initialization procedure, initializing a Rice parameter variable according to a second Rice parameter variable initialization procedure, and initializing a palette predictor variable according to a second palette predictor. The initialization process initializes the palette predictor variables, and in response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is unavailable, initializes the context variables according to the first context variable initialization process, initializes the Rice parameter variables according to the first Rice parameter variable initialization process, and initializes the palette predictor variables according to the first palette predictor initialization process; in response to determining that parallel coding is not enabled or that the CTU is not the first CTU in a row of CTUs, determines whether the CTU is the first CTU in the stripe and whether the stripe is a dependent stripe, in response to determining that the CTU is the first CTU in the stripe and the stripe is a dependent stripe, initializes the context variables according to the third context variable initialization process, initializes the Rice parameter variables according to the third Rice parameter variable initialization process, and initializes the palette predictor variables according to the third palette predictor initialization process; in response to determining that the CTU is not the first CTU in the stripe or the stripe is not a dependent stripe, does not initialize the context variables, Rice parameter variables, and palette predictor variables; and encodes the CTU, including encoding the transform units in the CTU based on the Rice parameter variables and the context variables. The coefficient values ​​of unit (TU) are encoded into binary representation, and the binary representation of the division is encoded into a video stream.

[0008] In another example, a method for encoding video includes: accessing a partition of the video, the partition comprising a plurality of CTUs forming one or more rows of CTUs; processing the partition of the video to generate a binary representation of the partition, the processing including: for each CTU in the plurality of CTUs in the partition, initializing a Rice parameter variable to an initial value; determining whether the CTU is the first CTU in a stripe or tile; in response to determining that the CTU is the first CTU in a stripe or tile, initializing a context variable for CABAC according to a first context variable initialization procedure, and initializing a palette predictor variable according to a first palette predictor initialization procedure; in response to determining that the CTU is not the first CTU in a stripe or tile, determining whether parallel coding is enabled and whether the CTU is the first CTU in a row of CTUs in a tile; in response to determining that parallel coding is enabled and the CTU is the first CTU in a row of CTUs in a tile... The TU determines the availability flag of the upper neighboring block of the CTU. In response to determining that the upper neighboring block of the CTU is available, the context variable is initialized according to the second context variable initialization procedure, and the palette predictor variable is initialized according to the second palette predictor initialization procedure. In response to determining that the upper neighboring block of the CTU is unavailable, the context variable is initialized according to the first context variable initialization procedure, and the palette predictor variable is initialized according to the first palette predictor initialization procedure. In response to determining that parallel coding is not enabled or that the CTU is not the first CTU in a row of CTUs with tiles, the context variable and the palette predictor variable are not initialized. The CTU is encoded, including encoding the coefficient values ​​of the TU in the CTU into a binary representation based on the Rice parameter variable and the context variable, and encoding the partitioned binary representation into a video bitstream.

[0009] In another example, a method for encoding video includes: accessing a partition of video, the partition comprising multiple CTUs forming one or more rows of CTUs; processing the partition of video to generate a binary representation of the partition, the processing including: for each CTU in the partition, determining whether an initialization condition is satisfied, the initialization condition including (a) the CTU is the first CTU in a tile, or (b) the CTU is the first CTU in a stripe, or (c) parallel coding is enabled and the CTU is the first CTU in the row of CTUs in the tile; in response to determining that the initialization condition is satisfied, initializing context variables for CABAC according to an initialization procedure for context variables, initializing Rice parameter variables according to an initialization procedure for Rice parameter variables, and initializing palette predictor variables according to an initialization procedure for palette predictor entries; in response to determining that the initialization condition is not satisfied, not performing initialization on the context variables, Rice parameter variables, and palette predictor variables; and encoding the CTUs, including encoding the coefficient values ​​of the TUs in the CTUs into a binary representation based on the Rice parameter variables and the context variables, and encoding the binary representation of the partition into a bitstream of video.

[0010] These illustrative embodiments are mentioned not to limit or define this disclosure, but to provide examples to aid in understanding it. Other embodiments are discussed in the detailed description and further description is provided. Attached Figure Description

[0011] The features, embodiments, and advantages of this disclosure can be better understood by referring to the accompanying drawings and reading the detailed description below.

[0012] Figure 1 This is a block diagram illustrating an example of a video encoder used to implement the embodiments presented herein.

[0013] Figure 2 This is a block diagram illustrating an example of a video decoder used to implement the embodiments presented herein.

[0014] Figure 3 Examples of encoding tree unit partitioning of images in a video according to some embodiments of the present disclosure are provided.

[0015] Figure 4 Examples of coding unit partitioning of coding tree units according to some embodiments of the present disclosure are described.

[0016] Figure 5 An example of a tile with wavefront parallel processing enabled.

[0017] Figure 6 Examples of a process for encoding the segmentation of video according to some embodiments of the present disclosure are described.

[0018] Figure 7 Examples of a process for decoding a segment of video according to some embodiments of the present disclosure are described.

[0019] Figure 8 Another example depicting a process for encoding the segmentation of video according to some embodiments of the present disclosure.

[0020] Figure 9 Another example depicting a process for decoding the segmentation of video according to some embodiments of the present disclosure.

[0021] Figure 10 Another example depicting a process for encoding the segmentation of video according to some embodiments of the present disclosure.

[0022] Figure 11 Another example depicting a process for decoding the segmentation of video according to some embodiments of the present disclosure.

[0023] Figure 12 Examples of computing systems that can be used to implement some embodiments of this disclosure are described. Detailed Implementation

[0024] Various embodiments provide initialization processes for video encoding. As mentioned above, an increasing amount of video data is being generated, stored, and transmitted. Improving the efficiency of video encoding techniques, thereby representing video with less data without compromising the visual quality of the decoded video, is beneficial. One way to improve encoding efficiency is through entropy coding, which compresses processed video samples into a binary bitstream using as few bits as possible. On the other hand, because videos typically contain a large amount of data, reducing processing time during encoding (encoding and decoding) is beneficial. For this purpose, parallel processing can be employed in video encoding and decoding.

[0025] In entropy coding, video samples are binarized into binary bins, and coding algorithms such as CABAC can further compress these bins into bits. Binarization requires the computation of binarization parameters, such as the Rice parameter used in the combination of truncated Rice (TR) binarization and finite k-th order exponential Golomb (EGk) binarization processes specified in the Versatile Video Coding (VVC) specification, or the Rice parameter used in Golomb-Rice codes specified in the High Efficiency Video Coding (HEVC) specification.

[0026] For computer-generated content with large amounts of text and simple graphics, palette-based coding can provide higher compression efficiency than conventional block-based residual prediction and transform coding. Palette-based coding involves encoding the palette and the palette index for each spatial location covered by the coding unit.

[0027] Various variables involved in at least the aforementioned parts of video coding, such as entropy coding variables, palette prediction variables, and parallel processing variables, need to be initialized for encoding. However, due to the relationships between CTUs in the video (e.g., the current CTU is related to the previous CTU because the current CTU is spatially adjacent to it), inappropriate initialization can degrade coding efficiency. For example, the existing slice and tile initialization and wavefront parallel processing (WPP) initialization in the HEVC and VVC specifications may not be optimal due to unnecessary initialization steps. Furthermore, existing parallel processing initialization can cause a delay of one or two CTUs when parallel processing is enabled in VVC and HEVC respectively. This delay slows down the video coding process.

[0028] The various embodiments described herein address these problems by omitting unnecessary initialization operations during partitioning, thereby simplifying the encoding process and improving encoding efficiency. Furthermore, appropriate initialization procedures can eliminate initialization delays in parallel processing, thus accelerating video processing with minimal reduction in encoding efficiency. Non-limiting examples are provided below to illustrate some embodiments.

[0029] In one embodiment, unnecessary initialization steps in existing HEVC and VVC are omitted. For example, the initialization of context variables, rice parameter variables, and palette predictor variables for the CTU in video partitioning for context-adaptive binary arithmetic coding (CABAC) is performed only under specific conditions. For CTUs under other conditions, the initialization of these variables is omitted. Therefore, encoding efficiency can be improved, the complexity of the video encoder and decoder can be reduced, and various resource consumptions involved in the encoding process, such as CPU time and memory usage, can also be reduced.

[0030] In another embodiment, the initialization of the CTU's context variables for CABAC, Rice parameter variables, and palette predictor variables is further simplified by applying the same initialization scheme to all CTUs that meet the initialization conditions. For example, in this embodiment, when WPP is enabled, for the first CTU in each CTU row, before encoding the current image, all dependent variables between CTUs (e.g., context variables for CABAC, palette prediction variables, and variables for Rice parameter derivation, etc.) are reset to their respective initial values. Therefore, the encoding of CTU rows does not depend on previous CTU rows, and multiple CTU rows can be processed in parallel using WPP without latency. Thus, in addition to the advantages of reducing the complexity of the video encoder and decoder and reducing resource consumption, this embodiment also reduces encoding latency in parallel processing. The techniques proposed in this paper can serve as effective encoding tools in video coding standards.

[0031] Now refer to the attached diagram, Figure 1 This is a block diagram illustrating an example of a video encoder 100 used to implement the embodiments presented herein. Figure 1 In the example shown, the video encoder 100 includes a partitioning module 112, a transform module 114, a quantization module 115, an inverse quantization module 118, an inverse transform module 119, a loop filter module 120, an intra-frame prediction module 126, an inter-frame prediction module 124, a motion estimation module 122, a decoded image buffer 130, and an entropy coding module 116.

[0032] The input to the video encoder 100 is an input video 102 containing a sequence of images (also referred to as frames or pictures). In a block-based video encoder, for each image, the video encoder 100 uses a partitioning module 112 to divide the image into blocks 104, and each block contains multiple pixels. These blocks can be macroblocks, coding tree units, coding units, prediction units, and / or prediction blocks. An image can include blocks of different sizes, and the block partitioning can also be different for different images of the video. Each block can be encoded using different prediction methods (such as intra-frame prediction, inter-frame prediction, or a mixture of intra-frame and inter-frame prediction).

[0033] Typically, the first frame of a video signal is an intra-predicted frame, and only intra-prediction is used to encode this frame. In intra-prediction mode, only data from the same frame is used to predict blocks of the image. Intra-predicted frames can be decoded without information from other frames. To perform intra-prediction, Figure 1The video encoder 100 shown may employ an intra-prediction module 126. The intra-prediction module 126 generates an intra-prediction block (prediction block 134) using reconstructed samples from reconstructed blocks 136 of adjacent blocks in the same image. Intra-prediction is performed according to the intra-prediction mode selected for the block. The video encoder 100 then calculates the difference between block 104 and intra-prediction block 134. This difference is referred to as residual block 106.

[0034] To further remove redundancy from the block, transform module 114 transforms the residual block 106 into the transform domain by applying a transform to the samples in the block. Examples of transforms may include, but are not limited to, discrete cosine transform (DCT) or discrete sine transform (DST). The transform values ​​may be referred to as transform coefficients, representing the residual block in the transform domain. In some examples, the residual block may be quantized directly without transforming it through transform module 114. This is called transform skip mode.

[0035] The video encoder 100 can further quantize the transform coefficients using the quantization module 115 to obtain quantized coefficients. Quantization involves dividing the sample by the quantization step size and then rounding, while inverse quantization involves multiplying the quantized value by the quantization step size. This quantization process is called scalar quantization. Quantization is used to reduce the dynamic range of (transformed or untransformed) video samples so that fewer bits are used to represent the video samples.

[0036] Intra-block coefficient / sample quantization can be performed independently, and this quantization method is used in some existing video compression standards such as H.264 and HEVC. For an N×M block, the 2D coefficients of the block can be converted into a 1-D array using a specific scan order for coefficient quantization and encoding. Intra-block coefficient quantization can utilize scan order information. For example, the quantization of a given coefficient in the block can depend on the state of previous quantization values ​​along the scan order. To further improve coding efficiency, more than one quantizer can be used. Which quantizer is used to quantize the current coefficient depends on information about coefficients earlier in the encoding / decoding scan order. This quantization method is called correlated quantization.

[0037] The degree of quantization can be adjusted using the quantization step size. For example, for scalar quantization, different quantization step sizes can be applied to achieve finer or coarser quantization. Smaller quantization step sizes correspond to finer quantization, while larger quantization step sizes correspond to coarser quantization. The quantization step size can be indicated by the quantization parameter (QP). Providing the quantization parameter in the encoded bitstream of the video allows the video decoder to apply the same quantization parameter for decoding.

[0038] The entropy coding module 116 then encodes the quantized samples to further reduce the size of the video signal. The entropy coding module 116 applies an entropy coding algorithm to the quantized samples. In some examples, the quantized samples are binarized into binary bins, and the coding algorithm further compresses the binary bins into bits. Examples of binarization methods include, but are not limited to, truncated Rice (TR) binarization and k-th order Ep-Golomb (EGk) binarization. To improve coding efficiency, a history-based Rice parameter derivation is used, where the Rice parameters for the TU are derived based on variables obtained from or updated from previous TUs. Examples of entropy coding algorithms include, but are not limited to, variable-length coding (VLC) schemes, context-adaptive VLC schemes (CAVLC), arithmetic coding schemes, binarization, CABAC, syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or other entropy coding techniques. Add the entropy-encoded data to the bitstream of the output encoded video 132.

[0039] As described above, reconstructed blocks 136 from neighboring blocks are used in intra-frame prediction of blocks of an image. Generating reconstructed blocks 136 involves calculating the reconstruction residuals of that block. The reconstruction residuals can be determined by applying inverse quantization and inverse transform to the quantization residuals of the blocks. Inverse quantization module 118 is used to apply inverse quantization to quantized samples to obtain dequantization coefficients. Inverse quantization module 118 applies the inverse scheme of the quantization scheme applied by quantization module 115 using the same quantization step size as quantization module 115. Inverse transform module 119 is used to apply the inverse transform of the transform applied by transform module 114, such as inverse DCT or inverse DST, to dequantized samples. The output of inverse transform module 119 is the reconstruction residuals of the blocks in the pixel domain. The reconstruction residuals can be added to the predicted blocks 134 of the blocks to obtain reconstructed blocks 136 in the pixel domain. For blocks that skip the transform, inverse transform module 119 is not applied to those blocks. The dequantized samples are the reconstruction residuals of the blocks.

[0040] Blocks in subsequent images following the first intra-predicted image can be encoded using either inter-frame prediction or intra-frame prediction. In inter-frame prediction, the prediction of blocks in an image comes from one or more previously encoded video images. To perform inter-frame prediction, the video encoder 100 uses an inter-frame prediction module 124. The inter-frame prediction module 124 is used to perform motion compensation for blocks based on motion estimates provided by the motion estimation module 122.

[0041] The motion estimation module 122 compares the current block 104 of the current image with the decoded reference image 108 to perform motion estimation. The decoded reference image 108 is stored in the decoded image buffer 130. The motion estimation module 122 selects the reference block from the decoded reference image 108 that best matches the current block. The motion estimation module 122 further identifies the offset between the position of the reference block (e.g., x, y coordinates) and the position of the current block. This offset is called a motion vector (MV) and is provided to the inter-frame prediction module 124. In some cases, multiple reference blocks are identified for the block in multiple decoded reference images 108. Therefore, multiple motion vectors are generated and provided to the inter-frame prediction module 124.

[0042] Inter-frame prediction module 124 uses motion vectors and other inter-frame prediction parameters to perform motion compensation to generate a prediction for the current block (i.e., inter-frame prediction block 134). For example, based on motion vectors, inter-frame prediction module 124 can locate the prediction block pointed to by the motion vector in the corresponding reference image. If there are more than one prediction block, these prediction blocks are combined with some weights to generate the prediction block 134 for the current block.

[0043] For an inter-frame prediction block, the video encoder 100 can subtract the inter-frame prediction block 134 from block 104 to generate a residual block 106. The residual block 106 can be transformed, quantized, and entropy-coded in the same manner as the residuals of the intra-frame prediction blocks discussed above. Similarly, the reconstructed block 136 of the inter-frame prediction block can be obtained by inverse quantizing and inverse transforming the residual and then combining it with the corresponding prediction block 134.

[0044] To acquire the decoded image 108 for motion estimation, the loop filter module 120 processes the reconstructed block 136. The loop filter module 120 smooths pixel transitions, thereby improving video quality. The loop filter module 120 can be used to implement one or more loop filters, such as a de-blocking filter, a sample-adaptive offset (SAO) filter, or an adaptive loop filter (ALF), etc.

[0045] Figure 2 An example of a video decoder 200 for implementing the embodiments presented herein is depicted. The video decoder 200 processes the encoded video 202 in the bitstream and generates a decoded image 208. Figure 2 In the example shown, the video decoder 200 includes an entropy decoding module 216, an inverse quantization module 218, an inverse transform module 219, a loop filter module 220, an intra-frame prediction module 226, an inter-frame prediction module 224, and a decoded image buffer 230.

[0046] Entropy decoding module 216 performs entropy decoding of the encoded video 202. Entropy decoding module 216 decodes quantization coefficients, encoding parameters including intra-frame prediction parameters and inter-frame prediction parameters, and other information. In some examples, entropy decoding module 216 decodes the bitstream of encoded video 202 into a binary representation, and then converts the binary representation into quantization levels of coefficients. The entropy-decoded coefficients are then dequantized by dequantization module 218, and subsequently inversely transformed to the pixel domain by inverse transform module 219. The functions of dequantization module 218 and inverse transform module 219 are as described above. Figure 1 The described inverse quantization module 118 is similar to the inverse transform module 119. The residual block from the inverse transform can be added to the corresponding prediction block 234 to generate the reconstruction block 236. For blocks that skip the transform, the inverse transform module 219 is not applied to those blocks. The dequantized samples generated by the inverse quantization module 118 are used to generate the reconstruction block 236.

[0047] A prediction block 234 is generated based on the prediction mode of a specific block. If the encoding parameters of the block indicate that the block is intra-frame predicted, the reconstructed block 236 of the reference block in the same image can be fed back to the intra-frame prediction module 226 to generate the prediction block 234. If the encoding parameters of the block indicate that the block is inter-frame predicted, the inter-frame prediction module 224 generates the prediction block 234. The functions of the intra-frame prediction module 226 and the inter-frame prediction module 224 are respectively... Figure 1 The intra-frame prediction module 126 and the inter-frame prediction module 124 are similar.

[0048] As referenced above Figure 1 The inter-frame prediction discussed involves one or more reference images. The video decoder 200 generates a decoded image 208 of the reference images by applying a loop filter module 220 to the reconstructed blocks of the reference images. The decoded image 208 is stored in a decoded image buffer 230 for use by the inter-frame prediction module 224 and also for output.

[0049] Now for reference Figure 3 , Figure 3 Examples of coding tree unit partitioning of images in a video according to some embodiments of the present disclosure are described. (Refer to the above text.) Figure 1 and Figure 2 The discussion focuses on dividing images into blocks for encoding video images, for example, such as... Figure 3 The CTU 302 in the VVC shown. For example, CTU 302 can be a 128×128 pixel block. According to, for example... Figure 3 The order shown indicates the processing of CTU. In some examples, such as... Figure 4 As shown, each CTU 302 in the image can be divided into one or more coding units (CUs) 402, which can be further divided into prediction units for prediction or transformation units for transformation. Depending on the coding scheme, the CTU 302 can be divided into CUs 402 differently. For example, in VVC, the CU 402 can be rectangular or square, and the CUs can be encoded without further division into prediction units or transformation units. Each CU 402 can be as large as the root CTU 302 of that CU, or as small as a 4×4 block subdivision of the root CTU 302. Figure 4 As shown, the partitioning from CTU 302 to CU 402 in VVC can be a quadtree partition, a binary tree partition, or a ternary tree partition. Figure 4 In the diagram, solid lines represent quadtree partitions, while dashed lines represent binary or ternary tree partitions.

[0050] Initialization processing

[0051] Initialization is a crucial step in video coding. In existing HEVC specifications (ITU-T, “High Efficiency Video Coding”, November 2019) and VVC specifications (ISO / IEC 23090-3:2021 Information technology—Coded representation of immersive media—Part 3: Versatile video coding and Recommendation ITU-T H.266(08 / 2020): Versatile Video coding), multiple variables are initialized for encoding. For example, initial values ​​are used to derive two context variables, ctxTable and ctxIdx, for CABAC in HEVC. In VVC, initializing ctxTable and ctxIdx is used to derive two context variables, pStateIdx0 and pStateIdx1. Context variables are used to derive multiple variables for compressing bins in CABAC. In HEVC, when Rice parameter adaptation is enabled, the initial value of the variable StatCoeff[k] is initialized to 0, where k is in the range of 0 to 3. Similarly, when history-based Rice parameter derivation is enabled in VVC, the initial value of the variable StatCoeff[idx] is initialized, where idx represents the luminance component and the two chrominance components. Furthermore, when palette prediction is enabled in HEVC and VVC, two palette prediction-related variables, PredictorPaletteSize and PredictorPaletteEntries, also need to be initialized.

[0052] Residual coding

[0053] In video coding, residual coding is used to convert quantization levels into a bitstream. After quantization, an n×MTU coded block has N×M quantization levels. These N×M levels can be zero or non-zero values. If a non-zero level is not binary, it is further binarized into a binary bin. CABAC can further compress the bin into bits. Furthermore, there are two context-based coding methods. Specifically, one of these methods adaptively updates the context model based on adjacent coding information. This method is called context coding, and bins encoded in this way are called context-coded bins. In contrast, the other method assumes that the probability of 1 or 0 is always 50%, and therefore always uses a fixed context model without adjustment. This method is called the bypass method, and bins encoded using this method are called bypass bins.

[0054] For regular residual coding (RRC) blocks in VVC, the position of the last non-zero level is defined as the position of the last non-zero level along the coding scan order. The representation of the 2D coordinates of the last non-zero level (last_sig_coeff_x and last_sig_coeff_y) includes a total of four prefix and suffix syntax elements: last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. First, the syntax elements last_sig_coeff_x_prefix and last_sig_coeff_y_prefix are encoded using a contextual encoding method. If `last_sig_coeff_x_suffix` and `last_sig_coeff_y_suffix` exist, they are encoded using a bypass method. An RRC block can consist of multiple predefined sub-blocks. The syntax element `sb_coded_flag` indicates whether all levels of the current sub-block are equal to zero. If `sb_coded_flag` equals 1, there is at least one non-zero coefficient in the current sub-block. If `sb_coded_flag` equals 0, all coefficients in the current sub-block will be zero. However, the `sb_coded_flag` of the last non-zero sub-block with the last non-zero level is deduced to 1 from `last_sig_coeff_x` and `last_sig_coeff_y` according to the encoding scan order, and is not encoded into the bitstream. Furthermore, the `sb_coded_flag` of the top-left sub-block containing the DC position is also deduced to 1 and is not encoded into the bitstream. The syntax elements of sb_coded_flag in the bitstream are encoded using the context encoding method. RRC will start from the last non-zero sub-block and encode sub-blocks one by one in reverse encoding scan order.

[0055] For blocks encoded in Transform Skip Residual Coding (TSRC) mode, TSRC encodes each sub-block sequentially, starting from the top-left sub-block and proceeding in the coding scan order. Similarly, the syntax element `sb_coded_flag` indicates whether all residuals in the current sub-block are equal to zero. When a specific condition occurs, all syntax elements `sb_coded_flag` in all sub-blocks except the last sub-block are encoded into the bitstream. If all `sb_coded_flag`s in all sub-blocks before the last sub-block are not equal to 1, then the `sb_coded_flag` of the last sub-block is deduced to be 1 and this flag is not encoded into the bitstream. To guarantee worst-case throughput, a predefined value `RemCcbs` is used to limit the maximum context coding bin. If the current sub-block has a non-zero level, TSRC encodes the level at each position in the coding scan order. If `RemCcbs` is greater than 4, the following syntax elements are encoded using the context coding method. For each level, `sig_coeff_flag` is first encoded into the bitstream to indicate whether the level is zero or non-zero. If the level is non-zero, `coeff_sign_flag` is encoded to indicate whether the level is positive or negative. Then, `abs_level_gtx_flag[n][0]` is encoded to indicate whether the current absolute level at the current position is greater than 1, where `n` is the index of the current position within the sub-block along the scan order. If `abs_level_gtx_flag[n][0]` is not zero, `par_level_flag` is encoded. After encoding each of the above syntax elements using the context encoding method, the value of `RemCcbs` is decremented by 1.

[0056] After encoding the aforementioned syntax elements at all positions within the current sub-block, if RemCcbs is still greater than 4, then at most four additional abs_level_gtx_flag[n][j] will be encoded using the context encoding method, where n is the index of the current position within the sub-block along the scan order; j is 1 to 4. The value of RemCcbs is decremented by 1 after encoding each abs_level_gtx_flag[n][j]. If RemCcbs is not greater than 4, then the syntax element abs_remainder at the current position within the sub-block will be encoded using the bypass method if necessary. For positions where the absolute level is fully encoded using the abs_remainder syntax element via the bypass method, coeff_sign_flags will also be encoded via the bypass method. In summary, a predefined counter remBinsPass1 exists in the RRC or a predefined counter RemCcbs exists in the TSRC to limit the total number of context-encoded bins and ensure worst-case throughput.

[0057] Rice parameter derivation

[0058] In the current RRC design in VVC, for the remaining level, the bitstream can contain two syntax elements, abs_remainder and dec_abs_level, encoded as bypass bins. Both abs_remainder and dec_abs_level are binarized using a combination of TR binarization and finite k-order EGk binarization processes specified in the VVC specification. This requires the Rice parameter to binarize the given level. To obtain the optimal Rice parameter, a local summation method is used, as described below.

[0059] The array AbsLevel[xC][yC] represents an array of absolute values ​​of the transform coefficient levels of the current transform block at color component index cIdx. Given the array AbsLevel[x][y] of the transform block, where the color component index is cIdx and the top-left luminance position is (x0, y0), derive the local sum variable locSumAbs according to the following pseudocode procedure: Where log2TbWidth is the base-2 logarithm of the transform block width, and log2TbHeight is the base-2 logarithm of the transform block height. For abs_remainder and dec_abs_level, the variable baseLevel is 4 and 0, respectively. Given the local sum and variable locSumAbs, as specified in Table 1, derive the Rice parameter cRiceParam. Table 1—cRiceParam Specification Based on locSumAbs locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3

[0060] Rice parameter derivation based on history

[0061] If coefficients are located on the boundaries of the TU or are being decoded for the first time using the Rice method, the template calculation used for Rice parameter derivation may produce inaccurate coefficient estimates. This is because some template locations may be outside the TU and interpreted or initialized to a value of 0, thus biasing the template calculation towards 0 for these coefficients. To improve the accuracy of estimating Rice from the calculated templates, for template locations outside the current TU, the local sum variable locSumAbs is updated with historical derivation values ​​instead of being initialized to 0. The implementation of this method is illustrated in the VVC specification text excerpt below, Section 9.3.3.2.

[0062] To maintain the history of adjacent coefficients / sample values, a history counter StatCoeff[cIdx] is used for each color component, where cIdx = 0, 1, and 2 represent the three color components Y, U, and V, respectively. If the CTU is the first CTU in a partition (e.g., image, strip, or tile), StatCoeff[cIdx] is initialized as follows: StatCoeff[idx]=2*Floor(Log2(BitDepth-10) (1) Here, BitDepth specifies the bit depth of the samples in the video's luminance and chrominance arrays; Floor(x) represents the largest integer less than or equal to x, and Log2(x) is the base-2 logarithm of x. Before decoding the TU and updating the history counter, the replacement variable HistValue is initialized to: HistValue[cIdx] = 1 <StatCoeff[cIdx] (2) The replacement variable HistValue is used as an estimate of neighboring samples outside the TU boundary (e.g., neighboring samples have horizontal or vertical coordinates outside the TU). The local variables locSumAbs are re-derived according to the following pseudocode procedure, with changes marked underlined:

[0063] The history counter StatCoeff is updated once per unit (TU) using an exponential moving average process from the first non-zero Columbus-Rice encoded transform coefficient (abs_remaintment[cIdx] or dec_abs_level[cIdx]). When the first non-zero Columbus-Rice encoded transform coefficient in the TU is encoded as abs_remainder, the history counter StatCoeff for the color component cIdx is updated as follows: StatCoeff[cIdx]=(StatCoeff[cIdx]+Floor(Log2(abs_remainder[cIdx]))+2)>>1 (3) When the first non-zero Columbus-Rice coded transform coefficient in the TU is encoded as dec_abs_level, the history counter StatCoeff for the color component cIdx is updated as follows: StatCoeff[cIdx]=(StatCoeff[cIdx]+Floor(Log2(dec_abs_level[cIdx])))>>1 (4) Before decoding the next TU, the replacement variable HistValue of the next TU can be calculated using the updated StatCoeff according to equation (2).

[0064] In HEVC, the Rice parameter is also used to binarize the residual absolute value of the transform coefficient level encoded in Golomb-Rice code at scan position n (denoted as coeff_abs_level_remaining[n]). Given the syntax element coeff_abs_level_remaining[n], the current subblock scan index i, baseLevel, color component cIdx, and the brightness position (x0, y0) of the upper-left sample of the current brightness transform block relative to the upper-left brightness sample of the image, the syntax element can be binarized as specified in Section 9.3.3.11 of the HEVC specification. Depending on the value of persistent_rice_adaptation_enabled_flag, the following applies: - If persistent_rice_adaptation_enabled_flag equals 0, then set the variable initRiceValue to equal 0. - Otherwise (if persistent_rice_adaptation_enabled_flag equals 1), the following applies: The derivation of the variable sbType is as follows: If transform_skip_flag[x0][y0][cIdx] equals 0 and cu_transquant_bypass_flag equals 0, then apply. the following: sbType=2*(cIdx==0?1:0) (9-20) Otherwise, the following applies: sbType=2*(cIdx==0?1:0)+1(9-21) The derivation of the variable initRiceValue is as follows: initRiceValue=StatCoeff[sbType] / 4 (9-22) - If this procedure is called for the first time for scanning index i of the current sub-block, StatCoeff[sbType] is modified as follows: if(coeff_abs_level_remaining[n]>=(3<<(StatCoeff[sbType] / 4)))StatCoeff[sbType]++ else if(2*coeff_abs_level_remaining[n]<(1<<(StatCoeff[sbType] / 4))&& StatCoeff[sbType]>0) StatCoeff[sbType] -- (9-23) The derivation of variables cLastAbsLevel and cLastRiceParam is as follows: - If this procedure is called for the first time for scanning index i of the current sub-block, then cLastAbsLevel is set to equal to 0, and cLastRiceParam is set to equal to initRiceValue. - Otherwise (if this procedure is not called for the first time for the current subblock scan index i), set cLastAbsLevel and cLastRiceParam to the values ​​of cAbsLevel and cRiceParam, respectively, which were deduced during the last call to the binarization procedure for the syntax element coeff_abs_level_remaining[n] as specified in this clause. The variable cAbsLevel is set to equal baseLevel + coeff_abs_level_remaining[n]. The variable cRiceParam is derived from cLastAbsLevel and cLastRiceParam as follows: - If persistent_rice_adaptation_enabled_flag is equal to 0, the following applies: cRiceParam = Min(cLastRiceParam + (cLastAbsLevel > (3 * (1 << cLastRiceParam))? 1 : 0), 4) (9 - 24) - Otherwise (persistent_rice_adaptation_enabled_flag is equal to 1), the following applies: cRiceParam = cLastRiceParam + (cLastAbsLevel > (3 * (1 << cLastRiceParam))? 1 : 0) (9 - 25) The variable cMax is derived from cRiceParam as: cMax = 4 << cRiceParam (9 - 26) The binarization of the syntax element coeff_abs_level_remaining[n] is the concatenation of a prefix bin string and a suffix bin string (if it exists). For the derivation of the prefix bin string, the following applies: - The prefix value prefixVal of coeff_abs_level_remaining[n] is derived as follows: prefixVal = Min(cMax, coeff_abs_level_remaining[n]) (9 - 27) - The prefix bin string is specified by calling the TR binarization process for prefixVal as specified in Section 9.3.3.2, with the variables cMax and cRiceParam as inputs. When the prefix bin string is equal to a bit string of length 4 and all bits are equal to 1, there is a suffix bin string and it is derived as follows: - The suffix value suffixVal of coeff_abs_level_remaining[n] is derived as follows: suffixVal = coeff_abs_level_remaining[n] - cMax (9 - 28) - If extended_precision_processing_flag equals 0, the suffix bin string is specified by calling the k-order EGk binarization process for binarization of suffixVal as specified in section 9.3.3.3, where the order k of Exp-Golomb is set to equal to cRiceParam+1. - Otherwise (extended_precision_processing_flag equals 1), the suffix bin string is specified by calling the finite k-order EGk binarization process for binarization of suffixVal as specified in Section 9.3.3.4, where the variable riceParam is set to equal cRiceParam+1 and the color component cIdx.

[0065] Palette mode encoding

[0066] For computer-generated content with large amounts of text and simple graphics, Palette Mode offers higher compression efficiency than conventional block-based residual prediction and transform coding. The Palette Mode coding path begins with HEVC and VVC coding units and employs an entropy coding engine within a hybrid video coding architecture. Palette Mode in the HEVC SCC extension supports coding units of 32×32 and smaller and consists of two parts: the encoding of a list representing different samples (i.e., the palette), and the encoding of the palette index for each spatial location covered by the coding unit. Palette entries include an index in the palette and the corresponding sample, where the sample is a triplet in a non-monochrome video format.

[0067] In a palette-based coding unit, each coding unit uses its own palette, and signaling includes prediction due to the high correlation between palettes in adjacent regions. The predictor stores palette information for used palettes and constructs the current coding unit's palette either using flags indicating the reuse of predictor entries, or by adding new samples to the palette when a sample is not in the predictor's list. In the latter case, the predictor is then updated with the palette, followed by updates to unused elements until the predictor reaches its maximum size. The maximum palette size is 64, and the maximum predictor size in the HEVC SCC extension is 128, where smaller values ​​are possible via signaling within the SPS. However, in VVC, the maximum sizes of the palette and predictor cannot be adjusted.

[0068] After the palette construction is complete, the spatial locations covered by the coding units are encoded using either horizontal or vertical scan patterns. For each scan location, the encoder uses run-length coding to write the palette index into the bitstream. This run-length coding has two types of classifications: copy index and copyabove. Copy index means that the index of the palette entry is directly written into the bitstream. On the other hand, for the copyabove mode, the index is the same as the index of the upper row (or left column) of the horizontal (or vertical) scan pattern. For the residual coding stage in VVC, the encoding of samples occurs in multiple scan passes. The first coding pass uses the copy index type to write the index of the scan location into the bitstream. The second coding pass includes a context coding bin representing type and run-length information. Finally, the third scan pass specifies the sample at the scan location where the index is equal to the escape entry. The first and third scan passes use bypass mode only for the corresponding syntax elements, while the second coding pass uses the context model for entropy coding.

[0069] Wavefront Parallel Processing (WPP)

[0070] WPP is designed to provide a parallel coding mechanism. When WPP is enabled in VVC, each CTU line of a frame, tile, or stripe constitutes a separate partition. WPP is enabled / disabled via the SPS element `sps_entropy_coding_sync_enabled_flag`. Figure 5 An example of a tile with WPP enabled is shown. Figure 5 In WPP, each CTU line of a tile is processed with a delay of one CTU relative to its preceding CTU line. In this way, if palette coding is enabled at the end of each CTU line, the dependencies between consecutive CTU lines are not broken at the partition boundaries, except for the CABAC context variables and the palette predictor. To mitigate the potential loss of coding efficiency, the adaptive CABAC context variables and the contents of the palette predictor propagate from the first encoded CTU of the previous CTU line to the first CTU of the current CTU line. WPP does not change the regular raster scan order of the CTUs. Similarly, WPP is also used in HEVC. In HEVC, there is not a one-CTU delay between adjacent CTU lines, but a two-CTU delay.

[0071] When WPP is enabled, a special initialization process is used in both HEVC and VVC so that CTU rows can be processed independently. With WPP enabled, up to the number of CTU rows in the image can run in parallel to process individual CTU rows. By using WPP in the decoder, each decoding thread processes a single CTU row of the image. The scheduling of thread processing must be organized so that for each CTU, the decoding of its uppermost adjacent CTU in the previous CTU row must have been completed. WPP adds additional overhead so that after encoding the first CTU in each CTU row (except the last CTU row), all CABAC context variables and the contents of the palette predictor can be stored.

[0072] As discussed above, the existing stripe and tile initialization and parallel processing initialization in the HEVC and VVC specifications may not be optimal due to unnecessary initialization steps. In some embodiments, omitting these unnecessary initialization steps improves encoding efficiency, reduces the complexity of the video encoder and decoder, and reduces various resource consumptions involved in the encoding process, such as CPU time and memory usage.

[0073] The initialization rules in the HEVC specification are as follows. The context variables for initializing the arithmetic decoding engine, the initialization state of the Rice parameter, and the palette predictor variables are as follows: - If the CTU is the first CTU in the tile, the following applies: - Call the context variable initialization procedure as specified in Clause 9.3.2.2. - Set the variable StatCoeff[k] to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in Section 9.3.2.3. - Otherwise, if entropy_coding_sync_enabled_flag equals 1, and either CtbAddrInRs%PicWidthInCtbsY equals 0, If TileId[CtbAddrInTs] is not equal to TileId[CtbAddrRsToTs[CtbAddrInRs-1]], then the following applies: - Derive the spatially adjacent block T (in the original text) using the position (x0, y0) of the top-left luminance sample of the current CTB. Figure 9-2 The position (xNbT, yNbT) of the top-left brightness sample is shown below: (xNbT,yNbT)=(x0+CtbSizeY,y0-CtbSizeY) (9-3) - Call the availability derivation procedure for the block in the z-scan order specified in Section 6.4.1, taking the position (xCurr, yCurr) set to equal to (x0, y0) and the adjacent position (xNbY, yNbY) set to equal to (xNbT, yNbT) as input, and assign the output to availableFlagT. The synchronization process for calling context variables, initializing the Rice parameter, and synchronizing the palette predictor variables is as follows: - If availableFlagT equals 1, then the synchronization procedures for the context variables, Rice parameter initialization state, and palette predictor variables as specified in Section 9.3.2.5 are invoked, with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as inputs. -Otherwise, the following applies: - Call the context variable initialization procedure as specified in Clause 9.3.2.2. - Set the variable StatCoeff[k] to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in Section 9.3.2.3. Otherwise, if CtbAddrInRs equals slice_segment_address and dependent_slice_segment_flag equals 1, then the synchronization procedure for initializing the state of the context variables and Rice parameter as specified in Section 9.3.2.5 is invoked, with TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs as input. -Otherwise, the following applies: - Call the context variable initialization procedure as specified in Clause 9.3.2.2. - Set the variable StatCoeff[k] to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in Section 9.3.2.3. The initialization process of the arithmetic decoding engine shall be invoked in accordance with the provisions of Section 9.3.2.6.

[0074] Some CTUs that are not the first CTU of a tile or the first CTU in a row of CTUs within a tile can also invoke the above initialization process. However, performing this initialization process is unnecessary for these CTUs. In fact, performing this unnecessary initialization actually impacts encoding performance. Initialization resets various variables to their respective initial values, making the encoding of a CTU independent of previous CTUs, and failing to utilize the correlation between CTUs within the same strip or tile. In this embodiment, it is recommended to omit some of the following strikethrough initialization processes to improve encoding efficiency. The context variables for initializing the arithmetic decoding engine, the initialization state of the Rice parameter, and the palette predictor variables are as follows: - If the CTU is the first CTU in the tile, the following applies: - Call the context variable initialization procedure as specified in Clause 9.3.2.2. - Set the variable StatCoeff[k] to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in Section 9.3.2.3. - Otherwise, if entropy_coding_sync_enabled_flag equals 1, and either CtbAddrInRs%PicWidthInCtbsY equals 0, If TileId[CtbAddrInTs] is not equal to TileId[CtbAddrRsToTs[CtbAddrInRs-1]], then the following applies: - Derive the spatially adjacent block T (in the original text) using the position (x0, y0) of the top-left luminance sample of the current CTB. Figure 9-2 The position (xNbT, yNbT) of the top-left brightness sample is shown below: (xNbT,yNbT)=(x0+CtbSizeY,y0-CtbSizeY) (9-3) - Call the availability derivation procedure for the block in the z-scan order specified in Section 6.4.1, taking the position (xCurr, yCurr) set to equal to (x0, y0) and the adjacent position (xNbY, yNbY) set to equal to (xNbT, yNbT) as input, and assign the output to availableFlagT. The synchronization process for calling context variables, initializing the Rice parameter, and synchronizing the palette predictor variables is as follows: - If availableFlagT equals 1, then the synchronization procedures for the context variables, Rice parameter initialization state, and palette predictor variables as specified in Section 9.3.2.5 are invoked, with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as inputs. -Otherwise, the following applies: - Call the context variable initialization procedure as specified in Clause 9.3.2.2. - Set the variable StatCoeff[k] to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in Section 9.3.2.3. Otherwise, if CtbAddrInRs equals slice_segment_address and dependent_slice_segment_flag equals 1, then the synchronization procedure for initializing the state of the context variables and Rice parameter as specified in Section 9.3.2.5 is invoked, with TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs as input. The initialization process of the arithmetic decoding engine shall be invoked in accordance with the provisions of Section 9.3.2.6.

[0075] In another example, the initialization of the HEVC specification can be modified as follows: The context variables for initializing the arithmetic decoding engine, the initialization state of the Rice parameter, and the palette predictor variables are as follows: - If the CTU is the first CTU in the tile or CtbAddrInRs equals slice_segment_address and dependent_slice_segment_flag equals 0, then the following applies: - Call the context variable initialization procedure as specified in Clause 9.3.2.2. - Set the variable StatCoeff[k] to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in Section 9.3.2.3. - Otherwise, if entropy_coding_sync_enabled_flag equals 1, and either CtbAddrInRs%PicWidthInCtbsY equals 0, If TileId[CtbAddrInTs] is not equal to TileId[CtbAddrRsToTs[CtbAddrInRs-1]], then the following applies: - Derive the spatially adjacent block T (in the original text) using the position (x0, y0) of the top-left luminance sample of the current CTB. Figure 9-2 The position (xNbT, yNbT) of the top-left brightness sample is shown below: (xNbT,yNbT)=(x0+CtbSizeY,y0-CtbSizeY) (9-3) - Call the availability derivation procedure for the block in the z-scan order specified in Section 6.4.1, taking the position (xCurr, yCurr) set to equal to (x0, y0) and the adjacent position (xNbY, yNbY) set to equal to (xNbT, yNbT) as input, and assign the output to availableFlagT. The synchronization process for calling context variables, initializing the Rice parameter, and synchronizing the palette predictor variables is as follows: - If availableFlagT equals 1, then the synchronization procedures for the context variables, Rice parameter initialization state, and palette predictor variables as specified in Section 9.3.2.5 are invoked, with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as inputs. -Otherwise, the following applies: - Call the context variable initialization procedure as specified in Clause 9.3.2.2. - Set the variable StatCoeff[k] to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in Section 9.3.2.3. Otherwise, if CtbAddrInRs equals slice_segment_address and dependent_slice_segment_flag equals 1, then the synchronization procedure for initializing the state of the context variables and Rice parameter as specified in Section 9.3.2.5 is invoked, with TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs as input. The initialization process of the arithmetic decoding engine shall be invoked in accordance with the provisions of Section 9.3.2.6.

[0076] Similarly, the following initializations specified in the VVC specification have the same problems as the HEVC specification discussed above regarding the initialization of the context variables of the arithmetic decoding engine: - If the CTU is the first CTU in a strip or tile, then the context variable initialization procedure is invoked as specified in Section 9.3.2.2, and the array PredictorPaletteSize[chType] is initialized to 0, where chType = 0, 1, and the array StatCoeff[i] is initialized, where i = 0...2 as follows: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0(1513) Otherwise, if sps_entropy_coding_sync_enabled_flag equals 1 and CtbAddrX equals CtbToTileColBd[CtbAddrX], Applicable to the following: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0(XXXX) - Derive the spatially adjacent block T using the position (x0, y0) of the top-left luminance sample of the current CTB. Figure 12 The position (xNbT, yNbT) of the top-left brightness sample is shown below: (xNbT,yNbT)=(x0,y0-CtbSizeY) (1510) - Call the derivation process for the availability of adjacent blocks as specified in Section 6.4.4, taking the position (xCurr,yCurr) set to equal to (x0,y0), the adjacent position (xNbY,yNbY) set to equal to (xNbT,yNbT), checkPredModeY set to equal to FALSE, and cIdx set to equal to 0 as inputs, and assign the output to availableFlagT. The synchronization process for calling context variables is as follows: - If availableFlagT equals 1, then the following applies: - Call the synchronization procedure for the context variables specified in Section 9.3.2.4, using TableStateIdx0Wpp and TableStateIdx1Wpp as input. - When sps_palette_enabled_flag equals 1, the synchronization procedure for the palette predictor as specified in section 9.3.2.7 is invoked. - Otherwise, invoke the context variable initialization procedure as specified in Section 9.3.2.2 and initialize the array PredictorPaletteSize[chType] to 0, where chType = 0, 1. Otherwise, invoke the context variable initialization procedure as specified in section 9.3.2.2, and initialize the array PredictorPaletteSize[chType]. Initialize to 0, where chType = 0, 1. The decoding engine registers ivlCurrRange and ivlOffset, both with 16-bit register precision, are initialized by calling the initialization procedure of the arithmetic decoding engine as specified in Section 9.3.2.5.

[0077] In this embodiment, it is recommended to omit some of the strikethrough initialization procedures in the VVC specification to further improve encoding efficiency. The context variables for initializing the arithmetic decoding engine are as follows: - If the CTU is the first CTU in a strip or tile, then the context variable initialization procedure is invoked as specified in Section 9.3.2.2, and the array PredictorPaletteSize[chType] is initialized to 0, where chType = 0, 1, and the array StatCoeff[i] is initialized, where i = 0...2 as follows: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0(1513) Otherwise, if sps_entropy_coding_sync_enabled_flag equals 1 and CtbAddrX equals CtbToTileColBd[CtbAddrX], Applicable to the following: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0(XXXX) - Derive the spatially adjacent block T using the position (x0, y0) of the top-left luminance sample of the current CTB. Figure 12 The position (xNbT, yNbT) of the top-left brightness sample is shown below: (xNbT,yNbT)=(x0,y0-CtbSizeY) (1510) - Call the derivation process for the availability of adjacent blocks as specified in Section 6.4.4, taking the position (xCurr,yCurr) set to equal to (x0,y0), the adjacent position (xNbY,yNbY) set to equal to (xNbT,yNbT), checkPredModeY set to equal to FALSE, and cIdx set to equal to 0 as input, and assign the output to availableFlagT. The synchronization process for calling context variables is as follows: - If availableFlagT equals 1, then the following applies: - Call the synchronization procedure for the context variables specified in Section 9.3.2.4, using TableStateIdx0Wpp and TableStateIdx1Wpp as input. - When sps_palette_enabled_flag equals 1, the synchronization procedure for the palette predictor as specified in section 9.3.2.7 is invoked. - Otherwise, invoke the context variable initialization procedure as specified in Section 9.3.2.2 and initialize the array PredictorPaletteSize[chType] to 0, where chType = 0, 1. The decoding engine registers ivlCurrRange and ivlOffset, both with 16-bit register precision, are initialized by calling the initialization procedure of the arithmetic decoding engine as specified in Section 9.3.2.5.

[0078] Alternatively, the initialization process for modifying VVC can also be described as follows: The context variables of the arithmetic decoding engine, as well as the arrays PredictorPaletteSize and StatCoeff, are initialized as follows: - Initialize the array StatCoeff[i], where i = 0...2 as follows: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0(1513) - If the CTU is the first CTU in a strip or tile, the context variable initialization procedure is invoked as specified in subsection 9.3.2.2, and the array PredictorPaletteSize[chType] is initialized to 0, where chType = 0, 1. Otherwise, when sps_entropy_coding_sync_enabled_flag equals 1 and CtbAddrX equals CtbToTileColBd[CtbAddrX] When applicable, the following applies: - Derive the spatially adjacent block T using the position (x0, y0) of the top-left luminance sample of the current CTB. Figure 12 The bit of the top left brightness sample Let (xNbT, yNbT) be set as follows: (xNbT,yNbT)=(x0,y0-CtbSizeY) (1514) - Call the derivation process for the availability of adjacent blocks as specified in Subsection 6.4.4, taking the position (xCurr,yCurr) set to equal to (x0,y0), the adjacent position (xNbY,yNbY) set to equal to (xNbT,yNbT), checkPredModeY set to equal to FALSE, and cIdx set to equal to 0 as inputs, and assign the output to availableFlagT. The synchronization process for calling context variables and the palette predictor is as follows: - If availableFlagT equals 1, then the following applies: - Call the synchronization procedure for the context variables specified in subsection 9.3.2.4, using TableStateIdx0Wpp and TableStateIdx1Wpp as input. - When sps_palette_enabled_flag equals 1, the synchronization procedure for the palette predictor, as specified in subsection 9.3.2.7, is invoked. - Otherwise, invoke the context variable initialization procedure as specified in Section 9.3.2.2 and initialize the array PredictorPaletteSize[chType] to 0, where chType = 0, 1. The decoding engine registers ivlCurrRange and ivlOffset, both with 16-bit register precision, are initialized by calling the initialization procedure of the arithmetic decoding engine specified in subsection 9.3.2.5. A value of 1 for `sps_persistent_rice_adaptation_enabled_flag` specifies that at the beginning of each TU, the binarized Rice parameter derivation for `abs_remainder[]` and `dec_abs_level[]` is initialized using statistics accumulated from previous TUs. A value of 0 for `sps_persistent_rice_adaptation_enabled_flag` specifies that previous TU states are not used in the Rice parameter derivation. If `sps_persistent_rice_adaptation_enabled_flag` does not exist, its value is inferred to be 0.

[0079] Figure 6 Examples of a process 600 for encoding segments of video according to some embodiments of the present disclosure are described. For example, process 600 may be implemented to encode video according to a modified HEVC specification as described above. One or more computing devices (e.g., computing devices implementing video encoder 100) implement this by executing suitable program code (e.g., program code implementing entropy encoding module 116). Figure 6 The operation is described in the accompanying drawings. For illustrative purposes, process 600 is described with reference to some examples depicted in the drawings. However, other implementations are also possible.

[0080] In box 602, process 600 includes accessing the segmentation of the video signal. The segmentation can be a video frame, strip, tile, or any type of segmentation that the video encoder processes as a unit during encoding. This segmentation includes, for example... Figure 5The diagram shows a group of CTUs arranged in rows. Each row of CTUs includes one or more CTUs, and each CTU includes one or more TUs used for encoding.

[0081] In box 604, which includes boxes 606 through 620, process 600 includes processing each CTU in the group of CTUs in the partition to encode the partition into bits. In box 606, process 600 includes determining whether the CTU is the first CTU in the tile. If the CTU is the first CTU in the tile, in box 608, context variables for CABAC, the Rice parameter variable StatCoeff, and the palette predictor variable are initialized according to a first initialization scheme. In the first initialization scheme, context variables for CABAC are initialized according to a first context variable initialization procedure, for example, the context variable initialization procedure specified in Clause 9.3.2.2 of the HEVC specification. The Rice parameter variable is initialized according to a first Rice parameter variable initialization procedure. For example, the first Rice parameter variable initialization procedure initializes the Rice parameter variable StatCoeff[k] to zero, where k is in the range of 0 to 3, inclusive. The palette predictor variable is initialized according to the first palette predictor initialization procedure, for example, the palette predictor variable initialization procedure specified in Clause 9.3.2.3 of the HEVC specification. If the CTU is not the first CTU in the tile, procedure 600 continues to block 610.

[0082] In another example, the condition in box 606 can be changed to (a) the CTU is the first CTU in the tile, or (b) the CTU is the first CTU in the stripe and dependent stripes are disabled (e.g., dependent_slice_segment_flag equals 0, meaning the current stripe is an independent stripe). If either condition (a) or condition (b) is met, the initialization scheme of box 608 above is used; otherwise, process 600 continues to box 610.

[0083] In box 610, procedure 600 includes determining whether the parallel coding mechanism WPP is enabled and whether the current CTU is the first CTU in the CTU row. In some examples, parallel coding can be indicated by a flag, with a value of 0 indicating that parallel coding is disabled and a value of 1 indicating that parallel coding is enabled. If it is determined that the parallel coding mechanism is enabled and the current CTU is the first CTU in the CTU row, then in box 612, procedure 600 includes initializing the context variables for CABAC, the Rice parameter variable StatCoeff, and the palette predictor variable according to a second initialization scheme.

[0084] In the second initialization scheme, the available flag (availableFlagT) of the upper neighbor block of the current CTU is determined, and initialization is performed based on the available flag (availableFlagT). In some examples, the available flag of the upper neighbor block of the current CTU is determined based on the position of the upper left luminance sample of the upper neighbor block. If the available flag (availableFlagT) indicates that the upper neighbor block is available, the context variables for CABAC are initialized according to the second context variable initialization procedure, the Rice parameter variables are initialized according to the second Rice parameter variable initialization procedure, and the palette predictor variables are initialized according to the second palette predictor initialization procedure. Examples of the second context variable initialization procedure, the second Rice parameter variable initialization procedure, and the second palette predictor initialization procedure can be the corresponding initialization procedures for the context variables, Rice parameter variables, and palette predictor variables as specified in Clause 9.3.2.5 of the HEVC standard, where TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp are taken as inputs.

[0085] If the available flag of the current CTU's adjacent block indicates that the adjacent block is unavailable, then the context variables, Rice parameter variables, and palette predictor variables are initialized according to the corresponding initialization process in the first scheme described above. If parallel coding is not enabled or the current CTU is not the first CTU in the CTU row, then process 600 continues to box 614.

[0086] In box 614, process 600 includes determining whether the CTU is the first CTU in the stripe and whether the stripe is a dependent stripe. If the CTU is the first CTU in the stripe and the stripe is a dependent stripe, then in box 616, process 600 includes initializing the context variables for CABAC, the Rice parameter variables (denoted as StatCoeff), and the palette predictor variables according to a third initialization scheme. In the third scheme, the context variables for CABAC are initialized according to a second context variable initialization process, but the input to this process is different from the input to the second context variable initialization process described in box 612 above. Similarly, the Rice parameter variables are initialized according to a second Rice parameter variable initialization process, the input of which is different from the input to the second Rice parameter variable initialization process described in box 612 above. The palette predictor variables are initialized according to a second palette predictor initialization process, the input of which is also different from the input to the second palette predictor initialization process described in box 612 above. For example, the initialization procedures for context variables, Rice parameter variables, and palette predictor variables specified in Section 9.3.2.5 of the HEVC standard can be performed as the initialization procedures in the third scheme, where TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs are taken as inputs. In this way, the CTU's variables are initialized to the values ​​of these variables from previous CTUs in previous slices. If the current CTU is not the first CTU in the slice, or the slice is not a dependent slice, then procedure 600 continues to box 618 without any initialization. In other words, no initialization is performed for CTUs that do not satisfy any of the conditions described in boxes 606, 610, and 614. Therefore, unnecessary initialization procedures are eliminated, thereby improving coding efficiency.

[0087] In box 618, procedure 600 includes encoding the TU in the CTU into a binary representation based on the Rice parameter variable. For example, the Rice parameter can be calculated based on the Rice parameter variable StatCoeff, and the Rice parameter can be used, for example, to encode the TU using the Golomb-Rice code specified in the HEVC specification. In box 620, procedure 600 includes encoding the binary representation of the CTU into bits contained in the video bitstream using CABAC discussed above, based on context variables. In some examples, encoding the TU in the CTU into a binary representation also includes palette coding based on palette predictor variables. In box 622, procedure 600 includes outputting the encoded video bitstream.

[0088] Figure 7 Examples of a process 700 for decoding a segment of video according to some embodiments of the present disclosure are described. For example, process 700 may be implemented to decode video according to the HEVC specification with the suggested modifications as described above. One or more computing devices implement this by executing suitable program code. Figure 7 The operations described herein. For example, a computing device implementing the video decoder 200 can be implemented by executing program code for the entropy decoding module 216, the inverse quantization module 218, and the inverse transform module 219. Figure 7 The operation is described in the accompanying drawings. For illustrative purposes, process 700 is described with reference to some examples depicted in the drawings. However, other embodiments are also possible.

[0089] In box 702, process 700 includes accessing a binary string or binary representation representing a segment of the video signal. The segment can be a video frame, strip, tile, or any type of segment that the video encoder processes as a unit during encoding. The segment includes, for example,... Figure 5 The diagram shows a group of CTUs arranged in rows. Each row of CTUs includes one or more CTUs, and each CTU includes multiple TUs used for encoding.

[0090] In box 704, which includes boxes 706 through 720, process 700 includes processing the binary string of each CTU in the group of CTUs in the partition to generate a sample for decoding the partition. In box 706, process 700 includes determining whether the CTU is the first CTU in the tile. If the CTU is the first CTU in the tile, in box 708, context variables for CABAC, the Rice parameter variable StatCoeff, and the palette predictor variable are initialized according to a first scheme. In the first scheme, context variables for CABAC are initialized according to a first context variable initialization procedure, for example, the context variable initialization procedure specified in section 9.3.2.2 of the HEVC standard. The Rice parameter variable is initialized according to a first Rice parameter variable initialization procedure. For example, the first Rice parameter variable initialization procedure initializes the Rice parameter variable StatCoeff[k] to zero, where k is in the range of 0 to 3, inclusive. The palette predictor variables are initialized according to the first palette predictor initialization procedure, for example, the palette predictor variable initialization procedure specified in Clause 9.3.2.3 of the HEVC standard. If the CTU is not the first CTU in the tile, procedure 700 continues to box 710.

[0091] In another example, the condition in box 706 can be changed to (a) the CTU is the first CTU in the tile, or (b) the CTU is the first CTU in the stripe and dependent stripes are disabled (e.g., dependent_slice_segment_flag equals 0, meaning the current stripe is an independent stripe). If either condition (a) or condition (b) is met, the initialization scheme of box 708 above is used; otherwise, process 700 continues to box 710.

[0092] In box 710, procedure 700 includes determining whether the parallel coding mechanism WPP is enabled and whether the current CTU is the first CTU in the CTU row. In some examples, parallel coding can be indicated by a flag, with a value of 0 indicating that parallel coding is disabled and a value of 1 indicating that parallel coding is enabled. If it is determined that the parallel coding mechanism is enabled and the current CTU is the first CTU in the CTU row, then in box 712, procedure 700 includes initializing the context variables for CABAC, the Rice parameter variable StatCoeff, and the palette predictor variable according to a second initialization scheme.

[0093] In the second approach, the available flag (availableFlagT) of the upper neighboring block of the current CTU is determined, and initialization is performed based on the available flag (availableFlagT). In some examples, the available flag of the upper neighboring block of the current CTU is determined based on the position of the upper left luminance sample of the upper neighboring block. If the available flag (availableFlagT) indicates that the upper neighboring block is available, the context variables for CABAC are initialized according to the second context variable initialization procedure, the Rice parameter variables are initialized according to the second Rice parameter variable initialization procedure, and the palette predictor variables are initialized according to the second palette predictor initialization procedure. Examples of the second context variable initialization procedure, the second Rice parameter variable initialization procedure, and the second palette predictor initialization procedure can be the corresponding initialization procedures for the context variables, Rice parameter variables, and palette predictor variables as specified in Clause 9.3.2.5 of the HEVC standard, where TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp are taken as inputs.

[0094] If the available flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is unavailable, then the context variables, Rice parameter variables, and palette predictor variables are initialized according to the corresponding initialization process in the first scheme described above. If the parallel coding mechanism is not enabled or the current CTU is not the first CTU in the CTU row, then process 700 continues to block 714.

[0095] In box 714, process 700 includes determining whether the CTU is the first CTU in the stripe and whether the stripe is a dependent stripe. If the CTU is the first CTU in the stripe and the stripe is a dependent stripe, then in box 716, process 700 includes initializing the context variables for CABAC, the Rice parameter variable StatCoeff, and the palette predictor variable according to a third initialization scheme. In the third scheme, the context variables for CABAC are initialized according to a second context variable initialization process, but the input to this process is different from the input to the second context variable initialization process described in box 712 above. Similarly, the Rice parameter variable is initialized according to a second Rice parameter variable initialization process, the input of which is different from the input to the second Rice parameter variable initialization process described in box 712 above. The palette predictor variable is initialized according to a second palette predictor initialization process, the input of which is also different from the input to the second palette predictor initialization process described in box 712 above. For example, the initialization procedures for context variables, Rice parameter variables, and palette predictor variables specified in Section 9.3.2.5 of the HEVC standard can be performed as the initialization procedures in the third scheme, where TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs are taken as inputs. In this way, the CTU's variables are initialized to the values ​​of these variables from previous CTUs in previous slices. If the current CTU is not the first CTU in the slice, or the slice is not a dependent slice, then procedure 700 continues to box 718 without any initialization. In other words, for CTUs that do not satisfy any of the conditions described in boxes 706, 710, and 714, no initialization is performed. In this way, unnecessary initialization procedures are eliminated, thereby improving coding efficiency.

[0096] In box 718, process 700 includes decoding the binary string or binary representation of the CTU into coefficient values ​​based on the Rice parameter variable and context variable using CABAC as described above. For example, the Rice parameter can be calculated based on the Rice parameter variable StatCoeff, and the calculated Rice parameter can be used, for example, to decode the TU using the Golomb-Rice code specified in the HEVC specification. In box 720, process 700 includes, for example, decoding using the code referenced above. Figure 2The inverse quantization and inverse transform reconstruct the pixel values ​​of the TUs in the CTU. In some examples, decoding the TUs in the CTU also includes palette coding based on palette predictor variables of the video portion encoded using palette coding. In box 722, process 700 includes outputting the decoded video partition.

[0097] Figure 8 Examples of a process 800 for encoding segments of video according to some embodiments of the present disclosure are described. For example, process 800 may be implemented to encode video according to the VVC standard as described above. One or more computing devices (e.g., computing devices implementing video encoder 100) implement this by executing suitable program code (e.g., program code implementing entropy encoding module 116). Figure 8 The operations depicted are described below. For illustrative purposes, process 800 is described with reference to some examples depicted in the accompanying drawings. However, other implementations are also possible.

[0098] In box 802, process 800 includes accessing the segmentation of the video signal. The segmentation can be a video frame, strip, tile, or any type of segmentation that the video encoder processes as a unit during encoding. This segmentation includes, for example... Figure 5 The diagram shows a group of CTUs arranged in rows. Each row of CTUs includes one or more CTUs, and each CTU includes one or more TUs used for encoding.

[0099] In box 804, which includes boxes 808 through 820, process 800 includes processing each CTU in the group of CTUs in the partition to encode the partition into bits. In box 808, process 800 includes initializing the Rice parameter variable StatCoeff to an initial value. For example, the Rice parameter variable StatCoeff can be set to the initial value as described above according to the following: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 Where i = 0...2, StatCoeff represents the history counter, Floor(x) represents the largest integer less than or equal to x, and Log2(x) is the base-2 logarithm of x, and a value of 1 for sps_persistent_rice_adaptation_enabled_flag indicates that history-based Rice parameter derivation is enabled.

[0100] In box 810, process 800 includes determining whether the CTU is the first CTU in a tile or strip. If the CTU is the first CTU in a tile or strip, in box 812, context variables and palette predictor variables for CABAC are initialized according to a first initialization scheme. In the first initialization scheme, context variables for CABAC are initialized according to a first context variable initialization procedure, for example, the context variable initialization procedure specified in Clause 9.3.2.2 of the VVC standard. Palette predictor variables are initialized according to a first palette predictor initialization procedure. For example, in the first palette predictor initialization procedure, the palette predictor variable PredictorPaletteSize[chType] may be initialized to 0, where chType = 0 or 1. If the CTU is not the first CTU in a tile or strip, process 800 continues to box 814.

[0101] In box 814, procedure 800 includes determining whether the parallel coding mechanism WPP is enabled and whether the current CTU is the first CTU in the CTU row. In some examples, parallel coding can be indicated by a flag, with a value of 0 indicating that parallel coding is disabled and a value of 1 indicating that parallel coding is enabled. If it is determined that the parallel coding mechanism is enabled and the current CTU is the first CTU in the CTU row, then in box 816, procedure 800 includes initializing the context variables and palette predictor variables for CABAC according to a second initialization scheme.

[0102] In the second initialization scheme, the available flag (availableFlagT) of the upper neighbor block of the current CTU is determined, and initialization is performed based on the available flag (availableFlagT). In some examples, the available flag of the upper neighbor block of the current CTU is determined based on the position of the upper left luminance sample of the upper neighbor block. If the available flag (availableFlagT) indicates that the upper neighbor block is available, the context variables for CABAC are initialized according to the second context variable initialization procedure, and the palette predictor variables are initialized according to the second palette predictor initialization procedure. An example of the second context variable initialization procedure can be the context variable initialization procedure specified in subsection 9.3.2.4 of the VVC standard, where TableStateIdx0Wpp and TableStateIdx1Wpp are inputs. An example of the second palette predictor initialization procedure can be the palette predictor initialization procedure specified in subsection 9.3.2.7 of the VVC standard.

[0103] If the available flag of the current CTU's adjacent block indicates that the adjacent block is unavailable, then the context variables and palette predictor variables are initialized according to the corresponding initialization process in the first scheme described above. If parallel coding is not enabled or the current CTU is not the first CTU in the CTU row, then process 800 continues to box 818 without any initialization process. In other words, for CTUs that do not meet any of the conditions described in boxes 810 and 814, no initialization is performed. In this way, unnecessary initialization processes are eliminated, thereby improving coding efficiency.

[0104] In box 818, procedure 800 includes encoding the TU in the CTU into a binary representation based on the Rice parameter variable. For example, the Rice parameter can be calculated based on the Rice parameter variable StatCoeff, and the Rice parameter can be used to encode the TU, for example, through a combination of TR and a finite k-order EGk binarization process as specified in the VVC specification. In box 820, procedure 800 includes encoding the binary representation of the CTU into bits contained in the video bitstream using CABAC discussed above based on context variables. In some examples, encoding the TU in the CTU into a binary representation also includes palette encoding based on palette predictor variables. In box 822, procedure 800 includes outputting the encoded video bitstream.

[0105] Figure 9 Examples of a process 900 for decoding a segment of video according to some embodiments of the present disclosure are described. For example, process 900 may be implemented to decode video according to the VVC standard as described above. One or more computing devices implement this by executing suitable program code. Figure 9 The operations described herein. For example, a computing device implementing the video decoder 200 can be implemented by executing program code for the entropy decoding module 216, the inverse quantization module 218, and the inverse transform module 219. Figure 9 The operations depicted are described below. For illustrative purposes, process 900 is described with reference to some examples depicted in the accompanying drawings. However, other implementations are also possible.

[0106] In box 902, process 900 includes accessing a binary string or binary representation representing a segment of the video signal. The segment can be a video frame, strip, tile, or any type of segment that the video encoder processes as a unit during encoding. The segment includes, for example,... Figure 5 The diagram shows a group of CTUs arranged in rows. Each row of CTUs includes one or more CTUs, and each CTU includes one or more TUs used for encoding.

[0107] In box 904, which includes boxes 908 through 920, process 900 includes processing the binary string of each CTU in the group of CTUs in the partition to generate a decoded sample of the partition. In box 908, process 900 includes initializing the Rice parameter variable StatCoeff to an initial value. For example, the Rice parameter variable StatCoeff can be set to the initial value as described above according to the following: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 Where i = 0...2, StatCoeff represents the history counter, Floor(x) represents the largest integer less than or equal to x, and Log2(x) is the base-2 logarithm of x, and a value of 1 for sps_persistent_rice_adaptation_enabled_flag indicates that history-based Rice parameter derivation is enabled.

[0108] In box 910, procedure 900 includes determining whether the CTU is the first CTU in a tile or strip. If the CTU is the first CTU in a tile or strip, in box 912, context variables and palette predictor variables for CABAC are initialized according to a first scheme. In the first scheme, context variables for CABAC are initialized according to a first context variable initialization procedure, for example, the context variable initialization procedure specified in Clause 9.3.2.2 of the VVC standard. Palette predictor variables are initialized according to a first palette predictor initialization procedure. For example, the palette predictor variable PredictorPaletteSize[chType] may be initialized to 0, where chType = 0 or 1. If the CTU is not the first CTU in a tile or strip, procedure 900 continues to box 914.

[0109] In box 914, procedure 900 includes determining whether the parallel coding mechanism WPP is enabled and whether the current CTU is the first CTU in the CTU row. In some examples, parallel coding can be indicated by a flag, with a value of 0 indicating that parallel coding is disabled and a value of 1 indicating that parallel coding is enabled. If it is determined that the parallel coding mechanism is enabled and the current CTU is the first CTU in the CTU row, then in box 916, procedure 900 includes initializing the context variables and palette predictor variables for CABAC according to a second initialization scheme.

[0110] In the second approach, the available flag (availableFlagT) of the upper neighboring block of the current CTU is determined, and initialization is performed based on the available flag (availableFlagT). In some examples, the available flag of the upper neighboring block of the current CTU is determined based on the position of the upper left luminance sample of the upper neighboring block. If the available flag (availableFlagT) indicates that the upper neighboring block is available, the context variables for CABAC are initialized according to the second context variable initialization procedure, and the palette predictor variables are initialized according to the second palette predictor initialization procedure. An example of the second context variable initialization procedure can be the context variable initialization procedure specified in subsection 9.3.2.4 of the VVC standard, where TableStateIdx0Wpp and TableStateIdx1Wpp are taken as inputs. An example of the second palette predictor initialization procedure can be the palette predictor initialization procedure specified in subsection 9.3.2.7 of the VVC standard.

[0111] If the available flag of the current CTU's adjacent block indicates that the adjacent block is unavailable, then the context variables and palette predictor variables are initialized according to the corresponding initialization process in the first scheme described above. If parallel coding is not enabled or the current CTU is not the first CTU in the CTU row, then process 900 continues to box 918 without any initialization process. In other words, for CTUs that do not meet any of the conditions described in boxes 910 and 914, no initialization is performed. In this way, unnecessary initialization processes are eliminated, thereby improving coding efficiency.

[0112] In box 918, procedure 900 includes decoding the binary string or binary representation of the CTU into coefficient values ​​based on the Rice parameter variable and context variable using CABAC as described above. For example, the Rice parameter can be calculated based on the Rice parameter variable StatCoeff, and the calculated Rice parameter can be used, for example, to decode the TU using a combination of TR and a finite k-order EGk binarization procedure as specified in the VVC specification. In box 920, procedure 900 includes, for example, decoding using the method described above (referenced above) Figure 2 The inverse quantization and inverse transform reconstruct the pixel values ​​of the TUs in the CTU. In some examples, decoding the TUs in the CTU also includes palette coding based on palette predictor variables of the video portion encoded using palette coding. In box 922, process 900 includes outputting the decoded video partition.

[0113] As mentioned above, when parallel processing is enabled for VVC and HEVC respectively, the existing parallel processing initialization results in a delay of one or two CTUs. This delay slows down the video encoding process. For example, when WPP is enabled, there is a delay of two CTUs or one CTU between adjacent CTU rows in HEVC and VVC respectively. When the image height is large and the CTU size is relatively small, the number of CTU rows in the image or strip may be large, which may result in delays of multiple CTUs in the last CTU row.

[0114] In some embodiments, the initialization latency of parallel processing is eliminated, thereby improving the speed of the encoding and decoding processes. To eliminate WPP latency, when WPP is enabled, for the first CTU in each CTU row, all dependent variables between CTUs (e.g., context variables for CABAC, variables for palette prediction, and variables for Rice parameter derivation, etc.) are reset to their respective initial values ​​before encoding the current image. Possible changes based on existing HEVC and VVC specifications are shown below (underlined parts represent added parts, and strikethrough parts represent omitted parts).

[0115] Regarding HEVC: The context variables for initializing the arithmetic decoding engine, the initialization state of the Rice parameter, and the palette predictor variables are as follows: -If the CTU is the first CTU in the tile Or if entropy_coding_sync_enabled_flag It equals 1, and either CtbAddrInRs%PicWidthInCtbsY equals 0, or TileId[CtbAddrInTs] does not equal 1. TileId[CtbAddrRsToTs[CtbAddrInRs-1]], or if CtbAddrInRs equals slice_segment_ The address is set and dependent_slice_segment_flag is equal to 1. The following applies: - Call the context variable initialization procedure as specified in Clause 9.3.2.2. - Set the variable StatCoeff[k] to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in Section 9.3.2.3. The initialization process of the arithmetic decoding engine shall be invoked in accordance with the provisions of Section 9.3.2.6.

[0116] For VVC: The context variables for initializing the arithmetic decoding engine are as follows: -If the CTU is the first CTU in the strip or tile Or if sps_entropy_coding_sync_ enabled_flag equals 1 and CtbAddrX equals CtbToTileColBd[CtbAddrX].Then, in accordance with the provisions of section 9.3.2.2, the initialization procedure for the context variables is invoked, and the array PredictorPaletteSize[chType] is initialized to 0, where chType = 0, 1, and the array StatCoeff[i] is initialized, where i = 0...2 as follows: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0(1513) The decoding engine registers ivlCurrRange and ivlOffset, both with 16-bit register precision, are initialized by calling the initialization procedure of the arithmetic decoding engine as specified in Section 9.3.2.5.

[0117] Figure 10 Examples of a process 1000 for encoding segments of video according to some embodiments of the present disclosure are described. For example, process 1000 may be implemented to encode video according to the HEVC or VVC standard as described above. One or more computing devices (e.g., computing devices implementing video encoder 100) implement this by executing suitable program code (e.g., program code implementing entropy encoding module 116). Figure 10 The operations depicted are described below. For illustrative purposes, process 1000 is described with reference to some examples depicted in the accompanying drawings. However, other embodiments are also possible.

[0118] In box 1002, process 1000 includes accessing the segmentation of the video signal. The segmentation can be a video frame, strip, tile, or any type of segmentation that the video encoder processes as a unit during encoding. This segmentation includes, for example... Figure 5 The diagram shows a group of CTUs arranged in rows. Each row of CTUs includes one or more CTUs, and each CTU includes multiple TUs used for encoding.

[0119] In box 1004, which includes boxes 1006 through 1012, process 1000 includes processing each CTU in the group of CTUs in the partition to encode the partition into bits. In box 1006, process 1000 includes determining whether an initialization condition is met. The initialization condition includes: (1) the CTU is the first CTU in the tile, or (2) the CTU is the first CTU in the stripe, or (3) parallel coding WPP is enabled and the CTU is the first CTU in the CTU row of the tile.

[0120] If the initialization conditions are met, then in box 1008, the context variables, Rice parameter variables, and palette predictor variables for CABAC are initialized according to the initialization scheme. In this initialization scheme, the context variables for CABAC are initialized according to the context variable initialization procedure, the Rice parameter variables are initialized according to the Rice parameter variable initialization procedure, and the palette predictor variables are initialized according to the palette predictor entry initialization procedure. In HEVC, the context variable initialization procedure can be the procedure specified in Clause 9.3.2.2 of the HEVC specification. The Rice parameter variable initialization procedure can set the Rice parameter variable StatCoeff[k] to 0, where k is in the range of 0 to 3. The palette predictor initialization procedure can be the procedure specified in Clause 9.3.2.3 of the HEVC specification. In VVC, the context variable initialization procedure can be the procedure specified in Clause 9.3.2.2 of the VVC specification. The Rice parameter variable initialization procedure can set the Rice parameter variable StatCoeff according to the following: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0, Where i = 0...2, StatCoeff represents the history counter, Floor(x) represents the largest integer less than or equal to x, and Log2(x) is the base-2 logarithm of x. A value of 1 for sps_persistent_rice_adaptation_enabled_flag indicates that history-based Rice parameter derivation is enabled, and the palette predictor initialization process includes setting the palette predictor variable to 0.

[0121] If the initialization conditions are not met, process 1000 continues to block 1010. In other words, if the initialization conditions are not met, the context variables, Rice parameter variables, and palette predictor variables are not initialized. Compared to processes 600 and 800, only one initialization scheme is executed for CTUs that meet the initialization conditions. Furthermore, the initialization of parallel encoding is independent of previous CTU lines, thus eliminating encoding latency caused by initialization based on previous CTU lines.

[0122] In box 1010, procedure 1000 includes encoding the TU in the CTU into a binary representation based on the Rice parameter variable. For example, the Rice parameter can be calculated based on the Rice parameter variable StatCoeff, and the Rice parameter can be used, for example, to encode the TU using Golomb-Rice codes as specified in the HEVC standard. In box 1012, procedure 1000 includes encoding the binary representation of the CTU into bits contained in the video bitstream using CABAC discussed above based on context variables. In some examples, encoding the TU in the CTU into a binary representation also includes palette encoding based on palette predictor variables. In box 1014, procedure 1000 includes outputting the encoded video bitstream.

[0123] Figure 11 Examples of a process 1100 for decoding a segment of video according to some embodiments of the present disclosure are described. For example, process 1100 may be implemented to decode video according to the HEVC or VVC standard as described above. One or more computing devices implement this by executing suitable program code. Figure 11 The operations described herein. For example, a computing device implementing the video decoder 200 can be implemented by executing program code for the entropy decoding module 216, the inverse quantization module 218, and the inverse transform module 219. Figure 11 The operation is described in the accompanying drawings. For illustrative purposes, process 1100 is described with reference to some examples depicted in the drawings. However, other embodiments are also possible.

[0124] In box 1102, process 1100 includes accessing a binary string or binary representation representing a segment of the video signal. The segment can be a video frame, strip, tile, or any type of segment that the video encoder processes as a unit during encoding. The segment includes, for example... Figure 5 The diagram shows a group of CTUs arranged in rows. Each row of CTUs includes one or more CTUs, and each CTU includes multiple TUs used for encoding.

[0125] In box 1104, which includes boxes 1106 through 1112, process 1100 includes processing the binary string of each CTU in the group of CTUs in the partition to generate a sample of the partition for decoding. In box 1106, process 1100 includes determining whether an initialization condition is met. The initialization condition includes: (1) the CTU is the first CTU in the tile, or (2) the CTU is the first CTU in the stripe, or (3) parallel coding is enabled and the CTU is the first CTU in the CTU row of the tile.

[0126] If the initialization conditions are met, then in box 1108, the context variables, Rice parameter variables, and palette predictor variables for CABAC are initialized according to the initialization scheme. In this initialization scheme, the context variables for CABAC are initialized according to the context variable initialization procedure, the Rice parameter variables are initialized according to the Rice parameter variable initialization procedure, and the palette predictor variables are initialized according to the palette predictor entry initialization procedure. In HEVC, the context variable initialization procedure can be the procedure specified in Clause 9.3.2.2 of the HEVC specification. The Rice parameter variable initialization procedure can set the Rice parameter variable StatCoeff[k] to 0, where k is in the range of 0 to 3. The palette predictor initialization procedure can be the procedure specified in Clause 9.3.2.3 of the HEVC specification. In VVC, the context variable initialization procedure can be the procedure specified in Clause 9.3.2.2 of the VVC specification. The Rice parameter variable initialization procedure can set the Rice parameter variable according to the following: StatCoeff[i] = sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0), where i = 0...2, StatCoeff represents the history counter, Floor(x) represents the largest integer less than or equal to x, and Log2(x) is the base-2 logarithm of x. A value of 1 for sps_persistent_rice_adaptation_enabled_flag indicates that history-based Rice parameter derivation is enabled. The palette predictor initialization process includes setting the palette predictor variable to 0.

[0127] If the initialization conditions are not met, process 1100 continues to block 1110. In other words, if the initialization conditions are not met, the context variables, Rice parameter variables, and palette predictor variables are not initialized. Compared to processes 700 and 900, only one initialization scheme is executed for CTUs that meet the initialization conditions. Furthermore, the initialization of parallel encoding is independent of previous CTU lines, thus eliminating encoding latency caused by initialization based on previous CTU lines.

[0128] In box 1110, procedure 1100 includes decoding the binary string or binary representation of the CTU into coefficient values ​​based on the Rice parameter variable and context variable using CABAC as described above. For example, the Rice parameter can be calculated based on the Rice parameter variable StatCoeff, and the calculated Rice parameter can be used, for example, to decode the TU using a combination of TR and a finite k-order EGk binarization process as specified in the VVC specification or a Golomb-Rice code as specified in the HEVC specification. In box 1112, procedure 1100 includes, for example, decoding using the method described above (referenced above) Figure 2 The inverse quantization and inverse transform reconstruct the pixel values ​​of the TUs in the CTU. In some examples, decoding the TUs in the CTU also includes palette coding based on palette predictor variables of the video portion encoded using palette coding. In box 1114, process 1100 includes outputting the decoded video partition.

[0129] Example of a computational system for implementing video coding-related quantization

[0130] Any suitable computing system can be used to perform the operations described in this paper. For example, Figure 12 Depiction can be achieved Figure 1 Video encoder 100 or Figure 2 Examples of computing devices 1200 for video decoder 200. In some embodiments, computing device 1200 may include processor 1212 communicatively coupled to memory 1214, and processor 1212 executing computer-executable program code and / or accessing information stored in memory 1214. Processor 1212 may include a microprocessor, application-specific integrated circuit (“ASIC”), state machine, or other processing device. Processor 1212 may include any of a plurality of processing devices (including one). Such a processor may include or be able to communicate with a computer-readable medium storing instructions, which, when executed by processor 1212, cause the processor to perform the operations described herein.

[0131] Memory 1214 may include any suitable non-transitory computer-readable medium. Computer-readable medium may include any electronic, optical, magnetic, or other storage device capable of providing computer-readable instructions or other program code to a processor. Non-limiting examples of computer-readable media include disks, memory chips, ROM, RAM, ASICs, configured processors, optical storage, magnetic tape or other magnetic storage, or any other medium from which a computer processor may read instructions. Instructions may include processor-specific instructions generated by a compiler and / or interpreter from code written in any suitable computer programming language, including, for example, C, C++, C#, Visual Basic, Java, Python, Perl, JavaScript, and ActionScript.

[0132] The computing device 1200 may also include a bus 1216. The bus 1216 may communicatively couple one or more components of the computing device 1200. The computing device 1200 may also include multiple external or internal devices, such as input or output devices. For example, the computing device 1200 illustrates an input / output (“I / O”) interface 1218 that can receive input from one or more input devices 1220 or provide output to one or more output devices 1222. One or more input devices 1220 and one or more output devices 1222 may be communicatively coupled to the I / O interface 1218. Communication coupling can be achieved by any suitable means (e.g., via a printed circuit board connection, via a cable connection, via wireless communication, etc.). Non-limiting examples of input devices 1220 include touchscreens (e.g., one or more cameras for imaging a touch area or a pressure sensor for detecting pressure changes caused by a touch), mice, keyboards, or any other device that can be used to generate input events in response to physical actions of a user of the computing device. Non-limiting examples of output device 1222 include an LCD screen, an external monitor, a speaker, or any other device that can be used to display or otherwise present the output generated by the computing device.

[0133] Computing device 1200 can execute for processor 1212 to perform the above-mentioned... Figures 1 to 11 The program code for one or more of the described operations. The program code may include video encoder 100 or video decoder 200. The program code may reside in memory 1214 or any suitable computer-readable medium and may be executed by processor 1212 or any other suitable processor.

[0134] The computing device 1200 may also include at least one network interface device 1224. The network interface device 1224 may include any device or group of devices suitable for establishing wired or wireless data connections to one or more data networks 1228. Non-limiting examples of the network interface device 1224 include Ethernet network adapters, modems, etc. The computing device 1200 may transmit messages as electrical or optical signals via the network interface device 1224.

[0135] General precautions

[0136] This document sets forth numerous specific details to provide a thorough understanding of the claimed subject matter. However, those skilled in the art will understand that the claimed subject matter can be practiced without these specific details. In other instances, methods, apparatus, or systems known to a person of ordinary skill have not been described in detail so as not to obscure the claimed subject matter.

[0137] Unless otherwise specifically stated, it should be understood that the use of terms such as “processing,” “computing,” “operation,” “determining,” and “identifying” throughout the discussion of this specification refers to the actions or processes of a computing device (e.g., one or more computers or similar electronic computing devices or apparatuses) that manipulate or convert data represented as physical electronic or magnetic quantities within the memory, registers, or other information storage, transmission, or display devices of a computing platform.

[0138] The one or more systems discussed herein are not limited to any particular hardware architecture or configuration. Computing devices may include any suitable arrangement of components that provides results based on one or more inputs. Suitable computing devices include multi-purpose microprocessor-based computer systems that access stored software, ranging from general-purpose computing devices implementing one or more embodiments of this subject to dedicated computing devices that program or configure computing systems. Any suitable programming, scripting, or other type of language or combination of languages ​​may be used to implement the teachings contained herein in the software used when programming or configuring computing devices.

[0139] Embodiments of the methods disclosed herein can be executed in the operation of such a computing device. The order of the boxes presented in the above examples can be changed—for example, the boxes can be reordered, grouped, and / or divided into sub-boxes. Some boxes or processes can be executed in parallel.

[0140] The use of “suitable for” or “used for” in this document implies open and inclusive language, and does not exclude devices suitable for or used to perform additional tasks or steps. Furthermore, the use of “based on” implies openness and inclusiveness, because processes, steps, calculations, or other actions “based on” one or more of the listed conditions or values ​​may actually be based on additional conditions or values ​​beyond those listed above. The headings, lists, and numbering included in this document are for illustrative purposes only and are not intended to be limiting.

[0141] While the subject matter has been described in detail with reference to specific embodiments herein, it should be understood that those skilled in the art, upon understanding the foregoing, can readily make changes, variations, and equivalents to these embodiments. Therefore, it should be understood that this disclosure is provided for illustrative purposes and not for limitation, and does not exclude modifications, variations, and / or additions to the subject matter that would be obvious to those skilled in the art.

Claims

1. A method for decoding video from a video bitstream, the method comprising: Determine if the current CTU is the first CTU in the strip or tile; In response to determining that the current CTU is the first CTU in a strip or tile, the context variables for context-adaptive binary arithmetic coding (CABAC) are initialized according to the first context variable initialization procedure; In response to determining that the current CTU is not the first CTU in a strip or tile, determine whether wavefront parallel processing (WPP) decoding is enabled and whether the current CTU is the first CTU in the CTU row of the tile; In response to determining that the wavefront parallel processing decoding is enabled and that the current CTU is the first CTU in the CTU row of the tile, the available markers for the upper adjacent blocks of the current CTU are determined. In response to determining that the availability flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is available, the context variable is initialized according to the second context variable initialization procedure, and In response to the determination that the available flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is unavailable, the context variable is initialized according to the first context variable initialization procedure; In response to determining that the wavefront parallel processing decoding is not enabled or that the current CTU is not the first CTU in the CTU row of the tile, the context variable is not initialized; and Based on the context variables, the current CTU is decoded.

2. The method according to claim 1, wherein, The video is divided into images, strips, or tiles.

3. The method according to claim 1, wherein, Decoding the current CTU includes: further decoding the binary string corresponding to the current CTU into the coefficient value of the current CTU based on the palette predictor variable.

4. The method according to claim 1, wherein, Decoding the current CTU includes: based on the Rice parameter variable and the context variable, decoding the binary string corresponding to the current CTU into the coefficient value of the current CTU, including: calculating the Rice parameter of the current CTU based on the Rice parameter variable, and decoding the binary string corresponding to the current CTU into the coefficient value based on the calculated Rice parameter.

5. The method according to claim 1, further comprising: For each CTU in the multiple CTUs of the video segmentation, the Rice parameter variable is initialized to its initial value. Initializing the Rice parameter variable to its initial value includes setting the Rice parameter variable according to the following: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0, Where i = 0...2, StatCoeff[i] represents the Rice parameter variable, Floor(x) represents the largest integer less than or equal to x, and Log2(x) is the base-2 logarithm of x, and the value of sps_persistent_rice_adaptation_enabled_flag is 1, indicating that historical Rice parameter derivation is enabled.

6. The method according to claim 1, further comprising: In response to determining that the current CTU is the first CTU in a strip or tile, a palette predictor variable is initialized according to a first palette predictor initialization procedure, wherein the first palette predictor initialization procedure includes setting the palette predictor variable to 0.

7. The method according to claim 1, further comprising: In response to determining that the available flag of the upper adjacent block of the current CTU indicates that the upper adjacent block is available, the palette predictor variables are initialized according to the second palette predictor initialization procedure, wherein, when palette encoding is enabled, the second palette predictor initialization procedure, which is invoked in response to determining that the current CTU is the first CTU in the stripe, is executed.

8. The method according to claim 1, wherein, The available markers for the upper adjacent block of the current CTU are determined based on the position of the upper left luminance sample of the upper adjacent block.

9. A method for encoding video, the method comprising: Determine if the current CTU is the first CTU in the strip or tile; In response to determining that the current CTU is the first CTU in a strip or tile, the context variables for context-adaptive binary arithmetic coding (CABAC) are initialized according to the first context variable initialization procedure; In response to determining that the current CTU is not the first CTU in a strip or tile, determine whether wavefront parallel processing (WPP) decoding is enabled and whether the current CTU is the first CTU in the CTU row of the tile; In response to determining that the wavefront parallel processing decoding is enabled and that the current CTU is the first CTU in the CTU row of the tile, the available markers for the upper adjacent blocks of the current CTU are determined. In response to determining that the availability flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is available, the context variable is initialized according to the second context variable initialization procedure, and In response to the determination that the available flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is unavailable, the context variable is initialized according to the first context variable initialization procedure; In response to determining that the wavefront parallel processing decoding is not enabled or that the current CTU is not the first CTU in the CTU row of the tile, the context variable is not initialized; and The current CTU is encoded based on the context variables.

10. The method according to claim 9, wherein, The video is divided into images, strips, or tiles.

11. The method according to claim 9, wherein, Encoding the current CTU includes: further encoding the coefficient values ​​of TU in the current CTU into binary representation based on the palette predictor variable.

12. The method according to claim 9, wherein, Encoding the current CTU includes: encoding the coefficient values ​​of the TUs in the current CTU into binary representations based on the Rice parameter variable and the context variable, including: calculating the Rice parameter of the current CTU based on the Rice parameter variable, and encoding the coefficient values ​​of the TUs in the current CTU into the binary representations based on the calculated Rice parameter.

13. The method of claim 9, further comprising: For each CTU in the multiple CTUs of the video segmentation, the Rice parameter variable is initialized to its initial value. Initializing the Rice parameter variable to its initial value includes setting the Rice parameter variable according to the following: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0, Where i = 0...2, StatCoeff[i] represents the Rice parameter variable, Floor(x) represents the largest integer less than or equal to x, and Log2(x) is the base-2 logarithm of x, and the value of sps_persistent_rice_adaptation_enabled_flag is 1, indicating that historical Rice parameter derivation is enabled.

14. The method of claim 9, further comprising: In response to determining that the current CTU is the first CTU in a strip or tile, a palette predictor variable is initialized according to a first palette predictor initialization procedure, wherein the first palette predictor initialization procedure includes setting the palette predictor variable to 0.

15. The method of claim 9, further comprising: In response to determining that the available flag of the upper adjacent block of the current CTU indicates that the upper adjacent block is available, the palette predictor variables are initialized according to the second palette predictor initialization procedure, wherein, when palette encoding is enabled, the second palette predictor initialization procedure, which is invoked in response to determining that the current CTU is the first CTU in the stripe, is executed.

16. The method according to claim 9, wherein, The available markers for the upper adjacent block of the current CTU are determined based on the position of the upper left luminance sample of the upper adjacent block.

17. A video decoder for decoding video from a video bitstream, the decoder comprising: Memory, used to store executable program code for a computer; as well as The processor, coupled to the memory, is used to execute the computer-executable program code to: Determine if the current CTU is the first CTU in the strip or tile; In response to determining that the current CTU is the first CTU in a strip or tile, the context variables for context-adaptive binary arithmetic coding (CABAC) are initialized according to the first context variable initialization procedure; In response to determining that the current CTU is not the first CTU in a strip or tile, determine whether wavefront parallel processing (WPP) decoding is enabled and whether the current CTU is the first CTU in the CTU row of the tile; In response to determining that the wavefront parallel processing decoding is enabled and that the current CTU is the first CTU in the CTU row of the tile, the available markers for the upper adjacent blocks of the current CTU are determined. In response to determining that the availability flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is available, the context variable is initialized according to the second context variable initialization procedure, and In response to the determination that the available flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is unavailable, the context variable is initialized according to the first context variable initialization procedure; In response to determining that the wavefront parallel processing decoding is not enabled or that the current CTU is not the first CTU in the CTU row of the tile, the context variable is not initialized; and Based on the context variables, the current CTU is decoded.

18. The decoder according to claim 17, wherein, The video is divided into images, strips, or tiles.

19. The decoder according to claim 17, wherein, Decoding the current CTU includes: further decoding the binary string corresponding to the current CTU into the coefficient value of the current CTU based on the palette predictor variable.

20. A video encoder for encoding video, the encoder comprising: Memory, used to store executable program code for a computer; as well as The processor, coupled to the memory, is used to execute the computer-executable program code to: Determine if the current CTU is the first CTU in the strip or tile; In response to determining that the current CTU is the first CTU in a strip or tile, the context variables for context-adaptive binary arithmetic coding (CABAC) are initialized according to the first context variable initialization procedure; In response to determining that the current CTU is not the first CTU in a strip or tile, determine whether wavefront parallel processing (WPP) decoding is enabled and whether the current CTU is the first CTU in the CTU row of the tile; In response to determining that the wavefront parallel processing decoding is enabled and that the current CTU is the first CTU in the CTU row of the tile, the available markers for the upper adjacent blocks of the current CTU are determined. In response to determining that the availability flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is available, the context variable is initialized according to the second context variable initialization procedure, and In response to the determination that the available flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is unavailable, the context variable is initialized according to the first context variable initialization procedure; In response to determining that the wavefront parallel processing decoding is not enabled or that the current CTU is not the first CTU in the CTU row of the tile, the context variable is not initialized; and The current CTU is encoded based on the context variables.

21. A computer-readable storage medium having a computer program and a code stream stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method for encoding video as described in claim 9 to generate the bitstream.

Citation Information

Patent Citations

  • Method and apparatus for coding video data block using palette coding

    CN110336999A

  • Encoder, decoder and corresponding methods using history based motion vector prediction

    CN112715031A

  • An encoder, a decoder and corresponding methods using IBC dedicated buffer and default value refreshing for luma and chroma component

    CN113039798A

  • Method, apparatus and system for encoding and decoding video data

    WO2017197434A1

  • Method and apparatus for parallel encoding and decoding of moving picture data

    WO2020231220A1