Initialization process for video encoding

By simplifying the video encoding initialization process, especially eliminating unnecessary initialization steps and uniformly initializing the first CTU in a CTU row, the problems of low encoding efficiency and parallel processing delay in the existing technology are solved, achieving more efficient video encoding and faster processing speed.

CN119071510BActive Publication Date: 2025-10-10GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411264946.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-11-11
Filing Date
2022-11-11
Publication Date
2025-10-10
Estimated Expiration
2042-11-11

AI Technical Summary

Technical Problem

Existing video coding technologies have unnecessary steps in the initialization process, which leads to low coding efficiency and parallel processing delays, affecting the speed and resource consumption of video coding.

Method used

By eliminating unnecessary initialization steps under certain conditions, such as initializing context variables, Rice parameter variables, and palette predictor variables only for CTUs that meet certain conditions, the encoding process is simplified, and the first CTU in a CTU row is uniformly initialized when parallel processing is enabled, eliminating delays.

Benefits of technology

The coding efficiency is improved, the complexity of the video encoder and decoder is reduced, resource consumption is reduced, and the video processing process is accelerated without reducing the coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071510B_ABST
    Figure CN119071510B_ABST
Patent Text Reader

Abstract

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

Description

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

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

[0003] The present disclosure generally relates to computer-implemented methods and systems for video processing. Specifically, the present disclosure relates to an initialization process for video encoding. Background Art

[0004] Ubiquitous devices with camera functions, such as smartphones, tablets, and computers, have made it easier than ever to capture videos or images. However, even short videos can be very large in data size. Video coding technology (including video encoding and video decoding) can compress video data into smaller sizes, making it possible to store and transmit various videos. Video coding has been 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, etc. In order to reduce the storage space used to store videos and / or the network bandwidth consumption used to transmit videos, it is necessary to improve the efficiency of video coding schemes. Summary of the Invention

[0005] Some embodiments relate to initialization processing for video coding. In one example, a method for decoding a video from a video bitstream includes accessing a bin string representing a partition of the video, the partition including a plurality of coding tree units (CTUs) forming one or more CTU rows; for each CTU of the plurality of CTUs in the partition, determining whether the CTU is a first CTU in a tile; in response to determining that the CTU is the first CTU in the tile, initializing a context variable for context-adaptive binary arithmetic coding (CABAC) according to a first context variable initialization process, initializing a Rice parameter variable according to a first Rice parameter variable initialization process, and initializing a palette predictor variable according to a first palette predictor initialization process; 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 a first CTU in a CTU row of the tile; in response to determining that parallel coding is enabled and that the CTU is the first CTU in the CTU row of the tile, determining an available flag of an upper neighboring block of the CTU, in response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is available, initializing the context variable according to a second context variable initialization process, initializing the Rice parameter variable according to a second Rice parameter variable initialization process, and initializing the palette predictor variable according to a second palette predictor initialization process, and in response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is not available, initializing the context variable according to the first context variable initialization process, initializing the Rice parameter variable according to the first Rice parameter variable initialization process, and initializing 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 the tile, determining whether the CTU is a first CTU in a slice and whether the slice is a dependent slice, in response to determining that the CTU is the first CTU in the slice and that the slice is the dependent slice, initializing the context variable according to a third context variable initialization process, initializing the Rice parameter variable according to a third Rice parameter variable initialization process, and initializing the palette predictor variable according to a third palette predictor initialization process, and in response to determining that the CTU is not the first CTU in the slice or that the slice is not the dependent slice, not performing initialization of the context variable, the Rice parameter variable, and the palette predictor variable; and decoding the CTU, including decoding the bin string corresponding to the CTU into coefficient values of the CTU based on the Rice parameter variable and the context variable, and determining pixel values of the CTU from the coefficient values.

[0006] In another example, a method for decoding video from a video bitstream includes accessing a bin string representing a partition of the video, the partition including a plurality of CTUs forming one or more CTU rows; initializing a Rice parameter variable to an initial value for each CTU of the plurality of CTUs in the partition; determining whether the CTU is a first CTU in a slice or tile; in response to determining that the CTU is the first CTU in the slice or tile, initializing a context variable for CABAC according to a first context variable initialization process and initializing a palette predictor variable according to a first palette predictor initialization process; in response to determining that the CTU is not the first CTU in the slice or tile, determining whether parallel encoding is enabled and whether the CTU is a first CTU in a CTU row of a tile; in response to determining that parallel encoding is enabled and that the CTU is the first CTU in the CTU row of the tile, determining an available flag of an upper neighboring block of the CTU, in response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is available, initializing the context variable according to a second context variable initialization process and initializing the palette predictor variable according to a second palette predictor initialization process, and in response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is not available, initializing the context variable according to the first context variable initialization process and initializing the palette predictor variable according to the first palette predictor initialization process; in response to determining that parallel encoding is not enabled or that the CTU is not the first CTU in the CTU row of the tile, not performing initialization of the context variable and the palette predictor variable; and decoding the CTU, including decoding the bin string corresponding to the CTU into coefficient values of the CTU based on the Rice parameter variable and the context variable, and determining pixel values of the CTU from the coefficient values.

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

[0008] In another example, a method for encoding a video includes accessing a partition of a video, the partition including a plurality of CTUs forming one or more CTU rows; processing the partition of the video to generate a binary representation of the partition, the processing including, for each CTU of the plurality of CTUs in the partition, determining whether the CTU is a first CTU in a 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 process, initializing a Rice parameter variable according to a first Rice parameter variable initialization process, and initializing a palette predictor variable according to a first palette predictor initialization process; in response to determining that the CTU is not the first CTU in the tile, determining whether parallel encoding is enabled and whether the CTU is a first CTU in a CTU row of the tile; in response to determining that parallel encoding is enabled and that the CTU is the first CTU in the CTU row of the tile, determining an available flag of an upper neighboring block of the CTU, in response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is available, initializing the context variable according to a second context variable initialization process, initializing the Rice parameter variable according to a second Rice parameter variable initialization process, and initializing the palette predictor variable according to a second palette predictor initialization process, and in response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is not available, initializing the context variable according to the first context variable initialization process, initializing the Rice parameter variable according to the first Rice parameter variable initialization process, and initializing the palette predictor variable according to the first palette predictor initialization process; in response to determining that parallel encoding is not enabled or that the CTU is not the first CTU in the CTU row of the tile, determining whether the CTU is a first CTU in a slice and whether the slice is a dependent slice, in response to determining that the CTU is the first CTU in the slice and that the slice is the dependent slice, initializing the context variable according to a third context variable initialization process, initializing the Rice parameter variable according to a third Rice parameter variable initialization process, and initializing the palette predictor variable according to a third palette predictor initialization process, and in response to determining that the CTU is not the first CTU in the slice or that the slice is not the dependent slice, not performing initialization of the context variable, the Rice parameter variable, and the palette predictor variable; and encoding the CTU, including encoding, based on the Rice parameter variable and the context variable, coefficient values of transform units (TUs) in the CTU into the binary representation, and encoding the binary representation of the partition into a bitstream of the video.

[0009] In another example, a method for encoding a video includes: accessing a partition of the video, the partition including a plurality of CTUs forming one or more CTU rows; 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 slice or tile; in response to determining that the CTU is the first CTU in the slice or tile, initializing context variables for CABAC according to a first context variable initialization process and initializing a palette predictor variable according to a first palette predictor initialization process; in response to determining that the CTU is not the first CTU in the slice or tile, determining whether parallel coding is enabled and whether the CTU is the first CTU in a 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, TU, determining an available flag of an upper neighboring block of a CTU, in response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is available, initializing context variables according to a second context variable initialization process, and initializing palette predictor variables according to a second palette predictor initialization process, 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, initializing context variables according to a first context variable initialization process, and initializing palette predictor variables according to a first palette predictor initialization process; in response to determining that parallel encoding is not enabled or the CTU is not the first CTU in a CTU row of a tile, not initializing the context variables and the palette predictor variables; and encoding the CTU, including encoding coefficient values ​​of the TUs in the CTU into binary representations based on Rice parameter variables and context variables, and encoding the divided binary representations into a code stream of the video.

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

[0011] Reference to these illustrative embodiments is not intended to limit or define the disclosure, but to provide examples to help explain the present disclosure. Other embodiments can be discussed without departing from the intended scope of the disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0012] The features, embodiments, and advantages of the present disclosure can be better understood with reference to the following detailed description when read in conjunction with the accompanying drawings.

[0013] Figure 1 is a block diagram illustrating an example of a video encoder for implementing embodiments presented herein.

[0014] Figure 2 is a block diagram illustrating an example of a video decoder for implementing embodiments presented herein.

[0015] Figure 3 depicts an example of a coding tree unit partition of a picture in a video according to some embodiments of the present disclosure.

[0016] Figure 4 depicts an example of a coding unit partition of a coding tree unit according to some embodiments of the present disclosure.

[0017] Figure 5 depicts an example of a tile with wavefront parallel processing enabled.

[0018] Figure 6 depicts an example of a process for encoding a partition of a video according to some embodiments of the present disclosure.

[0019] Figure 7 An example of a process for decoding a partition of a video according to some embodiments of the disclosure is depicted.

[0020] Figure 8 Another example of a process for encoding a partition of a video according to some embodiments of the disclosure is depicted.

[0021] Figure 9 Another example of a process for decoding a partition of a video according to some embodiments of the disclosure is depicted.

[0022] Figure 10 Another example of a process for encoding a partition of a video according to some embodiments of the disclosure is depicted.

[0023] Figure 11 Another example of a process for decoding a partition of a video according to some embodiments of the disclosure is depicted.

[0024] Figure 12 An example of a computing system that can be used to implement some embodiments of the disclosure is depicted. DETAILED DESCRIPTION

[0025] Various embodiments provide initialization processing for video encoding. As described above, more and more video data is being generated, stored, and transmitted. It is beneficial to improve the efficiency of video encoding techniques, so that less data is used to represent a video without compromising the visual quality of the decoded video. One way to improve the encoding efficiency is through entropy coding, to compress the processed video samples into binary bitstreams using as few bits as possible. On the other hand, because a video typically contains a large amount of data, it is beneficial to reduce the processing time during encoding (both encoding and decoding). To this end, parallel processing can be employed in video encoding and decoding.

[0026] In entropy coding, video samples are binarized into binary bins, and an encoding algorithm such as CABAC can further compress the bins into bits. Binarization requires the computation of binarization parameters, for example, the Rice parameter used in the combination of truncated Rice (TR) binarization and k-th order Ep-Golomb (EGk) binarization processes specified in the versatile video coding (VVC) specification, or the Rice parameter used in the Golomb-Rice codes specified in the high efficiency video coding (HEVC) specification.

[0027] For computer-generated content with a large amount of text and simple graphics, palette mode can be used to provide higher compression efficiency than regular block-based residual prediction and transform coding. Palette mode coding includes coding a palette and a palette index for each spatial location covered by a coding unit.

[0028] Various variables involved in video coding, such as entropy coding variables, palette prediction variables, and parallel processing variables, need to be initialized for coding. However, due to the relationship between CTUs of a video (e.g., a current CTU is related to a previous CTU because the current CTU is spatially adjacent to the previous CTU), inappropriate initialization can reduce coding efficiency. For example, existing slice and tile initialization and wavefront parallel processing (WPP) initialization in HEVC and VVC specifications can 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.

