Initialization processing for video coding

By optimizing video encoding technology, unnecessary initialization steps are eliminated and the initialization solution is unified, the problems of low encoding efficiency and parallel processing delay in the prior art are solved, and more efficient video processing is achieved.

CN119071510AActive Publication Date: 2024-12-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

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

AI Technical Summary

Technical Problem

The existing video encoding technology has unnecessary steps in the initialization process, resulting in inefficient encoding efficiency and parallel processing delays, affecting the speed of video encoding and decoding.

Method used

By eliminating unnecessary initialization operations, the context adaptive binary arithmetic encoding of the CTU in video partitioning, the initialization of the Rice parameter variables and the palette predictor is performed under specific conditions, using the same initialization scheme for all those that meet the conditions The CTU is initialized to eliminate the initialization delay in parallel processing.

Benefits of technology

It improves the efficiency of video encoding and decoding, reduces the complexity of encoder and decoder, reduces resource consumption, eliminates delays in parallel processing, and becomes an effective encoding tool in video encoding standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071510A_ABST
    Figure CN119071510A_ABST
Patent Text Reader

Abstract

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

Description

CROSS-REFERENCE TO RELATED APPLICATIONS

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

[0002] The present disclosure generally relates to computer-implemented methods and systems for video processing. In particular, the present disclosure relates to initialization processing for video encoding. Background Art

[0003] The ubiquitous devices with camera functions such as smartphones, tablets, and computers make it easier than ever to capture videos or images. However, even for short videos, the amount of data can be very large. Video coding technology (including video encoding and video decoding) can compress video data to be smaller, so that various videos can be stored and transmitted. 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

[0004] Some embodiments relate to initialization processing for video encoding. In one example, a method for decoding video from a video bitstream includes: accessing a binary string representing a partition of the video, the partition including a plurality of coding tree units (CTUs) 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 tile; in response to determining that the CTU is the first CTU in the tile, initializing a context-adaptive binary arithmetic coding (context-adaptive binary arithmetic coding) according to a first context variable initialization process The method comprises the steps of: determining a context variable of a CABAC coding (CABAC), initializing the Rice parameter variables according to a first Rice parameter variable initialization process, and initializing the palette predictor variables 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 the first CTU in the CTU row of the tile; in response to determining that parallel coding is enabled and the CTU is the first CTU in the CTU row of the tile, 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 variables according to a second context variable initialization process, initializing the Rice parameter variables according to the second Rice parameter variable initialization process, and initializing the palette predictor variables according to the 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 variables according to the first context variable initialization process, and initializing the palette predictor variables according to the first Rice parameter variable initialization process. The initialization process initializes Rice parameter variables, and initializes 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, determines whether the CTU is the 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 the slice is a dependent slice, initializes context variables according to a third context variable initialization process, initializes Rice parameter variables according to a third Rice parameter variable initialization process, and initializes palette predictor variables 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 the slice is not a dependent slice, does not perform initialization on context variables, Rice parameter variables, and palette predictor variables; and decodes the CTU, including: based on the Rice parameter variables and the context variables, decoding a binary string corresponding to the CTU into coefficient values ​​of the CTU, and determining pixel values ​​of the CTU from the coefficient values.

[0005] In another example, a method for decoding video from a video bitstream includes: accessing a binary string representing a partition of the video, the partition including a plurality of CTUs forming one or more CTU rows; 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 a CTU row of the tile, determining C an available mark of an upper neighboring block of a CTU, in response to determining that the available mark 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 mark 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 context variables and palette predictor variables; and decoding the CTU, including: decoding a binary 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 code stream includes: accessing a binary string representing a partition of the video, the partition including multiple CTUs forming one or more CTU rows; for each CTU in the multiple CTUs in the partition, determining whether an initialization condition is satisfied, the initialization condition including (a) the CTU is the first CTU in a tile, or (b) the CTU is the first CTU in a slice, or (c) parallel coding is enabled and the CTU is the first CTU in a CTU row of the tile; in response to determining that the initialization condition is satisfied, initializing context variables for CABAC according to a context variable initialization process, initializing Rice parameter variables according to a Rice parameter variable initialization process, and initializing palette predictor variables according to an initialization process for palette predictor entries; in response to determining that the initialization condition is not satisfied, not initializing the context variables, Rice parameter variables, and palette predictor variables; and decoding the CTU, including: based on the Rice parameter variables and the context variables, decoding the binary string corresponding to the CTU into coefficient values ​​of the CTU, and determining pixel values ​​of the CTU from the coefficient values.

[0007] 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 of the plurality of CTUs in the partition, determining whether the CTU is the first CTU in a tile; in response to determining that the CTU is the first CTU in the tile, initializing context variables for CABAC according to a first context variable initialization process, initializing Rice parameter variables according to a first Rice parameter variable initialization process, and initializing palette predictor variables 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 the first CTU in a CTU row of the tile; in response to determining that parallel encoding is enabled and the CTU is the first CTU in a 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 context variables according to a second context variable initialization process, initializing Rice parameter variables according to a second Rice parameter variable initialization process, and initializing palette predictor variables according to a second palette predictor initialization process. Initializing palette predictor variables according to a first context variable initialization process, and in response to determining that an available flag of an upper neighboring block of a CTU indicates that the upper neighboring block is unavailable, initializing context variables according to a first context variable initialization process, initializing Rice parameter variables according to a first Rice parameter variable initialization process, and initializing palette predictor variables according to a first palette predictor initialization process; in response to determining that parallel coding is not enabled or that the CTU is not the first CTU in a CTU row of a tile, determining whether the CTU is the 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 a slice and the slice is a dependent slice, initializing context variables according to a third context variable initialization process, initializing Rice parameter variables according to a third Rice parameter variable initialization process, and initializing palette predictor variables according to a third palette predictor initialization process, and in response to determining that the CTU is not the first CTU in a slice or the slice is not a dependent slice, not performing initialization on context variables, Rice parameter variables, and palette predictor variables; and encoding the CTU, including converting transform units (transform units) in the CTU into transform units (transform units) based on the Rice parameter variables and the context variables. The coefficient values ​​of each unit (TU) are encoded into binary representations, and the divided binary representations are encoded into a bitstream of a video.

[0008] 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 encoding is enabled and whether the CTU is the first CTU in a CTU row of the tile; in response to determining that parallel encoding is enabled and the CTU is the first CTU in the CTU row of the 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 the first CTU in the CTU row of the tile; TU, determine 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, initialize context variables according to a second context variable initialization process, and initialize 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, initialize context variables according to a first context variable initialization process, and initialize 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, do not initialize the context variables and the palette predictor variables; and encode the CTU, including encoding coefficient values ​​of the TU in the CTU into binary representations based on Rice parameter variables and context variables, and encoding the divided binary representations into a bitstream of a video.

[0009] In another example, a method for encoding a video includes: accessing a partition of the video, the partition including multiple 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 multiple CTUs in the partition, determining whether an initialization condition is met, the initialization condition including (a) the CTU is the first CTU in a tile, or (b) the CTU is the first CTU in a slice, or (c) parallel coding is enabled and the CTU is the first CTU in a CTU row of the tile; in response to determining that the initialization condition is met, initializing context variables for CABAC according to a context variable initialization process, initializing Rice parameter variables according to a Rice parameter variable initialization process, and initializing palette predictor variables according to an initialization process for palette predictor entries; in response to determining that the initialization condition is not met, not initializing the context variables, Rice parameter variables, and palette predictor variables; and encoding the CTU, including encoding coefficient values ​​of the TU in the CTU into a binary representation based on the Rice parameter variables and the context variables, and encoding the binary representation of the partition into a bitstream of the video.

