WO2023272533A1 - 编解码方法、编码器、解码器以及存储介质 - Google Patents
编解码方法、编码器、解码器以及存储介质 Download PDFInfo
- Publication number
- WO2023272533A1 WO2023272533A1 PCT/CN2021/103306 CN2021103306W WO2023272533A1 WO 2023272533 A1 WO2023272533 A1 WO 2023272533A1 CN 2021103306 W CN2021103306 W CN 2021103306W WO 2023272533 A1 WO2023272533 A1 WO 2023272533A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- value
- mode
- identification information
- current block
- high throughput
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/46—Embedding additional information in the video signal during the compression process
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/13—Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Definitions
- the embodiments of the present application relate to the technical field of image processing, and in particular, to a codec method, an encoder, a decoder, and a storage medium.
- the image data to be encoded will be compressed and encoded through the entropy encoding unit after transformation and quantization, and the code stream generated after the entropy encoding process will be transmitted to Decoder; then analyze the code stream, and after inverse quantization and inverse transformation processing, the original input image data can be restored.
- video codecs with high bit width, high quality, and high bit rate are compared with video codecs with lower bit width, low quality, and low bit rate (which can be called “conventional video”).
- Decoding usually requires more coefficients for encoding and decoding, and the coefficients are larger. In this way, for three-high video, existing related solutions may bring greater overhead, generate waste, and even affect the speed and throughput of encoding and decoding.
- Embodiments of the present application provide a codec method, an encoder, a decoder, and a storage medium, which can improve coefficient coding throughput and codec speed, reduce complexity, and implement a simple and efficient codec method, thereby improving compression performance.
- the embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
- At least one of a context mode, a bypass mode, and an alignment process is used to determine coefficients of the current block.
- the embodiment of the present application provides a decoding method, which is applied to a decoder, and the method includes:
- At least one of a context mode, a bypass mode, and an alignment process is used to determine coefficients of the current block.
- the embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
- the embodiment of the present application provides an encoding method, which is applied to an encoder, and the method includes:
- the embodiment of the present application provides a decoder, the decoder includes: a decoding part, a first determining part,
- the decoding part is configured to decode code streams
- the first determining part is configured to determine high-throughput mode identification information of the current block; based on the high-throughput mode identification information, determine coefficients of the current block using at least one of context mode, bypass mode, and alignment processing .
- the embodiment of the present application provides a decoder, the decoder includes: a first determining part,
- the first determining part is configured to determine decoded information, and determine high throughput mode identification information of the current block according to the decoded information; based on the high throughput mode identification information, use context mode, bypass mode and At least one of the alignment processes determines the coefficients of the current block.
- the embodiment of the present application provides an encoder, the encoder includes: a second determining part, an encoding part,
- the first determining part is configured to determine the high throughput mode identification information of the current block
- the coding part is configured to use at least one of context mode, bypass mode and alignment processing to encode the coefficients of the current block based on the high throughput mode identification information to generate a code stream.
- the embodiment of the present application provides an encoder, the encoder includes: a second determining part, an encoding part,
- the first determining part is configured to determine decoded information, and determine high throughput mode identification information of the current block according to the decoded information;
- the coding part is configured to use at least one of context mode, bypass mode and alignment processing to encode the coefficients of the current block based on the high throughput mode identification information to generate a code stream.
- the embodiment of the present application provides a decoder, the encoder includes a first processor and a first memory storing instructions executable by the first processor, and when the instructions are executed, the When the first processor is executed, the above encoding method is implemented.
- the embodiment of the present application provides an encoder, the decoder includes a second processor and a second memory storing instructions executable by the second processor, and when the instructions are executed, the When the second processor is executed, the above decoding method is realized.
- the embodiment of the present application provides a computer storage medium, the computer storage medium stores a computer program, and when the computer program is executed by the first processor, the above-mentioned encoding method is implemented, or is executed by the second processor When the second processor executes, the above encoding method is realized.
- the embodiment of the present application provides a codec method, an encoder, a decoder, and a storage medium.
- the decoder decodes the code stream and determines the high-throughput mode identification information of the current block; based on the high-throughput mode identification information, the context mode, At least one of the bypass mode and the alignment process determines the coefficients of the current block.
- the decoder determines the decoded information, and determines the high throughput mode identification information of the current block according to the decoded information; based on the high throughput mode identification information, uses at least one of context mode, bypass mode and alignment processing to determine the coefficients of the current block.
- the encoder determines the high-throughput mode identification information of the current block; based on the high-throughput mode identification information, encodes the coefficients of the current block by using at least one of context mode, bypass mode and alignment processing to generate a code stream.
- the encoder determines the decoded information, and determines the high-throughput mode identification information of the current block according to the decoded information; based on the high-throughput mode identification information, encodes the coefficients of the current block using at least one of context mode, bypass mode, and alignment processing, Generate code stream.
- the codec when the codec is encoding and decoding coefficients, it can set whether to use only the bypass mode codec, whether to use the context mode codec, and whether to Alignment processing is performed in combination, so as to further use at least one of context mode, bypass mode, and alignment processing to determine the coefficients of the current block.
- Improve coefficient coding throughput and codec speed, reduce complexity, and adaptive high-throughput rate mode can adaptively judge whether the current part uses high-throughput rate mode according to the situation of the coded video, and can achieve high enough bit rate When the bit rate is not high enough, the throughput rate can be significantly improved without significant loss of compression performance. When the code rate is not high enough, the compression performance will not be significantly lost, and it has higher adaptability, thereby improving the compression performance.
- Fig. 1 is an application schematic diagram of a coding framework provided by related technologies
- FIG. 2 is a schematic diagram of a positional relationship between a current coefficient and an adjacent coefficient provided by the related art
- FIG. 3 is a schematic flow chart of a bin arithmetic decoding process provided by the related art
- Fig. 4 is a schematic flow chart of an arithmetic decoding process of a binary symbol provided by the related art
- FIG. 5 is a schematic flow chart of a renormalization of an arithmetic decoding engine provided by the related art
- FIG. 6 is a schematic flow chart of a bypass decoding process provided by the related art
- Figure 7 is a schematic diagram of the positional relationship between areas that may have non-zero coefficients and areas that are forced to be 0;
- FIG. 8 is a schematic diagram of a system composition of an encoder provided in an embodiment of the present application.
- FIG. 9 is a schematic diagram of a system composition of a decoder provided in an embodiment of the present application.
- FIG. 10 is a first schematic diagram of the implementation flow of the decoding method
- FIG. 11 is a first schematic diagram of alignment processing in RRC
- FIG. 12 is a schematic diagram 2 of alignment processing in RRC
- Fig. 13 is a schematic diagram of alignment processing in TSRC
- FIG. 14 is a second schematic diagram of the implementation flow of the decoding method
- FIG. 15 is a first schematic diagram of the implementation flow of the encoding method
- FIG. 16 is a second schematic diagram of the implementation flow of the encoding method
- FIG. 17 is a first schematic diagram of the composition and structure of the decoder proposed in the embodiment of the present application.
- FIG. 18 is a second schematic diagram of the composition and structure of the decoder proposed in the embodiment of the present application.
- FIG. 19 is a first schematic diagram of the composition and structure of the encoder proposed in the embodiment of the present application.
- FIG. 20 is a second schematic diagram of the composition and structure of the encoder proposed in the embodiment of the present application.
- references to “some embodiments” describe a subset of all possible embodiments, but it is understood that “some embodiments” may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict.
- first ⁇ second ⁇ third involved in the embodiment of the present application is only used to distinguish similar objects, and does not represent a specific ordering of objects. Understandably, “first ⁇ second ⁇ The specific order or sequence of "third” can be interchanged where allowed, so that the embodiments of the application described herein can be implemented in an order other than that illustrated or described herein.
- Each frame in the video image is divided into a square largest coding unit (LargestCodingUnit, LCU) or coding tree unit (codingtree unit, CTU) of the same size (such as 128 ⁇ 128, 64 ⁇ 64, etc.), each largest coding unit Or the coding tree unit can also be divided into rectangular coding units (CodingUnit, CU) according to the rules; and the coding unit may be divided into smaller prediction units (Prediction Unit, PU), transformation units (Transform Unit, TU) and so on.
- LCU largest coding unit
- CTU coding tree unit
- Fig. 1 is a schematic diagram of the application of a coding framework provided by the related art.
- the hybrid coding framework may include prediction (Prediction), transformation (Transform), quantization (Quantization), entropy coding (Entropycoding) , Inloop Filter and other modules.
- the prediction module may include intra prediction (Intra Prediction) and inter prediction (Inter Prediction), and inter prediction may include motion estimation (Motion Estimation) and motion compensation (Motion compensation). Due to the strong correlation between adjacent pixels in a video image, the use of intra-frame prediction in video coding and decoding technology can eliminate the spatial redundancy between adjacent pixels; however, due to the adjacent There is also a strong similarity between frames. In the video coding and decoding technology, the inter-frame prediction method is used to eliminate the temporal redundancy between adjacent frames, thereby improving the coding and decoding efficiency.
- the basic flow of the video codec is as follows: at the encoding end, divide a frame of image into blocks, use intra prediction or inter prediction for the current block to generate the prediction block of the current block, subtract the prediction block from the original block of the current block to obtain the residual
- the difference block transforms and quantizes the residual block to obtain a quantized coefficient matrix, and performs entropy encoding on the quantized coefficient matrix to output it into the code stream.
- intra prediction or inter prediction is used for the current block to generate the prediction block of the current block.
- the quantization coefficient matrix is obtained by decoding the code stream, and the quantization coefficient matrix is inversely quantized and transformed to obtain the residual block. The block and the residual block are added to obtain the reconstructed block.
- the reconstructed blocks form a reconstructed image
- the decoded image is obtained by performing loop filtering on the reconstructed image based on the image or based on the block.
- the encoding end also needs similar operations to the decoding end to obtain the decoded image.
- the decoded image may serve as a reference frame for inter-frame prediction for subsequent frames.
- Block division information determined by the encoding end, mode information such as prediction, transformation, quantization, entropy coding, loop filtering, or parameter information needs to be output to the code stream if necessary.
- the decoding end determines the same block division information as the encoding end through analysis and analysis based on existing information, prediction, transformation, quantization, entropy coding, loop filtering and other mode information or parameter information, so as to ensure that the decoded image and decoding image obtained by the encoding end
- the decoded image obtained at the end is the same.
- the decoded image obtained by the encoder is usually also called a reconstructed image.
- the current block may be divided into prediction units, and during transformation, the current block may be divided into transformation units, and the division of prediction units and transformation units may be different.
- the above is the basic process of the video codec under the block-based hybrid coding framework. With the development of technology, some modules or steps of the framework or process may be optimized. The embodiment of this application is applicable to the block-based hybrid coding The basic process of the video codec under the framework, but not limited to the framework and process.
- the current block may be the current coding unit (CU), the current prediction unit (PU), or the current transformation unit (TU).
- Block division information, various modes and parameter information of prediction, transformation and quantization, coefficients, etc. are written into the code stream through entropy coding. Assuming that the probabilities of different elements are different, assigning shorter codewords to elements with higher probability of occurrence and assigning longer codewords to elements with lower probability of occurrence can obtain higher coding efficiency than fixed-length coding. But if the probabilities of different elements are close or basically the same, the compression space of entropy coding is limited.
- CABAC Context-based adaptive binary arithmetic coding
- HEVC High Efficiency Videocoding
- VVC Versatile Videocoding
- CABAC uses the context model to improve compression efficiency, but the use and update of the context model also makes the operation more complicated.
- CABAC There is a bypass mode in CABAC. In the bypass mode, the context model does not need to be used and updated, and higher throughput can be achieved. In this application, the mode that needs to use and update the context model in CABAC can be called the context mode.
- FIG. 2 is a schematic diagram of a positional relationship between a current coefficient and adjacent coefficients provided in the related art.
- the block filled with black represents the current coefficient
- the block filled with grid lines represents the adjacent coefficient; as shown in Figure 2, the selection of the sig_coeff_flag of the current coefficient which context model needs to be based on its right and bottom and right bottom
- the information of the 5 coefficients is determined. It can be further seen from FIG. 2 that the operation of the context mode is much more complicated than that of the bypass mode, and there is also a dependency between adjacent coefficients.
- the arithmetic decoding process of the defined binary symbols needs to be invoked, including the state transition process, that is, the update of the context model.
- the renormalization process of the arithmetic decoding engine is invoked.
- the bypass decoding process needs to be invoked.
- the input of the arithmetic decoding process is ctxTable, ctxIdx, bypassFlag and the state variables ivlCurrRange and ivlOffset of the arithmetic decoding engine, and the output of the arithmetic decoding process is the value of bin.
- ctxTable is the table used when selecting the context mode
- ctxIdx is the context model index
- Fig. 3 is a schematic flow chart of the arithmetic decoding process of a bin provided by the related art. As shown in Fig. 3, in order to decode the value of the bin, the context index table ctxTable, ctxIdx, bypassFlag are transmitted to the arithmetic decoding process DecodeBin(ctxTable, ctxIdx, bypassFlag), as follows:
- bypassFlag If the value of bypassFlag is 1, call the bypass decoding process DecodeBypass();
- the input of the binary symbol arithmetic decoding process is the variables ctxTable, ctxIdx, ivlCurrRange, and ivlOffset
- the output of the process is the decoded value binVal
- FIG. 4 is a schematic flowchart of an arithmetic decoding process of a binary symbol provided by the related art. As shown in FIG. 4 , pStateIdx0 and pStateIdx1 are two states of the current context model.
- variable qRangeIdx Given the current value of ivlCurrRange, the variable qRangeIdx is derived as follows:
- ivlLpsRange (qRangeIdx ⁇ ((valMps? 32767 ⁇ pState:pState)>>9)>>1)+4.
- variable binVal 1–valMps
- ivlOffset is equal to ivlOffset minus ivlCurrRange
- the value of ivlCurrRange is ivlLpsRange
- variable binVal valMps
- the input of the state transition process is the current pStateIdx0 and pStateIdx1, and the solved value binVal
- the output of this process is the updated ctxTable and the context variables pStateIdx0 and pStateIdx1 corresponding to ctxIdx.
- the variables shift0 and shift1 are exported by shiftIdx, and the corresponding relationship between shiftIdx and ctxTable and ctxIdx is defined here, as follows:
- shift1 (shiftIdx&3)+3+shift0.
- pStateIdx0 pStateIdx0-(pStateIdx0>>shift0)+(1023 ⁇ binVal>>shift0)
- pStateIdx1 pStateIdx1-(pStateIdx1>>shift1)+(16383 ⁇ binVal>>shift1).
- the input of the renormalization process of the arithmetic decoding engine is the bits in the slice data and the variables ivlCurrRange and ivlOffset, and the output of this process is the updated variables ivlCurrRange and ivlOffset.
- Fig. 5 is a flow diagram of renormalization of an arithmetic decoding engine provided by related technologies. As shown in Fig. 5, the current value of ivlCurrRange is preferably compared with 256, and the subsequent steps are as follows:
- the data in the code stream during the whole process should not cause ivlOffset to be greater than or equal to ivlCurrRange.
- the input of the bypass decoding process of the binary symbol is the bits of the slice data and the variables ivlCurrRange and ivlOffset.
- the output of this process is the updated variable ivlOffset and the solved value binVal.
- the bypass decoding process is called .
- FIG. 6 is a schematic flowchart of a bypass decoding process provided by the related art. As shown in FIG. 6 , firstly, the value of ivlOffset is multiplied by 2, that is, shifted to the left by one bit. One bit obtained by read_bits(1) is shifted into ivlOffset. Then the value of ivlOffset will be compared with the value of ivlCurrRange, and the next steps are as follows:
- ivlOffset is greater than or equal to ivlCurrRange, then the value of binVal is set to 1, and ivlOffset is equal to ivlOffsetivl minus CurrRange
- the data in the code stream during the whole process should not cause ivlOffset to be greater than or equal to ivlCurrRange.
- transforms and transform skips are generally supported for residuals. Transformation includes discrete cosine transform (Discretecosine Transform, DCT), etc.
- the residual block using transformation usually shows certain characteristics after transformation (and quantization).
- the regional coefficient in the upper left corner is larger, and the regional coefficient in the lower right corner is smaller or even many 0 coefficients appear.
- the transform skipping does not perform transformation, and the distribution law of the coefficients after the transform skipping is different from that of the transformed coefficients, so different coefficient encoding methods can be used.
- regular residual coding regular residual coding
- TSRC transform skip residual coding
- the frequency of the transformed block is from low to high from left to right, and the frequency from top to bottom is from low to high.
- the upper left corner represents low frequencies
- the lower right corner represents high frequencies.
- the human eye is more sensitive to low-frequency information, but not particularly sensitive to high-frequency information.
- Some techniques such as forced zero (zero-out), can force some high-frequency information to zero. For example, for a 64x64 block, it is mandatory to set the coefficient of the position whose abscissa is greater than or equal to 32 or whose ordinate is greater than or equal to 32 to 0.
- Figure 7 is a schematic diagram of the positional relationship between areas that may have non-zero coefficients and areas that are forced to be 0. As shown in Figure 7, there may be non-zero coefficients in the upper left corner (that is, areas that may have non-zero coefficients), and all parts in the lower right corner will be set Zero (i.e. forced to be 0 area). In this way, for the subsequent coefficient encoding, the coefficients in the area where the zero-out is forced to be 0 do not need to be encoded because they must be 0.
- the coefficient distribution after transforming (and quantizing) the residual of the usual video shows that the coefficients in the upper left corner are large and the coefficients in the lower right corner are many 0 coefficients
- some methods are usually used to make the upper left corner within a certain range
- the coefficients of need to be coded, and the coefficients in a certain range in the lower right corner do not need to be coded, that is, these coefficients are 0 by default.
- One method is to first determine the position of the last non-zero coefficient of the block in scan order when encoding the coefficients of a block.
- the coefficients after the position of the last non-zero coefficient in the scanning order are all considered to be 0, that is, no coding is required; only the last non-zero coefficient position and the coefficients before it need to be coded.
- last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix to determine the position of the last non-zero coefficient (LastSignificantCoeffX, LastSignificantCoeffY).
- last_sig_coeff_x_prefix determines the prefix of the horizontal (or column) coordinates of the last non-zero coefficient in scan order in the current block.
- the value of last_sig_coeff_x_prefix should be in the range of 0 to (log2ZoTbWidth ⁇ 1)-1, including these two boundary values.
- last_sig_coeff_x_prefix If last_sig_coeff_x_prefix does not exist, then the value of last_sig_coeff_x_prefix is 0.
- last_sig_coeff_y_prefix determines the vertical (or row) coordinate prefix of the last non-zero coefficient in scan order in the current block.
- the value of last_sig_coeff_y_prefix should be in the range of 0 to (log2ZoTbHeight ⁇ 1)-1, including these two boundary values.
- last_sig_coeff_y_prefix If last_sig_coeff_y_prefix does not exist, then the value of last_sig_coeff_y_prefix is 0.
- last_sig_coeff_x_suffix determines the horizontal (or column) coordinate suffix of the last non-zero coefficient in scan order in the current block.
- the value of last_sig_coeff_x_suffix should be in the range of 0 to (1 ⁇ ((last_sig_coeff_x_prefix>>1)-1))–1, including these two boundary values.
- LastSignificantCoeffX of the horizontal (or column) coordinate of the last non-zero coefficient in the scan order in the current transform block (TB) is derived as follows:
- LastSignificantCoeffX last_sig_coeff_x_prefix
- LastSignificantCoeffX (1 ⁇ ((last_sig_coeff_x_prefix>>1) ⁇ 1)) ⁇ (2+(last_sig_coeff_x_prefix&1))+last_sig_coeff_x_suffix.
- last_sig_coeff_y_suffix determines the vertical (or row) coordinate suffix (suffix) of the last non-zero coefficient in scan order in the current transform block.
- the value of last_sig_coeff_x_suffix should be in the range of 0 to (1 ⁇ ((last_sig_coeff_y_prefix>>1)-1))–1, including these two boundary values.
- LastSignificantCoeffY of the vertical (or row) coordinate of the last non-zero coefficient in the scanning order in the current transform block is derived as follows:
- LastSignificantCoeffY last_sig_coeff_y_prefix
- LastSignificantCoeffY (1 ⁇ ((last_sig_coeff_y_prefix>>1) ⁇ 1)) ⁇ (2+(last_sig_coeff_y_prefix&1))+last_sig_coeff_y_suffix.
- VVC uses the flag sb_coded_flag whether the current sub-block is coded to determine Whether the coefficients in the current subblock need to be encoded. If coding is not required, it is considered that the coefficients in the current sub-block are all 0.
- the sub-blocks are usually n ⁇ n sub-blocks, such as 4 ⁇ 4 sub-blocks.
- sb_coded_flag[xS][yS] determines the following information of the sub-block at position (xS, yS) in the current transform block, where the sub-block is an array of transform coefficient values:
- the compression efficiency can be improved by using the characteristics of coefficients. For example, for a common video, among the coefficients to be coded, a certain proportion of the coefficients is 0, so a syntax element can be used to indicate whether the current coefficient is 0, and this syntax element is usually a binary symbol. If the current coefficient is 0, it means that the encoding of the current coefficient has ended; otherwise, the encoding of the current coefficient needs to be continued. As another example, for a normal video, among the non-zero coefficients, the absolute value of a certain proportion of coefficients is 1, so a syntax element can be used to indicate whether the absolute value of the current coefficient is greater than 1, and this syntax element is usually a binary symbol. If the absolute value of the current coefficient is not greater than 1, it means that the encoding of the current coefficient has ended; otherwise, the encoding of the current coefficient needs to be continued.
- the syntax elements involved in VVC are as follows,
- sig_coeff_flag[xC][yC] is used to determine whether the corresponding transform coefficient of the current transform block at the transform coefficient position (xC, yC) is a non-zero coefficient:
- transform_skip_flag[x0][y0][cIdx] is 0 or the value of sh_ts_residual_coding_disabled_flag is 1:
- sig_coeff_flag[xC][yC] is inferred to be 1 if (xC, yC) is the position of the last non-zero coefficient in the scan order (LastSignificantCoeffX, LastSignificantCoeffY) or the following conditions are all true:
- inferSbDcSigCoeffFlag 1
- sig_coeff_flag[xC][yC] is inferred to be 0;
- inferSbSigCoeffFlag 1
- abs_level_gtx_flag[n][j] is used to determine whether the absolute value of the transform coefficient (nth in scanning order) is greater than (j ⁇ 1)+1. If abs_level_gtx_flag[n][j] does not exist, then the value of abs_level_gtx_flag[n][j] is 0.
- abs_remainder[n] is used to determine the absolute value of the Golomb-Rice encoded remainder of the nth transform coefficient in scan order. If abs_remainder[n] does not exist, the value of abs_remainder[n] is 0.
- syntax elements such as sig_coeff_flag and abs_level_gtx_flag are coded in context mode, and abs_remainder is coded in bypass mode.
- the context mode encoding is more complicated than the bypass mode encoding. The intuitive understanding is that it is slower to process. If there are many coefficients to be encoded, using too many context mode encodings will affect the decoding speed. Therefore, the number of syntax elements encoded using the context mode can be limited. For example, when the number of binary symbols encoded using the context mode exceeds a threshold, subsequent coefficient encoding is forced to use bypass mode encoding. Such as dec_abs_level in VVC.
- dec_abs_level[n] is a Golomb-Rice encoded intermediate value at scan position n.
- ZeroPos[n] can be derived when parsing dec_abs_level[n], and the absolute value of the quantization coefficient AbsLevel[xC][yC] at position (xC, yC) is derived as follows:
- dec_abs_level[n] does not exist or the value of dec_abs_level[n] is equal to ZeroPos[n], then the value of AbsLevel[xC][yC] is 0;
- coeff_sign_flag[n] can determine the sign of the transformation coefficient of scan position n as follows:
- CoeffSignLevel[xC][yC] can also be derived using other methods, which will not be repeated here.
- a par_level_flag of a coefficient value is also used in VVC. According to this flag, the parity of the value of the current coefficient can be known, which will be used in determining the value of the current coefficient and in Dependent Quantization.
- par_level_flag[n] determines the parity of the transform coefficient at position n in scan order. If par_level_flag[n] does not exist, then the value of par_level_flag[n] is 0.
- par_level_flag can also be used to determine the size of the coefficient together with abs_level_gtx_flag, abs_remainder, etc.
- the context mode encoding needs to select, use and update the context mode
- the bypass mode encoding does not need to select, use and update the context mode
- the usual practice is to put the syntax elements of the context mode encoding together within a certain range
- the syntax elements of bypass mode coding are put together, which is more friendly to hardware design. For example, all the syntax elements encoded in the context mode in a block are processed first, and then the syntax elements encoded in the bypass mode are processed. All the syntax elements encoded in the context mode in the current block may be further divided into several groups, and all the syntax elements encoded in the bypass mode in a block may be further divided into several groups.
- the array AbsLevel[xC][yC] represents an array of absolute values of transform coefficients of the current transform block.
- the array AbsLevelPass1[xC][yC] represents an array of partially reconstructed absolute values of the transform coefficients of the current transform block.
- the indices xC and yC of the array represent the (xC, yC) position in the current transform block.
- the coefficients whose ordinates are in the range [0, (1 ⁇ log2ZoTbHeight)–1] may be non-zero coefficients.
- (1 ⁇ log2ZoTbWidth) represents the width of the transform block after zero-out
- (1 ⁇ log2ZoTbHeight) represents the height of the transform block after zero-out.
- remBinsPass1 determines the number of syntax elements encoded using context mode in the current block.
- remBinsPass1 means remaining binaries inpass1, that is, the number of remaining binary symbols in the first round. Coefficients preceding the last nonzero coefficient in scan order require encoding. For the sub-blocks where these coefficients are located, it is determined in turn whether the current sub-block needs to be encoded.
- the syntax elements encoded in the context mode in a sub-block can be placed in the first round, and the syntax elements encoded in the bypass mode can be placed in the first round. behind.
- Each coefficient may need to process up to 4 context mode coded syntax elements, including 1 sig_coeff_flag, 2 abs_level_gtx_flag, and 1 par_level_flag.
- RemCcbs determines the number of syntax elements encoded using context mode in the current block. In this application, it can be understood that RemCcbs means remainingcontextcoded binaries, that is, the number of remaining contextcoded binary symbols. For each sub-block, determine whether the current sub-block needs encoding.
- the TSRC method puts the syntax elements of the context mode encoding in a sub-block in two rounds, and each coefficient processes up to 4 context mode encodings in the first and second rounds respectively grammatical elements.
- the syntax elements encoded in bypass mode are placed next.
- CABAC CABAC can compress the code, so bits and bins are not in one-to-one correspondence. For example, n bits correspond to m bins, usually, n is smaller than m. Statistics of some sequences show that n:m in CABAC is about 1:1.2 to 1:1.8.
- the bypass mode itself does not compress the encoding, so the simple bypass mode can achieve a one-to-one correspondence between bits and bins.
- the alignment process is to set the variable ivlCurrRange in the CABAC engine to 256.
- ivlCurrRange is 256
- ivlOffset and code stream can be considered as a shift register (shift register).
- binVal the value of bin (binVal) is the second highest bit in the register. Since ivlOffset is smaller than the limit of ivlCurrRange, the highest bit is always 0. Alignment processing is described in HEVC 9.3.4.3.6 Alignment process prior to aligned bypass decoding.
- the existing coefficient encoding method has good compression efficiency for currently commonly used videos, such as consumer videos.
- Consumer video usually has a bit width of 8 or 10 bits per pixel, and consumer video usually has a moderate bit rate, usually a few megabytes per second (MB/s) or lower.
- the pixels of some video applications require a higher bit width, such as 12 bits, 14 bits, or 16 bits or more for each pixel. Higher bit widths usually lead to larger coefficients and thus higher code rates.
- There are some application videos that require higher quality, and higher quality usually brings a larger coefficient and thus a higher bit rate.
- a higher code rate has higher requirements on the processing capability of the decoder, such as throughput.
- Video codecs with high bit width, high quality, and high bit rate usually require more coefficients and larger coefficients for video codecs with lower bit width, low quality, and low bit rate (conventional video).
- the coefficients that need to be encoded and decoded in a block in three-high video are much more than the coefficients that need to be encoded and decoded in a block of the same size in conventional video. Because many of the coefficients after prediction, transformation, and quantization in the block of the conventional video become 0, but many coefficients after prediction, transformation, and quantization in the block of the three-high video are still non-zero coefficients.
- a certain proportion of the coefficients that need to be encoded in the coefficients after prediction, transformation, and quantization in the block of conventional video is 0, and a large proportion of the non-zero coefficients are small coefficients, such as the absolute value is 1 or 2 or 3, etc. .
- many of the coefficients that need to be coded are relatively large values, while 0, the absolute value of which is 1, 2, and 3 has a very small proportion of coefficients. Therefore, the existing syntactic elements such as whether the current coefficient of the flag is a non-zero coefficient, whether the absolute value of the current coefficient is greater than 1, or whether the absolute value of the current coefficient is greater than 2 will not improve the compression efficiency for the three-high video.
- processing context mode is more complicated than bypass mode, that is, it pays more cost to process it, and no positive effect is obtained.
- CABAC CABAC
- the current design of CABAC utilizes the law of coefficient distribution in ordinary video, and for high-bit-width, high-bit-rate, high-quality video and other encoding and decoding scenarios where the coefficient distribution law is different from ordinary video, the existing CABAC There is a defect of high complexity, which reduces the compression efficiency.
- the codec when it encodes and decodes coefficients, it can combine whether to use only the bypass mode codec, whether to use the context mode codec, and whether to perform alignment processing through the setting of the high throughput mode, so as to further Coefficients of the current block are determined using at least one of a context mode, a bypass mode, and an alignment process.
- Improve coefficient coding throughput and codec speed, reduce complexity, and adaptive high-throughput rate mode can adaptively judge whether the current part uses high-throughput rate mode according to the situation of the coded video, and can achieve high enough bit rate When the bit rate is not high enough, the throughput rate can be significantly improved without significant loss of compression performance. When the code rate is not high enough, the compression performance will not be significantly lost, and it has higher adaptability, thereby improving the compression performance.
- the encoder 100 may include: a segmentation unit 101, a prediction unit 102, a first adder 107, a transform unit 108, a quantization unit 109, an inverse quantization unit 110, an inverse transform unit 111, a second adder 112, A filtering unit 113, a decoded picture buffer (Decoded Picture Buffer, DPB) unit 114 and an entropy encoding unit 115.
- the input of the encoder 100 may be a video composed of a series of pictures or a static picture
- the output of the encoder 100 may be a bit stream (also called a "code stream") representing a compressed version of the input video. .
- the segmentation unit 101 divides the pictures in the input video into one or more coding tree units (CodingTree Units, CTUs).
- the segmentation unit 101 divides the picture into multiple tiles (or called tiles, tiles), and can further divide a tile into one or more bricks (bricks).
- one tile or one brick can include one or more complete and/or partial CTUs.
- the segmentation unit 101 may form one or more slices, wherein one slice may include one or more tiles arranged in a grid order in the picture, or one or more tiles covering a rectangular area in the picture.
- the segmentation unit 101 may also form one or more sub-pictures, wherein one sub-picture may include one or more slices, tiles or bricks.
- the division unit 101 transmits the CTU to the prediction unit 102 .
- the prediction unit 102 may be composed of a block division unit 103, a motion estimation (Motion Estimation, ME) unit 104, a motion compensation (Motion compensation, MC) unit 105 and an intra prediction unit 106.
- the block division unit 103 iteratively uses quadtree division, binary tree division and ternary tree division to further divide the input CTU into smaller coding units (CodingUnits, CUs).
- Prediction unit 102 may use ME unit 104 and MC unit 105 to obtain an inter-prediction block for a CU.
- Intra prediction unit 106 may obtain an intra prediction block for a CU using various intra prediction modes including MIP mode.
- the rate-distortion optimized motion estimation approach can be invoked by the ME unit 104 and the MC unit 105 to obtain an inter prediction block
- the rate-distortion optimized mode determination approach can be invoked by the intra prediction unit 106 to obtain an intra prediction block .
- the prediction unit 102 outputs the prediction block of the CU, and the first adder 107 calculates the difference between the CU in the output of the division unit 101 and the prediction block of the CU, that is, the residual CU.
- the transform unit 108 reads the residual CU and performs one or more transform operations on the residual CU to obtain coefficients.
- the quantization unit 109 quantizes the coefficients and outputs the quantized coefficients (ie levels).
- the inverse quantization unit 110 performs a scaling operation on the quantized coefficients to output reconstructed coefficients.
- the inverse transform unit 111 performs one or more inverse transforms corresponding to the transforms in the transform unit 108 and outputs a reconstruction residual.
- the second adder 112 calculates a reconstructed CU by adding the reconstruction residual to the prediction block of the CU from the prediction unit 102 .
- the second adder 112 also sends its output to the prediction unit 102 for use as an intra prediction reference.
- the filtering unit 113 performs loop filtering on the reconstructed picture or sub-picture.
- the filtering unit 113 includes one or more filters, such as a deblocking filter, a sample adaptive offset (Sample Adaptive Offset, SAO) filter, an adaptive loop filter (Adaptiveloop Filter, ALF), brightness mapping and Chroma scaling (Luma Mappingwithchroma Scaling, LMCS) filters and filters based on neural networks, etc.
- filters such as a deblocking filter, a sample adaptive offset (Sample Adaptive Offset, SAO) filter, an adaptive loop filter (Adaptiveloop Filter, ALF), brightness mapping and Chroma scaling (Luma Mappingwithchroma Scaling, LMCS) filters and filters based on neural networks, etc.
- SAO sample adaptive offset
- ALF adaptive loop filter
- the output of the filtering unit 113 is decoded pictures or sub-pictures, which are buffered into the DPB unit 114 .
- the DPB unit 114 outputs decoded pictures or sub-pictures according to timing and control information.
- the pictures stored in the DPB unit 114 can also be used as a reference for the prediction unit 102 to perform inter prediction or intra prediction.
- the entropy encoding unit 115 converts the parameters (such as control parameters and supplementary information) necessary for decoding pictures from the encoder 100 into binary form, and writes such binary form into the code stream according to the syntax structure of each data unit , that is, the encoder 100 finally outputs a code stream.
- the encoder 100 may have a first processor and a first memory recording a computer program. When the first processor reads and runs the computer program, the encoder 100 reads the input video and generates a corresponding code stream. Additionally, encoder 100 may also be a computing device having one or more chips. These units implemented on the chip as integrated circuits have similar connection and data exchange functions as the corresponding units in FIG. 8 .
- the decoder 200 may include: an analysis unit 201 , a prediction unit 202 , an inverse quantization unit 205 , an inverse transformation unit 206 , an adder 207 , a filter unit 208 and a decoded picture buffer unit 209 .
- the input of the decoder 200 is a bit stream representing a compressed version of a video or a still picture
- the output of the decoder 200 may be a decoded video composed of a series of pictures or a decoded still picture.
- the input code stream of the decoder 200 may be the code stream generated by the encoder 100 .
- the parsing unit 201 parses the input code stream and obtains values of syntax elements from the input code stream.
- the parsing unit 201 converts the binary representation of the syntax elements into digital values and sends the digital values to units in the decoder 200 to obtain one or more decoded pictures.
- the parsing unit 201 may also parse one or more syntax elements from the input code stream to display the decoded picture.
- the parsing unit 201 sends the value of the syntax element and one or more variables set or determined according to the value of the syntax element to obtain one or more decoded pictures to the decoder 200 unit.
- the prediction unit 202 determines a prediction block for a currently decoded block (eg, CU).
- the prediction unit 202 may include a motion compensation unit 203 and an intra prediction unit 204 .
- the prediction unit 202 passes the relevant parameters from the parsing unit 201 to the motion compensation unit 203 to obtain the inter-frame prediction block;
- the intra-frame prediction mode When the MIP mode indicated based on the MIP mode index value) is used to decode the current decoding block, the prediction unit 202 transmits the relevant parameters from the parsing unit 201 to the intra prediction unit 204 to obtain the intra prediction block.
- the dequantization unit 205 has the same function as the dequantization unit 110 in the encoder 100 .
- the inverse quantization unit 205 performs a scaling operation on the quantization coefficients (ie levels) from the parsing unit 201 to obtain reconstruction coefficients.
- the inverse transform unit 206 has the same function as the inverse transform unit 111 in the encoder 100 .
- the inverse transform unit 206 performs one or more transform operations (ie, the inverse of the one or more transform operations performed by the inverse transform unit 111 in the encoder 100) to obtain the reconstruction residual.
- the adder 207 performs an addition operation on its inputs (the predicted block from the prediction unit 202 and the reconstructed residual from the inverse transform unit 206) to obtain the reconstructed block of the currently decoded block.
- the reconstructed block is also sent to the prediction unit 202 to be used as a reference for other blocks encoded in intra prediction mode.
- filtering unit 208 After all CUs in a picture or sub-picture are reconstructed, filtering unit 208 performs loop filtering on the reconstructed picture or sub-picture.
- the filtering unit 208 includes one or more filters, such as a deblocking filter, a sampling adaptive compensation filter, an adaptive loop filter, a luma mapping and chroma scaling filter, and a neural network-based filter.
- filters such as a deblocking filter, a sampling adaptive compensation filter, an adaptive loop filter, a luma mapping and chroma scaling filter, and a neural network-based filter.
- filtering unit 208 determines that the reconstructed block is not used as a reference when decoding other blocks, filtering unit 208 performs loop filtering on one or more target pixels in the reconstructed block.
- the output of the filtering unit 208 is a decoded picture or sub-picture, and the decoded picture or sub-picture is cached in the DPB unit 209 .
- the DPB unit 209 outputs decoded pictures or sub-pictures according to timing and control information.
- the picture stored in the DPB unit 209 can also be used as a reference to perform inter prediction or intra prediction by the prediction unit 202 .
- the decoder 200 may have a second processor and a second memory recording a computer program. When the first processor reads and runs the computer program, the decoder 200 reads the input code stream and generates a corresponding decoded video. Additionally, decoder 200 may also be a computing device having one or more chips. These units implemented as integrated circuits on the chip have similar connection and data exchange functions as the corresponding units in FIG. 9 .
- the "current block” specifically refers to the block currently to be encoded in the video image (also referred to as “coding block” for short); when the embodiment of the present application When applied to the decoder 200, the “current block” specifically refers to a block currently to be decoded in a video image (may also be referred to simply as a "decoded block”).
- the encoding method in the embodiment of the present application is mainly applied to the "entropy encoding unit 115" part of the encoder 100.
- an adaptive binary arithmetic coding mode based on a context model or a side-by-side Entropy encoding is performed on relevant identification information (or syntax elements) in the road mode, and then written into the code stream.
- the decoding method in the embodiment of the present application is mainly applied to the "parsing unit 201" part of the decoder 200.
- the parsing unit 201 an adaptive binary arithmetic coding mode or a bypass mode based on a context model can be used.
- Decoding is performed to obtain the value of relevant identification information (or syntax elements), and then the coefficients are reconstructed.
- FIG. 10 is a schematic diagram of the first implementation flow of the decoding method.
- the decoding method of the decoder may include the following steps:
- Step 101 decode the code stream, and determine the high throughput mode identification information of the current block.
- Step 102 based on the identification information of the high throughput mode, use at least one of the context mode, the bypass mode and the alignment process to determine the coefficients of the current block.
- the decoder may determine the high throughput mode identification information of the current block by decoding the code stream. Coefficients of the current block may then be determined using at least one of context mode, bypass mode, and alignment processing based on the high throughput mode identification information.
- the identification information of the high throughput mode may be used to improve the throughput of the codec.
- the current block may be an image block that has not undergone transformation processing, or may be a transformation block that has undergone transformation processing.
- the current block may be a transformed block after zero-out.
- the high-throughput mode identification information can be understood as a flag indicating that at least one of the context mode, the bypass mode, and the alignment process is used to determine the coefficient of the current block, or the high-throughput mode can be set to
- the throughput mode identification information is understood as a flag indicating that at least one of the context mode, the bypass mode and the alignment process is used to determine the value of the coefficient of the current block.
- the decoder decodes the code stream, and may determine a variable as the identification information of the high throughput mode, so that the identification information of the high throughput mode may be determined through the value of the variable.
- the value of the high throughput mode identification information may be the first value or the second value. Specifically, the value of the high throughput mode identification information is different, and the manner of determining the coefficient of the current block (or determining the value of the coefficient of the current block) is also different.
- At least one of context mode, bypass mode and alignment processing may be selected to be used when determining the coefficient of the current block.
- the identification information of the high throughput mode can be understood as a flag indicating whether to perform alignment processing.
- the value of the high-throughput mode identification information is the first value, then you can choose to use the alignment process to determine the coefficient of the current block; if the value of the high-throughput mode identification information is the second value , then you can choose to skip the alignment process to determine the coefficients of the current block.
- the high throughput mode identification information can be understood as a flag indicating whether only the bypass mode is used.
- the value of the high-throughput mode identification information is the first value, then you can choose to use the bypass mode to determine the coefficient of the current block; if the value of the high-throughput mode identification information is the second value, then you can choose to use at least one of the context mode and the bypass mode to determine the coefficients of the current block.
- the identification information of the high throughput mode can be understood as a flag bit indicating to reduce the initial value of the number parameter (or set the number parameter to 0).
- the initial value of the quantity parameter can be determined according to the identification information of the high throughput mode; if the value of the initial value of the quantity parameter is greater than or equal to the quantity threshold, then the context mode and the bypass mode can be selected to be used At least one of them determines the coefficient of the current block; if the initial value of the quantity parameter is smaller than the quantity threshold, then a bypass mode can be selected to determine the coefficient of the current block.
- the initial value of the number parameter indicates the maximum number of syntax elements that can be coded and decoded using the context mode.
- the number parameter may be a parameter indicating the number of remaining context mode coding syntax elements available for the current block, and the initial value of the number parameter is the value initially set for the number parameter.
- the high-throughput mode identification information can be used to determine the initial value of the quantity parameter, and then judge based on the initial value of the quantity parameter Whether to use the context mode to determine the coefficients for the current block.
- the first value can be set to 1 and the second value to 0; the first value can also be set to true and the second value to false.
- This application does not make any limitations.
- the high-throughput mode identification information is used to determine whether to use at least one of the context mode, the bypass mode, and the alignment process to determine the coefficient of the current block (or the value of the coefficient of the current block), then it may Use the flag high_throughput_mode_enabled_flag to indicate high throughput mode identification information.
- the value of high_throughput_mode_enabled_flag is 1, it may indicate that alignment processing is performed when determining the coefficient of the current block (or the value of the coefficient of the current block); if the value of high_throughput_mode_enabled_flag is 0, then It may indicate that the alignment process is not performed when the coefficient of the current block (or the value of the coefficient of the current block) is determined.
- the value of high_throughput_mode_enabled_flag is 1, it may indicate that only the bypass mode is used to determine the coefficient of the current block (or the value of the coefficient of the current block); if the value of high_throughput_mode_enabled_flag is 0, it may indicate that The coefficient of the current block (or the value of the coefficient of the current block) is determined using at least one of the context mode and the bypass mode.
- the value of the initial value of the quantity parameter can be determined as the first quantity value, and then it is determined whether to use the context mode according to the value of the initial value of the quantity parameter
- the coefficient of the current block (or the value of the coefficient of the current block); if the value of high_throughput_mode_enabled_flag is 0, the initial value of the quantity parameter can be determined according to the height parameter and width parameter of the current block, and then according to the initial value of the quantity parameter
- the value determines whether to use the context mode to determine the coefficients of the current block (or the values of the coefficients of the current block).
- the decoder may also determine the height parameter and width parameter of the current block.
- the height parameter and width parameter of the current block can be used to determine the size of the current block.
- (1 ⁇ log2ZoTbHeight) can be used to represent the corresponding height parameter, and at the same time, the (1 ⁇ log2ZoTbWidth) indicates the corresponding width parameter.
- the first quantity value is an integer greater than or equal to 0 and less than the quantity threshold.
- the quantity threshold is 4, the first quantity value may be set to 0 or 1 or 2 or 3.
- the value of the initial value of the quantity parameter can be determined as the second quantity value, and then it is determined whether to use the context mode according to the value of the initial value of the quantity parameter
- the coefficient of the current block (or the value of the coefficient of the current block); if the value of high_throughput_mode_enabled_flag is 0, the initial value of the quantity parameter can be determined according to the height parameter and width parameter of the current block, and then according to the initial value of the quantity parameter
- the value determines whether to use the context mode to determine the coefficients of the current block (or the values of the coefficients of the current block).
- the second quantity value may be used to reduce the initial value of the quantity parameter.
- the second quantity value may be smaller than the initial value of the quantity parameter determined according to the height parameter and width parameter of the current block.
- the initial value of the number parameter can be determined according to the height parameter and width parameter of the current block and the first shift parameter, and then according to the value of the initial value of the number parameter Determine whether to use the context mode to determine the coefficient of the current block (or the value of the coefficient of the current block); if the value of high_throughput_mode_enabled_flag is 0, then the number parameter can be determined according to the height parameter and width parameter of the current block and the second shift parameter The initial value, and then determine whether to use the context mode to determine the coefficient of the current block (or the value of the coefficient of the current block) according to the value of the initial value of the quantity parameter.
- the first shift parameter and the second shift parameter are used for right shift processing, and the first shift parameter is greater than the second shift parameter.
- the decoder can also determine the video identification information by decoding the code stream; if the video identification information indicates that the video meets the first preset condition, then the determination of the high throughput mode identification information can be performed The process is to determine the high throughput mode identification information of the current block.
- the first preset condition includes at least one of the following conditions: the bit width is greater than the bit width threshold; the bit rate is greater than the bit rate threshold; the frame rate is greater than the frame rate threshold; the quantization parameter ( Quantization Parameter, QP) is less than the quality threshold; lossless compression.
- the bit width threshold can be set to 14bit (or 12bit, or 16bit), if the bit width of the video frame to be encoded and decoded is greater than 14bit, it can be considered as an unconventional video with a high bit width; code rate The threshold can be set to 1Gbit/s. If the bit rate of the video frame to be encoded and decoded is greater than 1Gbit/s, it can be considered as an unconventional video with a high bit rate; the frame rate threshold can be set to 90Hz (or 120Hz).
- the quality threshold can be set to different specific values according to different bit widths, for example, set the input bit width to 12bit and encode according to 12bit When the corresponding quality threshold is 0, if the bit width of the video frame to be encoded and decoded is 12bit and the quantization parameter determined in the case of 12bit encoding is less than the corresponding quality threshold is 0, it can be considered as high-quality non-conventional video.
- the coefficient decoding method is the same as the existing method in the related art; but for a certain situation, such as high bit width or high quality or high bit rate or high frame rate or
- the process of determining the identification information of the high-throughput mode can be added, that is, the identification information of the high-throughput mode of the current block can be determined.
- the bit width of unconventional video is higher than that of regular video
- the quality of unconventional video is higher than that of regular video
- the bit rate of unconventional video is higher than that of regular video
- the frame rate of unconventional video is higher than that of regular video.
- the frame rate is higher than regular video, and unconventional video is lossless compressed.
- the current video is a regular video, which may be indicated by video identification information. Specifically, if the value of the video identification information is the first value, it can be determined that the video identification information indicates that the video meets the first preset condition, that is, the video is an unconventional video; if the value of the video identification information is the second value, then It may be determined that the video identification information indicates that the video does not meet the first preset condition, that is, the video is a regular video.
- the first value can be set to 1 and the second value to 0; the first value can also be set to true and the second value to false.
- This application does not make any limitations.
- the video identification information may be a sequence-level mark, or even a higher-level mark, such as Video Usability Information (Video Usability Information, VUI), Supplemental Enhancement Information (Supplemental Enhancement Information) , SEI) and so on.
- VUI Video Usability Information
- Supplemental Enhancement Information Supplemental Enhancement Information
- SEI Supplemental Enhancement Information
- the video identification information is high bit width sequence identification information
- the high bit width sequence identification information indicates that the video meets the first preset condition
- the video identification information is high bit rate sequence identification information
- the high bit rate sequence identification information indicates that the video meets the first preset condition
- the video identification information is high-quality sequence identification information
- the high-quality sequence identification information indicates that the video meets the first preset condition
- the video identification information is high frame rate sequence identification information
- the high frame rate sequence identification information indicates that the video meets the first preset condition
- the video identification information is lossless compression sequence identification information
- the lossless compression sequence identification information indicates that the video meets the first preset condition
- the video identification information can be high bit width sequence identification information (expressed by sps_high_bit_depth_flag), used to indicate whether the current video is a high bit width sequence; or can be replaced by high bit rate sequence identification information (expressed by sps_high_bit_rate_flag), used to indicate whether the current video is a high bit rate sequence; or can be replaced with other identification information indicating high bit width, high bit rate, high quality, high frame rate or lossless compression, the embodiment of the present application does not make specific limited.
- the determination of the high throughput mode identification information may depend on the determination of the video identification information, that is, the high_throughput_mode_enabled_flag may depend on some other flags, such as a high bit width flag or a high bit rate flag or an SPS extension flag (sps_extension_flag ), etc.
- the SPS extension flag can be turned on in the standard extended version, for example, the extended version developed by VVC for high-bit-width and high-bit-rate encoding.
- the high throughput mode identification information may be a sequence (sequence) level flag or image (picture) level flag or slice (slice) level flag or block (block)-level flags or other level flags
- block-level flags include largest coding unit (LCU)-level flags or coding tree unit (CTU)-level flags or coding unit (CU)-level flags or other block-level flags sign.
- high_throughput_mode_enabled_flag can even be a higher-level flag, such as Video Usability Information (Video Usability Information, VUI), Supplemental Enhancement Information (Supplemental Enhancement Information, SEI), etc.
- coefficient encoding generally referred to in video standards may include two parts of encoding and decoding, therefore, coefficient encoding includes a coefficient encoding method on the encoder side and a coefficient decoding method on the decoder side.
- the embodiment of the present application describes the coefficient decoding method on the decoder side.
- the sub-block coding identification information may be represented by sb_coded_flag.
- sb_coded_flag if the value of sb_coded_flag is 1, it can be determined that all coefficients in the sub-block to be decoded need to be decoded sequentially; if the value of sb_coded_flag is 0, it can be determined that it is not necessary to decode all coefficients in the sub-block to be decoded sequentially Decoding is performed, and at this time, all coefficients in the sub-block to be decoded are zero.
- all scanned sub-blocks need to be encoded by default, or in other words, all scanned sub-blocks contain non-zero coefficients by default. That is to say, generally, the coefficient encoding method is still the same as the existing method in the related art.
- a certain situation may refer to video codecs with high bit width or high quality or high bit rate or high frame rate or lossless compressed video. In this case, there are many non-zero coefficients, and almost all scanned sub-blocks need to be coded; or in other words, almost all scanned sub-blocks contain non-zero coefficients.
- the bypass mode can be used to determine the sub-block coding identification information sb_coded_flag of the current block instead of using the context mode to determine Sub-block coding identification information sb_coded_flag of the current block.
- sb_coded_flag is decoded in context mode. If sb_coded_flag is removed or sb_coded_flag is changed to bypass mode decoding, then all coefficients in the entire block are decoded with bypass mode. Mode decoding will further improve the codec speed or throughput.
- the bypass mode determines the prefix information last_sig_coeff_x_prefix of the horizontal coordinate of the last non-zero coefficient corresponding to the current block, and finally The prefix information last_sig_coeff_y_prefix of the vertical coordinate of a non-zero coefficient, the suffix information last_sig_coeff_x_prefix of the horizontal coordinate of the last non-zero coefficient, and the suffix information last_sig_coeff_y_suffix of the vertical coordinate of the last non-zero coefficient.
- the above methods are based on the unified use of this technology for all components in the video as an example. All components refer to R, G, B of RGB format video or Y, U, V(Y, Cb, Cr).
- the above method can also be used only for a certain component, such as only for the Y component of the YUV format.
- the above method can also be used for each component separately, that is, each component can control the switch independently. This application does not impose specific limitations.
- the syntax of the context mode coding is not used in the coding and decoding of the coefficient value (coefficient level) and the coding and decoding of the residual level (residual level) element.
- the remBinsPass1 in the RRC and the RemCcbs in the TSRC are set to 0, that is, the number of binary symbols (bins) encoded in the context mode that the current TB can use is set to 0. Then all coefficient values or residual values are coded using bypass mode.
- the alignment process when using the alignment process to determine the coefficient of the current block, for RRC, you can choose to perform the alignment process after using the context mode to determine the last non-zero coefficient position, and The bypass mode is used to determine syntax elements other than the last non-zero coefficient position; for TSRC, an alignment process may be selected before the bypass mode is used to determine the first syntax element.
- the alignment (alignment) operation occurs before entering the sub-block, that is, for RRC, the alignment process is in last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix After last_sig_coeff_y_suffix, for TSRC, the alignment process starts at the beginning of the entire TB. In other words, the alignment process occurs before the syntax element coded by the first bypass mode in the TB.
- FIG. 11 is a schematic diagram 1 of alignment processing in RRC.
- all other syntax elements are Use bypass mode, that is, align after the last_sig_coeff_x_prefix of the horizontal coordinate prefix, last_sig_coeff_y_prefix of the vertical coordinate prefix, last_sig_coeff_x_suffix of the horizontal coordinate suffix and last_sig_coeff_y_suffix of the vertical coordinate suffix, and align after the last non-zero coefficient position Processing, which can make the decoding of the content encoded in the bypass mode of the subsequent large segment faster.
- Coefficient bits represent coefficient bits
- sb_coded_flag represents encoding identification information
- Context coded bins represents context mode coding group
- Bypass coded bins represents bypass mode coding group
- Aign represents the position of alignment processing.
- last_sig_coeff_x_prefix and last_sig_coeff_y_prefix can be coded in context mode, and last_sig_coeff_x_suffix and last_sig_coeff_y_suffix can be coded in bypass mode. Therefore, in an embodiment, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix and last_sig_coeff_y_suffix can all be used as the encoding of the last non-zero coefficient, and the subsequent ones are all encodings of sub-blocks and internal coefficients of sub-blocks.
- FIG. 12 is a second schematic diagram of alignment processing in RRC. As shown in FIG. 12 , it can also be performed on the basis of distinguishing the syntax elements encoded in the context mode and the syntax elements encoded in the bypass mode. Alignment processing, that is, an alignment operation is performed after the syntax element encoded in the context mode ends and before the syntax element encoded in the bypass mode begins.
- Coefficient bits represent coefficient bits
- sb_coded_flag represents encoding identification information
- Context coded bins represents context mode coding group
- Bypass coded bins represents bypass mode coding group
- Aign represents the position of alignment processing.
- the bypass mode determines the horizontal coordinate suffix identification information last_sig_coeff_x_suffix and the vertical coordinate suffix identification information last_sig_coeff_y_suffix of the last non-zero coefficient to perform alignment processing, and uses other syntax elements other than the position of the last non-zero coefficient in the bypass mode.
- last_sig_coeff_x_prefix and last_sig_coeff_y_prefix can also be changed to bypass mode encoding, at this time, the last non-zero coefficient position is also encoded using bypass mode Yes, and the entire TB is also encoded using bypass mode.
- the alignment process can also be placed at the beginning of the entire TB.
- the alignment processing can also be placed before the TB.
- the alignment process can occur before the first syntax element encoded in the bypass mode in the TB.
- FIG. 13 is a schematic diagram of alignment processing in TSRC.
- all syntax elements of the entire TB use the bypass mode, and alignment processing is performed at the beginning of the entire TB , which enables faster decoding of whole TB of bypass mode encoded content.
- Coefficient bits represent coefficient bits
- sb_coded_flag represents encoding identification information
- Aign represents the position of alignment processing.
- sps_extension_flag there is a sequence-level flag sps_extension_flag.
- sps_extension_flag if the value of sps_extension_flag is 1, sps_range_extension_flag needs to be decoded. If the value of sps_range_extension_flag is 1, sps_high_throughput_mode_enabled_flag needs to be decoded.
- sps_high_throughput_mode_enabled_flag is the flag that the high throughput mode of the current sequence is enabled.
- sps_high_throughput_mode_enabled_flag 1
- sps_high_throughput_mode_enabled_flag 0
- sps_extension_flag can be regarded as a flag indicating whether the current sequence uses a standard extended version.
- sps_range_extension_flag is the flag of whether the current sequence uses range extension (range extension), such as high bit width, high code rate, etc.
- sequence parameter set RBSP syntax (Sequence parameter set RBSP syntax) is shown in Table 3
- sequence parameter set range extension syntax (Sequence parameter set range extension syntax) is shown in Table 4:
- the sb_coded_flag that needs to be decoded, if the value of sps_high_throughput_mode_enabled_flag is 1, the sb_coded_flag is decoded using the bypass mode; otherwise, the sb_coded_flag is decoded using the common context mode.
- CABAC parsing process for slice data if the value of sps_high_throughput_mode_enabled_flag is 1, in residual_coding (x0, y0, log2TbWidth, log2TbHeight, cIdx) last_sig_coeff_x_prefix, last_sig_coig_la_st_y Alignment processing is performed after last_sig_coeff_y_suffix (if it exists), and alignment processing is performed at the beginning of residual_ts_coding(x0, y0, log2TbWidth, log2TbHeight, cIdx). Or perform alignment before the first dec_abs_level or abs_remainder or sb_coded_flag of TB. Or the alignment process is performed before the syntax element coded by the first bypass mode of the TB.
- the input of the alignment process is the variable ivlCurrRange
- the output of the alignment process is the updated variable ivlCurrRange, where ivlCurrRange is set to 256.
- the identification information of the sequence level and the slice level may be used to control whether to use the high throughput mode for encoding and decoding.
- the high-throughput mode identification information may include sequence-level identification information and slice-level identification information; if the value of the sequence-level identification information is the first value, the value of the slice-level identification information may be determined; if the slice-level If the value of the identification information is the first value, then you can choose to use the high throughput mode, that is, you can use the alignment process to determine the coefficient of the current block; and/or use the bypass mode to determine the coefficient of the current block ; and/or determining coefficients for the current block using at least one of the context mode and the bypass mode.
- sequence-level flag sps_extension_flag there is a sequence-level flag sps_extension_flag.
- sps_extension_flag if the value of sps_extension_flag is 1, sps_range_extension_flag needs to be decoded. If the value of sps_range_extension_flag is 1, the sequence-level identification information sps_high_throughput_mode_enabled_flag needs to be decoded.
- sequence parameter set RBSP syntax Sequence parameter set RBSP syntax
- sequence parameter set range extension syntax Sequence parameter set range extension syntax
- sps_high_throughput_mode_enabled_flag is a flag indicating that the high throughput mode of the current sequence is enabled. If the value of sps_high_throughput_mode_enabled_flag is 1, the slice-level identification information sh_high_throughput_mode_flag needs to be decoded at the slice level. If the value of sh_high_throughput_mode_flag is 1, it means that the blocks in the current slice use the high throughput mode; if the value of sh_high_throughput_mode_flag is 0, it means that the blocks in the current slice do not use the high throughput mode.
- sps_high_throughput_mode_enabled_flag if the value of sps_high_throughput_mode_enabled_flag is equal to 1, it means that sh_high_throughput_mode_flag will appear in the slice header in the current sequence, and if the value of sps_high_throughput_mode_enabled_flag is equal to 0, it means that the sh_high_throughput_mode_flag will not appear in the slice header in the current sequence. Wherein, if sps_high_throughput_mode_enabled_flag does not appear, it can be considered that the value of sps_high_throughput_mode_enabled_flag is 0.
- slice header syntax (Slice header syntax) is shown in Table 7:
- sh_high_throughput_mode_flag if the value of sh_high_throughput_mode_flag is equal to 1, it means that the blocks in the current slice use the high throughput mode, and if the value of sh_high_throughput_mode_flag is equal to 0, it means that the blocks in the current slice do not use the high throughput mode. If sh_high_throughput_mode_flag does not appear, it can be considered that the value of sh_high_throughput_mode_flag is 0.
- the input of the alignment process is the variable ivlCurrRange
- the output of the alignment process is the updated variable ivlCurrRange, where ivlCurrRange is set to 256.
- the high throughput mode Combining whether to use only the bypass mode codec, whether to use the context mode codec, and whether to perform alignment processing, so as to further use at least one of the context mode, bypass mode, and alignment processing to determine the coefficients of the current block.
- the throughput of coefficient decoding can be improved by reducing or even eliminating the number of syntax elements decoded in context mode during coefficient decoding.
- the high-throughput mode can form a large continuous and aligned bypass mode code, which can further improve the throughput.
- the embodiment of the present application provides a decoding method.
- the codec When the codec is encoding and decoding coefficients, it can set whether to use only bypass mode encoding and decoding, whether to use context mode encoding and decoding, and whether to perform alignment by setting the high throughput mode.
- the processing is combined to further determine the coefficients of the current block using at least one of context mode, bypass mode and alignment processing. Improve the throughput and codec speed of coefficient coding, reduce complexity, and improve compression performance.
- the high-throughput mode identification information can be understood as a flag bit indicating the initial value of the number parameter, that is, the high-throughput mode identification information is used to determine the current block Whether to reduce the initial value of the quantity parameter, you can use the flag high_throughput_mode_enabled_flag to indicate the high throughput mode identification information.
- high_throughput_mode_enabled_flag 1, it may indicate that the initial value of the quantity parameter is reduced; if the value of high_throughput_mode_enabled_flag is 0, it may indicate that the initial value of the quantity parameter is not reduced.
- the initial value of the number parameter indicates the maximum number of syntax elements that can be encoded and decoded using the context mode.
- the number parameter may be a parameter indicating the number of remaining context mode coding syntax elements available for the current block, and the initial value of the number parameter is the value initially set for the number parameter.
- the number parameter can be understood as a parameter indicating the number of syntax elements decoded using the context mode in the current block.
- the parameter value set when the quantity parameter does not enter the decoding process of the syntax element is the initial value of the quantity parameter.
- the flag remBinsPass1 can be used to indicate the number parameter of the number parameter of the syntax element, then the initial value of remBinsPass1 set before encoding and decoding of the syntax element is the initial value of the number parameter.
- the flag RemCcbs can be used to indicate the quantity parameter, then the initial value of RemCcbs set before encoding and decoding the syntax element is the initial value of the quantity parameter.
- the initial value of the quantity parameter when determining the initial value of the quantity parameter according to the identification information of the high throughput mode, if the value of the identification information of the high throughput mode is the first value, the initial value of the quantity parameter can be The value of is determined as the first quantity value; if the value of the high throughput mode identification information is the second value, the initial value of the quantity parameter can be determined according to the height parameter and width parameter of the current block.
- the first quantity value is an integer greater than or equal to 0 and less than the quantity threshold.
- the quantity threshold is 4, the first quantity value may be set to 0 or 1 or 2 or 3.
- the value of the high throughput mode identification information is the first value
- the value of the high-throughput mode identification information is the first value
- the value of the high-throughput mode identification information is the second value
- the high throughput mode identification information is used to determine whether to reduce the initial value of the quantity parameter, then when determining the initial value of the quantity parameter according to the high throughput mode identification information, if the high throughput If the value of the high-throughput mode identification information is the first value, the value of the initial value of the quantity parameter can be determined as the second value; if the value of the high-throughput mode identification information is the second value, it can be determined according to the current block
- the height parameter and width parameter determine the initial value of the quantity parameter.
- the second quantity value may be used to reduce the initial value of the quantity parameter. Specifically, the second quantity value may be smaller than the initial value of the quantity parameter determined according to the height parameter and width parameter of the current block.
- the high throughput mode identification information is used to determine whether to reduce the initial value of the quantity parameter, then when determining the initial value of the quantity parameter according to the high throughput mode identification information, if the high throughput mode If the value of the identification information is the first value, the initial value of the quantity parameter can be determined according to the height parameter, the width parameter and the first shift parameter of the current block; if the value of the identification information of the high throughput mode is the second value, then The initial value of the number parameter may be determined according to the height parameter and width parameter of the current block and the second shift parameter.
- the first shift parameter and the second shift parameter may be used for right shift processing, wherein the first shift parameter is greater than the second shift parameter. That is to say, under the same other conditions, after the right shift processing is performed according to the first shift parameter and the second shift parameter respectively, the initial value of the quantity parameter corresponding to the first shift parameter is smaller than the value of the second shift parameter. The value of the initial value of the quantity parameter corresponding to the bit parameter.
- the value of the high-throughput mode identification information is the first value, whether the value of the initial value of the quantity parameter is determined as a fixed value (second quantity value) or increased
- second quantity value the value of the initial value of the quantity parameter
- the initial value of is to reduce the number of syntax elements decoded using context mode.
- remBinsPass1 may also be set in other ways.
- parameter may be determined by a sequence-level or slice-level flag or other level flags. Specifically, if this flag does not exist, the value of parameter is 0. The value of parameter may be 0, 1, 2, 3, etc. Then the syntax modification can be done without the format of if and else.
- the adjustable range is also more flexible.
- a ccb_right_shift_level_flag can be set, and the value of this ccb_right_shift_level_flag can be 0, 1, 2, 3, 4, 5, or 6.
- the value of parameter is equal to the value of ccb_right_shift_level_flag, if ccb_right_shift_level_flag does not exist, then the value of parameter is 0.
- RemCcbs may also be set in other ways.
- parameter may be determined by a sequence-level or slice-level flag or other level flags. Specifically, if this flag does not exist, the value of parameter is 0. The value of parameter may be 0, 1, 2, 3, etc. Then the syntax modification can be done without the format of if and else.
- the adjustable range is also more flexible.
- a ccb_right_shift_level_flag can be set, and the value of this ccb_right_shift_level_flag can be 0, 1, 2, 3, 4, 5, or 6.
- the value of parameter is equal to the value of ccb_right_shift_level_flag, if ccb_right_shift_level_flag does not exist, then the value of parameter is 0.
- the decoder may determine whether to use the context mode to determine the coefficient of the current block according to the initial value of the quantity parameter.
- the context mode may be used to determine the coefficient of the current block; if the initial value of the quantity parameter is less than the quantity threshold, The coefficients for the current block can then be determined using the bypass mode.
- the bypass mode can also be used to determine the coefficient of the current block while using the context mode.
- the determination of the coefficients of that is, at least using the context mode to determine the coefficients of the current block.
- the initial value of the quantity parameter is reduced or set to 0 (or 1 or 2 or 3) based on the identification information of the high throughput mode, and is selected according to the initial value of the quantity parameter Whether to no longer use the context mode to further reconstruct the coefficients of the current block.
- all coefficients before the position of the last non-zero coefficient can be sequentially decoded, and finally the reconstruction coefficient of the current block can be determined, that is, the coefficient of the current block can be reconstructed.
- all coefficients before the position of the last non-zero coefficient can be sequentially decoded according to a preset scanning order, where the preset scanning order can be diagonal, Zigzag, horizontal, vertical,
- the 4 ⁇ 4 sub-block scanning or any other scanning sequence is not limited in this embodiment of the present application.
- (1 ⁇ log2ZoTbWidth) represents the width of the transform block after zero-out
- (1 ⁇ log2ZoTbHeight) represents the height of the transform block after zero-out.
- the value of remBinsPass1 is further determined according to the high throughput mode identification information (high_throughput_mode_enabled_flag), wherein, when the value of the high throughput mode identification information high_throughput_mode_enabled_flag is the first value, the value of remBinsPass1 can be directly set to 0, or can be set The value of remBinsPass1 is set to a value smaller than ((1 ⁇ (log2TbWidth+log2TbHeight)) ⁇ 7)>>2.
- the number of syntax elements decoded using the context mode in the current block is determined through remBinsPass1. Coefficients before the last nonzero coefficient in scan order require decoding.
- RemCcbs it is also necessary to further determine the value of RemCcbs according to the high throughput mode identification information (high_throughput_mode_enabled_flag), wherein, when the value of the high throughput mode identification information high_throughput_mode_enabled_flag is the first value, the value of RemCcbs can be directly set to 0, or, The value of RemCcbs may be set to a value smaller than ((1 ⁇ (log2TbWidth+log2TbHeight)) ⁇ 7)>>2.
- the number of syntax elements decoded using the context mode in the current block is determined through RemCcbs. Coefficients before the last nonzero coefficient in scan order require decoding.
- the syntax elements of the context mode decoding in a sub-block can be placed in two rounds, and each coefficient is in the first and second rounds.
- the syntax elements of up to 4 context mode decodes are processed respectively in .
- remBinsPass1 or RemCcbs are set smaller than the existing method when high_throughput_mode_enabled_flag is established, then the corresponding RRC or TSRC will reduce the number of context modes used when decoding coeff_sign_flag. This further reduces the number of syntax elements decoded by the context mode.
- syntax element design of context mode decoding does not conform to the law of coefficient distribution in high-bit-width, high-bit-rate, high-quality video, reducing or even eliminating the use of syntax elements for high-bit-width, high bit-rate, high-quality video context mode decoding , will not reduce the compression efficiency but can improve the compression efficiency to a certain extent.
- the coefficient decoding method may be selected to reduce the number of syntax elements coded using the context mode when decoding coefficients. That is to say, usually, the coefficient decoding method is still the same as the common method. In the case of high bit width or high quality or high bit rate or high frame rate video codec, the number of syntax elements decoded using the context mode is reduced during coefficient decoding.
- this application it is possible to choose to reduce the number of syntax elements decoded using the context mode to zero. It is also possible to choose to reduce the number of syntax elements coded using the context mode to 0 while all the coefficients are coded in the bypass mode.
- the method proposed in this application can be applied to RRC and/or TSRC.
- sps_high_bit_depth_flag indicating whether the current sequence is a high-bit-width sequence. If the value of sps_high_bit_depth_flag is 1, it means that the current sequence is a high bit width sequence, otherwise it means that the current sequence is not a high bit width sequence.
- sps_high_bit_depth_flag if the value of sps_high_bit_depth_flag is 1, sps_high_throughput_mode_enabled_flag needs to be decoded.
- sps_high_throughput_mode_enabled_flag is the flag that the high throughput mode of the current sequence is enabled.
- sps_high_throughput_mode_enabled_flag 1
- the block in the current sequence does not use the syntax element of the coefficient coded in the context mode
- the value of sps_high_throughput_mode_enabled_flag 0
- the block in the current sequence High throughput mode is not used.
- the high_throughput_mode_enabled_flag in the above syntax table becomes sps_high_throughput_mode_enabled_flag.
- sequence parameter set RBSP syntax Sequence parameter set RBSP syntax
- sps_extension_flag there is a sequence-level flag sps_extension_flag.
- sps_extension_flag if the value of sps_extension_flag is 1, sps_range_extension_flag needs to be decoded. If the value of sps_range_extension_flag is 1, sps_high_throughput_mode_enabled_flag needs to be decoded.
- sps_high_throughput_mode_enabled_flag is the flag that the high throughput mode of the current sequence is enabled.
- sps_high_throughput_mode_enabled_flag 1
- sps_extension_flag can be regarded as a flag indicating whether the current sequence uses a standard extended version.
- sps_range_extension_flag is the flag of whether the current sequence uses range extension (range extension), such as high bit width, high code rate, etc.
- range extension range extension
- sequence parameter set RBSP syntax Sequence parameter set RBSP syntax
- sequence parameter set range extension syntax Sequence parameter set range extension syntax
- sps_extension_flag is equal to 1, indicating that the syntax elements sps_range_extension_flag and sps_extension_7bits will appear in the SPS RBSP syntax structure.
- sps_extension_flag 0 indicates that these syntax elements will not appear.
- sps_range_extension_flag 1 indicates that the sps_range_extension() syntax structure will appear in the SPS RBSP syntax structure. If sps_range_extension_flag is not present, the value of sps_range_extension_flag is 0.
- sps_extension_flag there is a sequence-level flag sps_extension_flag.
- sps_extension_flag if the value of sps_extension_flag is 1, sps_range_extension_flag needs to be decoded. If the value of sps_range_extension_flag is 1, sps_high_throughput_mode_enabled_flag needs to be decoded.
- sps_high_throughput_mode_enabled_flag is the flag that the high throughput mode of the current sequence is enabled.
- sps_high_throughput_mode_enabled_flag 1
- the block in the current sequence does not use the syntax element of the coefficient coded in the context mode
- the value of sps_high_throughput_mode_enabled_flag 0
- the block in the current sequence Blocks cannot be enabled for high throughput mode. If sps_high_throughput_mode_enabled_flag is not present, the value of sps_high_throughput_mode_enabled_flag is 0.
- sh_high_throughput_mode_flag is the flag that the high throughput mode of the current slice is enabled. If the value of sh_high_throughput_mode_flag is 1, it means that the current slice uses the high throughput mode, for example, the blocks in the current slice do not use the syntax elements of the coefficients encoded in the context mode, and if the value of sh_high_throughput_mode_flag is 0, it means that the current slice does not use the high throughput mode.
- sequence parameter set RBSP syntax Sequence parameter set RBSP syntax
- sps_high_throughput_mode_enabled_flag is equal to 1, indicating that the blocks in the current sequence use the high throughput mode; the value of sps_high_throughput_mode_enabled_flag is 0, indicating that the blocks in the current sequence may not use the high throughput mode.
- sh_high_throughput_mode_flag is equal to 1, indicating that the blocks in the current slice use the high throughput mode, for example, set remBinsPass1 and RemCcbs of the blocks in the current slice to 0; the value of sh_high_throughput_mode_flag is 0, indicating that the blocks in the current slice do not use the high throughput mode.
- sequence-level flag sps_high_bit_depth_flag indicates whether the current sequence is a high-bit-width sequence, or can be replaced with sps_high_bit_rate_flag, which indicates whether the current sequence is a high-code-rate sequence. or other flags indicating high bitwidth, high bitrate, high quality, or lossless encoding.
- the above methods are based on the unified use of this technology for all components in the video as an example. All components refer to R, G, B of RGB format video or Y, U, V(Y, Cb, Cr).
- the above method can also be used only for a certain component, such as only for the Y component of the YUV format.
- the above method can also be used for each component separately, that is, each component can control the switch independently.
- the embodiment of the present application provides a decoding method.
- the codec When the codec is encoding and decoding coefficients, it can set whether to use only bypass mode encoding and decoding, whether to use context mode encoding and decoding, and whether to perform alignment by setting the high throughput mode.
- the processing is combined to further determine the coefficients of the current block using at least one of context mode, bypass mode and alignment processing. Improve the throughput and codec speed of coefficient coding, reduce complexity, and improve compression performance.
- FIG. 14 is a schematic diagram of the second implementation flow of the decoding method.
- the decoding method of the decoder may include the following steps:
- Step 103 Determine the decoded information, and determine the high throughput mode identification information of the current block according to the decoded information.
- Step 102 based on the identification information of the high throughput mode, use at least one of the context mode, the bypass mode and the alignment process to determine the coefficients of the current block.
- the decoded information may be determined first, and then the high throughput mode identification information of the current block may be determined according to the decoded information. Coefficients of the current block may then be determined using at least one of context mode, bypass mode, and alignment processing based on the high throughput mode identification information. Wherein, the high throughput mode identification information may be used to improve the throughput of the codec.
- the decoded information when encoding and decoding the current block, may represent the information of the current encoded and decoded block.
- the decoded information when encoding and decoding the current partial content, may represent the information of the currently encoded and decoded partial content.
- the decoded information is at least one of the following decoded information: the first n decoded slices, the first n decoded largest coding units LCU, and the first n decoded coding trees A unit CTU, the first n decoded coding units CU, the first n decoded transform units TU, and the first n decoded transform blocks TB; wherein, n is an integer greater than 0.
- the current partial content includes, but is not limited to, the current slice, the current coding tree unit CTU, the current largest coding unit LCU, the current CU, the current TU, or the current TB.
- the coded partial content includes, but is not limited to, a coded slice, a coded largest coding unit LCU, a coded CU, a coded TU or a coded TB, and the like.
- the part of coded content includes but not limited to the first n slices, the first n CTUs, the first n LCUs, the first n CUs, the first n TUs or the first n TB etc., where n is 1, 2...etc.
- the coded partial content includes but not limited to all (within a certain range) slices, CTU, LCU, CU, TU or TB before the current partial content.
- the decoded information is at least one of the following information: code rate, coefficient, residual, and number of bits.
- the decoded information includes but not limited to code rate, coefficient, residual, bit number and some other variables or parameters or statistics of parameters.
- the value of the high throughput mode identification information of the current block can be determined from the decoded information, so that whether to use the high throughput mode can be determined based on the value of the high throughput mode identification information. That is to say, it may be determined whether to use a high-throughput codec method (high-throughput mode) for the codec of the current partial content according to the information of the currently coded partial content.
- the decoded information when determining the high throughput mode identification information of the current block according to the decoded information, if the decoded information satisfies the second preset condition, then determine the high throughput mode identification information The value is the first value; if the decoded information does not satisfy the second preset condition, determine that the value of the high throughput mode identification information is the second value.
- the value of the identification information of the high throughput mode may be the first value or the second value.
- the value of the high throughput mode identification information is different, and the manner of determining the coefficient of the current block (or determining the value of the coefficient of the current block) is also different.
- the codec method in the high throughput mode includes but not limited to alignment (alignment) operation, full bypass mode, and the like.
- the method of not using the syntax elements of the coefficients coded in the context mode may be determined as the full bypass mode.
- the second preset condition may be used to determine whether the code rate is high or low, that is, the second preset condition may determine whether the code rate needs to be reduced.
- the second preset condition may include one of the following conditions: the code rate is greater than or equal to the first threshold, the accumulated value of the absolute value of the coefficient is greater than or equal to the second threshold, the average value of the absolute value of the coefficient is greater than or equal to the third threshold, The accumulated value of the absolute value of the residual is greater than or equal to the fourth threshold, the average value of the absolute value of the residual is greater than or equal to the fifth threshold, and the number of bits is greater than or equal to the sixth threshold.
- the decoded information meets the second preset condition
- the number of bits used by the previous CTU reaches or If it exceeds a threshold, or the cumulative value of the absolute value of the coefficient value or residual value of the previous CTU exceeds a threshold, or the average value of the absolute value of the coefficient value or residual value of the previous CTU exceeds a threshold
- high throughput can be determined
- the value of the rate mode identification information is the first value, that is, it can be determined that the current CTU uses the high throughput rate mode; otherwise, it is considered that the decoded information does not meet the second preset condition, and the value of the high throughput rate mode identification information is determined to be the second Value, that is, the current CTU does not use the high throughput mode.
- the high throughput mode can be determined
- the value of the identification information is the first value, that is, it can be determined that the current TB uses the high throughput mode; otherwise, it is considered that the decoded information does not meet the second preset condition, and the value of the identification information of the high throughput mode is determined to be the second value, That is, the current TB does not use the high throughput mode.
- the high throughput mode can be determined
- the value of the identification information is the first value, that is, it can be determined that the current CTU uses the high throughput mode; otherwise, it is considered that the decoded information does not meet the second preset condition, and the value of the identification information of the high throughput mode is determined to be the second value, That is, the current CTU does not use the high throughput mode.
- At least one of context mode, bypass mode and alignment processing may be selected to be used when determining the coefficient of the current block.
- the identification information of the high throughput mode can be understood as a flag indicating whether to perform alignment processing.
- the value of the high-throughput mode identification information is the first value, then you can choose to use the alignment process to determine the coefficient of the current block; if the value of the high-throughput mode identification information is the second value , then you can choose to skip the alignment process to determine the coefficients of the current block.
- the high throughput mode identification information can be understood as a flag indicating whether only the bypass mode is used.
- the value of the high-throughput mode identification information is the first value, then you can choose to use the bypass mode to determine the coefficient of the current block; if the value of the high-throughput mode identification information is the second value, then you can choose to use at least one of the context mode and the bypass mode to determine the coefficients of the current block.
- the identification information of the high throughput mode can be understood as a flag bit indicating to reduce the initial value of the number parameter (or set the number parameter to 0).
- the initial value of the quantity parameter can be determined according to the identification information of the high throughput mode; if the value of the initial value of the quantity parameter is greater than or equal to the quantity threshold, then the context mode and the bypass mode can be selected to be used At least one of them determines the coefficient of the current block; if the initial value of the quantity parameter is smaller than the quantity threshold, then a bypass mode can be selected to determine the coefficient of the current block.
- the initial value of the number parameter indicates the maximum number of syntax elements that can be coded and decoded using the context mode.
- the number parameter may be a parameter indicating the number of remaining context mode coding syntax elements available for the current block, and the initial value of the number parameter is the value initially set for the number parameter.
- the high-throughput mode identification information can be used to determine the initial value of the quantity parameter, and then judge based on the initial value of the quantity parameter Whether to use the context mode to determine the coefficients for the current block.
- the first value can be set to 1 and the second value to 0; the first value can also be set to true and the second value to false.
- This application does not make any limitations.
- the high-throughput mode identification information is used to determine whether to use at least one of the context mode, the bypass mode, and the alignment process to determine the coefficient of the current block (or the value of the coefficient of the current block), then it may Use the flag high_throughput_mode_enabled_flag to indicate high throughput mode identification information.
- high_throughput_mode_enabled_flag may be a sequence (sequence) level flag or a picture (picture) level flag or a slice (slice) level flag or a block (block) level flag or Flags at other levels
- block-level flags include largest coding unit (LCU)-level flags or coding tree unit (CTU)-level flags or coding unit (CU)-level flags or other block-level flags.
- high_throughput_mode_enabled_flag can even be a higher-level flag, such as Video Usability Information (Video Usability Information, VUI), Supplemental Enhancement Information (Supplemental Enhancement Information, SEI), etc.
- the full-bypass mode or the high-throughput mode can significantly improve the throughput of the codec, so the full-bypass mode or the high-throughput mode is suitable for ultra-high bit rate video encoding. decoding. It is precisely because the ultra-high bit rate video codec itself has high requirements on the decoding throughput rate, and on the other hand, the coefficients in the bit stream of the ultra-high bit rate video are usually very large. At this time, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, etc. will not play a significant role, but may increase overhead. That is to say, when the full-bypass mode or high-throughput mode is encoding and decoding ultra-high bit rate video, the throughput rate is significantly improved, but the compression efficiency will not be reduced or will be significantly reduced.
- the full bypass mode or the high throughput mode is not suitable for video codecs with low bit rates or video codecs with insufficient bit rates. This is because in low-bit-rate video codec scenarios, although the throughput rate is significantly improved, the compression performance will be significantly reduced. And in low-bit-rate video codecs, the coefficients are usually relatively small. At this time, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, etc. are very helpful for compression performance. Full bypass mode or high throughput mode may skip sig_coeff_flag, abs_level_gtx_flag, par_level_flag, Such an operation cannot guarantee compression performance. The high throughput mode uses all sb_coded_flag in bypass mode, and the alignment operation will also lose compression efficiency.
- an adaptive high throughput mode (adaptive high throughput mode) proposed by this application can adaptively judge whether the current part uses the high throughput mode according to the situation of the encoded and decoded video, so that the When the bit rate is high enough, the throughput rate can be significantly improved without obvious loss of compression performance. When the bit rate is not high enough, the compression performance will not be significantly lost, and it has higher adaptability.
- the high throughput mode is mainly chosen as an example for description, and the adaptive high throughput mode proposed in the embodiment of the present application can also be applied to
- the full-bypass mode evolves into an adaptive full-bypass mode (adaptive full-bypass mode), or is applied to other modes for improving throughput, which is not specifically limited in this application.
- VVC adopts a history-based rice parameter derivation technique in high-bit-width coding.
- This technique sets a variable StatCoeff[cIdx] for each component, where cIdx can take 0, 1, and 2, representing the three components of YUV respectively.
- the variable StatCoeff[cIdx] will be initialized at the beginning of each slice or tile, and the value of the variable StatCoeff[cIdx] will be updated once every TB codec.
- the variable StatCoeff[cIdx] is used to derive the rice parameter for coefficient encoding.
- the adaptive high throughput mode (adaptive high throughput mode) can use the variable StatCoeff[cIdx] to determine whether the current part uses the high throughput mode.
- variable StatCoeff[cIdx] when the variable StatCoeff[cIdx] is initialized, if the current sequence does not use the history-based Rice parameter (rice parameter) derivation technique, the variable StatCoeff[cIdx] is initialized to 0, where cIdx is equal to 0, 1, 2. Otherwise, if the variable bit depth (bitDepth) is greater than 12, the variable StatCoeff[cIdx] is initialized to 4, otherwise the variable StatCoeff[cIdx] is initialized to 2.
- bitDepth bit depth
- the variable StatCoeff[cIdx] is initialized to 4
- the variable StatCoeff[cIdx] is initialized to 2.
- the syntax for updating the variable StatCoeff[cIdx] can be shown in Table 20,
- sps_persistent_rice_adaptation_enabled_flag is the flag of whether the sequence uses the history-based Rice parameter (rice parameter) derivation technique.
- the case of using abs_remainder is one more "+2" than the case of dec_abs_level, because if there are many large coefficients in TB, the coefficient of the first non-zero exponential Columbus code in TB usually uses abs_remainder, and if TB The coefficient of the first non-zero Exponential Columbus encoding uses dec_abs_level, which means that the coefficients of this TB are generally small, because all coefficients encoded using context mode are less than 4. That is to say, the case coefficient using abs_remainder is generally more likely to be too large, while the case coefficient using dec_abs_level is less likely to be generally large.
- variable StatCoeff[cIdx] determined according to the encoded TB can be obtained before each TB starts decoding, so it can be determined according to the variable StatCoeff[cIdx] whether the current TB uses the high throughput mode.
- the variable StatCoeff[cIdx] is updated in RRC, and it can be determined according to the variable StatCoeff[cIdx] whether the current TB of RRC and TSRC uses the high throughput mode. It may also be determined only according to the variable StatCoeff[cIdx] whether the current TB of the RRC uses the high throughput mode. It may also be determined according to the variable StatCoeff[cIdx] whether the current CU or the current CTU of the RRC uses the high throughput mode.
- the encoded information is a Rice parameter
- the value of a variable can be determined first, wherein the first variable can be the variable StatCoeff[cIdx], Then the encoded information can be determined according to the value of the first variable.
- the Rice parameter satisfies the second preset condition, that is, it is determined that the value of the first variable is greater than or equal to the seventh threshold.
- the value of the throughput mode identification information is the first value, and then choose to use the high throughput mode; if the value of the first variable is less than the seventh threshold, it is determined that the Rice parameter does not meet the second preset condition, that is, determine the high throughput mode.
- the value of the throughput mode identification information is the second value, so that the high throughput mode is selected not to be used.
- the current TB uses the high throughput mode; otherwise, the current TB does not use the high throughput mode.
- the value of the threshold may be 3, 4, 5 and so on.
- a sequence-level flag sps_high_throughput_mode_enabled_flag may be set.
- the value of sps_high_throughput_mode_enabled_flag is equal to 1, indicating that the blocks in the current sequence can use the high throughput mode, otherwise, it indicates that the blocks in the current sequence do not use the high throughput mode.
- the coded information is a Rice parameter
- the value of the two variables can be determined first, wherein the second variable can be the variable sh_ts_residual_coding_rice_idx_minus1, and then can be based on The value of the second variable determines the encoded information.
- the Rice parameter satisfies the second preset condition, that is, it is determined that the value of the second variable is greater than or equal to the eighth threshold.
- the value of the throughput mode identification information is the first value, and then choose to use the high throughput mode; if the value of the second variable is less than the eighth threshold, it is determined that the Rice parameter does not meet the second preset condition, that is, determine the high throughput mode.
- the value of the throughput mode identification information is the second value, so that the high throughput mode is selected not to be used.
- VVC adopts a method for deriving the rice parameter of TSRC that is different from that of RRC.
- the rice parameter of TSRC is derived from sh_ts_residual_coding_rice_idx_minus1.
- sh_ts_residual_coding_rice_idx_minus1+1 determines the rice parameter used by residual_ts_coding (x0, y0, log2TbWidth, log2TbHeight, cIdx).
- sh_ts_residual_coding_rice_idx_minus1 the TB of the TSRC of the current slice uses the high throughput mode; otherwise, the TB of the TSRC of the current slice does not use the high throughput mode. Further, it may also be determined according to sh_ts_residual_coding_rice_idx_minus1 whether the current TB of the RRC uses the high throughput mode.
- variable StatCoeff[cIdx] and/or the variable sh_ts_residual_coding_rice_idx_minus1 can be used to determine whether the high throughput mode is suitable, which can improve the adaptability of the high throughput mode.
- the high throughput mode by setting the high throughput mode, it is possible to combine whether to use only the bypass mode codec, whether to use the context mode codec, and whether to perform alignment processing, so as to further use the context
- At least one of mode, bypass mode, and alignment process determines coefficients of the current block.
- the throughput of coefficient decoding can be improved by reducing or even eliminating the number of syntax elements decoded in context mode during coefficient decoding.
- the high-throughput mode can form a large continuous and aligned bypass mode code, which can further improve the throughput.
- the adaptive high-throughput rate mode can adaptively judge whether the current part uses the high-throughput rate mode according to the situation of the coded video, which can significantly improve the throughput rate and not significantly lose the compression performance when the bit rate is high enough. When the code rate is not high enough, the compression performance will not be significantly lost, and it has higher adaptability.
- the high throughput mode proposed in this application combines whether to use only the bypass mode codec, whether to use the context mode codec, and whether to perform alignment processing, and can be composed into slices when using the high throughput mode. and aligned bypass mode encoding.
- the adaptive high-throughput mode proposed in this application can determine whether the current part uses the high-throughput mode based on the information of the coded part, which can improve the adaptability of the high-throughput mode.
- the embodiment of the present application provides a decoding method.
- the decoder decodes the code stream.
- the codec encodes and decodes the coefficients, it can set whether to use only the bypass mode to encode and decode, and whether to use the context
- the mode codec and whether to perform alignment processing are combined, so as to further use at least one of context mode, bypass mode, and alignment processing to determine the coefficients of the current block.
- Improve coefficient coding throughput and codec speed, reduce complexity, and adaptive high-throughput rate mode can adaptively judge whether the current part uses high-throughput rate mode according to the situation of the coded video, and can achieve high enough bit rate When the bit rate is not high enough, the throughput rate can be significantly improved without significant loss of compression performance. When the code rate is not high enough, the compression performance will not be significantly lost, and it has higher adaptability, thereby improving the compression performance.
- FIG. 15 is a schematic diagram of the first implementation flow of the encoding method.
- the encoding method of the encoder may include the following step:
- Step 201 Determine the identification information of the high throughput mode of the current block.
- Step 202 Based on the high throughput mode identification information, use at least one of the context mode, the bypass mode and the alignment process to encode the coefficients of the current block to generate a code stream.
- the encoder may determine the high throughput mode identification information of the current block. Then, based on the identification information of the high throughput mode, at least one of the context mode, the bypass mode and the alignment process can be used to encode the coefficients of the current block, so as to generate a code stream.
- the identification information of the high throughput mode may be used to improve the throughput of the codec.
- the current block may be an image block that has not undergone transformation processing, or may be a transformation block that has undergone transformation processing.
- the current block may be a transformed block after zero-out.
- the high-throughput mode identification information can be understood as a flag indicating that at least one of the context mode, the bypass mode, and the alignment process is used to determine the coefficient of the current block, or the high-throughput mode can be set to
- the throughput mode identification information is understood as a flag indicating that at least one of the context mode, the bypass mode and the alignment process is used to determine the value of the coefficient of the current block.
- the encoder may determine a variable as the identification information of the high throughput mode, so that the identification information of the high throughput mode may be determined through the value of the variable.
- the value of the high throughput mode identification information may be the first value or the second value. Specifically, the value of the high throughput mode identification information is different, and the manner of determining the coefficient of the current block (or determining the value of the coefficient of the current block) is also different.
- At least one of context mode, bypass mode, and alignment processing may be selected to be used when encoding coefficients of the current block.
- the identification information of the high throughput mode can be understood as a flag indicating whether to perform alignment processing.
- the value of the high-throughput mode identification information is the first value, then you can choose to use alignment processing to encode the coefficients of the current block to generate a code stream; if the value of the high-throughput mode identification information is is the second value, then you can choose to skip the alignment process and encode the coefficients of the current block to generate a code stream.
- the high throughput mode identification information can be understood as a flag indicating whether only the bypass mode is used.
- the value of the high-throughput mode identification information is the first value, then you can choose to use the bypass mode to encode the coefficients of the current block to generate a code stream; if the high-throughput mode identification information is set to value is the second value, then at least one of the context mode and the bypass mode can be selected to encode the coefficients of the current block to generate a code stream.
- the identification information of the high throughput mode can be understood as a flag bit indicating to reduce the initial value of the number parameter (or set the number parameter to 0).
- the initial value of the quantity parameter can be determined according to the identification information of the high throughput mode; if the value of the initial value of the quantity parameter is greater than or equal to the quantity threshold, then the context mode and the bypass mode can be selected to be used At least one of them encodes the coefficients of the current block to generate a code stream; if the initial value of the quantity parameter is less than the quantity threshold, then you can choose to use the bypass mode to encode the coefficients of the current block to generate a code stream.
- the initial value of the number parameter indicates the maximum number of syntax elements that can be coded and decoded using the context mode.
- the number parameter may be a parameter indicating the number of remaining context mode coding syntax elements available for the current block, and the initial value of the number parameter is the value initially set for the number parameter.
- the high-throughput mode identification information can be used to determine the initial value of the quantity parameter, and then judge based on the initial value of the quantity parameter Whether to use context mode to encode the coefficients of the current block.
- the first value can be set to 1 and the second value to 0; the first value can also be set to true and the second value to false.
- This application does not make any limitations.
- the high-throughput mode identification information is used to determine whether to use at least one of the context mode, the bypass mode, and the alignment process to determine the coefficient of the current block (or the value of the coefficient of the current block), then it may Use the flag high_throughput_mode_enabled_flag to indicate high throughput mode identification information.
- the value of high_throughput_mode_enabled_flag is 1, it may indicate that alignment processing is performed when determining the coefficient of the current block (or the value of the coefficient of the current block); if the value of high_throughput_mode_enabled_flag is 0, then It may indicate that the alignment process is not performed when the coefficient of the current block (or the value of the coefficient of the current block) is determined.
- the value of high_throughput_mode_enabled_flag is 1, it may indicate that only the bypass mode is used to determine the coefficient of the current block (or the value of the coefficient of the current block); if the value of high_throughput_mode_enabled_flag is 0, it may indicate that The coefficient of the current block (or the value of the coefficient of the current block) is determined using at least one of the context mode and the bypass mode.
- the value of the initial value of the quantity parameter can be determined as the first quantity value, and then it is determined whether to use the context mode according to the value of the initial value of the quantity parameter
- the coefficient of the current block (or the value of the coefficient of the current block); if the value of high_throughput_mode_enabled_flag is 0, the initial value of the quantity parameter can be determined according to the height parameter and width parameter of the current block, and then according to the initial value of the quantity parameter
- the value determines whether to use the context mode to determine the coefficients of the current block (or the values of the coefficients of the current block).
- the encoder may also determine the height parameter and width parameter of the current block.
- the height parameter and width parameter of the current block can be used to determine the size of the current block.
- (1 ⁇ log2ZoTbHeight) can be used to represent the corresponding height parameter, and at the same time, the (1 ⁇ log2ZoTbWidth) indicates the corresponding width parameter.
- the first quantity value is an integer greater than or equal to 0 and less than the quantity threshold.
- the quantity threshold is 4, the first quantity value may be set to 0 or 1 or 2 or 3.
- the value of the initial value of the quantity parameter can be determined as the second quantity value, and then it is determined whether to use the context mode according to the value of the initial value of the quantity parameter
- the coefficient of the current block (or the value of the coefficient of the current block); if the value of high_throughput_mode_enabled_flag is 0, the initial value of the quantity parameter can be determined according to the height parameter and width parameter of the current block, and then according to the initial value of the quantity parameter
- the value determines whether to use the context mode to determine the coefficients of the current block (or the values of the coefficients of the current block).
- the second quantity value may be used to reduce the initial value of the quantity parameter.
- the second quantity value may be smaller than the initial value of the quantity parameter determined according to the height parameter and width parameter of the current block.
- the initial value of the number parameter can be determined according to the height parameter and width parameter of the current block and the first shift parameter, and then according to the value of the initial value of the number parameter Determine whether to use the context mode to determine the coefficient of the current block (or the value of the coefficient of the current block); if the value of high_throughput_mode_enabled_flag is 0, then the number parameter can be determined according to the height parameter and width parameter of the current block and the second shift parameter The initial value, and then determine whether to use the context mode to determine the coefficient of the current block (or the value of the coefficient of the current block) according to the value of the initial value of the quantity parameter.
- the first shift parameter and the second shift parameter are used for right shift processing, and the first shift parameter is greater than the second shift parameter.
- the encoder can determine the video identification information; if the video identification information indicates that the video satisfies the first preset condition, then the determination process of the high-throughput mode identification information can be performed, that is, the determination of the current block The high-throughput mode identification information.
- the first preset condition includes at least one of the following conditions: the bit width is greater than the bit width threshold; the bit rate is greater than the bit rate threshold; the frame rate is greater than the frame rate threshold; the quantization parameter QP Less than the quality threshold; lossless compression.
- the bit width threshold can be set to 14bit (or 12bit, or 16bit), if the bit width of the video frame to be encoded and decoded is greater than 14bit, it can be considered as an unconventional video with a high bit width; code rate The threshold can be set to 1Gbit/s. If the bit rate of the video frame to be encoded and decoded is greater than 1Gbit/s, it can be considered as an unconventional video with a high bit rate; the frame rate threshold can be set to 90Hz (or 120Hz).
- the quality threshold can be set to different specific values according to different bit widths, for example, set the input bit width to 12bit and encode according to 12bit When the corresponding quality threshold is 0, if the bit width of the video frame to be encoded and decoded is 12bit and the quantization parameter determined in the case of 12bit encoding is less than the corresponding quality threshold is 0, it can be considered as high-quality non-conventional video.
- the coefficient codec method is the same as the existing method in the related art; but for a certain situation, such as high bit width or high quality or high bit rate or high frame rate Or non-conventional video with lossless compression, when encoding and decoding coefficients in the embodiment of the present application, the process of determining the identification information of the high-throughput mode can be added, that is, the identification information of the high-throughput mode of the current block can be determined.
- the bit width of unconventional video is higher than that of regular video
- the quality of unconventional video is higher than that of regular video
- the bit rate of unconventional video is higher than that of regular video
- the frame rate of unconventional video is higher than that of regular video.
- the frame rate is higher than regular video, and unconventional video is lossless compressed.
- the current video is a regular video, which may be indicated by video identification information. Specifically, if the value of the video identification information is the first value, it can be determined that the video identification information indicates that the video meets the first preset condition, that is, the video is an unconventional video; if the value of the video identification information is the second value, then It may be determined that the video identification information indicates that the video does not meet the first preset condition, that is, the video is a regular video.
- the first value can be set to 1 and the second value to 0; the first value can also be set to true and the second value to false.
- This application does not make any limitations.
- the video identification information may be a sequence-level mark, or even a higher-level mark, such as Video Usability Information (Video Usability Information, VUI), Supplemental Enhancement Information (Supplemental Enhancement Information) , SEI) and so on.
- VUI Video Usability Information
- Supplemental Enhancement Information Supplemental Enhancement Information
- SEI Supplemental Enhancement Information
- the video identification information is high bit width sequence identification information
- the high bit width sequence identification information indicates that the video meets the first preset condition
- the video identification information is high bit rate sequence identification information
- the high bit rate sequence identification information indicates that the video meets the first preset condition
- the video identification information is high-quality sequence identification information
- the high-quality sequence identification information indicates that the video meets the first preset condition
- the video identification information is high frame rate sequence identification information
- the high frame rate sequence identification information indicates that the video meets the first preset condition
- the video identification information is lossless compression sequence identification information
- the lossless compression sequence identification information indicates that the video meets the first preset condition
- the video identification information can be high bit width sequence identification information (expressed by sps_high_bit_depth_flag), used to indicate whether the current video is a high bit width sequence; or can be replaced by high bit rate sequence identification information (expressed by sps_high_bit_rate_flag), used to indicate whether the current video is a high bit rate sequence; or can be replaced with other identification information indicating high bit width, high bit rate, high quality, high frame rate or lossless compression, the embodiment of the present application does not make specific limited.
- the determination of the high throughput mode identification information may depend on the determination of the video identification information, that is, the high_throughput_mode_enabled_flag may depend on some other flags, such as a high bit width flag or a high bit rate flag or an SPS extension flag (sps_extension_flag ), etc.
- the SPS extension flag can be turned on in the standard extended version, for example, the extended version developed by VVC for high-bit-width and high-bit-rate encoding.
- the high throughput mode identification information may be a sequence (sequence) level flag or image (picture) level flag or slice (slice) level flag or block (block)-level flags or other level flags
- block-level flags include largest coding unit (LCU)-level flags or coding tree unit (CTU)-level flags or coding unit (CU)-level flags or other block-level flags sign.
- high_throughput_mode_enabled_flag can even be a higher-level flag, such as Video Usability Information (Video Usability Information, VUI), Supplemental Enhancement Information (Supplemental Enhancement Information, SEI), etc.
- coefficient encoding commonly referred to in video standards may include encoding and decoding. Therefore, coefficient encoding includes a coefficient encoding method on the encoder side and a coefficient decoding method on the decoder side. The embodiment of the present application describes the coefficient decoding method on the decoder side.
- the sub-block coding identification information may be represented by sb_coded_flag.
- sb_coded_flag if the value of sb_coded_flag is 1, it can be determined that all coefficients in the sub-block to be decoded need to be decoded sequentially; if the value of sb_coded_flag is 0, it can be determined that it is not necessary to decode all coefficients in the sub-block to be decoded sequentially Decoding is performed, and at this time, all coefficients in the sub-block to be decoded are zero.
- all scanned sub-blocks need to be encoded by default, or in other words, all scanned sub-blocks contain non-zero coefficients by default. That is to say, generally, the coefficient encoding method is still the same as the existing method in the related art.
- a certain situation may refer to video codecs with high bit width or high quality or high bit rate or high frame rate or lossless compressed video. In this case, there are many non-zero coefficients, and almost all scanned sub-blocks need to be coded; or in other words, almost all scanned sub-blocks contain non-zero coefficients.
- the bypass mode can be used to determine the sub-block coding identification information sb_coded_flag of the current block, instead of using the context mode to determine the current Sub-block coded identification information sb_coded_flag of a block.
- sb_coded_flag is decoded in context mode. If sb_coded_flag is removed or sb_coded_flag is changed to bypass mode decoding, then all coefficients in the entire block are decoded with bypass mode. Mode decoding will further improve the codec speed or throughput.
- the bypass mode determines the prefix information last_sig_coeff_x_prefix of the horizontal coordinate of the last non-zero coefficient corresponding to the current block, and finally The prefix information last_sig_coeff_y_prefix of the vertical coordinate of a non-zero coefficient, the suffix information last_sig_coeff_x_prefix of the horizontal coordinate of the last non-zero coefficient, and the suffix information last_sig_coeff_y_suffix of the vertical coordinate of the last non-zero coefficient.
- the above methods are based on the unified use of this technology for all components in the video as an example. All components refer to R, G, B of RGB format video or Y, U, V(Y, Cb, Cr).
- the above method can also be used only for a certain component, such as only for the Y component of the YUV format.
- the above method can also be used for each component separately, that is, each component can control the switch independently. This application does not impose specific limitations.
- the setting of the high throughput mode can be used to determine whether to use only the bypass mode encoding and decoding, whether to use
- the encoding and decoding of the context mode and whether the alignment process is performed are combined, so that at least one of the context mode, the bypass mode and the alignment process is further used to encode the coefficients of the current block to generate a code stream.
- the syntax of the context mode coding is not used in the coding and decoding of the coefficient value (coefficient level) and the coding and decoding of the residual level (residual level) element.
- the remBinsPass1 in the RRC and the RemCcbs in the TSRC are set to 0, that is, the number of binary symbols (bins) encoded in the context mode that the current TB can use is set to 0. Then all coefficient values or residual values are coded using bypass mode.
- the alignment process when using the alignment process to determine the coefficient of the current block, for RRC, you can choose to perform the alignment process after using the context mode to determine the last non-zero coefficient position, and The bypass mode is used to determine syntax elements other than the last non-zero coefficient position; for TSRC, an alignment process may be selected before the bypass mode is used to determine the first syntax element.
- the alignment (alignment) operation occurs before entering the sub-block, that is, for RRC, the alignment process is in last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix After last_sig_coeff_y_suffix, for TSRC, the alignment process starts at the beginning of the entire TB. In other words, the alignment process occurs before the syntax element coded by the first bypass mode in the TB.
- last_sig_coeff_x_prefix and last_sig_coeff_y_prefix can be coded in context mode, and last_sig_coeff_x_suffix and last_sig_coeff_y_suffix can be coded in bypass mode. Therefore, in an embodiment, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix and last_sig_coeff_y_suffix can all be used as the encoding of the last non-zero coefficient, and the subsequent ones are all encodings of sub-blocks and internal coefficients of sub-blocks.
- the alignment processing method shown in FIG. 11 above is performed on the basis of distinguishing according to the meaning of the syntax elements.
- the alignment process can also be performed on the basis of distinguishing the syntax elements encoded in the context mode from the syntax elements encoded in the bypass mode, that is, the syntax elements encoded in the context mode Alignment occurs after the end of the element and before the start of the bypass mode coded syntax element. ⁇ , ⁇ RRC ⁇ , ⁇ 11 ⁇ last_sig_coeff_x_prefix,last_sig_coeff_y_prefix,last_sig_coeff_x_suffix ⁇ last_sig_coeff_y_suffix ⁇ , ⁇ 12 ⁇ last_sig_coeff_x_prefix ⁇ last_sig_coeff_y_prefix ⁇ ,last_sig_coeff_x_suffix ⁇ last_sig_coeff_y_suffix ⁇ operate.
- the bypass mode determines the horizontal coordinate suffix identification information last_sig_coeff_x_suffix and the vertical coordinate suffix identification information last_sig_coeff_y_suffix of the last non-zero coefficient to perform alignment processing, and uses other syntax elements other than the position of the last non-zero coefficient in the bypass mode.
- last_sig_coeff_x_prefix and last_sig_coeff_y_prefix can also be changed to bypass mode encoding, at this time, the last non-zero coefficient position is also encoded using bypass mode Yes, and the entire TB is also encoded using bypass mode.
- the alignment process can also be placed at the beginning of the entire TB.
- the alignment processing can also be placed before the TB.
- the alignment process can occur before the first syntax element encoded in the bypass mode in the TB.
- sps_extension_flag there is a sequence-level flag sps_extension_flag.
- sps_extension_flag if the value of sps_extension_flag is 1, sps_range_extension_flag needs to be decoded. If the value of sps_range_extension_flag is 1, sps_high_throughput_mode_enabled_flag needs to be decoded.
- sps_high_throughput_mode_enabled_flag is the flag that the high throughput mode of the current sequence is enabled.
- sps_high_throughput_mode_enabled_flag 1
- sps_high_throughput_mode_enabled_flag 0
- sps_extension_flag can be regarded as a flag indicating whether the current sequence uses a standard extended version.
- sps_range_extension_flag is the flag of whether the current sequence uses range extension (range extension), such as high bit width, high code rate, etc.
- sequence parameter set RBSP syntax Sequence parameter set RBSP syntax
- sequence parameter set range extension syntax Sequence parameter set range extension syntax
- the sb_coded_flag that needs to be decoded, if the value of sps_high_throughput_mode_enabled_flag is 1, the sb_coded_flag is decoded using the bypass mode; otherwise, the sb_coded_flag is decoded using the common context mode.
- CABAC parsing process for slice data if the value of sps_high_throughput_mode_enabled_flag is 1, in residual_coding (x0, y0, log2TbWidth, log2TbHeight, cIdx) last_sig_coeff_x_prefix, last_sig_coig_la_st_y Alignment processing is performed after last_sig_coeff_y_suffix (if it exists), and alignment processing is performed at the beginning of residual_ts_coding(x0, y0, log2TbWidth, log2TbHeight, cIdx). Or perform alignment before the first dec_abs_level or abs_remainder or sb_coded_flag of TB. Or the alignment process is performed before the syntax element coded by the first bypass mode of the TB.
- the input of the alignment process is the variable ivlCurrRange
- the output of the alignment process is the updated variable ivlCurrRange, where ivlCurrRange is set to 256.
- the identification information of the sequence level and the slice level may be used to control whether to use the high throughput mode for encoding and decoding.
- the high-throughput mode identification information may include sequence-level identification information and slice-level identification information; if the value of the sequence-level identification information is the first value, the value of the slice-level identification information may be determined; if the slice-level If the value of the identification information is the first value, then you can choose to use the high throughput mode, that is, you can use the alignment process to determine the coefficient of the current block; and/or use the bypass mode to determine the coefficient of the current block ; and/or determining coefficients for the current block using at least one of the context mode and the bypass mode.
- sequence-level flag sps_extension_flag there is a sequence-level flag sps_extension_flag.
- sps_extension_flag if the value of sps_extension_flag is 1, sps_range_extension_flag needs to be decoded. If the value of sps_range_extension_flag is 1, the sequence-level identification information sps_high_throughput_mode_enabled_flag needs to be decoded.
- sequence parameter set RBSP syntax Sequence parameter set RBSP syntax
- sequence parameter set range extension syntax Sequence parameter set range extension syntax
- sps_high_throughput_mode_enabled_flag is a flag indicating that the high throughput mode of the current sequence is enabled. If the value of sps_high_throughput_mode_enabled_flag is 1, the slice-level identification information sh_high_throughput_mode_flag needs to be decoded at the slice level. If the value of sh_high_throughput_mode_flag is 1, it means that the blocks in the current slice use the high throughput mode; if the value of sh_high_throughput_mode_flag is 0, it means that the blocks in the current slice do not use the high throughput mode.
- sps_high_throughput_mode_enabled_flag if the value of sps_high_throughput_mode_enabled_flag is equal to 1, it means that sh_high_throughput_mode_flag will appear in the slice header in the current sequence, and if the value of sps_high_throughput_mode_enabled_flag is equal to 0, it means that the sh_high_throughput_mode_flag will not appear in the slice header in the current sequence. Wherein, if sps_high_throughput_mode_enabled_flag does not appear, it can be considered that the value of sps_high_throughput_mode_enabled_flag is 0.
- slice header syntax (Slice header syntax) is shown in Table 7 above.
- sh_high_throughput_mode_flag 1
- sh_high_throughput_mode_flag 0
- sh_high_throughput_mode_flag 0.
- FIG. 16 is a schematic diagram of the second implementation flow of the encoding method.
- the encoding method by the encoder may include the following steps:
- Step 203 Determine the encoded information, and determine the high throughput mode identification information of the current block according to the encoded information.
- Step 202 Based on the high throughput mode identification information, use at least one of the context mode, the bypass mode and the alignment process to encode the coefficients of the current block to generate a code stream.
- the encoded information may be determined first, and then the high throughput mode identification information of the current block may be determined according to the encoded information. Then, based on the identification information of the high throughput mode, at least one of the context mode, the bypass mode and the alignment process can be used to encode the coefficients of the current block to generate a code stream. Wherein, the high throughput mode identification information may be used to improve the throughput of the codec.
- the encoded information when encoding and decoding the current block, may represent the information of the currently encoded and decoded block.
- the encoded information when encoding and decoding the current partial content, may represent the information of the currently encoded and decoded partial content.
- the encoded information is at least one of the following encoded information: the first n encoded slices, the first n encoded largest coding units LCU, and the first n encoded coding trees A unit CTU, the first n encoded coding units CU, the first n encoded transform units TU, and the first n encoded transform blocks TB; wherein, n is an integer greater than 0.
- the current partial content includes, but is not limited to, the current slice, the current coding tree unit CTU, the current largest coding unit LCU, the current CU, the current TU, or the current TB.
- the coded partial content includes, but is not limited to, a coded slice, a coded largest coding unit LCU, a coded CU, a coded TU or a coded TB, and the like.
- the part of coded content includes but not limited to the first n slices, the first n CTUs, the first n LCUs, the first n CUs, the first n TUs or the first n TB etc., where n is 1, 2...etc.
- the coded partial content includes but not limited to all (within a certain range) slices, CTU, LCU, CU, TU or TB before the current partial content.
- the coded information is at least one of the following information: code rate, coefficient, residual, and number of bits.
- encoded information includes but not limited to code rate, coefficient, residual, bit number and some other variables or parameters or statistics of parameters.
- the value of the high throughput mode identification information of the current block can be determined from the encoded information, so that whether to use the high throughput mode can be determined based on the value of the high throughput mode identification information. That is to say, it may be determined whether to use a high-throughput codec method (high-throughput mode) for the codec of the current partial content according to the information of the currently coded partial content.
- the encoded information when determining the high-throughput mode identification information of the current block according to the encoded information, if the encoded information satisfies the second preset condition, then determine the high-throughput mode identification information The value is the first value; if the coded information does not satisfy the second preset condition, determine that the value of the high throughput mode identification information is the second value.
- the value of the identification information of the high throughput mode may be the first value or the second value.
- the value of the high throughput mode identification information is different, and the manner of determining the coefficient of the current block (or determining the value of the coefficient of the current block) is also different.
- the codec method in the high throughput mode includes but not limited to alignment (alignment) operation, full bypass mode, and the like.
- the method of not using the syntax elements of the coefficients coded in the context mode may be determined as the full bypass mode.
- the second preset condition may be used to determine whether the code rate is high or low, that is, the second preset condition may determine whether the code rate needs to be reduced.
- the second preset condition may include one of the following conditions: the code rate is greater than or equal to the first threshold, the accumulated value of the absolute value of the coefficient is greater than or equal to the second threshold, the average value of the absolute value of the coefficient is greater than or equal to the third threshold, The accumulated value of the absolute value of the residual is greater than or equal to the fourth threshold, the average value of the absolute value of the residual is greater than or equal to the fifth threshold, and the number of bits is greater than or equal to the sixth threshold.
- the current CTU if some variables or parameters of the previous CTU meet the conditions (encoded information meets the second preset condition), for example, the number of bits used by the previous CTU reaches or If it exceeds a threshold, or the cumulative value of the absolute value of the coefficient value or residual value of the previous CTU exceeds a threshold, or the average value of the absolute value of the coefficient value or residual value of the previous CTU exceeds a threshold, then high throughput can be determined
- the value of the rate mode identification information is the first value, that is, it can be determined that the current CTU uses the high throughput mode; otherwise, it is considered that the encoded information does not meet the second preset condition, and the value of the high throughput mode identification information is determined to be the second Value, that is, the current CTU does not use the high throughput mode.
- the high throughput mode can be determined
- the value of the identification information is the first value, that is, it can be determined that the current TB uses the high throughput mode; otherwise, it is considered that the encoded information does not meet the second preset condition, and the value of the identification information of the high throughput mode is determined to be the second value, That is, the current TB does not use the high throughput mode.
- the high throughput mode can be determined
- the value of the identification information is the first value, that is, it can be determined that the current CTU uses the high throughput mode; otherwise, it is considered that the encoded information does not meet the second preset condition, and the value of the identification information of the high throughput mode is determined to be the second value, That is, the current CTU does not use the high throughput mode.
- At least one of context mode, bypass mode, and alignment processing may be selected to be used when encoding coefficients of the current block.
- the identification information of the high throughput mode can be understood as a flag indicating whether to perform alignment processing. If the value of the high-throughput mode identification information is the first value, then you can choose to use alignment processing to encode the coefficients of the current block to generate a code stream; if the value of the high-throughput mode identification information is the second value, you can choose to skip Coefficients of the current block are encoded through alignment to generate code streams.
- the high throughput mode identification information can be understood as a flag indicating whether only the bypass mode is used. If the value of the high-throughput mode identification information is the first value, then you can choose to use the bypass mode to encode the coefficients of the current block to generate a code stream; if the value of the high-throughput mode identification information is the second value, you can choose Use at least one of the context mode and the bypass mode to encode the coefficients of the current block to generate a code stream.
- the identification information of the high throughput mode can be understood as a flag bit indicating to reduce the initial value of the number parameter (or set the number parameter to 0).
- the initial value of the number parameter can be determined first according to the high-throughput mode identification information; if the value of the initial value of the number parameter is greater than or equal to the number threshold, then at least one of the context mode and the bypass mode can be selected to encode the coefficient of the current block, Generate a code stream; if the initial value of the number parameter is less than the number threshold, you can choose to use the bypass mode to encode the coefficients of the current block to generate a code stream.
- the first value can be set to 1 and the second value to 0; the first value can also be set to true and the second value to false.
- This application does not make any limitations.
- the full-bypass mode or the high-throughput mode can significantly improve the throughput of the codec, so the full-bypass mode or the high-throughput mode is suitable for ultra-high bit rate video encoding. decoding. It is precisely because the ultra-high bit rate video codec itself has high requirements on the decoding throughput rate, and on the other hand, the coefficients in the bit stream of the ultra-high bit rate video are usually very large. At this time, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, etc. will not play a significant role, but may increase overhead. That is to say, when the full-bypass mode or high-throughput mode is encoding and decoding ultra-high bit rate video, the throughput rate is significantly improved, but the compression efficiency will not be reduced or will be significantly reduced.
- the full bypass mode or the high throughput mode is not suitable for video codecs with low bit rates or video codecs with insufficient bit rates. This is because in low-bit-rate video codec scenarios, although the throughput rate is significantly improved, the compression performance will be significantly reduced. And in low-bit-rate video codecs, the coefficients are usually relatively small. At this time, sig_coeff_flag, abs_level_gtx_flag, par_level_flag, etc. are very helpful for compression performance. Full bypass mode or high throughput mode may skip sig_coeff_flag, abs_level_gtx_flag, par_level_flag, Such an operation cannot guarantee compression performance. The high throughput mode uses all sb_coded_flag in bypass mode, and the alignment operation will also lose compression efficiency.
- an adaptive high throughput mode (adaptive high throughput mode) proposed by this application can adaptively judge whether the current part uses the high throughput mode according to the situation of the encoded and decoded video, so that the When the bit rate is high enough, the throughput rate can be significantly improved without obvious loss of compression performance. When the bit rate is not high enough, the compression performance will not be significantly lost, and it has higher adaptability.
- the high throughput mode is mainly chosen as an example for description, and the adaptive high throughput mode proposed in the embodiment of the present application can also be applied to
- the full-bypass mode evolves into an adaptive full-bypass mode (adaptive full-bypass mode), or is applied to other modes for improving throughput, which is not specifically limited in this application.
- VVC adopts a history-based rice parameter derivation technique in high-bit-width coding.
- This technique sets a variable StatCoeff[cIdx] for each component, where cIdx can take 0, 1, and 2, representing the three components of YUV respectively.
- the variable StatCoeff[cIdx] will be initialized at the beginning of each slice or tile, and the value of the variable StatCoeff[cIdx] will be updated once every TB codec.
- the variable StatCoeff[cIdx] is used to derive the rice parameter for coefficient encoding.
- the adaptive high throughput mode (adaptive high throughput mode) can use the variable StatCoeff[cIdx] to determine whether the current part uses the high throughput mode.
- variable StatCoeff[cIdx] when the variable StatCoeff[cIdx] is initialized, if the current sequence does not use the history-based Rice parameter (rice parameter) derivation technique, the variable StatCoeff[cIdx] is initialized to 0, where cIdx is equal to 0, 1, 2. Otherwise, if the variable bit depth (bitDepth) is greater than 12, the variable StatCoeff[cIdx] is initialized to 4, otherwise the variable StatCoeff[cIdx] is initialized to 2.
- bitDepth bit depth
- the variable StatCoeff[cIdx] is initialized to 4
- the variable StatCoeff[cIdx] is initialized to 2.
- the syntax for updating the variable StatCoeff[cIdx] may be as shown in Table 17 above. Among them, sps_persistent_rice_adaptation_enabled_flag is the flag of whether the sequence uses the history-based Rice parameter (rice
- the case of using abs_remainder is one more "+2" than the case of dec_abs_level, because if there are many large coefficients in TB, the coefficient of the first non-zero exponential Columbus code in TB usually uses abs_remainder, and if TB The coefficient of the first non-zero Exponential Columbus encoding uses dec_abs_level, which means that the coefficients of this TB are generally small, because all coefficients encoded using context mode are less than 4. That is to say, the case coefficient using abs_remainder is generally more likely to be too large, while the case coefficient using dec_abs_level is less likely to be generally large.
- variable StatCoeff[cIdx] determined according to the coded TB can be obtained, so it can be determined according to the variable StatCoeff[cIdx] whether the current TB uses the high throughput mode .
- the variable StatCoeff[cIdx] is updated in RRC, and it can be determined according to the variable StatCoeff[cIdx] whether the current TB of RRC and TSRC uses the high throughput mode. It may also be determined only according to the variable StatCoeff[cIdx] whether the current TB of the RRC uses the high throughput mode. It may also be determined according to the variable StatCoeff[cIdx] whether the current CU or the current CTU of the RRC uses the high throughput mode.
- the encoded information is a Rice parameter
- the value of a variable can be determined first, wherein the first variable can be the variable StatCoeff[cIdx], Then the encoded information can be determined according to the value of the first variable.
- the Rice parameter satisfies the second preset condition, that is, it is determined that the value of the first variable is greater than or equal to the seventh threshold.
- the value of the throughput mode identification information is the first value, and then choose to use the high throughput mode; if the value of the first variable is less than the seventh threshold, it is determined that the Rice parameter does not meet the second preset condition, that is, determine the high throughput mode.
- the value of the throughput mode identification information is the second value, so that the high throughput mode is selected not to be used.
- the current TB uses the high throughput mode; otherwise, the current TB does not use the high throughput mode.
- the value of the threshold may be 3, 4, 5 and so on.
- a sequence-level flag sps_high_throughput_mode_enabled_flag may be set.
- the value of sps_high_throughput_mode_enabled_flag is equal to 1, indicating that the blocks in the current sequence can use the high throughput mode, otherwise, it indicates that the blocks in the current sequence do not use the high throughput mode.
- the coded information is a Rice parameter
- the value of the two variables can be determined first, wherein the second variable can be the variable sh_ts_residual_coding_rice_idx_minus1, and then can be based on The value of the second variable determines the encoded information.
- the Rice parameter satisfies the second preset condition, that is, it is determined that the value of the second variable is greater than or equal to the eighth threshold.
- the value of the throughput mode identification information is the first value, and then choose to use the high throughput mode; if the value of the second variable is less than the eighth threshold, it is determined that the Rice parameter does not meet the second preset condition, that is, determine the high throughput mode.
- the value of the throughput mode identification information is the second value, so that the high throughput mode is selected not to be used.
- VVC adopts a method for deriving the rice parameter of TSRC that is different from that of RRC.
- the rice parameter of TSRC is derived from sh_ts_residual_coding_rice_idx_minus1.
- sh_ts_residual_coding_rice_idx_minus1+1 determines the rice parameter used by residual_ts_coding (x0, y0, log2TbWidth, log2TbHeight, cIdx).
- sh_ts_residual_coding_rice_idx_minus1 the TB of the TSRC of the current slice uses the high throughput mode; otherwise, the TB of the TSRC of the current slice does not use the high throughput mode. Further, it may also be determined according to sh_ts_residual_coding_rice_idx_minus1 whether the current TB of the RRC uses the high throughput mode.
- variable StatCoeff[cIdx] and/or the variable sh_ts_residual_coding_rice_idx_minus1 can be used to determine whether the high throughput mode is suitable, which can improve the adaptability of the high throughput mode.
- the high throughput mode by setting the high throughput mode, it is possible to combine whether to use only the bypass mode codec, whether to use the context mode codec, and whether to perform alignment processing, so as to further use the context
- At least one of mode, bypass mode, and alignment process determines coefficients of the current block.
- the throughput of coefficient decoding can be improved by reducing or even eliminating the number of syntax elements decoded in context mode during coefficient decoding.
- the high-throughput mode can form a large continuous and aligned bypass mode code, which can further improve the throughput.
- the adaptive high-throughput rate mode can adaptively judge whether the current part uses the high-throughput rate mode according to the situation of the coded video, which can significantly improve the throughput rate and not significantly lose the compression performance when the bit rate is high enough. When the code rate is not high enough, the compression performance will not be significantly lost, and it has higher adaptability.
- the high throughput mode proposed in this application combines whether to use only the bypass mode codec, whether to use the context mode codec, and whether to perform alignment processing, and can be composed into slices when using the high throughput mode. and aligned bypass mode encoding.
- the adaptive high-throughput mode proposed in this application can determine whether the current part uses the high-throughput mode based on the information of the coded part, which can improve the adaptability of the high-throughput mode.
- the embodiment of the present application provides an encoding method.
- the codec can set whether to use only bypass mode encoding and decoding, whether to use context mode encoding and decoding, and whether to perform
- the alignment process is combined to further use at least one of the context mode, the bypass mode and the alignment process to determine the coefficients of the current block.
- Improve coefficient coding throughput and codec speed, reduce complexity, and adaptive high-throughput rate mode can adaptively judge whether the current part uses high-throughput rate mode according to the situation of the coded video, and can achieve high enough bit rate When the bit rate is not high enough, the throughput rate can be significantly improved without significant loss of compression performance. When the code rate is not high enough, the compression performance will not be significantly lost, and it has higher adaptability, thereby improving the compression performance.
- FIG. 17 is a schematic diagram of the composition and structure of the decoder proposed in the embodiment of the present application.
- the decoder 300 proposed in the embodiment of the present application may include decoding part 301, first determining part 302,
- the decoding part 301 is configured to decode code streams
- the first determining part 302 is configured to determine high throughput mode identification information of the current block; based on the high throughput mode identification information, use at least one of context mode, bypass mode and alignment processing to determine the current block coefficient.
- the first determining part 302 is configured to determine the decoded information, and determine the high throughput mode identification information of the current block according to the decoded information; based on the high throughput Mode identification information, using at least one of context mode, bypass mode and alignment processing to determine the coefficients of the current block.
- Fig. 18 is a schematic diagram 2 of the composition and structure of the decoder proposed by the embodiment of the present application.
- the decoder 300 proposed by the embodiment of the present application may further include a first processor 303, and stores executable codes of the first processor 303.
- the above-mentioned first processor 303 is configured to decode the code stream and determine the high-throughput mode identification information of the current block; based on the high-throughput mode identification information, use the context mode, bypass At least one of way mode and alignment processing determines the coefficients of the current block.
- the above-mentioned first processor 303 is configured to determine the decoded information, and determine the high throughput mode identification information of the current block according to the decoded information;
- At least one of a context mode, a bypass mode, and an alignment process is used to determine coefficients of the current block.
- Fig. 19 is a schematic diagram of the composition and structure of the encoder proposed in the embodiment of the present application.
- the encoder 400 proposed in the embodiment of the present application may include a second determination part 401, an encoding part 402,
- the first determining part 401 is configured to determine the high throughput mode identification information of the current block
- the coding part 402 is configured to use at least one of context mode, bypass mode and alignment processing to encode the coefficients of the current block based on the high throughput mode identification information to generate a code stream.
- the first determination part 401 is configured to determine the decoded information, and determine the high throughput mode identification information of the current block according to the decoded information;
- the coding part 402 is configured to use at least one of context mode, bypass mode and alignment processing to encode the coefficients of the current block based on the high throughput mode identification information to generate a code stream.
- Fig. 20 is a second schematic diagram of the composition and structure of the encoder proposed by the embodiment of the present application.
- the encoder 400 proposed by the embodiment of the present application may further include a second processor 403, which stores executable codes of the second processor 403.
- the above-mentioned second processor 403 is configured to determine the high-throughput mode identification information of the current block; based on the high-throughput mode identification information, use context mode, bypass mode, and alignment Processing at least one of the coefficients for encoding the current block to generate a code stream.
- the above-mentioned second processor 403 is configured to determine the decoded information, and determine the high-throughput mode identification information of the current block according to the decoded information; based on the high-throughput mode Identify information, use at least one of context mode, bypass mode and alignment processing to encode the coefficients of the current block to generate a code stream.
- each functional module in this embodiment may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above-mentioned integrated units can be implemented in the form of hardware or in the form of software function modules.
- the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium.
- the technical solution of this embodiment is essentially or The part contributed by the prior art or the whole or part of the technical solution can be embodied in the form of software products, the computer software products are stored in a storage medium, and include several instructions to make a computer device (which can be a personal A computer, a server, or a network device, etc.) or a processor (processor) executes all or part of the steps of the method of this embodiment.
- the aforementioned storage medium includes: U disk, mobile hard disk, read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disk and other various media that can store program codes.
- the embodiment of the present application provides an encoder and a decoder.
- the encoder and decoder can set whether to use only the bypass mode encoding and decoding, and whether to use the context mode encoding and decoding by setting the high throughput mode. and whether to perform alignment processing are combined, so as to further use at least one of the context mode, the bypass mode, and the alignment processing to determine the coefficients of the current block.
- Improve coefficient coding throughput and codec speed, reduce complexity, and adaptive high-throughput rate mode can adaptively judge whether the current part uses high-throughput rate mode according to the situation of the coded video, and can achieve high enough bit rate When the bit rate is not high enough, the throughput rate can be significantly improved without significant loss of compression performance. When the code rate is not high enough, the compression performance will not be significantly lost, and it has higher adaptability, thereby improving the compression performance.
- Embodiments of the present application provide a computer-readable storage medium and a computer-readable storage medium on which a program is stored, and when the program is executed by a processor, the methods described in the above-mentioned embodiments are implemented.
- the program instructions corresponding to a decoding method in this embodiment can be stored on a storage medium such as an optical disc, a hard disk, or a USB flash drive.
- a storage medium such as an optical disc, a hard disk, or a USB flash drive.
- At least one of a context mode, a bypass mode, and an alignment process is used to determine coefficients of the current block.
- At least one of a context mode, a bypass mode, and an alignment process is used to determine coefficients of the current block.
- the program instructions corresponding to an encoding method in this embodiment can be stored on a storage medium such as an optical disk, a hard disk, or a USB flash drive.
- a storage medium such as an optical disk, a hard disk, or a USB flash drive.
- the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) having computer-usable program code embodied therein.
- a computer-usable storage media including but not limited to disk storage and optical storage, etc.
- These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
- the device realizes the function specified in implementing one or more procedures of the flowchart and/or one or more blocks of the block diagram.
- the embodiment of the present application provides a codec method, an encoder, a decoder, and a storage medium.
- the decoder decodes the code stream and determines the high-throughput mode identification information of the current block; based on the high-throughput mode identification information, the context mode, At least one of the bypass mode and the alignment process determines the coefficients of the current block.
- the decoder determines the decoded information, and determines the high throughput mode identification information of the current block according to the decoded information; based on the high throughput mode identification information, uses at least one of context mode, bypass mode and alignment processing to determine the coefficients of the current block.
- the encoder determines the high-throughput mode identification information of the current block; based on the high-throughput mode identification information, encodes the coefficients of the current block by using at least one of context mode, bypass mode and alignment processing to generate a code stream.
- the encoder determines the decoded information, and determines the high-throughput mode identification information of the current block according to the decoded information; based on the high-throughput mode identification information, encodes the coefficients of the current block using at least one of context mode, bypass mode, and alignment processing, Generate code stream.
- the codec when the codec is encoding and decoding coefficients, it can set whether to use only the bypass mode codec, whether to use the context mode codec, and whether to Alignment processing is performed in combination, so as to further use at least one of context mode, bypass mode, and alignment processing to determine the coefficients of the current block.
- Improve coefficient coding throughput and codec speed, reduce complexity, and adaptive high-throughput rate mode can adaptively judge whether the current part uses high-throughput rate mode according to the situation of the coded video, and can achieve high enough bit rate When the bit rate is not high enough, the throughput rate can be significantly improved without significant loss of compression performance. When the code rate is not high enough, the compression performance will not be significantly lost, and it has higher adaptability, thereby improving the compression performance.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
Description
Claims (81)
- 一种解码方法,应用于解码器,所述方法包括:解码码流,确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
- 根据权利要求1所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;若所述高吞吐率模式标识信息的取值为第二值,则跳过所述对齐处理确定所述当前块的系数。
- 根据权利要求2所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述上下文模式确定最后一个非零系数位置之后进行对齐处理。
- 根据权利要求2所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述上下文模式确定最后一个非零系数的水平坐标前缀标识信息和垂直坐标前缀标识信息之后、使用所述旁路模式确定所述最后一个非零系数的水平坐标后缀标识信息和垂直坐标后缀标识信息之前进行对齐处理。
- 根据权利要求2所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述旁路模式确定第一个语法元素之前进行对齐处理。
- 根据权利要求1所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的系数;若所述高吞吐率模式标识信息的取值为第二值,则使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
- 根据权利要求6所述的方法,其中,所述方法还包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的全部编码标识信息。
- 根据权利要求1所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:根据所述高吞吐率模式标识信息确定数量参数的初始值;若所述数量参数的初始值的取值大于或者等于数量阈值,则使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数;若所述数量参数的初始值的取值小于数量阈值,则使用所述旁路模式确定所述当前块的系数。
- 根据权利要求8所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:若所述高吞吐率模式标识信息的取值为第一值,则将所述数量参数的初始值的取值确定为第一数量值;其中,所述第一数量值为大于或等于0且小于所述数量阈值的整数;若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数确定所述数量参数的初始值。
- 根据权利要求8所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:若所述高吞吐率模式标识信息的取值为第一值,则将所述数量参数的初始值的取值确定为第二数量值;若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数确定所述数量参数的初始值。
- 根据权利要求8所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:若所述高吞吐率模式标识信息的取值为第一值,则根据所述当前块的高度参数和宽度参数以及第一移位参数确定所述数量参数的初始值;若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数以及第二移位参数确定所述数量参数的初始值。
- 根据权利要求11所述的方法,其中,所述第一移位参数和所述第二移位参数用于右移处理,所述第一移位参数大于所述第二移位参数。
- 根据权利要求8所述的方法,其中,所述数量阈值为4。
- 根据权利要求1所述的方法,其中,所述方法还包括:解码所述码流,确定视频标识信息;若所述视频标识信息指示视频满足第一预设条件,则确定所述当前块的所述高吞吐率模式标识信息。
- 根据权利要求14所述的方法,其中,所述第一预设条件包括下述条件之一:位宽大于位宽阈值;码率大于码率阈值;帧率大于帧率阈值;量化参数QP小于质量阈值;无损压缩。
- 根据权利要求1所述的方法,其中,所述高吞吐率模式标识信息至少为下述其中一项的标识信息:序列(sequence)级、图像(picture)级、片(slice)级、图块(Tile)级、块(block)级、编码树单元(CTU)级。
- 根据权利要求1所述的方法,其中,所述高吞吐率模式标识信息包括序列级标识信息和片级标识信息;所述方法还包括:若所述序列级标识信息的取值为第一值,则确定所述片级标识信息的取值;若所述片级标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;和/或使用所述旁路模式确定所述当前块的系数;和/或使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
- 根据权利要求2、6、7、9-11、17任一项所述的方法,其中,所述第一值为1,所述第二值为0;或者,所述第一值设置为true,所述第二值设置为false。
- 一种解码方法,应用于解码器,所述方法包括:确定已解码信息,根据所述已解码信息确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
- 根据权利要求19所述的方法,其中,所述根据所述已解码信息确定当前块的高吞吐率模式标识信息,包括:若所述已解码信息满足第二预设条件,则确定所述高吞吐率模式标识信息的取值为第一值;若所述已解码信息不满足第二预设条件,则确定所述高吞吐率模式标识信息的取值为第二值。
- 根据权利要求20所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;若所述高吞吐率模式标识信息的取值为第二值,则跳过所述对齐处理确定所述当前块的系数。
- 根据权利要求21所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述上下文模式确定最后一个非零系数位置之后进行对齐处理。
- 根据权利要求21所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述上下文模式确定最后一个非零系数的水平坐标前缀标识信息和垂直坐标前缀标识信息之后、使用所述旁路模式确定所述最后一个非零系数的水平坐标后缀标识信息和垂直坐标后缀标识信息之前进行对齐处理。
- 根据权利要求21所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述旁路模式确定第一个语法元素之前进行对齐处理。
- 根据权利要求20所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的系数;若所述高吞吐率模式标识信息的取值为第二值,则使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
- 根据权利要求25所述的方法,其中,所述方法还包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的全部编码标识信息。
- 根据权利要求20所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:根据所述高吞吐率模式标识信息确定数量参数的初始值;若所述数量参数的初始值的取值大于或者等于数量阈值,则使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数;若所述数量参数的初始值的取值小于数量阈值,则使用所述旁路模式确定所述当前块的系数。
- 根据权利要求19-27任一项所述的方法,其中,所述已解码信息至少为下述其中一项的解码信息:前n个已解码slice,前n个已解码最大编码单元LCU,前n个已解码编码树单元CTU,前n个已解码编码单元CU,前n个已解码变换单元TU,前n个已解码变换块TB;其中,所述n为大于0的整数。
- 根据权利要求19-27任一项所述的方法,其中,所述已解码信息至少为下述其中一种信息:码率、系数、残差、比特数。
- 根据权利要求29所述的方法,其中,所述第二预设条件包括下述条件之一:码率大于等于第一阈值,系数的绝对值的累加值大于等于第二阈值,系数的绝对值的平均值大于等于第三阈值,残差的绝对值的累加值大于等于第四阈值,残差的绝对值的平均值大于等于第五阈值,比特数大于等于第六阈值。
- 根据权利要求19所述的方法,其中,所述高吞吐率模式标识信息至少为下述其中一项的标识信息:序列(sequence)级、图像(picture)级、片(slice)级、图块(Tile)级、块(block)级、编码树单元(CTU)级。
- 根据权利要求20所述的方法,其中,所述高吞吐率模式标识信息包括序列级标识信息和片级标识信息;所述方法还包括:若所述序列级标识信息的取值为第一值,则确定所述片级标识信息的取值;若所述片级标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;和/或使用所述旁路模式确定所述当前块的系数;和/或使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
- 根据权利要求20、21、25、26、32任一项所述的方法,其中,所述第一值为1,所述第二值为0;或者,所述第一值设置为true,所述第二值设置为false。
- 根据权利要求20所述的方法,其中,所述已编码信息为莱斯参数,所述确定已编码信息,包括:确定第一变量的取值;根据所述第一变量的取值确定所述已编码信息。
- 根据权利要求34所述的方法,其中,所述根据所述第一变量的取值确定所述已编码信息,包括:若所述第一变量的取值大于等于第七阈值,则确定所述莱斯参数满足所述第二预设条件;若所述第一变量的取值小于所述第七阈值,则确定所述莱斯参数不满足所述第二预设条件。
- 根据权利要求20所述的方法,其中,所述已编码信息为莱斯参数,所述确定已编码信息,包括:确定第二变量的取值;根据所述第二变量的取值确定所述已编码信息。
- 根据权利要求36所述的方法,其中,所述根据所述第一变量的取值确定所述已编码信息,包括:若所述第二变量的取值大于等于第八阈值,则确定所述莱斯参数满足所述第二预设条件;若所述第二变量的取值小于所述第八阈值,则确定所述莱斯参数不满足所述第二预设条件。
- 一种编码方法,应用于编码器,所述方法包括:确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
- 根据权利要求38所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述对齐处理编码所述当前块的系数,生成所述码流;若所述高吞吐率模式标识信息的取值为第二值,则跳过所述对齐处理编码所述当前块的系数,生成所述码流。
- 根据权利要求39所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述上下文模式确定最后一个非零系数位置之后进行对齐处理。
- 根据权利要求39所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述上下文模式确定最后一个非零系数的水平坐标前缀标识信息和垂直坐标前缀标识信息之后、使用所述旁路模式确定所述最后一个非零系数的水平坐标后缀标识信息和垂直坐标后缀标识信息之前进行对齐处理。
- 根据权利要求39所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述旁路模式确定第一个语法元素之前进行对齐处理。
- 根据权利要求38所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式编码所述当前块的系数,生成所述码流;若所述高吞吐率模式标识信息的取值为第二值,则使用所述上下文模式和所述旁路模式至少之一编码所述当前块的系数,生成所述码流。
- 根据权利要求43所述的方法,其中,所述方法还包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的全部编码标识信息。
- 根据权利要求38所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:根据所述高吞吐率模式标识信息确定数量参数的初始值;若所述数量参数的初始值的取值大于或者等于数量阈值,则使用所述上下文模式和所述旁路模式至少之一编码所述当前块的系数,生成所述码流;若所述数量参数的初始值的取值小于数量阈值,则使用所述旁路模式编码所述当前块的系数,生成所述码流。
- 根据权利要求45所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:若所述高吞吐率模式标识信息的取值为第一值,则将所述数量参数的初始值的取值确定为第一数量值;其中,所述第一数量值为大于或等于0且小于所述数量阈值的整数;若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数确定所述数量参数的初始值。
- 根据权利要求45所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:若所述高吞吐率模式标识信息的取值为第一值,则将所述数量参数的初始值的取值确定为第二数量值;若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数确定所述数量参数的初始值。
- 根据权利要求45所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:若所述高吞吐率模式标识信息的取值为第一值,则根据所述当前块的高度参数和宽度参数以及第一移位参数确定所述数量参数的初始值;若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数以及第二移位参数确定所述数量参数的初始值。
- 根据权利要求48所述的方法,其中,所述第一移位参数和所述第二移位参数用于右移处理,所述第一移位参数大于所述第二移位参数。
- 根据权利要求45所述的方法,其中,所述数量阈值为4。
- 根据权利要求38所述的方法,其中,所述方法还包括:确定视频标识信息;若所述视频标识信息指示视频满足第一预设条件,则确定所述当前块的所述高吞吐率模式标识信息。
- 根据权利要求51所述的方法,其中,所述第一预设条件包括下述条件之一:高位宽、高质量、高码率、高帧率以及无损压缩。
- 根据权利要求38所述的方法,其中,所述高吞吐率模式标识信息至少为下述其中一项的标识信息:序列(sequence)级、图像(picture)级、片(slice)级、图块(Tile)级、块(block)级、编码树单元(CTU)级。
- 根据权利要求38所述的方法,其中,所述高吞吐率模式标识信息包括序列级标识信息和片级标识信息;所述方法还包括:若所述序列级标识信息的取值为第一值,则确定所述片级标识信息的取值;若所述片级标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;和/或使用所述旁路模式确定所述当前块的系数;和/或使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
- 根据权利要求39、43、44、46-48、54任一项所述的方法,其中,所述第一值为1,所述第二值为0;或者,所述第一值设置为true,所述第二值设置为false。
- 一种编码方法,应用于编码器,所述方法包括:确定已编码信息,并根据所述已编码信息确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
- 根据权利要求56所述的方法,其中,所述根据所述已编码信息确定当前块的高吞吐率模式标识信息,包括:若所述已编码信息满足第二预设条件,则确定所述高吞吐率模式标识信息的取值为第一值;若所述已编码信息不满足第二预设条件,则确定所述高吞吐率模式标识信息的取值为第二值。
- 根据权利要求57所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述对齐处理编码所述当前块的系数,生成所述码流;若所述高吞吐率模式标识信息的取值为第二值,则跳过所述对齐处理编码所述当前块的系数,生成所述码流。
- 根据权利要求58所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述上下文模式确定最后一个非零系数位置之后进行对齐处理。
- 根据权利要求58所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述上下文模式确定最后一个非零系数的水平坐标前缀标识信息和垂直坐标前缀标识信息之后、使用所述旁路模式确定所述最后一个非零系数的水平坐标后缀标识信息和垂直坐标后缀标识信息之前进行对齐处理。
- 根据权利要求58所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:在使用所述旁路模式确定第一个语法元素之前进行对齐处理。
- 根据权利要求57所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式编码所述当前块的系数,生成所述码流;若所述高吞吐率模式标识信息的取值为第二值,则使用所述上下文模式和所述旁路模式至少之一编码所述当前块的系数,生成所述码流。
- 根据权利要求62所述的方法,其中,所述方法还包括:若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的全部编码标识信息。
- 根据权利要求57所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:根据所述高吞吐率模式标识信息确定数量参数的初始值;若所述数量参数的初始值的取值大于或者等于数量阈值,则使用所述上下文模式和所述旁路模式至少之一编码所述当前块的系数,生成所述码流;若所述数量参数的初始值的取值小于数量阈值,则使用所述旁路模式编码所述当前块的系数,生成所述码流。
- 根据权利要求56-64任一项所述的方法,其中,所述已编码信息至少为下述其中一项的编码信息:前n个已解码slice,前n个已解码最大编码单元LCU,前n个已解码编码树单元CTU,前n个已解码编码单元CU,前n个已解码变换单元TU,前n个已解码变换块TB;其中,所述n为大于0的整数。
- 根据权利要求56-64任一项所述的方法,其中,所述已编码信息至少为下述其中一种信息:码率、系数、残差、比特数。
- 根据权利要求66所述的方法,其中,所述第二预设条件包括下述条件至少之一:码率大于等于第一阈值,系数的绝对值的累加值大于等于第二阈值,系数的绝对值的平均值大于等于第三阈值,残差的绝对值的累加值大于等于第四阈值,残差的绝对值的平均值大于等于第五阈值,比特数大于等于第六阈值。
- 根据权利要求56所述的方法,其中,所述高吞吐率模式标识信息至少为下述其中一项的标识信息:序列(sequence)级、图像(picture)级、片(slice)级、图块(Tile)级、块(block)级、编码树单元(CTU)级。
- 根据权利要求57所述的方法,其中,所述高吞吐率模式标识信息包括序列级标识信息和片级标识信息;所述方法还包括:若所述序列级标识信息的取值为第一值,则确定所述片级标识信息的取值;若所述片级标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;和/或使用所述旁路模式确定所述当前块的系数;和/或使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
- 根据权利要求57、58、62、63、69任一项所述的方法,其中,所述第一值为1,所述第二值为0;或者,所述第一值设置为true,所述第二值设置为false。
- 根据权利要求57所述的方法,其中,所述已编码信息为莱斯参数,所述确定已编码信息,包括:确定第一变量的取值;根据所述第一变量的取值确定所述已编码信息。
- 根据权利要求71所述的方法,其中,所述根据所述第一变量的取值确定所述已编码信息,包括:若所述第一变量的取值大于等于第七阈值,则确定所述莱斯参数满足所述第二预设条件;若所述第一变量的取值小于所述第七阈值,则确定所述莱斯参数不满足所述第二预设条件。
- 根据权利要求57所述的方法,其中,所述已编码信息为莱斯参数,所述确定已编码信息,包括:确定第二变量的取值;根据所述第二变量的取值确定所述已编码信息。
- 根据权利要求73所述的方法,其中,所述根据所述第一变量的取值确定所述已编码信息,包括:若所述第二变量的取值大于等于第八阈值,则确定所述莱斯参数满足所述第二预设条件;若所述第二变量的取值小于所述第八阈值,则确定所述莱斯参数不满足所述第二预设条件。
- 一种解码器,所述解码器包括:解码部分,第一确定部分,所述解码部分,配置为解码码流;所述第一确定部分,配置为确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
- 一种解码器,所述解码器包括:第一确定部分,所述第一确定部分,配置为确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
- 一种解码器,所述编码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器,当所述指令被执行时,所述第一处理器执行时实现如权利要求1-18或19-37任一项所述的方法。
- 一种编码器,所述编码器包括:第二确定部分,编码部分,所述第一确定部分,配置为确定当前块的高吞吐率模式标识信息;所述编码部分,配置为基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
- 一种编码器,所述编码器包括:第二确定部分,编码部分,所述第一确定部分,配置为确定已编码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;所述编码部分,配置为基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
- 一种编码器,所述解码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器,当所述指令被执行时,所述第二处理器执行时实现如权利要求38-55或56-74任一项所述的方法。
- 一种计算机存储介质,其中,所述计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现如权利要求1-18或19-37任一项所述的方法,或者,被第二处理器执行时实现如权利要求38-55或56-74任一项所述的方法。
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202180099791.6A CN117561710A (zh) | 2021-06-29 | 2021-06-29 | 编解码方法、编码器、解码器以及存储介质 |
| PCT/CN2021/103306 WO2023272533A1 (zh) | 2021-06-29 | 2021-06-29 | 编解码方法、编码器、解码器以及存储介质 |
| EP21947488.9A EP4366303A4 (en) | 2021-06-29 | 2021-06-29 | ENCODING AND DECODING METHODS, ENCODER, DECODER AND STORAGE MEDIUM |
| US18/397,430 US20240129512A1 (en) | 2021-06-29 | 2023-12-27 | Encoding and decoding method, encoder, decoder, and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2021/103306 WO2023272533A1 (zh) | 2021-06-29 | 2021-06-29 | 编解码方法、编码器、解码器以及存储介质 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/397,430 Continuation US20240129512A1 (en) | 2021-06-29 | 2023-12-27 | Encoding and decoding method, encoder, decoder, and storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023272533A1 true WO2023272533A1 (zh) | 2023-01-05 |
Family
ID=84690174
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/103306 Ceased WO2023272533A1 (zh) | 2021-06-29 | 2021-06-29 | 编解码方法、编码器、解码器以及存储介质 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US20240129512A1 (zh) |
| EP (1) | EP4366303A4 (zh) |
| CN (1) | CN117561710A (zh) |
| WO (1) | WO2023272533A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20240137567A1 (en) * | 2021-07-07 | 2024-04-25 | Innopeak Technology, Inc. | Method and system for decoding/encoding video including sequence pictures |
| WO2024207235A1 (zh) * | 2023-04-04 | 2024-10-10 | Oppo广东移动通信有限公司 | 编解码方法、码流、编码器、解码器以及存储介质 |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130223521A1 (en) * | 2012-01-19 | 2013-08-29 | Sharp Laboratories Of America, Inc. | High throughput residual coding for a transform skipped block for cabac in hevc |
| CN105993173A (zh) * | 2013-07-15 | 2016-10-05 | 华为技术有限公司 | Hevc中cabac的变换跳过块的改进编码 |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| GB2513110A (en) * | 2013-04-08 | 2014-10-22 | Sony Corp | Data encoding and decoding |
-
2021
- 2021-06-29 EP EP21947488.9A patent/EP4366303A4/en active Pending
- 2021-06-29 WO PCT/CN2021/103306 patent/WO2023272533A1/zh not_active Ceased
- 2021-06-29 CN CN202180099791.6A patent/CN117561710A/zh active Pending
-
2023
- 2023-12-27 US US18/397,430 patent/US20240129512A1/en active Pending
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20130223521A1 (en) * | 2012-01-19 | 2013-08-29 | Sharp Laboratories Of America, Inc. | High throughput residual coding for a transform skipped block for cabac in hevc |
| CN105993173A (zh) * | 2013-07-15 | 2016-10-05 | 华为技术有限公司 | Hevc中cabac的变换跳过块的改进编码 |
Non-Patent Citations (2)
| Title |
|---|
| F. WANG (OPPO), Z. XIE (OPPO), Y. YU (OPPO), H. YU (OPPO), D. WANG (OPPO): "AHG8: a combination of JVET-V0059 option 2 and JVET-V0122 for high bit depth and high bit rate extensions", 22. JVET MEETING; 20210420 - 20210428; TELECONFERENCE; (THE JOINT VIDEO EXPLORATION TEAM OF ISO/IEC JTC1/SC29/WG11 AND ITU-T SG.16 ), no. JVET-V0178 ; m56945, 27 April 2021 (2021-04-27), XP030294422 * |
| See also references of EP4366303A4 * |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20240137567A1 (en) * | 2021-07-07 | 2024-04-25 | Innopeak Technology, Inc. | Method and system for decoding/encoding video including sequence pictures |
| US12167042B2 (en) * | 2021-07-07 | 2024-12-10 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method and system for decoding/encoding video including sequence pictures |
| US20250056052A1 (en) * | 2021-07-07 | 2025-02-13 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method and system for decoding/encoding video including sequence pictures |
| US20250056053A1 (en) * | 2021-07-07 | 2025-02-13 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Method and system for decoding/encoding video including sequence pictures |
| WO2024207235A1 (zh) * | 2023-04-04 | 2024-10-10 | Oppo广东移动通信有限公司 | 编解码方法、码流、编码器、解码器以及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| EP4366303A1 (en) | 2024-05-08 |
| CN117561710A (zh) | 2024-02-13 |
| EP4366303A4 (en) | 2025-04-23 |
| US20240129512A1 (en) | 2024-04-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI750624B (zh) | 編解碼變換係數的方法及裝置 | |
| JP7821919B2 (ja) | 係数符号化・復号化方法、符号器、復号器及びコンピュータ記憶媒体 | |
| WO2023272533A1 (zh) | 编解码方法、编码器、解码器以及存储介质 | |
| WO2022193394A1 (zh) | 系数的编解码方法、编码器、解码器及计算机存储介质 | |
| TWI881800B (zh) | 圖像解碼方法及裝置、圖像編碼方法及裝置、圖像解碼系統、電子設備以及存儲介質 | |
| WO2024022359A1 (zh) | 一种图像编解码方法及装置 | |
| WO2022217417A1 (zh) | 编解码方法、编码器、解码器以及存储介质 | |
| WO2022188239A1 (zh) | 系数的编解码方法、编码器、解码器及计算机存储介质 | |
| RU2853099C1 (ru) | Способ кодирования и декодирования, кодер и декодер | |
| RU2853100C1 (ru) | Способ кодирования и декодирования, кодер и декодер | |
| RU2853107C1 (ru) | Способ кодирования и декодирования, кодер и декодер | |
| RU2845936C1 (ru) | Способ кодирования и декодирования, кодер и декодер | |
| RU2856417C1 (ru) | Способ кодирования коэффициентов, кодер и декодер | |
| RU2850055C1 (ru) | Способ кодирования коэффициентов, кодер и декодер | |
| RU2836841C2 (ru) | Способ кодирования и декодирования, кодер и декодер | |
| CN118509601B (zh) | 编解码方法、码流、编码器、解码器及计算机存储介质 | |
| RU2831992C2 (ru) | Способ кодирования коэффициентов, кодер, декодер и компьютерный носитель данных | |
| HK40093826B (zh) | 一种图像编解码方法及装置 | |
| HK40093826A (zh) | 一种图像编解码方法及装置 | |
| WO2022193389A1 (zh) | 视频编解码方法与系统、及视频编解码器 | |
| JP2022548685A (ja) | 画像データの符号化及び復号化 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21947488 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202180099791.6 Country of ref document: CN |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2021947488 Country of ref document: EP |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2021947488 Country of ref document: EP Effective date: 20240129 |