[0029] Various embodiments described herein address these issues by omitting unnecessary initialization operations in partitioning, which can simplify the coding process and improve coding efficiency. Furthermore, initialization delay in parallel processing can be eliminated by appropriate initialization processes, which can speed up the video processing process without significantly reducing coding efficiency. Non-limiting examples are provided below to introduce some embodiments.

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

[0031] In another embodiment, the initialization of the context variables for CABAC, the Rice parameter variables, and the palette predictor variables of a CTU is further simplified to employ the same initialization scheme for all CTUs that satisfy the initialization condition. For example, in this embodiment, when WPP is enabled, for the first CTU in each CTU row, all dependent variables (e.g., the context variables for CABAC, the variables for palette prediction, and the variables for Rice parameter derivation, etc.) between CTUs are reset to their respective initial values before the current picture is encoded. Thus, the encoding of a CTU row does not depend on the previous CTU row, and multiple CTU rows can be processed in parallel using WPP without delay. Therefore, in addition to the advantages of reducing the complexity of the video encoder and decoder and reducing resource consumption, the encoding delay in parallel processing is also reduced in this embodiment. The techniques presented herein can become an efficient coding tool in the video coding standard.

[0032] Reference will now be made to the drawings, Figure 1 is a block diagram illustrating an example of a video encoder 100 for implementing the embodiments presented herein. In Figure 1 In the illustrated example, 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 prediction module 126, an inter prediction module 124, a motion estimation module 122, a decoded picture buffer 130, and an entropy encoding module 116.

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

[0034] Generally, the first picture of a video signal is an intra predicted picture, which is encoded using only intra prediction. In intra prediction mode, the blocks of a picture are predicted using only data from the same picture. An intra predicted picture can be decoded without information from other pictures. To perform intra prediction, Figure 1The illustrated video encoder 100 can employ an intra prediction module 126. The intra prediction module 126 is configured to generate an intra predicted block (predicted block 134) using reconstructed samples in reconstructed blocks 136 of neighboring blocks of the same picture. The intra prediction is performed according to an intra prediction mode selected for the block. The video encoder 100 then calculates a difference between the block 104 and the intra predicted block 134. This difference is referred to as a residual block 106.

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

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

[0037] The quantization of coefficients / samples within a block can be done independently and this quantization approach is used in some existing video compression standards, such as H.264 and HEVC. For an NxM block, a specific scan order can be used to convert the 2-D coefficients of the block into a 1-D array for coefficient quantization and encoding. The quantization of coefficients within a block can exploit the scan order information. For example, the quantization of a given coefficient in the block can depend on the state of the previously quantized values along the scan order. To further improve the coding efficiency, more than one quantizer can be used. Which quantizer is used to quantize the current coefficient depends on the information that is earlier than the current coefficient in the encoding / decoding scan order. This quantization approach is referred to as dependent quantization.

[0038] A quantization step size can be used to adjust the degree of quantization. For example, for scalar quantization, different quantization step sizes can be applied to achieve finer or coarser quantization. A smaller quantization step size corresponds to finer quantization, while a larger quantization step size corresponds to coarser quantization. The quantization step size can be indicated by a quantization parameter (QP). The quantization parameter is provided in the coded bitstream of the video so that the video decoder can apply the same quantization parameter for decoding.

[0039] The entropy encoding module 116 then encodes the quantized samples to further reduce the size of the video signal. The entropy encoding module 116 is configured to apply an entropy encoding algorithm to the quantized samples. In some examples, the quantized samples are binarized into binary bins, and the encoding 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 Exp-Golomb (EGk) binarization. To improve encoding efficiency, a history-based Rice parameter derivation is used, in which a Rice parameter for a TU is derived based on variables obtained or updated from previous TUs. Examples of entropy encoding algorithms include, but are not limited to, variable length coding (VLC) schemes, context adaptive VLC scheme (CAVLC), arithmetic coding schemes, binarization, CABAC, syntax-based context-adaptive binary arithmetic coding (SBAC), probability interval partitioning entropy (PIPE) coding, or other entropy encoding techniques. The entropy encoded data is added to the bitstream of the output coded video 132.

[0040] As mentioned above, reconstructed blocks 136 from neighboring blocks are used in intra prediction of a block of an image. Generating a reconstructed block 136 of a block involves computing a reconstructed residual for the block. The reconstructed residual can be determined by applying inverse quantization and inverse transform to the quantized residual of the block. The inverse quantization module 118 is configured to apply inverse quantization to the quantized samples to obtain dequantized coefficients. The inverse quantization module 118 applies an inverse of the quantization scheme applied by the quantization module 115 by using the same quantization step size as the quantization module 115. The inverse transform module 119 is configured to apply an inverse of the transform applied by the transform module 114, such as inverse DCT or inverse DST, to the dequantized samples. The output of the inverse transform module 119 is the reconstructed residual of the block in the pixel domain. The reconstructed residual can be added to the predicted block 134 of the block to obtain the reconstructed block 136 in the pixel domain. For blocks with skip transform, the inverse transform module 119 is not applied to those blocks. The dequantized samples are the reconstructed residual of the block.

[0041] Subsequent pictures in the first intra-predicted picture can be encoded using inter-prediction or intra-prediction. In inter-prediction, the prediction for a block in a picture comes from one or more previously encoded video pictures. To perform inter-prediction, video encoder 100 uses inter-prediction module 124. Inter-prediction module 124 is configured to perform motion compensation for a block based on motion estimates provided by motion estimation module 122.

[0042] Motion estimation module 122 compares current block 104 of a current picture to decoded reference pictures 108 for motion estimation. Decoded reference pictures 108 are stored in decoded picture buffer 130. Motion estimation module 122 selects a reference block from decoded reference pictures 108 that best matches the current block. Motion estimation module 122 further identifies an offset between the location of the reference block (e.g., x, y coordinates) and the location of the current block. This offset is referred to as a motion vector (MV) and is provided to inter-prediction module 124. In some cases, multiple reference blocks are identified for the block in multiple decoded reference pictures 108. Thus, multiple motion vectors are generated and provided to inter-prediction module 124.

[0043] Inter-prediction module 124 uses the motion vector and other inter-prediction parameters to perform motion compensation to generate a prediction for the current block (i.e., inter-predicted block 134). For example, based on the motion vector, inter-prediction module 124 can locate a prediction block in a corresponding reference picture that the motion vector points to. If there is more than one prediction block, the prediction blocks are combined with some weights to generate the prediction block 134 for the current block.

[0044] For inter-predicted blocks, video encoder 100 can subtract inter-predicted block 134 from block 104 to generate residual block 106. Residual block 106 can be transformed, quantized, and entropy encoded in the same manner as the residuals for intra-predicted blocks discussed above. Likewise, a reconstructed block 136 for an inter-predicted block can be obtained by inverse quantizing, inverse transforming, and then combining the residual with the corresponding prediction block 134.

[0045] To obtain decoded pictures 108 for motion estimation, loop filter module 120 processes reconstructed blocks 136. Loop filter module 120 is configured to smooth pixel transitions, thereby improving video quality. Loop filter module 120 can be configured to implement one or more loop filters, such as a de-blocking filter, or a sample-adaptive offset (SAO) filter, or an adaptive loop filter (ALF), etc.

[0046] Figure 2 An example of a video decoder 200 for implementing embodiments presented herein is depicted. The video decoder 200 processes encoded video 202 in a bitstream and generates decoded pictures 208. In 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, an in-loop filter module 220, an intra prediction module 226, an inter prediction module 224, and a decoded picture buffer 230.

[0047] The entropy decoding module 216 is configured to perform entropy decoding of the encoded video 202. The entropy decoding module 216 decodes quantized coefficients, coded parameters including intra prediction parameters and inter prediction parameters, and other information. In some examples, the entropy decoding module 216 decodes a bitstream of the encoded video 202 into a binary representation, and then converts the binary representation into quantized levels of coefficients. The entropy-decoded coefficients are then inverse quantized by the inverse quantization module 218 and subsequently inverse transformed by the inverse transform module 219 into the pixel domain. The functions of the inverse quantization module 218 and the inverse transform module 219 are respectively similar to those of the quantization module 114 and the transform module 116 described above with reference to FIG. 1. Figure 1 The inverse quantization module 218 and the inverse transform module 219 are described above with reference to FIG. 1. The inverse-transformed residual blocks can be added to the corresponding prediction blocks 234 to generate the reconstructed blocks 236. For blocks that are skipped from transform, the inverse transform module 219 is not applied to those blocks. The dequantized samples generated using the inverse quantization module 118 are used to generate the reconstructed blocks 236.

[0048] A prediction block 234 for a particular block is generated based on the prediction mode of the block. If the coded parameters of the block indicate that the block is intra predicted, the reconstructed blocks 236 of reference blocks in the same picture can be fed back into the intra prediction module 226 to generate the prediction block 234 for the block. If the coded parameters of the block indicate that the block is inter predicted, the inter prediction module 224 generates the prediction block 234. The functions of the intra prediction module 226 and the inter prediction module 224 are respectively similar to those of the intra prediction module 126 and the inter prediction module 124 described above with reference to FIG. 1. Figure 1 The intra prediction module 226 and the inter prediction module 224 are described above with reference to FIG. 1.

[0049] As discussed above with reference to Figure 1 Inter prediction involves one or more reference pictures. The video decoder 200 generates decoded pictures 208 for the reference pictures by applying the in-loop filter module 220 to the reconstructed blocks of the reference pictures. The decoded pictures 208 are stored in the decoded picture buffer 230 for use by the inter prediction module 224 and also for output.

[0050] Reference is now made to Figure 3 , Figure 3 An example of coding tree unit partitioning of pictures in a video according to some embodiments of the present disclosure is depicted. As discussed above with reference to Figure 1 and Figure 2 To encode the images of a video, the images are divided into blocks, e.g., as shown in Figure 3 CTU 302 in VVC. For example, the CTU 302 can be a block of 128x128 pixels. The CTU is processed according to an order, e.g., as shown in Figure 3 In some examples, as shown in Figure 4 Each CTU 302 in an image can be divided into one or more coding units (CU) 402, which can be further divided into prediction units for prediction or transform units for transform, as shown in Figure 4 The division from CTU 302 to CU 402 in VVC can be quad-tree partitioning or binary-tree partitioning or ternary-tree partitioning, as shown in Figure 4 In the above, solid lines represent quad-tree partitioning, and dashed lines represent binary- or ternary-tree partitioning.

[0051] Initialization processing