[0010] These illustrative embodiments are mentioned not to limit or define the present disclosure, but to provide examples to aid understanding of the present disclosure. Other embodiments are discussed in the detailed description, and further description is provided. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The features, embodiments, and advantages of the present disclosure may be better understood by reading the following detailed description with reference to the accompanying drawings.

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

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

[0014] Figure 3 Depicting an example of coding tree unit partitioning of an image in a video according to some embodiments of the present disclosure.

[0015] Figure 4 Depicting an example of coding unit partitioning of a coding tree unit according to some embodiments of the present disclosure.

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

[0017] Figure 6 An example of a process for encoding partitions of a video is depicted in accordance with some embodiments of the present disclosure.

[0018] Figure 7 An example of a process for decoding partitions of a video is depicted in accordance with some embodiments of the present disclosure.

[0019] Figure 8 Another example of a process for encoding partitions of a video is depicted in accordance with some embodiments of the present disclosure.

[0020] Fig. 9 Another example of a process for decoding partitions of a video is depicted in accordance with some embodiments of the present disclosure.

[0021] Fig.10 Another example of a process for encoding partitions of a video is depicted in accordance with some embodiments of the present disclosure.

[0022] Fig.11 Another example of a process for decoding partitions of a video is depicted in accordance with some embodiments of the present disclosure.

[0023] Fig.12 Depicts an example of a computing system that can be used to implement some embodiments of the present disclosure. DETAILED DESCRIPTION

[0024] 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 the video without compromising the visual quality of the decoded video. One method of improving coding efficiency is to compress the processed video samples into a binary code stream using as few bits as possible through entropy coding. On the other hand, because videos typically contain a large amount of data, it is beneficial to reduce processing time during encoding (encoding and decoding). For this reason, parallel processing can be used in video encoding and decoding.

[0025] In entropy coding, video samples are binarized into binary bins, and coding algorithms such as CABAC can further compress the bins into bits. Binarization requires the calculation of binarization parameters, such as the Rice parameters 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 parameters used in Golomb-Rice codes specified in the high efficiency video coding (HEVC) specification.

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

[0027] Various variables involved in at least the above-mentioned part of video encoding, such as entropy coding variables, palette prediction variables, and parallel processing variables, need to be initialized for encoding. However, due to the relationship between the CTUs of the video (for example, because the current CTU is spatially adjacent to the previous CTU, the current CTU is related to the previous CTU), inappropriate initialization may reduce coding efficiency. For example, due to unnecessary initialization steps, the existing slice and tile initialization and parallel processing wavefront parallel processing (WPP) initialization in the HEVC specification and the VVC specification may not be optimal. In addition, when parallel processing is enabled in 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.

[0028] Various embodiments described herein solve these problems by eliminating unnecessary initialization operations in the partitioning, thereby simplifying the encoding process and improving the encoding efficiency. In addition, the initialization delay in parallel processing can be eliminated through a proper initialization process, thereby speeding up the video processing process without almost reducing the encoding efficiency. Non-limiting examples are provided below to introduce some embodiments.

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

[0030] In another embodiment, the initialization of the context variables, Rice parameter variables, and palette predictor variables for CABAC of the CTU is further simplified to adopt the same initialization scheme for all CTUs that meet the initialization conditions. For example, in this embodiment, when WPP is enabled, for the first CTU in each CTU row, before encoding the current image, all dependent variables between CTUs (e.g., context variables for CABAC, variables for palette prediction, and variables for Rice parameter derivation, etc.) are reset to their respective initial values. Therefore, the encoding of the CTU row does not depend on the previous CTU row, and WPP can be used to process multiple CTU rows in parallel without delay. Therefore, in addition to the advantages of reducing the complexity of video encoders and decoders and reducing resource consumption, the encoding delay in parallel processing is also reduced in this embodiment. The technology proposed in this article can become an effective encoding tool in video coding standards.

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

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

[0033] Typically, the first picture of a video signal is an intra-predicted picture, which is encoded using only intra-prediction. In intra-prediction mode, 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 may employ an intra prediction module 126. The intra prediction module 126 is used to generate an intra prediction block (prediction block 134) using reconstructed samples in a reconstruction block 136 of a neighboring block of the same image. Intra prediction is performed according to an intra prediction mode selected for the block. The video encoder 100 then calculates the difference between the block 104 and the intra prediction block 134. The difference is referred to as a residual block 106.

[0034] 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 the samples in the block. Examples of transforms may include, but are not limited to, discrete cosine transforms (DCT) or discrete sine transforms (DST). The transform values ​​may be referred to as transform coefficients, representing the residual block in the transform domain. In some examples, the residual block may be quantized directly without being transformed by the transform module 114. This is referred to as a transform skip mode.

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

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

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

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

[0039] As described above, a reconstructed block 136 from a neighboring block is used in intra prediction of a block of an image. Generating a reconstructed block 136 of a block involves calculating a reconstructed residual of 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 used to apply inverse quantization to quantized samples to obtain dequantized coefficients. The inverse quantization module 118 applies the 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 used to apply the inverse transform of the transform applied by the transform module 114 to the dequantized samples, such as an inverse DCT or an inverse DST. 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 prediction block 134 of the block to obtain the reconstructed block 136 in the pixel domain. For blocks that skip transform, the inverse transform module 119 is not applied to those blocks. The dequantized samples are the reconstructed residual of the block.

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

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

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

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

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

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

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

[0047] A prediction block 234 of a particular block is generated based on the prediction mode of the block. If the encoding parameters of the block indicate that the block is intra-predicted, a reconstructed block 236 of a reference block in the same image may be fed back to the intra-prediction module 226 to generate the prediction block 234 of the block. If the encoding 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 Figure 1 The intra-frame prediction module 126 is similar to the inter-frame prediction module 124 .

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

[0049] Reference now Figure 3 , Figure 3 Describes an example of coding tree unit partitioning of an image in a video according to some embodiments of the present disclosure. Figure 1 and Figure 2 As discussed, in order to encode an image of a video, the image is divided into blocks, e.g. Figure 3 302 in a VVC. For example, CTU 302 may be a block of 128×128 pixels. Figure 3 In some examples, such as Figure 4 As shown, each CTU 302 in the image can be divided into one or more coding units (CUs) 402, and the above CU can be further divided into prediction units for prediction or transform units for transformation. Depending on the coding scheme, the CTU 302 can be divided into CUs 402 differently. For example, in VVC, the CU 402 can be rectangular or square, and the above CU can be encoded without further division into prediction units or transform units. Each CU 402 can be as large as the root CTU 302 of the CU, or a subdivision of the root CTU 302 as small as 4×4 blocks. Figure 4 As shown, the partition from CTU 302 to CU 402 in the VVC may be a quadtree partition, a binary tree partition, or a ternary tree partition. Figure 4 In , the solid line represents quadtree partitioning, and the dashed line represents binary tree or ternary tree partitioning.

[0050] Initialization Processing