[0052] Initialization is an important step in video coding. In the existing HEVC specification (ITU-T, “High Efficiency Video Coding”, Nov. 2019) and VVC specification (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 coding. For example, initial values are used to derive two context variables ctxTable and ctxldx indices for CABAC in HEVC. In VVC, initial ctxTable and ctxldx are used to derive two context variables pStateIdx0 and pStateIdx1. The context variables are used to derive multiple variables for compressing bins in CABAC. In HEVC, when Rice parameter adaptation is enabled, the initial values of the variables StatCoeff[k] are 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 values of the variables StatCoeff[idx] are initialized, where idx represents the luma component and two chroma components. Furthermore, when palette prediction is allowed in HEVC and VVC, two palette prediction related variables PredictorPaletteSize and PredictorPaletteEntries also need to be initialized.

[0053] Residual Coding

[0054] In video coding, residual coding is used to convert quantization levels into a bitstream. After quantization, an NxM TU coding block has N x M quantization levels. These N x M levels can be zero or non-zero. If the non-zero levels are not binary, the non-zero levels are further binarized into binary bins. CABAC can further compress the bins into bits. Furthermore, there are two coding methods based on context modeling. Specifically, one of the above methods is to update the context model adaptively according to the neighboring coded information. This method is called the context coding method, and the bins coded in this way are called context coded bins. In contrast, the other method assumes that the probability of 1 or 0 is always 50%, so a fixed context model is always used without adjustment. This method is called the bypass method, and the bins coded in this way are called bypass bins.

[0055] 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 4 prefix and suffix syntax elements, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix. The syntax elements last_sig_coeff_x_prefix and last_sig_coeff_y_prefix are first coded with a context coding method. If last_sig_coeff_x_suffix and last_sig_coeff_y_suffix exist, last_sig_coeff_x_suffix and last_sig_coeff_y_suffix are coded using a bypass method. A RRC block can be composed of multiple predefined sub-blocks. The syntax element sb_coded_flag is used to indicate whether the current sub-block has all levels equal to zero. If sb_coded_flag is equal to 1, there is at least one non-zero coefficient in the current sub-block. If sb_coded_flag is equal to 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 derived as 1 from last_sig_coeff_x and last_sig_coeff_y according to the coding scan order, without being coded into the bitstream. In addition, the sb_coded_flag of the top-left sub-block containing the DC position is also derived as 1, without being coded into the bitstream. The syntax elements of sb_coded_flag in the bitstream are coded with a context coding method. RRC will start from the last non-zero sub-block and code sub-block by sub-block in reverse coding scan order.

[0056] For a block coded in transform skip residual coding (TSRC) mode, TSRC will start from the top-left sub-block and code sub-block by sub-block in coding scan order. Similarly, a syntax element sb_coded_flag is used to indicate whether all the residuals of the current sub-block are equal to zero. When certain conditions occur, all the syntax elements sb_coded_flag of all the sub-blocks except the last one are coded into the bitstream. If all the sb_coded_flag of all the sub-blocks before the last one are not equal to 1, the sb_coded_flag of the last sub-block will be derived as 1 and the flag is not coded into the bitstream. To guarantee the worst case throughput, a pre-defined value RemCcbs is used to limit the maximum context coded bins. If the current sub-block has non-zero level, TSRC will code the level of each position in coding scan order. If RemCcbs is greater than 4, the following syntax elements will be coded using context coding method. For each level, sig_coeff_flag is coded into the bitstream first to indicate whether the level is zero or non-zero. If the level is non-zero, coeff_sign_flag is coded to indicate whether the level is positive or negative. Then abs_level_gtx_flag[n][0] is coded to indicate whether the current absolute level of the current position is greater than 1, where n is the index of the current position within the sub-block in scan order. If abs_level_gtx_flag[n][0] is not zero, par_level_flag is coded. After each of the above syntax elements is coded using context coding method, the value of RemCcbs will be reduced by 1.

[0057] After the above syntax elements for all positions within the current subblock are coded, if RemCcbs is still greater than 4, then at most four more abs_level_gtx_flag[n][j] are coded with the context coding method, where n is the index of the current position within the subblock along the scan order; j is 1 to 4. After each abs_level_gtx_flag[n][j] is coded, the value of RemCcbs will be decremented by 1. If RemCcbs is not greater than 4, then the syntax element abs_remainder for the current position within the subblock is coded with the bypass method if necessary. For positions where the absolute level is fully coded with the abs_remainder syntax element by the bypass method, coeff_sign_flags is also coded by the bypass method. In summary, there is a pre-defined counter remBinsPassl in RRC or RemCcbs in TSRC to limit the total number of context coded bins and to ensure the worst case throughput.

[0058] Rice parameter derivation

[0059] In the current RRC design in VVC, for the remaining levels, there can be two syntax elements abs_remainder and dec_abs_level coded as bypass bins in the bitstream. Both abs_remainder and dec_abs_level are binarized by a combination of the TR binarization and the finite k-th order EGk binarization process specified in the VVC specification, which requires a Rice parameter to binarize a given level. To obtain the optimal Rice parameter, a local summation method is employed as described below.

[0060] An array AbsLevel[xC][yC] represents an array of absolute values of transform coefficient levels of a current transform block of a color component index cldx. Given an array AbsLevel[x][y] of a transform block, where the color component index is cldx, and the top-left luma position is (x0, y0), the local sum variable locSumAbs is derived according to the following pseudo code procedure:

[0061]

[0062] where log2TbWidth is the base-2 logarithm of the width of the transform block and log2TbHeight is the base-2 logarithm of the height of the transform block. For abs_remainder and dec_abs_level, the variable baseLevel is 4 and 0, respectively. Given the local sum variable locSumAbs, the Rice parameter cRiceParam is derived as specified in Table 1.

[0063] Table 1 - cRiceParam specification based on locSumAbs

[0064] 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

[0065] Derivation of Rice parameters based on history

[0066] If a coefficient is located at a TU boundary or is decoded for the first time using the Rice method, the template calculation for Rice parameter derivation can produce inaccurate coefficient estimates. Because some template positions can be located outside the TU and interpreted or initialized to the value 0, the template calculation is biased towards 0 for these coefficients. To improve the accuracy of the Rice estimates from the calculated template, for template positions outside the current TU, the local sum variable locSumAbs is updated with the historically derived value, instead of being initialized to 0. The implementation of this method is shown in the following excerpt from the VVC specification text in clause 9.3.3.2.

[0067] To maintain the history of neighboring coefficient / sample values, a history counter StatCoeff[cldx] is utilized for each color component, cldx = 0, 1, 2, representing the three color components Y, U, V, respectively. If the CTU is the first CTU in a partition (e.g., picture, slice, or tile), StatCoeff[cldx] is initialized as follows:

[0068] StatCoeff[ idx ] = 2 * Floor( Log2( BitDepth - 10 ) (1)

[0069] Here, BitDepth specifies the bit depth of samples of the luma and chroma arrays of the video; Floor(x) denotes the largest integer less than or equal to x, and Log2(x) is the logarithm of x with base 2. Before decoding a TU and updating the history counter, the replacement variable HistValue is initialized as:

[0070] HistValue[cldx] = 1 « StatCoeff[cldx] (2)

[0071] The replacement variable HistValue is used as an estimate for neighboring samples outside the TU (e.g., neighboring samples having a horizontal or vertical coordinate outside the TU). The local sum variable locSumAbs is re-derived according to the following pseudo-code procedure, with the changes marked in underlining:

[0072]

[0073] The history counter StatCoeff is updated once per TU from the first non-zero Golomb-Rice coded transform coefficient (abs_remainder[cldx] or dec_abs_level[cIdx]) by an exponential moving average process. When the first non-zero Golomb-Rice coded transform coefficient in a TU is coded as abs_remainder, the history counter StatCoeff for the color component cldx is updated as follows:

[0074] StatCoeff[cldx] = ( StatCoeff[cldx] + Floor( Log2( abs_remainder[cldx] ) ) + 2 ) » 1 (3)

[0075] When the first non-zero Golomb-Rice coded transform coefficient in a TU is coded as dec_abs_level, the history counter StatCoeff for the color component cldx is updated as follows:

[0076] StatCoeff[cldx] = ( StatCoeff[cldx] + Floor( Log2( dec_abs_level[cldx] ) ) ) » 1 (4)

[0077] Before decoding the next TU, the replacement variable HistValue for the next TU can be computed using the updated StatCoeff according to equation (2).

[0078] In HEVC, in order to binarize the remaining absolute value of a transform coefficient level coded with Golomb-Rice code at scan position n (denoted as coeff_abs_level_remaining[n]), a Rice parameter is also used. Given the syntax element coeff_abs_level_remaining[n], the current subblock scan index i, baseLevel, the color component cldx, and the luma position (x0, y0) of the top-left sample of the current luma transform block relative to the top-left luma sample of the picture, the syntax element can be binarized as specified in section 9.3.3.11 of the HEVC specification as follows.

[0079] Depending on the value of persistent_rice_adaptation_enabled_flag, the following applies:

[0080] - If persistent_rice_adaptation_enabled_flag is equal to 0, the variable initRiceValue is set equal to 0.

[0081] - Otherwise (persistent_rice_adaptation_enabled_flag is equal to 1), the following applies:

[0082] - The variable sbType is derived as follows:

[0083] o If transform_skip_flag[ x0 ][ y0 ][ cldx ] is equal to 0 and cu_transquant_bypass_flag is equal to 0, the following applies

[0084] :

[0085] sbType = 2 * ( cldx = = 0? 1 : 0 ) (9-20)

[0086] o Otherwise, the following applies:

[0087] sbType = 2 * ( cldx = = 0? 1 : 0 ) + 1 (9-21)

[0088] - The variable initRiceValue is derived as follows:

[0089] initRiceValue = StatCoeff[ sbType ] / 4 (9-22)

[0090] - If the process is invoked for the first time for the current sub-block to scan index i, StatCoeff[ sbType ] is modified as follows:

[0091] if( coeff_abs_level_remaining[ n ] > = ( 3 << ( StatCoeff[ sbType ] / 4 ) ) )

[0092] StatCoeff[ sbType ]++

[0093] else if( 2 * coeff_abs_level_remaining[ n ] < ( 1 << ( StatCoeff[ sbType ] / 4 ) ) && StatCoeff[ sbType ] > 0 )

[0094] StatCoeff[ sbType ]--

[0095] StatCoeff[ sbType ]-- (9-23)

[0096] The variables cLastAbsLevel and cLastRiceParam are derived as follows:

[0097] - If this procedure is called for the first time for the current sub-block scan index i, cLastAbsLevel is set equal to 0 and cLastRiceParam is set equal to initRiceValue.

[0098] - Otherwise (this is not the first time this process is called for the current sub-block scan index i), cLastAbsLevel and cLastRiceParam are set equal to the values ​​of cAbsLevel and cRiceParam, respectively, which were derived during the last call of the binarization process for the syntax element coeff_abs_level_remaining[n] as specified in this clause.

[0099] The variable cAbsLevel is set equal to baseLevel + coeff_abs_level_remaining[n].

[0100] The variable cRiceParam is derived from cLastAbsLevel and cLastRiceParam as follows:

[0101] - If persistent_rice_adaptation_enabled_flag is equal to 0, the following applies:

[0102] cRiceParam = Min( cLastRiceParam + ( cLastAbsLevel > (3*(1< <cLastRiceParam)) ? 1:0),4) (9-24)

[0103] - Otherwise (persistent_rice_adaptation_enabled_flag is equal to 1), the following applies:

[0104] cRiceParam = cLastRiceParam+(cLastAbsLevel > (3*(1< <cLastRiceParam)) ? 1:0) (9-25)

[0105] The variable cMax is derived from cRiceParam as:

[0106] cMax=< <cRiceParam (9-26)

[0107] The binarization of the syntax element coeff_abs_level_remaining[ n ] is the concatenation of the prefix bin string and the suffix bin string (if present).

[0108] For the derivation of the prefix bin string, the following applies:

[0109] - the prefix value prefixVal for coeff_abs_level_remaining[ n ] is derived as follows:

[0110] prefixVal = Min( cMax, coeff_abs_level_remaining[ n ] ) (9-27)

[0111] - the prefix bin string is specified by invoking the TR-binarization process for prefixVal as specified in clause 9.3.3.2 with the variables cMax and cRiceParam as inputs.

[0112] - if the prefix bin string is equal to the bit string of length 4 with all bits equal to 1, there is a suffix bin string and it is derived as follows:

[0113] - the suffix value suffixVal for coeff_abs_level_remaining[ n ] is derived as follows:

[0114] suffixVal = coeff_abs_level_remaining[ n ] - cMax (9-28)

[0115] - if extended_precision_processing_flag is equal to 0, the suffix bin string is specified by invoking the k-th order EGk-binarization process for the binarization of suffixVal as specified in clause 9.3.3.3 with the order k of the Exp-Golomb set equal to cRiceParam + 1.

[0116] - otherwise (extended_precision_processing_flag is equal to 1), the suffix bin string is specified by invoking the limited k-th order EGk-binarization process for the binarization of suffixVal as specified in clause 9.3.3.4 with the variable riceParam set equal to cRiceParam + 1

[0117] and the color component cldx.

[0118] Palette mode encoding

[0119] For computer-generated content with a large amount of text and simple graphics, palette mode provides higher compression efficiency than regular block-based residual prediction and transform coding. The palette mode coding path starts at the coding unit in HEVC and VVC and employs the entropy coding engine of the hybrid video coding architecture. The palette mode in the HEVC SCC extension supports coding units of size 32x32 and smaller and consists of two parts: the coding of a list representing the different samples, i.e., the palette, and the coding of the palette index for each spatial position covered by the coding unit. A palette entry includes an index into the palette and the corresponding sample, where the sample is a triplet for non-monochrome video formats.

[0120] Each coding unit employing the palette mode uses its own palette, and due to the high correlation between palettes in neighboring regions, the signaling includes a prediction. The predictor stores the palette information of the used palettes and either constructs the palette of the current coding unit using a flag indicating to reuse predictor entries or adds new samples to the palette when the sample is not in the predictor's list. For the latter case, the predictor is then updated with the palette, and then the elements not used by the predictor are updated until the predictor reaches the maximum size. The maximum size of the palette is 64, and the maximum size of the predictor in the HEVC SCC extension is 128, where smaller values can be signaled within the SPS. However, in VVC, the maximum size of the palette and predictor cannot be adjusted.

[0121] After the palette construction is completed, the coding of the spatial positions covered by the coding unit using either a horizontal or vertical scan pattern is started. For each scan position, the encoder writes the palette index into the bitstream using run-length coding with two types of classification: copy index and copy above, where copy index indicates to directly write the index of the palette entry into the bitstream. On the other hand, for the copy above mode, the index is the same as the index of the above row (or left column) of the horizontal (or vertical) scan pattern. For the residual coding stage in VVC, the coding of the samples occurs in multiple scan passes, where the first coding pass writes the index of the scan position into the bitstream using the copy index type. The second coding pass includes context-coded bins representing the type and run information. Finally, the third scan pass specifies the samples of the scan positions whose index is equal to the escape entry. The first and third scan passes use bypass mode for the respective syntax elements, while the second coding pass employs a context model for entropy coding.

[0122] Wavefront Parallel Processing (WPP)

[0123] WPP is designed to provide a parallel encoding mechanism. When WPP is enabled in VVC, each CTU row of a frame, or tile, or slice constitutes a separate partition. WPP is enabled / disabled by the SPS element sps_entropy_coding_sync_enabled_flag. Figure 5 An example of a tile with WPP enabled is shown. In Figure 5 In the example, each CTU row of a tile is processed with a one-CTU delay relative to its preceding CTU row. In this way, if palette coding is enabled at the end of each CTU row, no dependencies between consecutive CTU rows at the partition boundary are broken, except for CABAC context variables and palette predictors. To mitigate potential loss of coding efficiency, adaptive CABAC context variables and the content of palette predictors are propagated from the first encoded CTU of the preceding CTU row to the first CTU of the current CTU row. WPP does not change the regular raster scan order of CTUs. Similarly, WPP is also used in HEVC. In HEVC, there is not a one-CTU delay, but a two-CTU delay between neighboring CTU rows.

[0124] When WPP is enabled, a special initialization procedure is used in both HEVC and VVC so that a CTU row can be processed independently. When WPP is enabled, up to the number of CTU rows in a picture threads can run in parallel to process individual CTU rows. By using WPP in a decoder, each decoding thread processes a single CTU row of a picture. The scheduling of thread processing has to be organized so that for each CTU, the decoding of its top neighboring CTU in the preceding CTU row has to be completed. Additional overhead is added for WPP so that after the first CTU in each CTU row (except the last CTU row) is encoded, the content of all CABAC context variables and palette predictors can be stored.

[0125] As discussed above, the existing slice and tile initialization and parallel processing initialization in the HEVC specification and the VVC specification can not be optimal due to unnecessary initialization steps in the initialization. In some embodiments, these unnecessary initialization steps are omitted, thereby improving coding efficiency, reducing the complexity of video encoders and decoders, and reducing various resource consumptions involved in the encoding process, e.g., CPU time, memory usage, etc.

[0126] In the HEVC specification, the initialization is specified as follows.

[0127] The context variables of the arithmetic decoding engine, the Rice parameter initialization state, and the palette predictor variables are initialized as follows:

[0128] - If the CTU is the first CTU in a tile, the following applies:

[0129] - Invoke the initialization process of context variables as specified in clause 9.3.2.2.

[0130] - Set the variable StatCoeff[ k ] equal to 0, where k is in the range of 0 to 3, inclusive.

[0131] - Invoke the initialization process of palette predictor variables as specified in clause 9.3.2.3.

[0132] - Otherwise, if entropy_coding_sync_enabled_flag is equal to 1 and either CtbAddrInRs % PicWidthInCtbsY is equal to 0,

[0133] or TileId[ CtbAddrInTs ] is not equal to TileId[ CtbAddrRsToTs[ CtbAddrInRs - 1 ] ], the following applies:

[0134] - Derive the position ( xNbT, yNbT ) of the top-left luma sample of the spatially neighboring block T( Figure 9-2 ) using the position ( x0, y0 ) of the top-left luma sample of the current CTB as follows:

[0135] ( xNbT, yNbT ) = ( x0 + CtbSizeY, y0 - CtbSizeY ) (9-3)

[0136] - Invoke the availability derivation process of the z-scan order of blocks as specified in clause 6.4.1 with the position ( xCurr, yCurr ) set equal to ( x0, y0 ) and the neighboring position ( xNbY, yNbY ) set equal to ( xNbT, yNbT ) as inputs and assign the output to availableFlagT.

[0137] - Invoke the synchronization process of context variables, Rice parameter initialization state, and palette predictor variables as follows:

[0138] - If availableFlagT is equal to 1, invoke the synchronization process of the context variables, the Rice parameter initialization state and the palette predictor variables as specified in clause 9.3.2.5 with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as inputs.

[0139] - Otherwise, the following applies:

[0140] - Invoke the initialization process of the context variables as specified in clause 9.3.2.2.

[0141] - Set the variable StatCoeff[ k ] to be equal to 0, where k is in the range of 0 to 3, inclusive.

[0142] - Invoke the initialization process of the palette predictor variables as specified in clause 9.3.2.3.

[0143] - Otherwise, if CtbAddrInRs is equal to slice_segment_address and dependent_slice_segment_flag is equal to 1, invoke the synchronization process of the context variables and the Rice parameter initialization state as specified in clause 9.3.2.5 with TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs as inputs.

[0144] - Otherwise, the following applies:

[0145] - Invoke the initialization process of the context variables as specified in clause 9.3.2.2.

[0146] - Set the variable StatCoeff[ k ] to be equal to 0, where k is in the range of 0 to 3, inclusive.

[0147] - Invoke the initialization process of the palette predictor variables as specified in clause 9.3.2.3.

[0148] Invoke the initialization process of the arithmetic decoding engine as specified in clause 9.3.2.6.

[0149] Some CTUs that are not the first CTU of a tile or the first CTU in the CTU row of a tile can also invoke the initialization process described above. However, it is unnecessary to perform the initialization process described above for these CTUs. In fact, performing these unnecessary initializations can actually hurt the coding performance. The initialization causes various variables to be reset to their initial values described above, causing the coding of a CTU to be independent of the previous CTU without exploiting the correlation between CTUs within the same slice or tile. In this embodiment, it is proposed to omit some of the initialization processes below with the underlined deletions to improve coding efficiency.

[0150] The initialization of the context variables of the arithmetic decoding engine, the Rice parameters initialization state, and the palette predictor variables is as follows:

[0151] - If the CTU is the first CTU in a tile, the following applies:

[0152] - Invoke the initialization process of the context variables as specified in clause 9.3.2.2.

[0153] - Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive.

[0154] - Invoke the initialization process of the palette predictor variables as specified in clause 9.3.2.3.

[0155] - Otherwise, if entropy_coding_sync_enabled_flag is equal to 1 and either CtbAddrInRs % PicWidthInCtbsY is equal to 0,

[0156] or TileId[CtbAddrInTs] is not equal to TileId[CtbAddrRsToTs[CtbAddrInRs - 1]], the following applies:

[0157] - Derive the position (xNbT, yNbT) of the top-left luma sample of the spatially neighboring block T( Figure 9-2 ) of the current CTB using the position (x0, y0) of the top-left luma sample of the current CTB as follows:

[0158] ( xNbT, yNbT ) = ( x0 + CtbSizeY, y0 - CtbSizeY ) (9-3)

[0159] - The derivation process of the availability of the block of the z-scan order specified in clause 6.4.1 is invoked with the position (xCurr, yCurr) set equal to (x0, y0) and the neighbouring position (xNbY, yNbY) set equal to (xNbT, yNbT) as inputs and the output is assigned to availableFlagT.

[0160] - The synchronization process of the context variables, the Rice parameter initialization state, and the palette predictor variables is invoked as follows:

[0161] - If availableFlagT is equal to 1, the synchronization process of the context variables, the Rice parameter initialization state, and the palette predictor variables specified in clause 9.3.2.5 is invoked with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as inputs.

[0162] - Otherwise, the following applies:

[0163] - The initialization process of the context variables is invoked as specified in clause 9.3.2.2.

[0164] - The variable StatCoeff[k] is set equal to 0, where k is in the range of 0 to 3, inclusive.

[0165] - The initialization process of the palette predictor variables is invoked as specified in clause 9.3.2.3.

[0166] - Otherwise, if CtbAddrInRs is equal to slice_segment_address and dependent_slice_segment_flag is equal to 1, the synchronization process of the context variables and the Rice parameter initialization state specified in clause 9.3.2.5 is invoked with TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs as inputs.

[0167]

[0168] The initialization process of the arithmetic decoding engine is invoked as specified in clause 9.3.2.6.

[0169] In another example, the initialization of the HEVC specification can be modified as follows:

[0170] The context variables of the arithmetic decoding engine, the Rice parameter initialization state, and the palette predictor variables are initialized as follows:

[0171] - If the CTU is the first CTU in the tile or CtbAddrInRs is equal to slice_segment_address and dependent_slice_segment_flag is equal to 0, the following applies:

[0172] - Invoke the initialization process of the context variables as specified in clause 9.3.2.2.

[0173] - Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive.

[0174] - Invoke the initialization process of the palette predictor variables as specified in clause 9.3.2.3.

[0175] - Otherwise, if entropy_coding_sync_enabled_flag is equal to 1 and either CtbAddrInRs % PicWidthInCtbsY is equal to 0,

[0176] or TileId[CtbAddrInTs] is not equal to TileId[CtbAddrRsToTs[CtbAddrInRs - 1]], the following applies:

[0177] - Derive the position (xNbT, yNbT) of the top-left luma sample of the spatially neighboring block T( Figure 9-2 ) of the current CTB using the position (x0, y0) of the top-left luma sample of the current CTB as follows:

[0178] (xNbT, yNbT) = (x0 + CtbSizeY, y0 - CtbSizeY) (9-3)

[0179] - Invoke the availability derivation process of the z-scan order as specified in clause 6.4.1 with the position (xCurr, yCurr) set equal to (x0, y0) and the neighboring position (xNbY, yNbY) set equal to (xNbT, yNbT) as inputs and assign the output to availableFlagT.

[0180] - Invoke the synchronization process of the context variables, the Rice parameter initialization state, and the palette predictor variables as follows:

[0181] - If availableFlagT is equal to 1, invoke the synchronization process of the context variables, the Rice parameter initialization state and the palette predictor variables as specified in clause 9.3.2.5 with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as inputs.

[0182] - Otherwise, the following applies:

[0183] - Invoke the initialization process of the context variables as specified in clause 9.3.2.2.

[0184] - Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive.

[0185] - Invoke the initialization process of the palette predictor variables as specified in clause 9.3.2.3.

[0186] - Otherwise, if CtbAddrInRs is equal to slice_segment_address and dependent_slice_segment_flag is equal to 1, invoke the synchronization process of the context variables and the Rice parameter initialization state as specified in clause 9.3.2.5 with TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs as inputs.

[0187]

[0188] Invoke the initialization process of the arithmetic decoding engine as specified in clause 9.3.2.6.

[0189] Similarly, the following initialization specified in the VVC specification has the same problem as the HEVC specification discussed above to initialize the context variables of the arithmetic decoding engine as follows:

[0190] — If the CTU is the first CTU in a slice or tile, invoke the initialization process of the context variables as specified in clause 9.3.2.2 and initialize the array PredictorPaletteSize[ chType ] to 0, where chType = 0, 1, and initialize the array StatCoeff[ i ], where i = 0...2, as follows:

[0191] StatCoeff[i] = sps_persistent_rice_adaptation_enabled_flag? 2 * Floor( Log2( BitDepth - 10 ) : 0 (1513)

[0192] - Otherwise, if sps_entropy_coding_sync_enabled_flag is equal to 1 and CtbAddrX is equal to CtbToTileColBd[ CtbAddrX ],

[0193] The following applies:

[0194] StatCoeff[i] = sps_persistent_rice_adaptation_enabled_flag? 2 * Floor( Log2( BitDepth - 10 ) : 0 (XXXX)

[0195] - Derive the position (xNbT, yNbT) of the top-left luma sample of the spatially neighboring block T( Figure 12 ) using the position (x0, y0) of the top-left luma sample of the current CTB, as follows:

[0196] ( xNbT, yNbT ) = ( x0, y0 - CtbSizeY ) (1510)

[0197] - Invoke the derivation process of neighboring block availability as specified in clause 6.4.4 with the position (xCurr, yCurr) set equal to (x0, y0), the neighboring position (xNbY, yNbY) set equal to (xNbT, yNbT), checkPredModeY set equal to FALSE, and cldx set equal to 0 as inputs, and assign the output to availableFlagT.

[0198] - Invoke the synchronization process of context variables as follows:

[0199] - If availableFlagT is equal to 1, the following applies:

[0200] - Invoke the synchronization process of context variables as specified in clause 9.3.2.4 with TableStateIdxOWpp and TableStateIdxIWpp as inputs.

[0201] - When sps_palette_enabled_flag is equal to 1, invoke the synchronization process of palette predictors as specified in clause 9.3.2.7.

[0202] - Otherwise, call 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.

[0203] - Otherwise, call the context variable initialization procedure as specified in Section 9.3.2.2 and set the array PredictorPaletteSize[chType]

[0204] Initialized to 0, where chType=0,1.

[0205] 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 clause 9.3.2.5.

[0206] In this embodiment, it is recommended to omit some of the following initialization processes with strikethrough in the VVC specification to further improve coding efficiency. The context variables for initializing the arithmetic decoding engine are as follows:

[0207] - If the CTU is the first CTU in a slice or tile, the context variable initialization procedure is called as specified in clause 9.3.2.2, and the array PredictorPaletteSize[chType] is initialized to 0, where chType = 0, 1, and the array StatCoeff[i], where i = 0...2, is initialized as follows:

[0208] StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 (1513)

[0209] - Otherwise, if sps_entropy_coding_sync_enabled_flag is equal to 1 and CtbAddrX is equal to CtbToTileColBd[CtbAddrX],

[0210] The following applies:

[0211] StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 (XXXX)

[0212] - Derive the position (xNbT, yNbT) of the top-left luma sample of the spatially neighboring block T (of the current CTB) using the position (x0, y0) of the top-left luma sample of the current CTB, as follows: Figure 12

[0213] (xNbT, yNbT) = (x0, y0 - CtbSizeY) (1510)

[0214] - Call the derivation process of the availability of neighboring blocks specified in clause 6.4.4 with the position (xCurr, yCurr) set equal to (x0, y0), the neighboring position (xNbY, yNbY) set equal to (xNbT, yNbT), the checkPredModeY set equal to FALSE, and the cldx set equal to 0 as inputs, and assign the output to availableFlagT.

[0215] - Call the synchronization process of the context variables as follows:

[0216] - If availableFlagT is equal to 1, the following applies:

[0217] - Call the synchronization process of the context variables specified in clause 9.3.2.4 with TableStateIdxOWpp and TableStateIdxIWpp as inputs.

[0218] - When sps_palette_enabled_flag is equal to 1, call the synchronization process of the palette predictors specified in clause 9.3.2.7.

[0219] - Otherwise, call the initialization process of the context variables as specified in clause 9.3.2.2 and initialize the array PredictorPaletteSize[ chType ] to 0, where chType = 0, 1.

[0220]

[0221] Initialize the decoding engine registers ivlCurrRange and ivlOffset, both with 16-bit register precision, by calling the initialization process of the arithmetic decoding engine specified in clause 9.3.2.5.

[0222] Alternatively, the modified initialization process of VVC can also be described as follows:

[0223] Initialize the context variables of the arithmetic decoding engine, as well as the arrays PredictorPaletteSize and StatCoeff, as follows:

[0224] ​- The array StatCoeff[ i ], with i = 0...2, is initialized as follows:

[0225] StatCoeff[ i ] = sps_persistent_rice_adaptation_enabled_flag? 2 * Floor( Log2( BitDepth - 10 ) : 0 (1513)

[0226] - If the CTU is the first CTU in a slice or tile, the initialization process of context variables is invoked as specified in subclause 9.3.2.2, and the array PredictorPaletteSize[ chType ] is initialized to 0, with chType = 0, 1.

[0227] - Otherwise, when sps_entropy_coding_sync_enabled_flag is equal to 1 and CtbAddrX is equal to CtbToTileColBd[ CtbAddrX ], the following applies:

[0228] - The position ( xNbT, yNbT ) of the top-left luma sample of the spatial neighboring block T( Figure 12 ) is derived using the position ( x0, y0 ) of the top-left luma sample of the current CTB, as follows:

[0229]

[0230] - The derivation process of neighboring block availability as specified in subclause 6.4.4 is invoked with the position ( xCurr, yCurr ) set equal to ( x0, y0 ), the neighboring position ( xNbY, yNbY ) set equal to ( xNbT, yNbT ), the checkPredModeY set equal to FALSE, and the cldx set equal to 0 as inputs, and the output is assigned to availableFlagT.

[0231] - The synchronization process of context variables and palette predictors is invoked as follows:

[0232] - If availableFlagT is equal to 1, the following applies:

[0233] - The synchronization process of context variables as specified in subclause 9.3.2.4 is invoked with TableStateIdxOWpp and TableStateIdxIWpp as inputs.

[0234] - When sps_palette_enabled_flag is equal to 1, the synchronization process of palette predictors as specified in subclause 9.3.2.7 is invoked. ​

[0235] - Otherwise, call 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.

[0236] 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 subclause 9.3.2.5.

[0237] sps_persistent_rice_adaptation_enabled_flag equal to 1 specifies that the Rice parameter derivation for binarization of abs_remainder[] and dec_abs_level[] is initialized at the start of each TU using the statistics accumulated from the previous TU. sps_persistent_rice_adaptation_enabled_flag equal to 0 specifies that the previous TU status is not used in Rice parameter derivation. If sps_persistent_rice_adaptation_enabled_flag is not present, the value of sps_persistent_rice_adaptation_enabled_flag is inferred to be equal to 0.

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

[0239] At block 602, process 600 includes accessing a partition of a video signal. A partition may be a video frame, slice, tile, or any other type of partition that a video encoder processes as a unit when performing encoding. The partition may include, for example, Figure 5 A group of CTUs are arranged into CTU rows. Each CTU row includes one or more CTUs, and each CTU includes one or more TUs for coding.

[0240] At block 604, including blocks 606 through 620, process 600 includes processing each CTU in the set of CTUs in a partition to encode the partition into bits. At block 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, at block 608, context variables for CABAC, Rice parameter variables StatCoeff, and palette predictor variables 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 process, e.g., the context variable initialization process specified in section 9.3.2.2 of the HEVC specification. Rice parameter variables are initialized according to the first Rice parameter variable initialization process. For example, the first Rice parameter variable initialization process initializes Rice parameter variables StatCoeff[k] to zero, where k is in the range of 0 to 3, inclusive. The palette predictor variables are initialized according to a first palette predictor initialization process, eg, the palette predictor variable initialization process specified in section 9.3.2.3 of the HEVC specification. If the CTU is not the first CTU in the tile, process 600 proceeds to block 610.

[0241] In another example, the condition in block 606 can be changed to (a) the CTU is the first CTU in a tile, or (b) the CTU is the first CTU in a slice and dependent slices are disabled (e.g., dependent_slice_segment_flag is equal to 0, which means that the current slice is an independent slice). If either condition (a) or condition (b) is met, the initialization scheme of block 608 is used; otherwise, process 600 continues to block 610.

[0242] At block 610, process 600 includes determining whether a parallel coding mechanism (WPP) is enabled and whether the current CTU is the first CTU in a CTU row. In some examples, parallel coding can be indicated by a flag, where a value of 0 indicates that parallel coding is disabled and a value of 1 indicates 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 a CTU row, then at block 612, process 600 includes initializing context variables for CABAC, Rice parameter variables StatCoeff, and palette predictor variables according to a second initialization scheme.

[0243] In the second initialization scheme, a use flag availableFlagT of an upper neighboring block of the current CTU is determined, and initialization is performed based on the use flag availableFlagT. In some examples, the use flag availableFlagT of the upper neighboring block of the current CTU is determined based on a position of a top-left luma sample of the upper neighboring block. If the use flag availableFlagT indicates that the upper neighboring block is available, the context variables for CABAC are initialized according to a second context variable initialization process, the Rice parameter variables are initialized according to a second Rice parameter variable initialization process, and the palette predictor variables are initialized according to a second palette predictor initialization process. Examples of the second context variable initialization process, the second Rice parameter variable initialization process, and the second palette predictor initialization process can be the corresponding initialization processes of the context variables, the Rice parameter variables, and the palette predictor variables specified in clause 9.3.2.5 of the HEVC standard, with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as inputs.

[0244] If the use flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is unavailable, the context variables, the Rice parameter variables, and the palette predictor variables are initialized according to the corresponding initialization processes in the first scheme described above. If the parallel encoding mechanism is not enabled or the current CTU is not the first CTU of a CTU row, the process 600 proceeds to block 614.

[0245] At block 614, process 600 includes determining whether the CTU is the first CTU in the slice and whether the slice is a dependent slice. If the CTU is the first CTU in the slice and the slice is a dependent slice, then at block 616, process 600 includes initializing context variables for CABAC, Rice parameter variables (denoted as StatCoeff), and palette predictor variables according to a third initialization scheme. In the third scheme, context variables for CABAC are initialized according to a second context variable initialization process, but the inputs to this process are different from the inputs to the second context variable initialization process described in block 612 above. Similarly, Rice parameter variables are initialized according to a second Rice parameter variable initialization process, the inputs to this process are different from the inputs to the second Rice parameter variable initialization process described in block 612 above. Palette predictor variables are initialized according to a second palette predictor initialization process, the inputs to this process are also different from the inputs to the second palette predictor initialization process described in block 612 above. For example, the corresponding initialization process 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 process in the third scheme, in which TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs are used as input. In this way, the variables of the CTU are initialized to the values ​​of these variables from the previous CTU in the previous slice. If the current CTU is not the first CTU in the slice, or the slice is not a dependent slice, process 600 continues to block 618 without performing any initialization. In other words, initialization is not performed for CTUs that do not meet any of the conditions described in blocks 606, 610, and 614. Therefore, unnecessary initialization processes are omitted, thereby improving coding efficiency.

[0246] At block 618, process 600 includes encoding the TUs in the CTU into binary representations based on the Rice parameter variables. For example, the Rice parameters can be calculated based on the Rice parameter variables StatCoeff, and the Rice parameters can be used, for example, to encode the TUs using the Golomb-Rice code specified in the HEVC specification. At block 620, process 600 includes encoding the binary representation of the CTU into bits included in a bitstream of the video using CABAC as discussed above based on the context variables. In some examples, encoding the TUs in the CTU into binary representations also includes palette coding based on the palette predictor variables. At block 622, process 600 includes outputting the encoded video bitstream.

[0247] Figure 7 An example of a process 700 for decoding a partition of a video according to some embodiments of the present disclosure is depicted. For example, the process 700 may be implemented to decode a video according to the HEVC specification with the proposed changes as described above. One or more computing devices implement the process by executing appropriate program code. Figure 7 For example, a computing device implementing the video decoder 200 may implement the operations described in the entropy decoding module 216, the inverse quantization module 218, and the inverse transform module 219 by executing the program code. Figure 7 For illustrative purposes, process 700 is described with reference to some examples depicted in the accompanying drawings. However, other implementations are possible.

[0248] At block 702, process 700 includes accessing a binary string or binary representation representing a partition of a video signal. A partition may be a video frame, slice, tile, or any other type of partition that a video encoder processes as a unit when performing encoding. The partition includes, for example, Figure 5 A group of CTUs are arranged into CTU rows. Each CTU row includes one or more CTUs, and each CTU includes multiple TUs for coding.

[0249] At block 704, which includes blocks 706-720, process 700 includes processing the bin string of each CTU in the set of CTUs in the partition to generate decoded samples of the partition. At block 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, at block 708, context variables for CABAC, Rice parameter variables StatCoeff, and palette predictor variables are initialized according to a first scheme. In the first scheme, the context variables for CABAC are initialized according to a first context variable initialization process, e.g., the initialization process for context variables specified in clause 9.3.2.2 of the HEVC standard. The Rice parameter variables are initialized according to a first Rice parameter variable initialization process. For example, the first Rice parameter variable initialization process initializes the Rice parameter variables StatCoeff[k] to zero, where k is in the range of 0 to 3, inclusive. The palette predictor variables are initialized according to a first palette predictor initialization process, e.g., the initialization process for palette predictor variables specified in clause 9.3.2.3 of the HEVC standard. If the CTU is not the first CTU in the tile, process 700 proceeds to block 710.

[0250] In another example, the condition in block 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 slice and dependent slices are disabled (e.g., dependent_slice_segment_flag equal to 0 means that the current slice is an independent slice). If either condition (a) or condition (b) is satisfied, the initialization scheme of block 708 described above is used; otherwise, process 700 proceeds to block 710.

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

[0252] In the second scheme, a use flag availableFlagT of an upper neighboring block of the current CTU is determined, and initialization is performed based on the use flag availableFlagT. In some examples, the use flag availableFlagT of the upper neighboring block is determined based on a position of a top-left luma sample of the upper neighboring block. If the use flag availableFlagT indicates that the upper neighboring block is available, context variables for CABAC are initialized according to a second context variable initialization process, Rice parameter variables are initialized according to a second Rice parameter variable initialization process, and palette predictor variables are initialized according to a second palette predictor initialization process. Examples of the second context variable initialization process, the second Rice parameter variable initialization process, and the second palette predictor initialization process can be the corresponding initialization processes of the context variables, the Rice parameter variables, and the palette predictor variables specified in clause 9.3.2.5 of the HEVC standard, with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as inputs.

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

[0254] At block 714, process 700 includes determining whether the CTU is the first CTU in the slice and whether the slice is a dependent slice. If the CTU is the first CTU in the slice and the slice is a dependent slice, then at block 716, process 700 includes initializing context variables for CABAC, Rice parameter variables StatCoeff, and palette predictor variables according to a third initialization scheme. In the third scheme, context variables for CABAC are initialized according to a second context variable initialization process, but the inputs to this process are different from the inputs to the second context variable initialization process described in block 712 above. Similarly, Rice parameter variables are initialized according to a second Rice parameter variable initialization process, the inputs to this process are different from the inputs to the second Rice parameter variable initialization process described in block 712 above. Palette predictor variables are initialized according to a second palette predictor initialization process, the inputs to this process are also different from the inputs to the second palette predictor initialization process described in block 712 above. For example, the corresponding initialization process 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 process in the third scheme, in which TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs are used as input. In this way, the variables of the CTU are initialized to the values ​​of these variables from the previous CTU in the previous slice. If the current CTU is not the first CTU in the slice, or the slice is not a dependent slice, process 700 continues to block 718 without performing any initialization. In other words, initialization is not performed for CTUs that do not meet any of the conditions described in blocks 706, 710, and 714. In this way, unnecessary initialization processes are omitted, thereby improving coding efficiency.

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

[0256] Figure 8 An example of a process 800 for encoding a partition of a video according to some embodiments of the disclosure is depicted. For example, process 800 can be implemented to encode a video in accordance with the VVC standard as described above. One or more computing devices (e.g., a computing device implementing video encoder 100) implement the operations depicted in process 800 by executing suitable program code (e.g., program code implementing entropy encoding module 116). Process 800 is described with reference to some of the examples depicted in the figures for illustrative purposes. But other implementations are possible. Figure 8

[0257] At block 802, process 800 includes accessing a partition of a video signal. The partition can be a video frame, slice, or tile or any type of partition that the video encoder processes as a unit when performing encoding. The partition includes a set of CTUs arranged into CTU rows as shown in Figure 5

[0258] At block 804, which includes blocks 808 through 820, process 800 includes processing each CTU in the set of CTUs in the partition to encode the partition into bits. At block 808, process 800 includes initializing a Rice parameter variable StatCoeff to an initial value. For example, Rice parameter variable StatCoeff can be set to the initial value as described above according to:

[0259] StatCoeff[i] = sps_persistent_rice_adaptation_enabled_flag? 2 * Floor(Log2(BitDepth - 10) : 0

[0260] where i = 0...2, StatCoeff represents a history counter, Floor(x) represents the largest integer less than or equal to x, and Log2(x) is the logarithm of x with base 2, and the value of sps_persistent_rice_adaptation_enabled_flag is 1 indicates that history-based Rice parameter derivation is enabled.

[0261] ​​At block 810, the process 800 includes determining whether the CTU is the first CTU in a tile or slice. If the CTU is the first CTU in a tile or slice, at block 812, the context variables and palette predictor variables for CABAC are initialized according to a first initialization scheme. In the first initialization scheme, the context variables for CABAC are initialized according to a first context variable initialization process, e.g., the context variable initialization process specified in clause 9.3.2.2 of the VVC standard. The palette predictor variables are initialized according to a first palette predictor initialization process. For example, in the first palette predictor initialization process, the palette predictor variable PredictorPaletteSize[chType] can be initialized to 0, where chType = 0 or 1. If the CTU is not the first CTU in a tile or slice, the process 800 proceeds to block 814.

[0262] At block 814, the process 800 includes determining whether a parallel encoding mechanism WPP is enabled and whether the current CTU is the first CTU of a CTU row. In some examples, parallel encoding can be indicated by a flag, where a value of 0 for the flag indicates that parallel encoding is disabled, and a value of 1 for the flag indicates that parallel encoding is enabled. If it is determined that the parallel encoding mechanism is enabled and that the current CTU is the first CTU of a CTU row, at block 816, the process 800 includes initializing the context variables and palette predictor variables for CABAC according to a second initialization scheme.

[0263] In the second initialization scheme, a useable flag availableFlagT of an upper neighboring block of the current CTU is determined, and initialization is performed based on the useable flag availableFlagT. In some examples, the useable flag availableFlagT of the upper neighboring block of the current CTU is determined based on a position of a top-left luma sample of the upper neighboring block. If the useable flag availableFlagT indicates that the upper neighboring block is available, the context variables for CABAC are initialized according to a second context variable initialization process, and the palette predictor variables are initialized according to a second palette predictor initialization process. An example of the second context variable initialization process can be the context variable initialization process specified in clause 9.3.2.4 of the VVC standard, where TableStateIdxOWpp and TableStateIdxIWpp are inputs. An example of the second palette predictor initialization process can be the palette predictor initialization process specified in clause 9.3.2.7 of the VVC standard.

[0264] If the availability flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is unavailable, the context variables and palette predictor variables are initialized according to the corresponding initialization process in the first scheme described above. If the parallel encoding mechanism is not enabled or the current CTU is not the first CTU in the CTU row, process 800 proceeds to block 818 without performing any initialization process. In other words, initialization is not performed for CTUs that do not meet any of the conditions described in blocks 810 and 814. In this way, unnecessary initialization processes are omitted, thereby improving coding efficiency.

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

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

[0267] At block 902, process 900 includes accessing a binary string or binary representation representing a partition of a video signal. A partition may be a video frame, slice, tile, or any other type of partition that a video encoder processes as a unit when performing encoding. The partition includes, for example, Figure 5 A group of CTUs are arranged into CTU rows. Each CTU row includes one or more CTUs, and each CTU includes one or more TUs for coding.

[0268] At block 904, which includes block 908 to block 920, the process 900 includes processing the bin string of each CTU in the set of CTUs in the partition to generate decoded samples of the partition. At block 908, the process 900 includes initializing a 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:

[0269] StatCoeff[i] = sps_persistent_rice_adaptation_enabled_flag? 2 * Floor(Log2(BitDepth - 10) : 0

[0270] where i = 0...2, StatCoeff represents a history counter, Floor(x) represents the largest integer less than or equal to x, and Log2(x) is the logarithm of x with base 2, and the value of sps_persistent_rice_adaptation_enabled_flag being 1 indicates that the history-based Rice parameter derivation is enabled.

[0271] At block 910, the process 900 includes determining whether the CTU is the first CTU in a tile or slice. If the CTU is the first CTU in a tile or slice, at block 912, the context variables and palette predictor variables for CABAC are initialized according to a first scheme. In the first scheme, the context variables for CABAC are initialized according to a first context variable initialization process, e.g., the initialization process of the context variables specified in clause 9.3.2.2 of the VVC standard. The palette predictor variables are initialized according to a first palette predictor initialization process. For example, the palette predictor variable PredictorPaletteSize[chType] can be initialized to 0, where chType = 0 or 1. If the CTU is not the first CTU in a tile or slice, the process 900 proceeds to block 914.

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

[0273] In the second scheme, a use flag availableFlagT of an upper neighboring block of the current CTU is determined, and initialization is performed based on the use flag availableFlagT. In some examples, the use flag availableFlagT of the upper neighboring block of the current CTU is determined based on a position of a top-left luma sample of the upper neighboring block. If the use flag availableFlagT indicates that the upper neighboring block is available, context variables for CABAC are initialized according to a second context variable initialization process, and palette predictor variables are initialized according to a second palette predictor initialization process. An example of the second context variable initialization process can be the context variable initialization process specified in subclause 9.3.2.4 of the VVC standard, with TableStateIdxOWpp and TableStateIdxIWpp as inputs. An example of the second palette predictor initialization process can be the palette predictor initialization process specified in subclause 9.3.2.7 of the VVC standard.

[0274] If the use flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is unavailable, the context variables and the palette predictor variables are initialized according to the corresponding initialization processes in the first scheme described above. If the parallel encoding mechanism is not enabled or the current CTU is not the first CTU of a CTU row, the process 900 proceeds to block 918 without any initialization process. In other words, for a CTU that does not satisfy any of the conditions described in blocks 910 and 914, no initialization is performed. In this way, unnecessary initialization processes are saved, and thus the encoding efficiency is improved.

[0275] At block 918, the process 900 includes decoding the binary string or binary representation of the CTU into coefficient values based on the Rice parameter variables and the context variables through CABAC as described above. For example, a Rice parameter can be calculated based on the Rice parameter variable StatCoeff, and the calculated Rice parameter can be used to decode the TUs, for example, through a combination of the TR and the finite k-th order EGk binarization processes specified in the VVC specification. At block 920, the process 900 includes reconstructing pixel values of the TUs in the CTU through, for example, the inverse quantization and inverse transformation described above with reference to block 812. In some examples, decoding the TUs in the CTU further includes palette coding based on the palette predictor variables of the video portion that is encoded using palette coding. At block 922, the process 900 includes outputting the decoded video partition. Figure 2

[0276] ​As mentioned above, when parallel processing is enabled for VVC and HEVC respectively, the existing parallel processing initialization causes 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 picture height is large and the size of CTU is relatively small, the number of CTU rows in a picture or slice can be large, which can cause a delay of multiple CTUs of the last CTU row.

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

[0278] For HEVC:

[0279] The context variables of the arithmetic decoding engine, the Rice parameter initialization state, and the palette predictor variables are initialized as follows:

[0280] - If the CTU is the first CTU in the tile, or if entropy_coding_sync_enabled_flag is equal to 1, and either CtbAddrInRs%PicWidthInCtbsY is equal to 0, or TileId[CtbAddrInTs] is not equal to TileId[CtbAddrRsToTs[CtbAddrInRs-1]], or if CtbAddrInRs is equal to slice_segment_ address and dependent_slice_segment_flag is equal to 1, the following applies:

[0281] - Invoke the initialization process of the context variables as specified in clause 9.3.2.2.

[0282] - Set the variable StatCoeff[ k ] to equal 0, where k is in the range of 0 to 3, inclusive.

[0283] - Invoke the initialization process of the palette predictor variables as specified in clause 9.3.2.3.

[0284]

[0285]

[0286] Invoke the initialization process of the arithmetic decoding engine as specified in clause 9.3.2.6.

[0287] For VVC:

[0288] Initialize the context variables of the arithmetic decoding engine as follows:

[0289] - If the CTU is the first CTU in a slice or tile, or if sps_entropy_coding_sync_ enabled_flag is equal to 1 and CtbAddrX is equal to CtbToTileColBd[CtbAddrX], The context variable initialization process is called according to the provisions of 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:

[0290] StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 (1513)

[0291]

[0292] 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 clause 9.3.2.5.

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

[0294] At block 1002, process 1000 includes accessing a partition of a video signal. A partition may be a video frame, slice, tile, or any other type of partition that a video encoder processes as a unit when performing encoding. The partition includes, for example, Figure 5 A group of CTUs are arranged into CTU rows. Each CTU row includes one or more CTUs, and each CTU includes multiple TUs for coding.

[0295] At block 1004, which includes block 1006 to block 1012, the process 1000 includes processing each CTU in the set of CTUs in the partition to encode the partition into bits. At block 1006, the process 1000 includes determining whether an initialization condition is satisfied. The initialization condition includes: (1) the CTU is the first CTU in a tile, or (2) the CTU is the first CTU in a slice, or (3) parallel coding WPP is enabled and the CTU is the first CTU in a CTU row of a tile.

[0296] If the initialization condition is satisfied, at block 1008, context variables for CABAC, Rice parameter variables, and palette predictor variables are initialized according to an initialization scheme. In the initialization scheme, the context variables for CABAC are initialized according to an initialization process of the context variables, the Rice parameter variables are initialized according to a Rice parameter variable initialization process, and the palette predictor variables are initialized according to a palette predictor entry initialization process. In HEVC, the initialization process of the context variables can be the process specified in clause 9.3.2.2 of the HEVC specification. The Rice parameter variable initialization process can set the Rice parameter variables StatCoeff[k] to 0, where k is in the range of 0 to 3. The palette predictor initialization process can be the process specified in clause 9.3.2.3 of the HEVC specification. In VVC, the initialization process of the context variables can be the process specified in clause 9.3.2.2 of the VVC specification. The Rice parameter variable initialization process can set the Rice parameter variables StatCoeff according to:

[0297] StatCoeff[i] = sps_persistent_rice_adaptation_enabled_flag? 2 * Floor(Log2(BitDepth - 10) : 0, StatCoeff[i] = 0 otherwise,

[0298] where i = 0...2, StatCoeff denotes a history counter, Floor(x) denotes the largest integer less than or equal to x, and Log2(x) is the logarithm of x with base 2, and the value of sps_persistent_rice_adaptation_enabled_flag being 1 indicates that history-based Rice parameter derivation is enabled, and the palette predictor initialization process includes setting the palette predictor variables to 0. The palette predictor initialization process can set the palette predictor variables to 0.

[0299] If the initialization condition is not satisfied, process 1000 continues to block 1010. In other words, if the initialization condition is not satisfied, no initialization is performed for the context variable, the Rice parameter variable, and the palette predictor variable. In comparison to process 600 and process 800, for a CTU that satisfies the initialization condition, only one initialization scheme is performed. Furthermore, the initialization for parallel encoding is independent of previous CTU rows, thus eliminating the encoding delay caused by initialization based on previous CTU rows.

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

[0301] Figure 11 An example of a process 1100 for decoding a partition of a video according to some embodiments of the disclosure is depicted. For example, process 1100 can be implemented to decode a video in accordance with the HEVC standard or the VVC standard as described above. One or more computing devices implement the operations depicted in Figure 11 by executing program code of an entropy decoding module 216, an inverse quantization module 218, and an inverse transform module 219. For illustrative purposes, process 1100 is described with reference to some examples depicted in the accompanying drawings. But other implementations are possible. Figure 11

[0302] At block 1102, process 1100 includes accessing a binary string or binary representation representing a partition of a video signal. The partition can be a video frame, slice, or tile or any type of partition that a video encoder processed as a unit when performing encoding. The partition includes a set of CTUs arranged into CTU rows as Figure 5 shown. Each CTU row includes one or more CTUs, and each CTU includes a plurality of TUs for encoding.

[0303] ​At block 1104, which includes block 1106 to block 1112, the process 1100 includes processing the bin string of each CTU in the set of CTUs in the partition to generate decoded samples of the partition. At block 1106, the process 1100 includes determining whether an initialization condition is satisfied. The initialization condition includes: (1) the CTU is the first CTU in a tile, or (2) the CTU is the first CTU in a slice, or (3) parallel encoding is enabled and the CTU is the first CTU in a CTU row of a tile.

[0304] If the initialization condition is satisfied, at block 1108, context variables for CABAC, Rice parameter variables, and palette predictor variables are initialized according to an initialization scheme. In the initialization scheme, the context variables for CABAC are initialized according to an initialization process of the context variables, the Rice parameter variables are initialized according to a Rice parameter variable initialization process, and the palette predictor variables are initialized according to a palette predictor entry initialization process. In HEVC, the initialization process of the context variables can be the process specified in clause 9.3.2.2 of the HEVC specification. The Rice parameter variable initialization process can set the Rice parameter variables StatCoeff[k] to 0, where k is in the range of 0 to 3. The palette predictor initialization process can be the process specified in clause 9.3.2.3 of the HEVC specification. In VVC, the initialization process of the context variables can be the process specified in clause 9.3.2.2 of the VVC specification. The Rice parameter variable initialization process can set the Rice parameter variables according to:

[0305] StatCoeff[i] = sps_persistent_rice_adaptation_enabled_flag? 2 * Floor(Log2(BitDepth - 10) : 0, where i = 0...2, StatCoeff denotes a history counter, Floor(x) denotes the largest integer less than or equal to x, and Log2(x) is the logarithm of x with base 2, and the value of sps_persistent_rice_adaptation_enabled_flag being 1 indicates that history-based Rice parameter derivation is enabled, and the palette predictor initialization process includes setting the palette predictor variables to 0. The palette predictor initialization process can set the palette predictor variables to 0.

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

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

[0308] Example of a computing system implementing quantization for video coding

[0309] Any suitable computing system may be used to perform the operations described herein. For example, Figure 12 Describing what can be achieved Figure 1 The video encoder 100 or Figure 2 12. In some embodiments, the computing device 1200 may include a processor 1212 that is communicatively coupled to a memory 1214 and that executes computer-executable program code and / or accesses information stored in the memory 1214. The processor 1212 may include a microprocessor, an application specific integrated circuit ("ASIC"), a state machine, or other processing device. The processor 1212 may include any of a plurality of processing devices (including one). Such a processor may include or may be in communication with a computer-readable medium having instructions stored thereon that, when executed by the processor 1212, cause the processor to perform the operations described herein.

[0310] The memory 1214 can include any suitable non-transitory computer- readable medium. A computer-readable medium can include any electronic, optical, magnetic, or other storage device capable of providing processor with computer-readable instructions or other program code. Non-limiting examples of computer-readable media include magnetic disks, memory chips, ROMs, RAMs, ASICs, configured processors, optical storage, magnetic tape or other magnetic storage, or any other medium capable of storing instructions that can be read by a computer processor. Instructions can 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.

[0311] The computing device 1200 can also include a bus 1216. The bus 1216 can communicatively couple one or more components of the computing device 1200. The computing device 1200 can also include a number of external or internal devices, such as input or output devices. For example, the computing device 1200 shows an input / output (“I / O”) interface 1218 that can receive input from or provide output to one or more input devices 1220 or one or more output devices 1222. The one or more input devices 1220 and the one or more output devices 1222 can be communicatively coupled to the I / O interface 1218. The communicative coupling can be achieved by any suitable means, such as by connections through a printed circuit board, by connections through a cable, by wireless transmission of communications, etc. Non-limiting examples of input devices 1220 include a touchscreen (e.g., one or more cameras to image a touch area or pressure sensors to detect changes in pressure caused by a touch), a mouse, a keyboard, 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 devices 1222 include an LCD screen, an external monitor, a speaker, or any other device that can be used to display or otherwise present output generated by the computing device.

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

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

[0314] General Notes

[0315] Numerous specific details are set forth herein 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, apparatuses, or systems that would be known by one of ordinary skill have not been described in detail so as not to obscure the claimed subject matter.

[0316] Unless specifically stated otherwise, it will be appreciated that throughout this specification discussions utilizing terms such as "processing," "computing," "calculating," "determining," and "identifying" or the like refer to actions or processes of a computing device (e.g., one or more computers or a similar electronic computing device or devices) that manipulate or transform data represented as physical electronic or magnetic quantities within memories, registers, or other information storage devices, transmission devices, or display devices of the computing platform.

[0317] The system or systems discussed herein are not limited to any particular hardware architecture or configuration. A computing device can include any suitable arrangement of components that provides a result based on one or more inputs. Suitable computing devices include a computer system based on a multiprocessor microprocessor-based computer system accessing stored software that programs or configures the computing system from a general purpose computing apparatus to a specialized computing apparatus implementing one or more embodiments of the present subject matter. Any suitable programming, scripting, or other type of language or combinations of languages can be used to implement the teachings contained herein in software that is used, directly or indirectly, in programming or configuring a computing device.

[0318] Embodiments of the methods disclosed herein can be performed in the operation of such computing devices. The order of the blocks presented in the examples above can be changed— for example, blocks can be reordered, combined, and / or split into sub-blocks. Some blocks or processes can be performed in parallel.

[0319] As used herein, "adapted to" or "for" means open and inclusive language that does not exclude devices adapted or for performing additional tasks or steps. Further, the use of "based on" means open and inclusive, as a process, step, calculation, or other action that is "based on" one or more recited conditions or values can actually be based on additional conditions or values beyond those recited. Headings, lists, and numbering included herein are for ease of explanation only and are not intended to be limiting.

[0320] While the subject matter has been described in detail with respect to specific embodiments thereof, it will be appreciated that those skilled in the art, upon attaining an understanding of the foregoing, can readily alter, vary or equate the embodiments without departing from the scope thereof. Accordingly, it is to be understood that the disclosure is presented by way of example and not limitation, and any change or variation that comes within the spirit and scope of the subject matter is intended to be included.

Claims

1. A method for decoding a video from a video stream, the method comprising: accessing a binary string representing a partition of the video, the partition comprising a plurality of coding tree unit (CTU) rows forming one or more CTU rows; For each CTU in the plurality of CTUs in the partition, Determining whether the CTU is the first CTU in a slice or tile; In response to determining that the CTU is a first CTU in a slice or tile, initializing context variables for context adaptive binary arithmetic coding (CABAC) according to a first context variable initialization procedure; In response to determining that the CTU is not the first CTU in a slice or tile, determining whether wavefront parallel processing (WPP) decoding is enabled and whether the CTU is the first CTU in a CTU row of the tile; In response to determining that the wavefront parallel processing decoding is enabled and the CTU is the first CTU in a CTU row of a tile, Determine the available flags of the upper neighboring blocks of the CTU, In response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is available, initializing the context variable according to a second context variable initialization process, 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, initializing the context variable according to the first context variable initialization process; In response to determining that the wavefront parallel processing decoding is not enabled or the CTU is not the first CTU in a CTU row of a tile, not initializing the context variable; as well as Decoding the CTU includes: decoding the binary string corresponding to the CTU into coefficient values ​​of the CTU based on the context variable, and Sample values ​​of pixels of the CTU are determined from the coefficient values.

2. The method according to claim 1, wherein The partitions are pictures, slices, or tiles.

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

4. The method according to claim 1, wherein Based on the Rice parameter variable and the context variable, decoding the binary string corresponding to the CTU into the coefficient value of the CTU includes: calculating the Rice parameter of the CTU based on the Rice parameter variable, and decoding the binary string corresponding to the 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 plurality of CTUs in the partition, initializing a Rice parameter variable to an initial value, Initializing the Rice parameter variable to the 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, Wherein, 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 logarithm of x with base 2, and the value of sps_persistent_rice_adaptation_enabled_flag is 1, indicating that history-based Rice parameter derivation is enabled.

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

7. The method according to claim 1, further comprising: In response to determining that the available flag of the upper-neighboring block of the CTU indicates that the upper-neighboring block is available, initializing a palette predictor variable according to a second palette predictor initialization process, wherein when palette encoding is enabled, the second palette predictor initialization process called in response to determining that the CTU is the first CTU in a slice is performed.

8. The method according to claim 1, wherein The available flag of the upper-neighboring block of the CTU is determined based on a position of an upper-left luma sample of the upper-neighboring block.

9. A method for encoding a video, the method comprising: accessing a partition of the video, the partition comprising a plurality of coding tree unit (CTU) rows forming one or more CTU rows; processing the partitions of the video to generate binary representations of the partitions, the processing comprising: For each CTU in the plurality of CTUs in the partition, Determining whether the CTU is the first CTU in a slice or tile; In response to determining that the CTU is a first CTU in a slice or tile, initializing context variables for context adaptive binary arithmetic coding (CABAC) according to a first context variable initialization procedure; In response to determining that the CTU is not the first CTU in a slice or tile, determining whether wavefront parallel processing (WPP) decoding is enabled and whether the CTU is the first CTU in a CTU row of the tile; In response to determining that the wavefront parallel processing decoding is enabled and the CTU is the first CTU in a CTU row of a tile, Determine the available flags of the upper neighboring blocks of the CTU, In response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is available, initializing the context variable according to a second context variable initialization process, 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, initializing the context variable according to the first context variable initialization process; In response to determining that the wavefront parallel processing decoding is not enabled or the CTU is not the first CTU in a CTU row of a tile, not initializing the context variable; and Encoding the CTU includes encoding coefficient values ​​of a transform unit (TU) in the CTU into a binary representation based on the context variable, and The binary representation of the partition is encoded into a code stream of the video.

10. The method according to claim 9, wherein: The partitions are pictures, slices, or tiles.

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

12. The method according to claim 9, wherein Based on the Rice parameter variable and the context variable, encoding the coefficient value of the TU in the CTU into the binary representation includes: calculating the Rice parameter of the CTU based on the Rice parameter variable, and encoding the coefficient value of the TU in the CTU into the binary representation based on the calculated Rice parameter.

13. The method according to claim 9, further comprising: For each CTU in the plurality of CTUs in the partition, initializing a Rice parameter variable to an initial value, Initializing the Rice parameter variable to the 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, Wherein, 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 logarithm of x with base 2, and the value of sps_persistent_rice_adaptation_enabled_flag is 1, indicating that history-based Rice parameter derivation is enabled.

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

15. The method according to claim 9, further comprising: In response to determining that the available flag of the upper-neighboring block of the CTU indicates that the upper-neighboring block is available, initializing a palette predictor variable according to a second palette predictor initialization process, wherein when palette encoding is enabled, the second palette predictor initialization process called in response to determining that the CTU is the first CTU in a slice is performed.

16. The method according to claim 9, wherein The available flag of the upper-neighboring block of the CTU is determined based on a position of an upper-left luma sample of the upper-neighboring block.

17. A video decoder for decoding a video from a video stream, the decoder comprising: a memory for storing computer executable program code; as well as a processor coupled to the memory and configured to execute the computer-executable program code to: For each CTU in the plurality of CTUs in the partition, Determining whether the CTU is the first CTU in a slice or tile; In response to determining that the CTU is a first CTU in a slice or tile, initializing context variables for context adaptive binary arithmetic coding (CABAC) according to a first context variable initialization procedure; In response to determining that the CTU is not the first CTU in a slice or tile, determining whether wavefront parallel processing (WPP) decoding is enabled and whether the CTU is the first CTU in a CTU row of the tile; In response to determining that the wavefront parallel processing decoding is enabled and the CTU is the first CTU in a CTU row of a tile, Determine the available flags of the upper neighboring blocks of the CTU, In response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is available, initializing the context variable according to a second context variable initialization process, 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, initializing the context variable according to the first context variable initialization process; In response to determining that the wavefront parallel processing decoding is not enabled or the CTU is not the first CTU in a CTU row of a tile, not initializing the context variable; as well as Decoding the CTU includes: decoding the binary string corresponding to the CTU into coefficient values ​​of the CTU based on the context variable, and Sample values ​​of pixels of the CTU are determined from the coefficient values.

18. The decoder according to claim 17, wherein The partitions are pictures, slices, or tiles.

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

20. A video encoder for encoding a video, the encoder comprising: a memory for storing computer executable program code; as well as a processor coupled to the memory and configured to execute the computer-executable program code to: accessing a partition of the video, the partition comprising a plurality of coding tree unit (CTU) rows forming one or more CTU rows; processing the partitions of the video to generate binary representations of the partitions, the processing comprising: For each CTU in the plurality of CTUs in the partition, Determining whether the CTU is the first CTU in a slice or tile; In response to determining that the CTU is a first CTU in a slice or tile, initializing context variables for context adaptive binary arithmetic coding (CABAC) according to a first context variable initialization procedure; In response to determining that the CTU is not the first CTU in a slice or tile, determining whether wavefront parallel processing (WPP) decoding is enabled and whether the CTU is the first CTU in a CTU row of the tile; In response to determining that the wavefront parallel processing decoding is enabled and the CTU is the first CTU in a CTU row of a tile, Determine the available flags of the upper neighboring blocks of the CTU, In response to determining that the available flag of the upper neighboring block of the CTU indicates that the upper neighboring block is available, initializing the context variable according to a second context variable initialization process, 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, initializing the context variable according to the first context variable initialization process; In response to determining that the wavefront parallel processing decoding is not enabled or the CTU is not the first CTU in a CTU row of a tile, not initializing the context variable; and Encoding the CTU includes encoding coefficient values ​​of a transform unit (TU) in the CTU into a binary representation based on the context variable, and The binary representation of the partition is encoded into a code stream of the video.

Citation Information

Patent Citations

  • Methods and systems for palette table coding

    US20160234498A1

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

    WO2020231220A1