[0051] Initialization is an important step in video coding. In the existing HEVC specification (ITU-T, "High Efficiency Video Coding", November 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 encoding. For example, the initial values ​​are used to derive two context variables indexed by ctxTable and ctxIdx for CABAC in HEVC. In VVC, the initial ctxTable and ctxIdx are used to derive two context variables pStateIdx0 and pStateIdx1. The context variables are used to derive multiple variables for compression bins in CABAC. In HEVC, when Rice parameter adaptation is enabled, the initial value of the variable StatCoeff[k] is initialized to 0, where k is in the range of 0 to 3. Similarly, when history-based Rice parameter derivation is enabled in VVC, the initial value of the variable StatCoeff[idx] is initialized, where idx represents the luma component and the two chroma components. In addition, when palette prediction is allowed in HEVC and VVC, two palette prediction related variables PredictorPaletteSize and PredictorPaletteEntries need to be initialized.

[0052] Residual Coding

[0053] In video coding, residual coding is used to convert quantization levels into bitstreams. After quantization, the N×MTU coding block has N×M quantization levels. These N×M levels can be zero values ​​or non-zero values. If the non-zero level is not binary, the non-zero level is further binarized into a binary bin. CABAC can further compress the bin into bits. In addition, there are two coding methods based on context modeling. Specifically, one of the above methods is to adaptively update the context model based on adjacent coding information. This method is called a context coding method, and the bin encoded in this way is called a context coding bin. In contrast, another method assumes that the probability of 1 or 0 is always 50%, so a fixed context modeling is always used without adjustment. This method is called a bypass method, and the bin encoded in this way is called a bypass bin.

[0054] For the regular residual coding (RRC) block 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, which are last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. The syntax elements last_sig_coeff_x_prefix and last_sig_coeff_y_prefix are first encoded using the 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 encoded using a bypass method. The RRC block can consist of multiple predefined sub-blocks. The syntax element sb_coded_flag is used to indicate whether all levels of the current sub-block are 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 from last_sig_coeff_x and last_sig_coeff_y as 1 according to the coding scan order, and is not encoded into the code stream. In addition, the sb_coded_flag of the upper left sub-block containing the DC position is also derived as 1 and is not encoded into the code stream. The context coding method is used to encode the syntax element of sb_coded_flag in the code stream. RRC will start from the last non-zero sub-block and encode it sub-block by sub-block in the reverse coding scanning order.

[0055] For blocks coded in transform skip residual coding (TSRC) mode, TSRC will be coded sub-block by sub-block along the coding scan order starting from the top left sub-block. Similarly, the syntax element sb_coded_flag is used to indicate whether all residuals of the current sub-block are equal to zero. When a specific condition occurs, all syntax elements sb_coded_flag of all sub-blocks except the last sub-block are encoded into the bitstream. If all sb_coded_flags of all sub-blocks before the last sub-block are not equal to 1, the sb_coded_flag of the last sub-block will be derived as 1 and the flag will not be encoded into the bitstream. In order to ensure the worst-case throughput, the maximum context coding bin is limited by a predefined value RemCcbs. If the current sub-block has a non-zero level, TSRC will encode the level of each position in the coding scan order. If RemCcbs is greater than 4, the following syntax elements will be encoded using the context coding method. For each level, sig_coeff_flag is first encoded into the bitstream to indicate whether the level is zero or non-zero. If the level is non-zero, coeff_sign_flag will be encoded to indicate whether the level is positive or negative. Then abs_level_gtx_flag[n][0] will be encoded 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 along the scan order. If abs_level_gtx_flag[n][0] is not zero, par_level_flag will be encoded. After encoding each of the above syntax elements using the context coding method, the value of RemCcbs will be reduced by 1.

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

[0057] Rice parameter derivation

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

[0059] The array AbsLevel[xC][yC] represents the array of absolute values ​​of the transform coefficient levels of the current transform block for color component index cIdx. Given an array AbsLevel[x][y] of a transform block with color component index cIdx and top left luma position (x0, y0), derive the local sum variable locSumAbs as specified by the following pseudo-code procedure: 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 and variable locSumAbs, derive the Rice parameter cRiceParam as specified in Table 1. Table 1 - cRiceParam specifications based on locSumAbs locSumAbs 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 cRiceParam 0 0 0 0 0 0 0 1 1 1 1 1 1 1 2 2 locSumAbs 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 cRiceParam 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3

[0060] Derivation of Rice parameters based on history

[0061] The template calculation used for Rice parameter derivation may produce inaccurate coefficient estimates if the coefficients are located at TU boundaries or decoded for the first time with the Rice method. Because some template positions may be located outside the TU and are interpreted or initialized to the value 0, the template calculation is biased towards 0 for these coefficients. In order to improve the accuracy of estimating Rice from the calculated template, the local sum variable locSumAbs is updated with historical derived values ​​for template positions outside the current TU instead of being initialized to 0. The implementation of this method is shown in the following excerpt from the VVC specification text in Section 9.3.3.2.

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

[0063] The history counter StatCoeff is updated once per TU from the first non-zero Golomb-Rice coded transform coefficient (abs_remaintment[cIdx] 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 encoded as abs_remainder, the history counter StatCoeff of the color component cIdx is updated as follows: StatCoeff[cIdx] = ( StatCoeff[cIdx] + Floor(Log2(abs_remainder[cIdx])) + 2 ) >> 1 (3) When the first non-zero Golomb-Rice coded transform coefficient in a TU is encoded as dec_abs_level, the history counter StatCoeff of the color component cIdx is updated as follows: StatCoeff[cIdx] = ( StatCoeff[cIdx] + Floor(Log2(dec_abs_level[cIdx])) ) >> 1 (4) Before decoding the next TU, the replacement variable HistValue of the next TU can be calculated using the updated StatCoeff according to equation (2).

[0064] In HEVC, Rice parameters are also used to binarize the remaining absolute value of the transform coefficient level encoded with a Golomb-Rice code at scan position n (denoted as coeff_abs_level_remaining[n]). Given the syntax element coeff_abs_level_remaining[n], the current sub-block scan index i, baseLevel, the color component cIdx, and the luma position (x0, y0) specifying the top-left sample of the current luma transform block relative to the top-left luma sample of the image, the syntax element can be binarized as specified in Section 9.3.3.11 of the HEVC specification as follows. Depending on the value of persistent_rice_adaptation_enabled_flag, the following applies: - If persistent_rice_adaptation_enabled_flag is equal to 0, then the variable initRiceValue is set equal to 0. - Otherwise (persistent_rice_adaptation_enabled_flag is equal to 1), the following applies: -The variable sbType is derived as follows: o If transform_skip_flag[x0][y0][cIdx] is equal to 0 and cu_transquant_bypass_flag is equal to 0, then it applies the following: sbType = 2 * ( cIdx = = 0 ? 1 : 0 ) (9-20) o Otherwise, the following applies: sbType = 2 * ( cIdx = = 0 ? 1 : 0 ) + 1 (9-21) -The variable initRiceValue is derived as follows: initRiceValue = StatCoeff[sbType] / 4 (9-22) - If the procedure is called for the first time for the current subblock scan index i, StatCoeff[sbType] is modified as follows: if(coeff_abs_level_remaining[n]>=(3<<(StatCoeff[sbType] / 4))) StatCoeff[sbType]++ else if(2*coeff_abs_level_remaining[n]<(1<<(StatCoeff[sbType] / 4))&& StatCoeff[sbType]>0) StatCoeff[sbType]--(9-23) The variables cLastAbsLevel and cLastRiceParam are derived as follows: - If the 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. - Otherwise (this is not the first time the 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. The variable cAbsLevel is set equal to baseLevel + coeff_abs_level_remaining[n]. The variable cRiceParam is derived from cLastAbsLevel and cLastRiceParam as follows: - If persistent_rice_adaptation_enabled_flag is equal to 0, the following applies: cRiceParam = Min( cLastRiceParam + ( cLastAbsLevel > (3*(1< <cLastRiceParam)) ? 1:0),4) (9-24) - Otherwise (persistent_rice_adaptation_enabled_flag is equal to 1), the following applies: cRiceParam = cLastRiceParam+(cLastAbsLevel > (3*(1< <cLastRiceParam)) ? 1:0) (9-25) The variable cMax is derived from cRiceParam as: cMax=< <cRiceParam (9-26) 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). For the derivation of prefix bin strings, the following applies: The prefix value prefixVal of -coeff_abs_level_remaining[n] is derived as follows: prefixVal=Min(cMax,coeff_abs_level_remaining[n]) (9-27) - Specify the prefix bin string by calling the TR binarization process for prefixVal as specified in clause 9.3.3.2, with variables cMax and cRiceParam as input. When the prefix bin string is equal to a bit string of length 4 with all bits equal to 1, the suffix bin string exists and is derived as follows: The suffix value suffixVal of -coeff_abs_level_remaining[n] is derived as follows: suffixVal=coeff_abs_level_remaining[n]-cMax (9-28) - If extended_precision_processing_flag is equal to 0, the suffix bin string is defined by invoking the k-order EGk binarization process for binarization of suffixVal as specified in clause 9.3.3.3, with the order k of Exp-Golomb set equal to cRiceParam+1. - Otherwise (extended_precision_processing_flag is equal to 1), the suffix bin string is defined by calling the finite k-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 And color component cIdx.

[0065] Palette mode encoding

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

[0067] Each coding unit in palette mode uses its own palette, and due to the high correlation between palettes in adjacent areas, the signaling includes predictions. The predictor stores the palette information of the used palettes, and either constructs the palette of the current coding unit with a flag indicating the reuse of the predictor entry, or adds new samples to the palette when the sample is not in the predictor's list. In the latter case, the predictor is then updated with the palette, and then the unused elements of 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 achieved through signaling within the SPS. However, in VVC, the maximum size of the palette and predictor cannot be adjusted.

[0068] After the palette construction is completed, the spatial positions covered by the coding unit are encoded using a horizontal or vertical scanning mode. For each scanning position, the encoder writes the palette index to the codestream using run-length coding, which has two types of classification: copy index and copy above, where the copy index means that the index of the palette entry is directly written to the codestream. On the other hand, for the copy above mode, the index is the same as the index of the upper row (or left column) of the horizontal (or vertical) scanning pattern. For the residual coding stage in VVC, the encoding of the sample occurs in multiple scanning channels (passes), where the first coding channel writes the index of the scanning position to the codestream using the copy index type. The second coding channel includes a context coding bin representing type and run information. Finally, the third scanning channel specifies the sample whose index is equal to the scanning position of the escape entry. The first and third scanning channels use bypass mode only for the corresponding syntax elements, while the second coding channel uses the context model for entropy coding.

[0069] Wavefront Parallel Processing (WPP)

[0070] WPP is designed to provide a parallel coding mechanism. When WPP is enabled in VVC, each CTU 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 WPP-enabled tile is shown. Figure 5 In HEVC, each CTU row of a tile is processed with a delay of one CTU relative to its previous CTU row. In this way, if palette coding is enabled at the end of each CTU row, the dependencies between consecutive CTU rows are not broken at the division boundaries, except for the CABAC context variables and the palette predictor. To mitigate the potential loss of coding efficiency, the adaptive CABAC context variables and the contents of the palette predictor are propagated from the first encoded CTU of the previous CTU row to the first CTU of the current CTU row. WPP does not change the conventional raster scan order of CTUs. Similarly, WPP is also used in HEVC. In HEVC, there is not one-CTU delay but two-CTU delay between adjacent CTU rows.

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

[0072] As discussed above, the existing slice and tile initialization and parallel processing initialization in the HEVC specification and the VVC specification may not be optimal due to unnecessary initialization steps in the initialization. In some embodiments, these unnecessary initialization steps are omitted, thereby improving the coding efficiency, reducing the complexity of the video encoder and decoder, and reducing various resource consumption involved in the encoding process, such as CPU time, memory usage, etc.

[0073] In the HEVC specification, initialization is specified as follows. Initialize the context variables of the arithmetic decoding engine, the Rice parameter initialization state, and the palette predictor variables as follows: - If the CTU is the first CTU in a tile, the following applies: - Call the initialization procedure for the context variables as specified in clause 9.3.2.2. -Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in clause 9.3.2.3. - Otherwise, if entropy_coding_sync_enabled_flag is equal to 1, and either CtbAddrInRs%PicWidthInCtbsY is equal to 0, Either TileId[CtbAddrInTs] is not equal to TileId[CtbAddrRsToTs[CtbAddrInRs-1]], then the following applies: -Use the position (x0, y0) of the top left luma sample of the current CTB to derive the spatial neighboring block T( Figure 9-2 ) is located at the position (xNbT, yNbT) of the upper left brightness sample as follows: (xNbT, yNbT) = (x0 + CtbSizeY, y0 - CtbSizeY) (9-3) - Invoke the block's availability derivation procedure in z-scan order as specified in clause 6.4.1, with as input the position (xCurr,yCurr) set equal to (x0,y0) and the neighboring position (xNbY,yNbY) set equal to (xNbT,yNbT), and assign the output to availableFlagT. - The synchronization process of calling context variables, Rice parameter initialization state, and palette predictor variables is as follows: -If availableFlagT is equal to 1, the synchronization process of context variables, Rice parameter initialization state, and palette predictor variables specified in Section 9.3.2.5 is called, with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as input. - Otherwise, the following applies: - Call the initialization procedure for the context variables as specified in clause 9.3.2.2. -Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in clause 9.3.2.3. - Otherwise, if CtbAddrInRs is equal to slice_segment_address and dependent_slice_segment_flag is equal to 1, the synchronization procedure for context variables and Rice parameter initialization state specified in clause 9.3.2.5 is called, with TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs as input. - Otherwise, the following applies: - Call the initialization procedure for the context variables as specified in clause 9.3.2.2. -Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in clause 9.3.2.3. Call the initialization procedure of the arithmetic decoding engine as specified in clause 9.3.2.6.

[0074] Some CTUs that are not the first CTU of a tile or the first CTU in a CTU row of a tile may also call the above initialization process. However, it is unnecessary to perform the above initialization process for these CTUs. In fact, the encoding performance is affected by performing these unnecessary initializations. Initialization causes various variables to be reset to their respective initial values, so that the encoding of the CTU is independent of the previous CTU, without utilizing the correlation between CTUs in the same strip or tile. In this embodiment, it is recommended to omit some of the following initialization processes with strikethroughs to improve encoding efficiency. Initialize the context variables of the arithmetic decoding engine, the Rice parameter initialization state, and the palette predictor variables as follows: - If the CTU is the first CTU in a tile, the following applies: - Call the initialization procedure for the context variables as specified in clause 9.3.2.2. -Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in clause 9.3.2.3. - Otherwise, if entropy_coding_sync_enabled_flag is equal to 1, and either CtbAddrInRs%PicWidthInCtbsY is equal to 0, Either TileId[CtbAddrInTs] is not equal to TileId[CtbAddrRsToTs[CtbAddrInRs-1]], then the following applies: -Use the position (x0, y0) of the top left luma sample of the current CTB to derive the spatial neighboring block T( Figure 9-2 ) is located at the position (xNbT, yNbT) of the upper left brightness sample as follows: (xNbT, yNbT) = (x0 + CtbSizeY, y0 - CtbSizeY) (9-3) - Invoke the block's availability derivation procedure in z-scan order as specified in clause 6.4.1, with as input the position (xCurr,yCurr) set equal to (x0,y0) and the neighboring position (xNbY,yNbY) set equal to (xNbT,yNbT), and assign the output to availableFlagT. - The synchronization process of calling context variables, Rice parameter initialization state, and palette predictor variables is as follows: -If availableFlagT is equal to 1, the synchronization process of context variables, Rice parameter initialization state, and palette predictor variables specified in Section 9.3.2.5 is called, with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as input. - Otherwise, the following applies: - Call the initialization procedure for the context variables as specified in clause 9.3.2.2. -Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in clause 9.3.2.3. - Otherwise, if CtbAddrInRs is equal to slice_segment_address and dependent_slice_segment_flag is equal to 1, the synchronization procedure for context variables and Rice parameter initialization state specified in clause 9.3.2.5 is called, with TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs as input. Call the initialization procedure of the arithmetic decoding engine as specified in clause 9.3.2.6.

[0075] In another example, the initialization of the HEVC specification may be modified as follows: Initialize the context variables of the arithmetic decoding engine, the Rice parameter initialization state, and the palette predictor variables as follows: - If the CTU is the first CTU in a tile or CtbAddrInRs is equal to slice_segment_address and dependent_slice_segment_flag is equal to 0, the following applies: - Call the initialization procedure for the context variables as specified in clause 9.3.2.2. -Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in clause 9.3.2.3. - Otherwise, if entropy_coding_sync_enabled_flag is equal to 1, and either CtbAddrInRs%PicWidthInCtbsY is equal to 0, Either TileId[CtbAddrInTs] is not equal to TileId[CtbAddrRsToTs[CtbAddrInRs-1]], then the following applies: -Use the position (x0, y0) of the top left luma sample of the current CTB to derive the spatial neighboring block T( Figure 9-2 ) is located at the position (xNbT, yNbT) of the upper left brightness sample as follows: (xNbT,yNbT)=(x0+CtbSizeY,y0-CtbSizeY) (9-3) - Invoke the block's availability derivation procedure in z-scan order as specified in clause 6.4.1, with as input the position (xCurr,yCurr) set equal to (x0,y0) and the neighboring position (xNbY,yNbY) set equal to (xNbT,yNbT), and assign the output to availableFlagT. - The synchronization process of calling context variables, Rice parameter initialization state, and palette predictor variables is as follows: -If availableFlagT is equal to 1, the synchronization process of context variables, Rice parameter initialization state, and palette predictor variables specified in Section 9.3.2.5 is called, with TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp as input. - Otherwise, the following applies: - Call the initialization procedure for the context variables as specified in clause 9.3.2.2. -Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in clause 9.3.2.3. - Otherwise, if CtbAddrInRs is equal to slice_segment_address and dependent_slice_segment_flag is equal to 1, the synchronization procedure for context variables and Rice parameter initialization state specified in clause 9.3.2.5 is called, with TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs as input. Call the initialization procedure of the arithmetic decoding engine as specified in clause 9.3.2.6.

[0076] Similarly, the following initialization specified in the VVC specification has the same issues as the HEVC specification discussed above. The context variables of the arithmetic decoding engine are initialized as follows: - If the CTU is the first CTU in a slice or tile, the initialization procedure for context variables 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: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 (1513) - Otherwise, if sps_entropy_coding_sync_enabled_flag is equal to 1 and CtbAddrX is equal to CtbToTileColBd[CtbAddrX], The following apply: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 (XXXX) -Use the position (x0, y0) of the top left luma sample of the current CTB to derive the spatial neighboring block T( Fig.12 ) is located at the position (xNbT, yNbT) of the upper left brightness sample as follows: (xNbT,yNbT)=(x0,y0-CtbSizeY) (1510) - Invoke the derivation process for neighbor block availability specified in clause 6.4.4, with as input the position (xCurr,yCurr) set equal to (x0,y0), the neighbor position (xNbY,yNbY) set equal to (xNbT,yNbT), checkPredModeY set equal to FALSE, and cIdx set equal to 0, and assign the output to availableFlagT. -The synchronization process of calling context variables is as follows: - If availableFlagT is equal to 1, the following applies: - Invoke the synchronization procedure for context variables specified in clause 9.3.2.4, using TableStateIdx0Wpp and TableStateIdx1Wpp as input. - When sps_palette_enabled_flag is equal to 1, the synchronization process of the palette predictor specified in clause 9.3.2.7 is called. - 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. - Otherwise, call the context variable initialization procedure as specified in Section 9.3.2.2 and set the array PredictorPaletteSize[chType] Initialized to 0, where chType=0,1. The decoding engine registers ivlCurrRange and ivlOffset, both with 16-bit register precision, are initialized by calling the initialization procedure of the arithmetic decoding engine specified in clause 9.3.2.5.

[0077] In this embodiment, it is recommended to omit some of the following initialization processes with deletions in the VVC specification to further improve the coding efficiency. The context variables for initializing the arithmetic decoding engine are as follows: - If the CTU is the first CTU in a slice or tile, the initialization procedure for context variables 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: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 (1513) - Otherwise, if sps_entropy_coding_sync_enabled_flag is equal to 1 and CtbAddrX is equal to CtbToTileColBd[CtbAddrX], The following apply: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 (XXXX) -Use the position (x0, y0) of the top left luma sample of the current CTB to derive the spatial neighboring block T( Fig.12 ) is located at the position (xNbT, yNbT) of the upper left brightness sample as follows: (xNbT,yNbT)=(x0,y0-CtbSizeY) (1510) - Invoke the derivation process for neighbor block availability specified in clause 6.4.4, with as input the position (xCurr,yCurr) set equal to (x0,y0), the neighbor position (xNbY,yNbY) set equal to (xNbT,yNbT), checkPredModeY set equal to FALSE, and cIdx set equal to 0, and assign the output to availableFlagT. -The synchronization process of calling context variables is as follows: - If availableFlagT is equal to 1, the following applies: - Invoke the synchronization procedure for context variables specified in clause 9.3.2.4, using TableStateIdx0Wpp and TableStateIdx1Wpp as input. - When sps_palette_enabled_flag is equal to 1, the synchronization process of the palette predictor specified in clause 9.3.2.7 is called. - 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. 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.

[0078] Optionally, the modified initialization process of VVC can also be described as follows: Initialize the context variables of the arithmetic decoding engine, as well as the arrays PredictorPaletteSize and StatCoeff as follows: - Initialize the array StatCoeff[i], where i=0...2 as follows: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 (1513) - If the CTU is the first CTU in a slice or tile, the initialization process of the context variables is called as specified in subclause 9.3.2.2 and the array PredictorPaletteSize[chType] is initialized to 0, where chType = 0, 1. - Otherwise, when sps_entropy_coding_sync_enabled_flag is equal to 1 and CtbAddrX is equal to CtbToTileColBd[CtbAddrX], the following applies: -Use the position (x0, y0) of the top left luma sample of the current CTB to derive the spatial neighboring block T( Fig.12 )'s upper left luminance sample Set (xNbT, yNbT) as follows: - Call the derivation process for neighbor block availability specified in subclause 6.4.4, with as input the position (xCurr, yCurr) set equal to (x0, y0), the neighbor position (xNbY, yNbY) set equal to (xNbT, yNbT), checkPredModeY set equal to FALSE, and cIdx set equal to 0, and assign the output to availableFlagT. - The synchronization process of calling context variables and palette predictor is as follows: - If availableFlagT is equal to 1, the following applies: - Call the synchronization procedure for context variables specified in subclause 9.3.2.4, using TableStateIdx0Wpp and TableStateIdx1Wpp as input. - When sps_palette_enabled_flag is equal to 1, the synchronization process of the palette predictor specified in subclause 9.3.2.7 is called. - 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. 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. sps_persistent_rice_adaptation_enabled_flag equal to 1 specifies that Rice parameter derivation for binarization of abs_remainder[] and dec_abs_level[] is initialized at the start of each TU using statistics accumulated from previous TUs. sps_persistent_rice_adaptation_enabled_flag equal to 0 specifies that previous TU states are 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.

[0079] 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 in accordance with 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.

[0080] At block 602, process 600 includes accessing a partition of a video signal. The partition may be a video frame, slice, or tile or any 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 shown arranged into CTU rows. Each CTU row includes one or more CTUs, and each CTU includes one or more TUs for encoding.

[0081] In box 604, including boxes 606 to 620, process 600 includes processing each CTU in the group of CTUs in the partition to encode the partition into bits. In box 606, process 600 includes determining whether the CTU is the first CTU in the tile. If the CTU is the first CTU in the tile, in box 608, context variables for CABAC, 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, for example, the context variable initialization process specified in Section 9.3.2.2 of the HEVC specification. The Rice parameter variables are initialized according to the first Rice parameter variable initialization process. For example, the first Rice parameter variable initialization process initializes the Rice parameter variable StatCoeff[k] to zero, where k is in the range of 0 to 3, including the end value. The palette predictor variables are initialized according to a first palette predictor initialization process, such as 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.

[0082] In another example, the condition in block 606 may 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, meaning that the current slice is an independent slice). If either condition (a) or condition (b) is met, the initialization scheme of block 608 described above is used; otherwise, process 600 proceeds to block 610.

[0083] At block 610, process 600 includes determining whether a parallel coding mechanism WPP is enabled and whether the current CTU is the first CTU of a CTU row. In some examples, parallel coding can be indicated by a flag, a value of 0 for the flag indicating that parallel coding is disabled, and a value of 1 for the flag indicating that parallel coding is enabled. If it is determined that the parallel coding mechanism is enabled and the current CTU is the first CTU of 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.

[0084] In the second initialization scheme, the available flag availableFlagT of the upper neighboring block of the current CTU is determined, and initialization is performed based on the available flag availableFlagT. In some examples, the available flag of the upper neighboring block of the current CTU is determined based on the position of the upper left luminance sample of the upper neighboring block. If the available flag availableFlagT indicates that the upper neighboring block is available, the context variables for CABAC are initialized according to the second context variable initialization process, the Rice parameter variables are initialized according to the second Rice parameter variable initialization process, and the palette predictor variables are initialized according to the 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, Rice parameter variables, and palette predictor variables specified in Section 9.3.2.5 of the HEVC standard, wherein TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp are used as inputs.

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

[0086] 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 the 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 the 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 the 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 of the context variables, Rice parameter variables, and palette predictor variables specified in Section 9.3.2.5 of the HEVC standard can be performed as an initialization process in the third scheme, in which TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs are used as inputs. 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, the process 600 continues to block 618 without performing any initialization. In other words, for CTUs that do not meet any of the conditions described in blocks 606, 610, and 614, initialization is not performed. Therefore, unnecessary initialization processes are omitted, thereby improving coding efficiency.

[0087] 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 may be calculated based on the Rice parameter variables StatCoeff, and the Rice parameters may 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 the CABAC 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.

[0088] 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 in accordance with 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 entropy decoding module 216, the inverse quantization module 218, and the inverse transform module 219 by executing program codes. Figure 7 For illustrative purposes, process 700 is described with reference to some of the examples depicted in the accompanying drawings. However, other implementations are possible.

[0089] At block 702, process 700 includes accessing a binary string or binary representation representing a partition of a video signal. The partition may be a video frame, slice, or tile or any 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 shown arranged in CTU rows. Each CTU row includes one or more CTUs, and each CTU includes multiple TUs for encoding.

[0090] In box 704, including boxes 706 to 720, process 700 includes processing a binary string of each CTU in the group of CTUs in the partition to generate decoded samples of the partition. In box 706, process 700 includes determining whether the CTU is the first CTU in the tile. If the CTU is the first CTU in the tile, in box 708, context variables for CABAC, Rice parameter variables StatCoeff, and palette predictor variables are initialized according to a first scheme. In the first scheme, context variables for CABAC are initialized according to a first context variable initialization process, for example, the context variable initialization process specified in Section 9.3.2.2 of the HEVC standard. 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 variable StatCoeff[k] to zero, where k is in the range of 0 to 3, including the end value. The palette predictor variables are initialized according to a first palette predictor initialization process, such as the palette predictor variable initialization process 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.

[0091] In another example, the condition in block 706 may 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, meaning that the current slice is an independent slice). If either condition (a) or condition (b) is met, the initialization scheme of block 708 described above is used; otherwise, process 700 proceeds to block 710.

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

[0093] In the second scheme, the available flag availableFlagT of the upper neighboring block of the current CTU is determined, and initialization is performed based on the available flag availableFlagT. In some examples, the available flag of the upper neighboring block of the current CTU is determined based on the position of the upper left luminance sample of the upper neighboring block. If the available flag availableFlagT indicates that the upper neighboring block is available, the context variables for CABAC are initialized according to the second context variable initialization process, the Rice parameter variables are initialized according to the second Rice parameter variable initialization process, and the palette predictor variables are initialized according to the 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, Rice parameter variables, and palette predictor variables specified in Section 9.3.2.5 of the HEVC standard, wherein TableStateIdxWpp, TableMpsValWpp, TableStatCoeffWpp, PredictorPaletteSizeWpp, and TablePredictorPaletteEntriesWpp are used as inputs.

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

[0095] At box 714, process 700 includes determining whether the CTU is the first CTU in the stripe and whether the stripe is a dependent stripe. If the CTU is the first CTU in the stripe and the stripe is a dependent stripe, then at box 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 the process are different from the inputs to the second context variable initialization process described in box 712 above. Similarly, Rice parameter variables are initialized according to a second Rice parameter variable initialization process, and the inputs to the process are different from the inputs to the second Rice parameter variable initialization process described in box 712 above. The palette predictor variables are initialized according to a second palette predictor initialization process, and the inputs to the process are also different from the inputs to the second palette predictor initialization process described in box 712 above. For example, the corresponding initialization process of the context variables, Rice parameter variables, and palette predictor variables specified in Section 9.3.2.5 of the HEVC standard can be performed as an initialization process in the third scheme, in which TableStateIdxDs, TableMpsValDs, TableStatCoeffDs, PredictorPaletteSizeDs, and TablePredictorPaletteEntriesDs are used as inputs. 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, the process 700 continues to block 718 without any initialization. In other words, for CTUs that do not meet any of the conditions described in blocks 706, 710, and 714, initialization is not performed. In this way, unnecessary initialization processes are omitted, thereby improving coding efficiency.

[0096] At block 718, process 700 includes decoding a 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 CABAC code described above with reference to FIG. Figure 2The inverse quantization and inverse transformation 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 722, process 700 includes outputting the decoded video partition.

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

[0098] At block 802, process 800 includes accessing a partition of a video signal. The partition may be a video frame, slice, or tile or any 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 shown arranged into CTU rows. Each CTU row includes one or more CTUs, and each CTU includes one or more TUs for encoding.

[0099] At block 804, including blocks 808 to 820, process 800 includes processing each CTU in the group 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, the Rice parameter variable StatCoeff may be set to the initial value as described above according to: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 Wherein, 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 base-2 logarithm of x, and the value of sps_persistent_rice_adaptation_enabled_flag is 1 indicating that history-based Rice parameter derivation is enabled.

[0100] At block 810, process 800 includes determining whether the CTU is the first CTU in a tile or a slice. If the CTU is the first CTU in a tile or a slice, at block 812, context variables and palette predictor variables for CABAC are initialized according to a first initialization scheme. In the first initialization scheme, context variables for CABAC are initialized according to a first context variable initialization process, for example, the context variable initialization process specified in Section 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 a slice, process 800 continues to block 814.

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

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

[0103] If the available flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is not available, the context variables and the 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 of the CTU row, the process 800 continues to block 818 without performing any initialization process. In other words, for CTUs that do not meet any of the conditions described in blocks 810 and 814, initialization is not performed. In this way, unnecessary initialization processes are omitted, thereby improving coding efficiency.

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

[0105] Fig. 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. Fig. 9 For example, a computing device implementing the video decoder 200 may implement the entropy decoding module 216, the inverse quantization module 218, and the inverse transform module 219 by executing program codes. Fig. 9 For illustrative purposes, process 900 is described with reference to some of the examples depicted in the accompanying drawings. However, other implementations are possible.

[0106] At block 902, process 900 includes accessing a binary string or binary representation representing a partition of a video signal. The partition may be a video frame, slice, or tile or any 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 shown arranged into CTU rows. Each CTU row includes one or more CTUs, and each CTU includes one or more TUs for encoding.

[0107] At block 904, including blocks 908 to 920, the process 900 includes processing a binary string of each CTU in the group 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 may be set to the initial value as described above according to: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 Wherein, 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 base-2 logarithm of x, and the value of sps_persistent_rice_adaptation_enabled_flag is 1 indicating that history-based Rice parameter derivation is enabled.

[0108] At block 910, process 900 includes determining whether the CTU is the first CTU in a tile or a slice. If the CTU is the first CTU in a tile or a slice, at block 912, context variables and palette predictor variables for CABAC are initialized according to a first scheme. In the first scheme, context variables for CABAC are initialized according to a first context variable initialization process, for example, the context variable initialization process specified in Section 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 a slice, process 900 continues to block 914.

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

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

[0111] If the available flag of the upper neighboring block of the current CTU indicates that the upper neighboring block is not available, the context variables and the 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 of the CTU row, the process 900 continues to block 918 without performing any initialization process. In other words, for CTUs that do not meet any of the conditions described in blocks 910 and 914, initialization is not performed. In this way, unnecessary initialization processes are omitted, thereby improving coding efficiency.

[0112] At block 918, process 900 includes decoding a 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 a combination of TR and finite k-order EGk binarization processes specified in the VVC specification. At block 920, process 900 includes decoding the CTU by, for example, referring to Figure 2 The inverse quantization and inverse transformation 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 922, process 900 includes outputting the decoded video partition.

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

[0114] In some embodiments, the delay in the initialization of parallel processing is eliminated, thereby increasing 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, before encoding the current image, all dependent variables between CTUs (e.g., context variables for CABAC, variables for palette prediction, and variables for Rice parameter derivation, etc.) are reset to their respective initial values. Based on the existing HEVC and VVC specifications, the possible changes are as follows (the underlined part represents the added part, and the deleted part represents the omitted part).

[0115] For HEVC: Initialize the context variables of the arithmetic decoding engine, the Rice parameter initialization state, and the palette predictor variables as follows: - If the CTU is the first CTU in a 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: - Call the initialization procedure for the context variables as specified in clause 9.3.2.2. -Set the variable StatCoeff[k] equal to 0, where k is in the range of 0 to 3, inclusive. - Call the initialization procedure for the palette predictor variables as specified in clause 9.3.2.3. Call the initialization procedure of the arithmetic decoding engine as specified in clause 9.3.2.6.

[0116] For VVC: Initialize the context variables of the arithmetic decoding engine as follows: - 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 clause 9.3.2.2, and the array PredictorPaletteSize[chType] is initialized to 0, where chType = 0, 1, and the array StatCoeff[i] is initialized, where i = 0...2 as follows: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0 (1513) 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.

[0117] Fig.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, process 1000 may be implemented to encode a video in accordance with the HEVC standard or the VVC standard as described above. One or more computing devices (e.g., computing devices implementing video encoder 100) implement the process 1000 by executing appropriate program code (e.g., program code implementing entropy coding module 116). Fig.10 For illustrative purposes, process 1000 is described with reference to some of the examples depicted in the accompanying drawings. However, other implementations are possible.

[0118] At block 1002, process 1000 includes accessing a partition of a video signal. The partition may be a video frame, slice, or tile or any 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 shown arranged in CTU rows. Each CTU row includes one or more CTUs, and each CTU includes multiple TUs for encoding.

[0119] At block 1004, including blocks 1006 to 1012, process 1000 includes processing each CTU in the set of CTUs in a partition to encode the partition into bits. At block 1006, 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.

[0120] If the initialization conditions are met, in box 1008, the context variables, Rice parameter variables, and palette predictor variables for CABAC are initialized according to the initialization scheme. In the initialization scheme, the context variables for CABAC are initialized according to the context variable initialization process, the Rice parameter variables are initialized according to the Rice parameter variable initialization process, and the palette predictor variables are initialized according to the palette predictor entry initialization process. In HEVC, the context variable initialization process can be the process specified in Section 9.3.2.2 of the HEVC specification. The Rice parameter variable initialization process can set the Rice parameter variable 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 Section 9.3.2.3 of the HEVC specification. In VVC, the context variable initialization process can be the process specified in Section 9.3.2.2 of the VVC specification. The Rice parameter variable initialization process can set the Rice parameter variable StatCoeff according to the following: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag? 2*Floor(Log2(BitDepth-10):0, Wherein, 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 base 2 logarithm of x, and the value of sps_persistent_rice_adaptation_enabled_flag is 1 to indicate 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 may set the palette predictor variables to 0.

[0121] If the initialization condition is not met, process 1000 proceeds to block 1010. In other words, if the initialization condition is not met, no initialization is performed on the context variables, Rice parameter variables, and palette predictor variables. Compared to process 600 and process 800, only one initialization scheme is performed for CTUs that meet the initialization condition. In addition, the initialization of parallel encoding is independent of the previous CTU row, thus eliminating the encoding delay caused by the initialization based on the previous CTU row.

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

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

[0124] At block 1102, process 1100 includes accessing a binary string or binary representation representing a partition of a video signal. The partition may be a video frame, slice, or tile or any 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 shown arranged in CTU rows. Each CTU row includes one or more CTUs, and each CTU includes multiple TUs for encoding.

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

[0126] If the initialization conditions are met, then in box 1108, the context variables, Rice parameter variables, and palette predictor variables for CABAC are initialized according to the initialization scheme. In the initialization scheme, the context variables for CABAC are initialized according to the context variable initialization process, the Rice parameter variables are initialized according to the Rice parameter variable initialization process, and the palette predictor variables are initialized according to the palette predictor entry initialization process. In HEVC, the context variable initialization process can be the process specified in Section 9.3.2.2 of the HEVC specification. The Rice parameter variable initialization process can set the Rice parameter variable 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 Section 9.3.2.3 of the HEVC specification. In VVC, the context variable initialization process can be the process specified in Section 9.3.2.2 of the VVC specification. The Rice parameter variable initialization process can set the Rice parameter variables according to the following: StatCoeff[i]=sps_persistent_rice_adaptation_enabled_flag?2*Floor(Log2(BitDepth-10):0, 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 base-2 logarithm of x, and a value of 1 for sps_persistent_rice_adaptation_enabled_flag indicates that history-based Rice parameter derivation is enabled, and the palette predictor initialization process includes setting the palette predictor variables to 0. The palette predictor initialization process may set the palette predictor variables to 0.

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

[0128] 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 Rice parameter variables StatCoeff, and the calculated Rice parameters may be used, for example, to decode the TU by a combination of TR and finite k-order EGk binarization processes specified in the VVC specification or Golomb-Rice codes specified in the HEVC specification. At block 1112, process 1100 includes decoding a CTU by, for example, referring to the above reference StatCoeff. Figure 2 The inverse quantization and inverse transformation 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.

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

[0130] Any suitable computing system may be used to perform the operations described herein. For example, Fig.12 Describing can be achieved Figure 1 The video encoder 100 or Figure 2 An example of a computing device 1200 of a video decoder 200 is provided. 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 communicate with a computer readable medium storing instructions that, when executed by the processor 1212, cause the processor to perform the operations described herein.

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

[0132] The computing device 1200 may also include a bus 1216. The bus 1216 may communicatively couple one or more components of the computing device 1200. The computing device 1200 may also include a plurality 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 may receive input from one or more input devices 1220 or provide output to one or more output devices 1222. One or more input devices 1220 and one or more output devices 1222 may be communicatively coupled to the I / O interface 1218. The communicatively coupling may be achieved in any suitable manner (e.g., connection via a printed circuit board, connection via a cable, communication via wireless transmission, etc.). Non-limiting examples of the input device 1220 include a touch screen (e.g., one or more cameras for imaging a touch area or a pressure sensor for detecting pressure changes caused by a touch), a mouse, a keyboard, or any other device that may be used to generate input events in response to physical actions of a computing device user. Non-limiting examples of output device 1222 include an LCD screen, an external monitor, speakers, or any other device that can be used to display or otherwise present output generated by the computing device.

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

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

[0135] General Notes

[0136] Numerous specific details are set forth herein to provide a thorough understanding of the claimed subject matter. However, those skilled in the art will appreciate that the claimed subject matter may be practiced without these specific details. In other cases, methods, devices, or systems known to those of ordinary skill in the art are not described in detail in order to avoid obscuring the claimed subject matter.

[0137] Unless otherwise specifically noted, it should be understood that terms such as "process," "compute," "calculate," "determine," and "identify" are used throughout the discussion of this specification to refer to the actions or processes of a computing device (e.g., one or more computers or similar electronic computing devices or devices) that manipulates or transforms data represented as physical electronic or magnetic quantities within a memory, register, or other information storage device, transmission device, or display device of a computing platform.

[0138] The one or more systems discussed herein are not limited to any specific hardware architecture or configuration. Computing devices may include any suitable component arrangement that provides results based on one or more inputs. Suitable computing devices include a computer system based on a multi-purpose microprocessor that accesses stored software, which accesses the storage software of a computing system from a general-purpose computing device that implements one or more embodiments of the present theme to a special-purpose computing device programming or configuration computing system. Any suitable programming, scripting, or other types of languages ​​or language combinations may be used to implement the teachings contained herein in the software used when programming or configuring computing devices.

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

[0140] As used herein, "suitable for" or "for" is intended to be open and inclusive language and does not exclude devices suitable for or used to perform additional tasks or steps. In addition, the use of "based on" is intended to be open and inclusive, because a process, step, calculation, or other action "based on" one or more of the listed conditions or values ​​may actually be based on additional conditions or values ​​other than those listed above. The headings, lists, and numbers included herein are for ease of explanation only and are not intended to be limiting.

[0141] Although the subject matter has been described in detail with respect to the specific embodiments herein, it should be understood that those skilled in the art can easily make changes, variations and equivalents to these embodiments after understanding the foregoing. Therefore, it should be understood that the present disclosure is provided for the purpose of illustration rather than limitation, and does not exclude changes, variations and / or additions to the subject matter that are obvious to those of ordinary skill in the art.

Claims

1. A method for decoding a video from a video code 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 process; In response to determining that the CTU is not the first CTU in a slice or tile, determining whether parallel decoding is enabled and whether the CTU is the first CTU in a CTU row of the tile; In response to determining that the parallel decoding is enabled and the CTU is a 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 parallel encoding 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 A pixel value of the CTU is 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 value of the CTU further based 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, Wherein, 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 maximum 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, initialize the 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 the 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 process; In response to determining that the CTU is not the first CTU in a slice or tile, determining whether parallel decoding is enabled and whether the CTU is the first CTU in a CTU row of the tile; In response to determining that the parallel decoding is enabled and the CTU is a 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 parallel 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, including 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 partitions 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 the 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, Wherein, 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 maximum 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, initialize the 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 the 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 process; In response to determining that the CTU is not the first CTU in a slice or tile, determining whether parallel decoding is enabled and whether the CTU is the first CTU in a CTU row of the tile; In response to determining that the parallel decoding is enabled and the CTU is a 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 parallel encoding 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 A pixel value of the CTU is 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 value of the CTU further based 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 process; In response to determining that the CTU is not the first CTU in a slice or tile, determining whether parallel decoding is enabled and whether the CTU is the first CTU in a CTU row of the tile; In response to determining that the parallel decoding is enabled and the CTU is a 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 parallel 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, including 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 partitions is encoded into a code stream of the video.

Citation Information

Patent Citations

  • Video decoder with enhanced cabac decoding

    CN103959782A

  • Wavefront parallel processing of luma and chroma components

    CN112262577A

  • Wavefront parallel processing of luma and chroma components

    EP3624450A1

  • Image encoder, image encoding method and program, image decoder, and image decoding method and program

    JP2014011726A

  • Semiconductor memory device and method for fabricating the same

    KR1020220049295A

Cited By

  • Video coding method and device, electronic equipment, storage medium and computer program product

    CN120614460A

  • A video encoding method, apparatus, electronic device, storage medium, and computer program product.

    CN120614460B