WO2023272533A1 - 编解码方法、编码器、解码器以及存储介质 - Google Patents

编解码方法、编码器、解码器以及存储介质 Download PDF

Info

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
Application number
PCT/CN2021/103306
Other languages
English (en)
French (fr)
Inventor
王凡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202180099791.6A priority Critical patent/CN117561710A/zh
Priority to PCT/CN2021/103306 priority patent/WO2023272533A1/zh
Priority to EP21947488.9A priority patent/EP4366303A4/en
Publication of WO2023272533A1 publication Critical patent/WO2023272533A1/zh
Priority to US18/397,430 priority patent/US20240129512A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods 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/17Methods 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/176Methods 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods 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/91Entropy 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

编解码方法、编码器、解码器以及存储介质 技术领域
本申请实施例涉及图像处理技术领域,尤其涉及一种编解码方法、编码器、解码器以及存储介质。
背景技术
随着人们对视频显示质量要求的提高,计算机视觉相关领域得到了越来越多的关注。近年来,图像处理技术在各行各业都取得了成功地应用。对于视频图像的编解码过程而言,在编码端,针对待编码的图像数据,在经过变换和量化处理之后将通过熵编码单元进行压缩编码,而熵编码处理后所生成的码流将传输到解码端;然后解析码流,再经过反量化和反变换处理之后,可以恢复出原始输入的图像数据。
目前,高位宽、高质量、高码率(简称为“三高视频”)的视频编解码相较于较低位宽、低质量、低码率(可称为“常规视频”)的视频编解码,通常需要编解码的系数更多,而且系数更大。这样,对于三高视频来说,已有的相关方案可能会带来更大的开销,产生浪费,甚至影响编解码的速度和吞吐量。
发明内容
本申请实施例提供一种编解码方法、编码器、解码器以及存储介质,能够提高系数编码的吞吐量和编解码速度,降低复杂度,实现简单高效的编解码方法,从而提升压缩性能。
本申请实施例的技术方案可以如下实现:
第一方面,本申请实施例提供了一种解码方法,应用于解码器,所述方法包括:
解码码流,确定当前块的高吞吐率模式标识信息;
基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
第二方面,本申请实施例提供了一种解码方法,应用于解码器,所述方法包括:
确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;
基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
第三方面,本申请实施例提供了一种编码方法,应用于编码器,所述方法包括:
确定当前块的高吞吐率模式标识信息;
基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
第四方面,本申请实施例提供了一种编码方法,应用于编码器,所述方法包括:
确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;
基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
第五方面,本申请实施例提供了一种解码器,所述解码器包括:解码部分,第一确定部分,
所述解码部分,配置为解码码流;
所述第一确定部分,配置为确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
第六方面,本申请实施例提供了一种解码器,所述解码器包括:第一确定部分,
所述第一确定部分,配置为确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
第七方面,本申请实施例提供了一种编码器,所述编码器包括:第二确定部分,编码部分,
所述第一确定部分,配置为确定当前块的高吞吐率模式标识信息;
所述编码部分,配置为基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
第八方面,本申请实施例提供了一种编码器,所述编码器包括:第二确定部分,编码部分,
所述第一确定部分,配置为确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;
所述编码部分,配置为基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
第九方面,本申请实施例提供了一种解码器,所述编码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器,当所述指令被执行时,所述第一处理器执行时实现如上所述的编码方法。
第十方面,本申请实施例提供了一种编码器,所述解码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器,当所述指令被执行时,所述第二处理器执行时实现如上所述的解码方法。
第十一方面,本申请实施例提供了一种计算机存储介质,所述计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现如上所述的编码方法,或者,被第二处理器执行时实现如上所述的编码方法。
本申请实施例提供了一种编解码方法、编码器、解码器以及存储介质,解码器解码码流,确定当前块的高吞吐率模式标识信息;基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。解码器确定已解码信息,并根据已解码信息确定当前块的高吞吐率模式标识信息;基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。编码器确定当前块的高吞吐率模式标识信息;基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码当前块的系数,生成码流。编码器确定已解码信息,并根据已解码信息确定当前块的高吞吐率模式标识信息;基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码当前块的系数,生成码流。也就是说,在本申请的实施例中,编解码器在进行系数的编解码时,可以通过高吞吐率模式的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定所述 当前块的系数。提高系数编码的吞吐量和编解码速度,降低复杂度,且自适应高吞吐率模式可以根据已编解码的视频的情况自适应地判断当前部分是否使用高吞吐率模式,能够在码率足够高的时候能明显提高吞吐率而且不明显损失压缩性能,在码率不够高的时候也不会明显损失压缩性能,具有更高的适应性,从而提升压缩性能。
附图说明
图1为相关技术提供的一种编码框架的应用示意图;
图2为相关技术提供的一种当前系数与相邻系数的位置关系示意图;
图3为相关技术提供的一种bin的算数解码过程的流程示意图;
图4为相关技术提供的一种二元符号的算数解码过程的流程示意图;
图5为相关技术提供的一种算数解码引擎的重归一化的流程示意图;
图6为相关技术提供的一种旁路解码过程的流程示意图;
图7为可能有非零系数区域与强制为0区域的位置关系示意图;
图8为本申请实施例提供的一种编码器的系统组成示意图;
图9为本申请实施例提供的一种解码器的系统组成示意图;
图10为解码方法的实现流程示意图一;
图11为RRC中对齐处理的示意图一;
图12为RRC中对齐处理的示意图二;
图13为TSRC中对齐处理的示意图;
图14为解码方法的实现流程示意图二;
图15为编码方法的实现流程示意图一;
图16为编码方法的实现流程示意图二;
图17为本申请实施例提出的解码器的组成结构示意图一;
图18为本申请实施例提出的解码器的组成结构示意图二;
图19为本申请实施例提出的编码器的组成结构示意图一;
图20为本申请实施例提出的编码器的组成结构示意图二。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅仅用于解释相关申请,而非对该申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关申请相关的部分。
在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。还需要指出,本申请实施例所涉及的术语“第一\第二\第三”仅是用于区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一\第二\第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本申请实施例能够以除了在这里图示或描述的以外的顺序实施。
目前,通用的视频编解码标准基于都采用基于块的混合编码框架。视频图像中的每一帧被分割成相同大小(比如128×128,64×64等)的正方形的最大编码单元(LargestCodingUnit,LCU)或编码树单元(codingtree unit,CTU),每个最大编码单元或编码树单元还可以根据规则划分成矩形的编码单元(CodingUnit,CU);而且编码单元可能还会划分成更小的预测单元(Prediction Unit,PU)、变换单元(Transform Unit,TU)等。
具体地,图1为相关技术提供的一种编码框架的应用示意图,如图1所示,混合编码框架可以包括有预测(Prediction)、变换(Transform)、量化(Quantization)、熵编码(Entropycoding)、环路滤波(Inloop Filter)等模块。其中,预测模块可以包括帧内预测(Intra Prediction)和帧间预测(Inter Prediction),帧间预测可以包括运动估计(Motion Estimation)和运动补偿(Motioncompensation)。由于视频图像的一个帧内相邻像素之间存在很强的相关性,在视频编解码技术中使用帧内预测方式能够消除相邻像素之间的空间冗余;但是由于视频图像中的相邻帧之间也存在着很强的相似性,在视频编解码技术中使用帧间预测方式消除相邻帧之间的时间冗余,从而能够提高编解码效率。
视频编解码器的基本流程如下:在编码端,将一帧图像划分成块,对当前块使用帧内预测或帧间预测产生当前块的预测块,当前块的原始块减去预测块得到残差块,对残差块进行变换、量化得到量化系数矩阵,对量化系数矩阵进行熵编码输出到码流中。在解码端,对当前块使用帧内预测或帧间预测产生当前块的预测块,另一方面解码码流得到量化系数矩阵,对量化系数矩阵进行反量化、反变换得到残差块,将预测块和残差块相加得到重建块。重建块组成重建图像,基于图像或基于块对重建图像进行环路滤波得到解码图像。编码端同样需要和解码端类似的操作获得解码图像。解码图像可以为后续的帧作为帧间预测的参考帧。编码端确定的块划分信息,预测、变换、量化、熵编码、环路滤波等模式信息或者参数信息如果有必要需要在输出到码流中。解码端通过解析及根据已有信息进行分析确定与编码端相同的块划分信息,预测、变换、量化、熵编码、环路滤波等模式信息或者参数信息,从而保证编码端获得的解码图像和解码端获得的解码图像相同。编码端获得的解码图像通常也叫做重建图像。在预测时可以将当前块划分成预测单元,在变换时可以将当前块划分成变换单元,预测单元和变换单元的划分可以不同。上述是基于块的混合编码框架下的视频编解码器的基本流程,随着技术的发展,该框架或流程的一些模块或步骤可能会被优化,本申请实施例适用于该基于块的混合编码框架下的视频编解码器的基本流程,但不限于该框架及流程。
当前块(current block)可以是当前编码单元(CU)、当前预测单元(PU)、或者当前变换单元(TU)等。
块划分信息,预测、变换、量化的各种模式及参数信息,系数等通过熵编码写入码流中。假设不同元素的概率是不同的,为出现概率较大的元素分配较短的码字,为出现概率较小的元素分配较长的码字,能获得比定长编码更高的编码效率。但是如果不同元素的概率相近或基本相同,熵编码的压缩空间就有限。
基于上下文的自适应二进制算术编码(context-based adaptivebinary arithmeticcoding,CABAC)是常用熵编码方法。视频压缩标准(High Efficiency Videocoding,HEVC)和多功能视频编码(VersatileVideocoding,VVC)等都使用CABAC进行熵编码。CABAC使用上下文模型可以提升压缩效率,但是上下文模式的使用及更新也使得操作更加复杂。CABAC中有一种旁路(bypass)模式,在旁路模式下不需要使用和更新上下文模型,可以达到更高的吞吐量(throughput)。在本申请中,可以把CABAC中需要使用和更新上下文模型的模式叫做上下文模式。
一般情况下,需要先根据定义的方法确定上下文模型,在调用定义的二元符号的算数解码过程时,上下文模型的参数可以作为输入。上下文模型的选择在相邻系数之间还存在依赖关系。例如,图2为相关技术提供的一种当前系数与相邻系数的位置关系示意图。在图2中,黑色填充的块表示当前系数,网格线填充的块表示相邻系数;如图2所示,当前系数的sig_coeff_flag的选择哪个上下文模型需要根据其右边和下边和右下边相邻的5个系数的信息来确定。根据图2进一步可以看出,上下文模式的操作较旁路模式的操作复杂得多,而且还有相邻系数之间的依赖性。
对于CABAC的算数编码引擎,如果需要使用上下文模式,需要调用定义的二元符号的算数解码过程,其中包括状态转移过程也就是上下文模型的更新。而在二元符号的算数解码过程中会调用算数解码引擎的重归一化过程。而在使用旁路模式时需要调用旁路解码过程。
下面以VVC中使用CABAC为例进行介绍:
对于CABAC的算数编码引擎,算数解码过程的输入是ctxTable,ctxIdx,bypassFlag以及算数解码引擎的状态变量ivlCurrRange和ivlOffset,算数解码过程的输出是bin的值。
其中,ctxTable是选择上下文模式时使用的表格,ctxIdx是上下文模型索引。
图3为相关技术提供的一种bin的算数解码过程的流程示意图,如图3所示,为了解码bin的值,上下文索引表ctxTable,ctxIdx,bypassFlag作为输入被传输到算数解码过程DecodeBin(ctxTable,ctxIdx,bypassFlag),具体如下:
如果bypassFlag的值为1,则调用旁路解码过程DecodeBypass();
否则,如果bypassFlag的值为0,ctxTable的值为0,且ctxIdx的值为0,则调用DecodeTerminate()
否则(bypassFlag的值为0且ctxTable的值不为0),调用定义的二元符号的算数解码过程DecodeDecision(ctxTable,ctxIdx)
进一步地,二元符号的算数解码过程输入是变量ctxTable,ctxIdx,ivlCurrRange,和ivlOffset,该过程的输出是解码的值binVal,更新后的变量ivlCurrRange和ivlOffset
图4为相关技术提供的一种二元符号的算数解码过程的流程示意图,如图4所示,其中,pStateIdx0和pStateIdx1是当前上下文模型的两个状态。
1、变量ivlLpsRange的值按如下方法导出:
给定ivlCurrRange的当前值,变量qRangeIdx按如下方法导出:
qRangeIdx=ivlCurrRange>>5
给定qRangeIdx,ctxTable和ctxIdx对应的pStateIdx0和pStateIdx1,valMps和ivlLpsRange按如下方法导出:
pState=pStateIdx1+16×pStateIdx0
valMps=pState>>14
ivlLpsRange=(qRangeIdx×((valMps?32767–pState:pState)>>9)>>1)+4。
2、变量ivlCurrRange的值设为ivlCurrRange–ivlLpsRange,并执行如下操作:
如果ivlOffset大于或等于ivlCurrRange,那么变量binVal的值为1–valMps,ivlOffset等于ivlOffset减去ivlCurrRange,ivlCurrRange的值为ivlLpsRange
否则(ivlOffset小于ivlCurrRange),变量binVal的值为valMps
给定binVal的值,执行定义的状态转移(statetransition)。基于ivlCurrRange的当前值,可以执行定义的重归一化(renormalization)。
进一步地,状态转移过程的输入是当前的pStateIdx0和pStateIdx1,以及解出的值binVal,这个过程的输出是更新的ctxTable和ctxIdx对应的上下文变量pStateIdx0和pStateIdx1。其中,变量shift0和shift1由shiftIdx导出,这里定义了shiftIdx与ctxTable和ctxIdx的对应关系,如下:
shift0=(shiftIdx>>2)+2
shift1=(shiftIdx&3)+3+shift0。
基于解出的值binVal,与ctxTable和ctxIdx对应的两个变量pStateIdx0和pStateIdx1的更新如下
pStateIdx0=pStateIdx0-(pStateIdx0>>shift0)+(1023×binVal>>shift0)
pStateIdx1=pStateIdx1-(pStateIdx1>>shift1)+(16383×binVal>>shift1)。
进一步地,算数解码引擎的重归一化过程的输入是片数据中的bits和变量ivlCurrRange和ivlOffset,这个过程的输出是更新的变量ivlCurrRange和ivlOffset。
图5为相关技术提供的一种算数解码引擎的重归一化的流程示意图,如图5所示,ivlCurrRange的当前值首选与256比较,后续步骤如下:
如果ivlCurrRange大于或等于256,那么不需要重归一化,RenormD过程结束
否则(ivlCurrRange小于256),进入重归一化循环。在这个循环中,ivlCurrRange的值乘2,也就是左移一位。ivlOffset的值乘2,也就是左移一位。用read_bits(1)得到的一位移入到ivlOffset中。
整个过程中码流中的数据不应该导致ivlOffset大于或等于ivlCurrRange。
进一步地,二元符号的旁路解码过程的输入是片数据的bits和变量ivlCurrRange和ivlOffset,这个过程的输出是更新的变量ivlOffset和解出的值binVal,当bypassFlag为1时旁路解码过程被调用。
图6为相关技术提供的一种旁路解码过程的流程示意图,如图6所示,首先ivlOffset的值乘2,也就是左移一位。用read_bits(1)得到的一位移入到ivlOffset中。然后ivlOffset的值会和ivlCurrRange的值比较,后续步骤如下:
如果ivlOffset大于或等于ivlCurrRange,那么binVal的值设为1,ivlOffset等于ivlOffsetivl减去CurrRange
否则(ivlOffset小于ivlCurrRange)binVal的值设为0。
整个过程中码流中的数据不应该导致ivlOffset大于或等于ivlCurrRange。
还应理解,在现在的视频编解码标准中,对于残差通常支持一种或多种变换(transform)以及变换跳过(transform skip)。变换有离散余弦变换(Discretecosine Transform,DCT)等,使用变换的残差块在变换(及量化)以后通常体现出一定的特性,如某些变换(及量化)后由于能量大多集中在低频区域而使得左上角的区域系数较大,右下角的区域系数较小甚至出现很多0系数。而变换跳过,顾名思义不做变换,变换跳过后的系数的分布规律与变换后的系数是不同的,因而可以使用不同的系数编码方法。比如在VVC中对变换跳过后的系数使用普通残差编码(regular residualcoding,RRC),对变换跳过的系数使用变换跳过残差编码(transformskip residualcoding,TSRC)。
一般的变换,如DCT变换,这时候变换后的块,从左往右代表的频率由低到高,从上到下代表的频率由低到高。左上角代表低频,右下角代表高频。人眼对低频的信息更敏感,而对高频的信息不是特别敏感。利用这种特性,一些高频的信息被做更多的处理或去掉对视觉影响较小。有些技术,如强制置零(zero-out),可以强制将某些高频信息置0。比如对64x64的块强制将横坐标大于或等于32、或者纵坐标大于或等于32的位置的系数置0。上述只是一个简单的示例,zero-out的范围可能会有更多复杂的导出方法,这里不再赘述。图7为可能有非零系数区域与强制为0区域的位置关系示意图,如图7所示,左上角部分可能存在非零系数(即为可能有非零系数区域),右下角部分将全部置零(即为强制为0区域)。这样,对于后面的系数编码来说,zero-out强制置0的区域的系数由于肯定是0而不需要编码。
进一步地,由于对通常的视频的残差进行变换(及量化)后系数分布显现出左上角系数较大而右下角很多0系数的特性,系数编码时通常会使用一些方法使得左上角一定范围内的系数需要进行编码,而右下角一定范围内的系数不需要编码,也就是默认这些系数为0。一种方法是在编码一个块的系数时,先确定这个块的按扫描顺序的最后一个非零系数的位置。确定出这个位置以后,按扫描顺序最后一个非零系数的位置后面的系数全部认为是0,即不需要编码;只有最后一个非零系数位置及之前的系数需要编码。例如在VVC中,使用last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix来确定最后一个非零系数的位置(LastSignificantCoeffX,LastSignificantCoeffY)。
(a)last_sig_coeff_x_prefix确定当前块中按扫描顺序最后一个非零系数的水平(或列)坐标的前缀(prefix)。last_sig_coeff_x_prefix的值应该在0到(log2ZoTbWidth<<1)-1,包含这两个边界值的范围内。
如果last_sig_coeff_x_prefix不存在,那么last_sig_coeff_x_prefix的值为0。
(b)last_sig_coeff_y_prefix确定当前块中按扫描顺序最后一个非零系数的竖直(或行)坐标的前缀(prefix)。last_sig_coeff_y_prefix的值应该在0到(log2ZoTbHeight<<1)-1,包含这两个边界值的范围内。
如果last_sig_coeff_y_prefix不存在,那么last_sig_coeff_y_prefix的值为0。
(c)last_sig_coeff_x_suffix确定当前块中按扫描顺序最后一个非零系数的水平(或列)坐标的后缀(suffix)。last_sig_coeff_x_suffix的值应该在0到(1<<((last_sig_coeff_x_prefix>>1)-1))–1,包含这两个边界值的范围内。
当前变换块(transform block,TB)中按扫描顺序最后一个非零系数的水平(或列)坐标的值LastSignificantCoeffX按如下方法导出:
如果last_sig_coeff_x_suffix不存在,那么
LastSignificantCoeffX=last_sig_coeff_x_prefix;
否则(last_sig_coeff_x_suffix存在),
LastSignificantCoeffX=(1<<((last_sig_coeff_x_prefix>>1)-1))×(2+(last_sig_coeff_x_prefix&1))+last_sig_coeff_x_suffix。
(d)last_sig_coeff_y_suffix确定当前变换块中按扫描顺序最后一个非零系数的竖直(或行)坐标的后缀(suffix)。last_sig_coeff_x_suffix的值应该在0到(1<<((last_sig_coeff_y_prefix>>1)-1))–1,包含这两个边界值的范围内。
当前变换块中按扫描顺序最后一个非零系数的竖直(或行)坐标的值LastSignificantCoeffY按如下方法导出:
如果last_sig_coeff_y_suffix不存在,那么
LastSignificantCoeffY=last_sig_coeff_y_prefix;
否则(last_sig_coeff_y_suffix存在),
LastSignificantCoeffY=(1<<((last_sig_coeff_y_prefix>>1)-1))×(2+(last_sig_coeff_y_prefix&1))+last_sig_coeff_y_suffix。
进一步地,最后一个非零系数及之前的系数全都要进行编码,但是在普通视频中,即使是这些系数中仍然有一定比例的系数是0,VVC中使用当前子块是否编码的标志sb_coded_flag来确定当前子块中的系数是否需要编码。如果不需要编码则认为当前子块中的系数全为0。这里,子块通常是n×n的子块,如4×4的子块。
sb_coded_flag[xS][yS]确定当前变换块中位置在(xS,yS)的子块的如下信息,其中,子块是变换系数值的数组:
如果sb_coded_flag[xS][yS]的值为0,那么当前变换块中位置在(xS,yS)的子块内的所有变换系数的值为0;
如果sb_coded_flag[xS][yS]不存在,那么sb_coded_flag[xS][yS]的值为1。
进一步地,在处理系数编码时,利用系数的特性可以提升压缩效率。例如,对通常的视频,需要编码的系数中,有一定比例的系数是0,因而可以用一个语法元素来表示当前系数是否是0,这个语法元素通常是一个二元符号。如果当前系数是0,那么意味着对当前系数的编码已经结束;否则,还需要继续编码当前系数。又如,对通常的视频,在非0系数中,有一定比例的系数的绝对值是1,因而可以用一个语法元素来表示当前系数的绝对值是否大于1,这个语法元素通常是一个二元符号。如果当前系数的绝对值不大于1,那么意味着对当前系数的编码已经结束;否则,还需要继续编码当前系数。例如,在VVC中涉及的语法元素如下,
sig_coeff_flag[xC][yC]用来确定当前变换块在变换系数位置(xC,yC)的对应的变换系数是不是非零系数:
如果sig_coeff_flag[xC][yC]的值是0,那么(xC,yC)位置的变换系数的值设为0;
否则(sig_coeff_flag[xC][yC]的值是1),(xC,yC)位置的变换系数是非零系数。
如果sig_coeff_flag[xC][yC]不存在,那么做如下推断:
如果transform_skip_flag[x0][y0][cIdx]的值为0或者sh_ts_residual_coding_disabled_flag的值为1:
如果(xC,yC)是最后按扫描顺序一个非零系数的位置(LastSignificantCoeffX,LastSignificantCoeffY)或如下条件全为真,那么sig_coeff_flag[xC][yC]的值推断为1:
(xC&((1<<log2SbW)-1),yC&((1<<log2SbH)-1))等于(0,0);
inferSbDcSigCoeffFlag的值等于1;
sb_coded_flag[xS][yS]的值1;
否则,sig_coeff_flag[xC][yC]的值推断为0;
否则(transform_skip_flag[x0][y0][cIdx]的值为1且sh_ts_residual_coding_disabled_flag的值为0):
如果如下条件全为真,那么sig_coeff_flag[xC][yC]的值推断为1:
(xC&((1<<log2SbW)-1),yC&((1<<log2SbH)-1))等于((1<<
log2SbW)-1,(1<<log2SbH)-1);
inferSbSigCoeffFlag的值为1;
sb_coded_flag[xS][yS]的值为1;
否则,sig_coeff_flag[xC][yC]的值推断为0。
abs_level_gtx_flag[n][j]用来确定(扫描顺序第n个)变换系数的绝对值是否大于(j<<1)+1。如果abs_level_gtx_flag[n][j]不存在,那么abs_level_gtx_flag[n][j]的值为0。
这样,如果在处理完上述标志(或称为语法元素)后,当前系数还没有编码结束,那么需要编码系数绝对值的剩余值。如VVC中的abs_remainder。
abs_remainder[n]用来确定扫描顺序第n个变换系数的用Golomb-Rice编码的剩余绝对值。如果abs_remainder[n]不存在,那么abs_remainder[n]的值为0。
进一步地,在VVC中,sig_coeff_flag和abs_level_gtx_flag等语法元素使用上下文模式编码,而abs_remainder使用旁路模式编码。上述提到了上下文模式编码较旁路模式编码更复杂,直观理解就是处理起来更慢,如果需要编码的系数很多,使用太多的上下文模式编码会影响解码速度。因而可以对使用上下文模式编码的语法元素的个数进行限制,比如使用上下文模式编码的二元符号的个数超过一个阈值后,后续的系数编码强制使用旁路模式编码。如VVC中的dec_abs_level。
dec_abs_level[n]是扫描位置n处的一个用Golomb-Rice编码的中间值。解析dec_abs_level[n]时可以导出ZeroPos[n],在位置(xC,yC)处的量化系数的绝对值AbsLevel[xC][yC]按如下方法导出:
如果dec_abs_level[n]不存在或dec_abs_level[n]的值等于ZeroPos[n],那么AbsLevel[xC][yC]的值为0;
否则,如果dec_abs_level[n]的值小于ZeroPos[n],那么AbsLevel[xC][yC]的值为dec_abs_level[n]+1;
否则(dec_abs_level[n]的值大于ZeroPos[n]),AbsLevel[xC][yC]的值为dec_abs_level[n]。
上述涉及的都是系数的绝对值,非零系数的正负号可以用系数正负号标志coeff_sign_flag或一些正负号导出的方法来确定。coeff_sign_flag[n]可以按如下方法确定扫描位置n的变换系数的正负号:
如果coeff_sign_flag[n]的值为0,那么对应的变换系数为正值;
否则(coeff_sign_flag[n]的值为1),对应的变换系数为负值。
如果coeff_sign_flag[n]不存在,那么coeff_sign_flag[n]的值为0;这时候根据CoeffSignLevel[xC][yC]确定坐标(xC,yC)上的变换系数的正负号:
如果CoeffSignLevel[xC][yC]的值为0,那么对应的变换系数为0;
否则,如果CoeffSignLevel[xC][yC]的值为1,那么对应的变换系数为正值;否则(CoeffSignLevel[xC][yC]的值为-1),对应的变换系数为负值。
还需要说明的是,CoeffSignLevel[xC][yC]还可以使用其他一些方法导出,这里不再赘述。
另外,在VVC中还使用了一个系数的值的奇偶性标志par_level_flag。根据这个标志可以知道当前系数的值的奇偶性,在确定当前系数的值以及依赖量化(Dependent Quantization)中会使用到。
par_level_flag[n]确定按扫描顺序位置n的变换系数的奇偶性。如果par_level_flag[n]不存在,那么par_level_flag[n]的值为0。
par_level_flag除了确定变换系数的奇偶性还可以用来和abs_level_gtx_flag、abs_remainder等共同确定系数的大小。
在这里,由于上下文模式编码需要选择、使用并更新上下文模式,而旁路模式编码不需要选择、使用并更新上下文模式,通常的做法是在一定范围内把上下文模式编码的语法元素放在一起,旁路模式编码的语法元素放在一起,这样对硬件设计更加友好。比如说先把一个块中的所有的上下文模式编码的语法元素处理完,再处理旁路模式编码的语法元素。当前块中的所有的上下文模式编码的语法元素可能还会分几个组,一个块中的所有的旁路模式编码的语法元素可能还会分几个组。
在一种具体的示例中,RRC的具体语法如下表1所示:
表1
Figure PCTCN2021103306-appb-000001
Figure PCTCN2021103306-appb-000002
Figure PCTCN2021103306-appb-000003
Figure PCTCN2021103306-appb-000004
Figure PCTCN2021103306-appb-000005
其中,数组AbsLevel[xC][yC]代表当前变换块的变换系数的绝对值的数组。数组AbsLevelPass1[xC][yC]代表当前变换块的变换系数的部分重建的绝对值的数组。数组的索引xC和yC表示当前变换块中的(xC,yC)位置。
进入residual_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)函数后,需要确定一些块尺寸的信息,如确定zero-out后的块尺寸的对数log2ZoTbWidth,log2ZoTbHeight,横坐标在[0,(1<<log2ZoTbWidth)–1],纵坐标在[0,(1<<log2ZoTbHeight)–1]范围内的系数可能是非零系数。(1<<log2ZoTbWidth)表示zero-out后的变换块的宽度,(1<<log2ZoTbHeight)表示zero-out后的变换块的高度。然后根据last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix等确定最后一个非零系数的位置。按扫描顺序最后一个非零系数之前的系数可能是非零系数。然后确定remBinsPass1的值,即使用等式remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2确定。remBinsPass1就确定了当前块中使用上下文模式编码的语法元素的个数。在本申请中,可以理解remBinsPass1为remainingbinaries inpass1的意思,也就是第一轮中剩余的二元符号的个数。按扫描顺序最后一个非零系数之前的系数需要编码。对这些系数所在的子块,依次确定当前子块是否需要编码,如果需要编码,可以把一个子块中上下文模式编码的语法元素放在了第一轮中,旁路模式编码的语法元素放在了后面。每个系数最多可能需要处理4个上下文模式编码的语法元素,包括1个sig_coeff_flag,2个abs_level_gtx_flag,1个par_level_flag。在第一轮中,每次处理完一个上下文模式编码的语法元素remBinsPass1就会减1。如果一个系数足够大,在第一轮处理完上下文模式编码的几个语法元素后还需要处理剩余值,即abs_remainder。而如果remBinsPass1已经足够小了(不满足remBinsPass1>=4),第一轮就会结束,剩下的系数就会直接用旁路模式处理,即dec_abs_level。
在另一种具体的示例中,TSRC的具体语法如下表2所示:
表2
Figure PCTCN2021103306-appb-000006
Figure PCTCN2021103306-appb-000007
Figure PCTCN2021103306-appb-000008
进入residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)函数后,需要确定一些块尺寸的信息。然后确定RemCcbs的值,即使用等式RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2确定。RemCcbs就确定了当前块中使用上下文模式编码的语法元素的个数。在本申请中,可以理解RemCcbs为remainingcontextcoded binaries的意思,也就是剩余的上下文模式编码的二元符号的个数。对每一个子块,确定当前子块是否需要编码。如果需要编码,与上述RRC不同,TSRC方法中把一个子块中上下文模式编码的语法元素放在了两轮中,每个系数在第一轮和第二轮中分别最多处理4个上下文模式编码的语法元素。旁路模式编码的语法元素放在了后面。在第一轮和第二轮中,每次处理完一个上下文模式编码的语法元素RemCcbs就会减1。如果一个系数足够大,在第一轮和第二轮处理完上下文模式编码的几个语法元素后还需要处理剩余值,即abs_remainder。而如果RemCcbs已经足够小了(不满足RemCcbs>=4),前两轮就会结束,剩下的系数就会直接用旁路模式处理,这里仍然是abs_remainder。
在制定HEVC时,为了提高高码率时的吞吐率,采用了一种对齐(alignment)操作。对CABAC引擎来说,编码时输入的是bins,输出的是bits。解码时相反,输入的是bits,输出的是bins。CABAC可以对编码进行压缩,因此bits和bins并不是一一对应的。例如,n个bits对应m个bins,通常情况下,n小于m。一些序列的统计值显示CABAC中n:m大概是1:1.2到1:1.8。旁路模式本身不会对编码进行压缩,所以单纯的旁路模式可以做到bits和bins的一一对应。但是如果上下文模式和旁路模式切换时,正好处理到分数个bit上,那么旁路模式也就只能在分数个bit上继续处理。如果使用对齐处理,将正在处理的bit对齐到整数个bit上,那么旁路模式就可以做到bits和bins的一一对应,这样CABAC引擎的操作可以更简单,因而提高了吞吐率。代价是对齐时会损失一些压缩性能,因为对齐意味着浪费了一部分的bit。在实际操作中,对齐处理是将CABAC引擎中的变量ivlCurrRange设置为256。当ivlCurrRange为256时,ivlOffset和码流可以被认为是移位寄存器(shift register)这时候bin的值(binVal)是寄存器中的第二最高位的bit。由于ivlOffset要小于ivlCurrRange的限制,最高位bit总是0。HEVC 9.3.4.3.6 Alignment process prior to aligned bypass decoding中有对对齐处理的描述。
现有的这种系数编码方法对于目前常用的视频,如消费类的视频,有很好的压缩效率。消费类视频通常每个像素的位宽为8位或者10位,消费类视频通常码率不会太高,通常为几兆每秒(MB/s)或更低。但是有一些应用的视频的像素需要更高位宽,如每个像素的位宽为12位、14位或16位或更多。更高的位宽通常会带来更大的系数从而带来更高的码率。有一些应用的视频需要更高的质量,更高的质量通常也会带来更大的系数从而带来更高的码率。更高的码率对解码器的处理能力如吞吐量就要有更高的要求。
高位宽、高质量、高码率(三高视频)的视频编解码通常较低位宽、低质量、低码率(常规视频)的视频编解码需要编解码的系数更多而且系数更大。比如说三高视频中一个块中需要编解码的系数比常规视频中同样大小的一个块中需要编解码的系数多得多。因为常规视频的块中经过预测、变换、量化之后的系数很多都变成了0,而三高视频的块中经过预测、变换、量化之后的系数很多仍然是非0系数。常规视频的块中经过预测、变换、量化之后的系数中需要编码的系数中有一定比例是0,非0系数中有很大比例是很小的系数,如绝对值是1或2或3等。而在三高视频的块中经过预测、变换、量化之后的系数中需要编码的系数中很多是较大的值,而0,绝对值为1,2,3这种系数比例很小。因而现有的这种标志当前系数是否为非零系数,标志当前系数的绝对值是否大于1,标志当前系数的绝对值是否大于2等的语法元素对三高视频并不会提升压缩效率。而另一方面,由于这些语法元素都是用上下文模式编码的,处理上下文模式比旁路模式更复杂,即付出了更多的代价去处理它,而没有得到正面作用。
还有一种可能是在无损压缩时使用本方法,因为无损压缩时不能使用量化,通常系数会比较大。
也就是说,目前CABAC的设计利用了普通视频中系数分布的规律,而对于高位宽、高码率、高质量的视频等一些系数分布规律与普通视频不同的编解码场景,使用现有的CABAC存在复杂度高的缺陷,降低了压缩效率。
针对上述问题,编解码器在进行系数的编解码时,可以通过高吞吐率模式的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。提高系数编码的吞吐量和编解码速度,降低复杂度,且自适应高吞吐率模式可以根据已编解码的视频的情况自适应地判断当前部分是否使用高吞吐率模式,能够在码率足够高的时候能明显提高吞吐率而且不明显损失压缩性能,在码率不够高的时候也不会明显损失压缩性能,具有更高的适应性,从而提升压缩性能。
参见图8,其示出了本申请实施例提供的一种编码器的系统组成框图示例。如图8所示,编码器100可以包括:分割单元101、预测单元102、第一加法器107、变换单元108、量化单元109、反量化单元110、逆变换单元111、第二加法器112、滤波单元113、解码图片缓存(Decoded Picture Buffer,DPB)单元114和熵编码单元115。这里,编码器100的输入可以是由一系列图片或者一张静态图片组成的视频,编码器100的输出可以是用于表示输入视频的压缩版本的比特流(也可以称为“码流”)。
其中,分割单元101将输入视频中的图片分割成一个或多个编码树单元(CodingTree Units,CTUs)。分割单元101将图片分成多个图块(或称为瓦片,tiles),还可以进一步将一个tile分成一个或多个砖块(bricks),这里,一个tile或者一个brick中可以包括一个或多个完整的和/或部分的CTUs。另外,分割单元101可以形成一个或多个切片(slices),其中一个slice可以包括图片中按照栅格顺序排列的一个或多个tiles,或者覆盖图片中矩形区域的一个或多个tiles。分割单元101还可形成一个或多个子图片,其中,一个子图片可以包括一个或多个slices、tiles或bricks。
在编码器100的编码过程中,分割单元101将CTU传送到预测单元102。通常,预测单元102可以由块分割单元103、运动估计(Motion Estimation,ME)单元104、运动补偿(Motioncompensation,MC)单元105和帧内预测单元106组成。具体地,块分割单元103迭代地使用四叉树分割、二叉树分割和三叉树分割而进一步将输入CTU划分成更小的编码单元(CodingUnits,CUs)。预测单元102可使用ME单元104和MC单元105获取CU的帧间预测块。帧内预测单元106可使用包括MIP模式的各种帧内预测模式获取CU的帧内预测块。在示例中,率失真优化的运动估计方式可被ME单元104和MC单元105调用以获取帧间预测块,以及率失真优化的模式确定方式可被帧内预测单元106调用以获取帧内预测块。
预测单元102输出CU的预测块,第一加法器107计算分割单元101的输出中的CU和CU的预测块之间的差值,即残差CU。变换单元108读取残差CU并对残差CU执行一个或多个变换操作以获取系数。量化单元109对系数进行量化并输出量化系数(即levels)。反量化单元110对量化系数执行缩放操作以输出重构系数。逆变换单元111执行对应于变换单元108中的变换的一个或多个逆变换并输出重构残差。第二加法器112通过使重构残差和来自预测单元102的CU的预测块相加而计算出重构CU。第二加法器112还将其输出发送到预测单元102以用作帧内预测参考。在图片或子图片中的所有CU被重构之后,滤波单元113对重构图片或子图片执行环路滤波。这里,滤波单元113包含一个或多个滤波器,例如去方块滤波器、采样自适应偏移(Sample Adaptive Offset,SAO)滤波器、自适应环路滤波器(Adaptiveloop Filter,ALF)、亮度映射和色度缩放(Luma Mappingwithchroma Scaling,LMCS)滤波器以及基于神经网络的滤波器等。或者,当滤波单元113确定CU不用作其它CU编码时的参考时,滤波单元113对CU中的一个或多个目标像素执行环路滤波。
滤波单元113的输出是解码图片或子图片,这些解码图片或子图片缓存至DPB单元114。DPB单元114根据时序和控制信息输出解码图片或子图片。这里,存储在DPB单元114中的图片还可用作预测单元102执行帧间预测或帧内预测的参考。最后熵编码单元115将来自编码器100中解码图片所必需的参数(比如控制参数和补充信息等)转换成二进制形式,并根据每个数据单元的语法结构将这样的二进制形式写入码流中,即编码器100最终输出码流。
进一步地,编码器100可以是具有第一处理器和记录计算机程序的第一存储器。当第一处理器读取并运行计算机程序时,编码器100读取输入视频并生成对应的码流。另外,编码器100还可以是具有一个或多个芯片的计算设备。在芯片上实现为集成电路的这些单元具有与图8中相应单元类似的连接和数据交换功能。
参见图9,其示出了本申请实施例提供的一种解码器的系统组成框图示例。如图9所示,该解码器200可以包括:解析单元201、预测单元202、反量化单元205、逆变换单元206、加法器207、滤波单元208和解码图片缓存单元209。这里,解码器200的输入是用于表示视频或者一张静态图片的压缩版本的比特流,解码器200的输出可以是由一系列图片组成的解码视频或者一张解码的静态图片。
其中,解码器200的输入码流可以是编码器100所生成的码流。解析单元201对输入码流进行解析并从输入码流获取语法元素的值。解析单元201将语法元素的二进制表示转换成数字值并将数字值发送到解码器200中的单元以获取一个或多个解码图片。解析单元201还可从输入码流解析一个或多个语法元素以显示解码图片。
在解码器200的解码过程中,解析单元201将语法元素的值以及根据语法元素的值设置或确定的、用于获取一个或多个解码图片的一个或多个变量发送到解码器200中的单元。
预测单元202确定当前解码块(例如CU)的预测块。这里,预测单元202可以包括运动补偿单元203和帧内预测单元204。具体地,当指示帧间解码模式用于对当前解码块进行解码时,预测单元202将来自解析单元201的相关参数传递到运动补偿单元203以获取帧间预测块;当指示帧内预测模式(包括基于MIP模式索引值指示的MIP模式)用于对当前解码块进行解码时,预测单元202将来自解析单元201的相关参数传送到帧内预测单元204以获取帧内预测块。
反量化单元205具有与编码器100中的反量化单元110相同的功能。反量化单元205对来自解析单元201的量化系数(即levels)执行缩放操作以获取重构系数。
逆变换单元206具有与编码器100中的逆变换单元111相同的功能。逆变换单元206执行一个或多个变换操作 (即通过编码器100中的逆变换单元111执行的一个或多个变换操作的反操作)以获取重构残差。
加法器207对其输入(来自预测单元202的预测块和来自逆变换单元206的重构残差)执行相加操作以获取当前解码块的重构块。重构块还发送到预测单元202以用作在帧内预测模式下编码的其它块的参考。
在图片或子图片中的所有CU被重构之后,滤波单元208对重构图片或子图片执行环路滤波。滤波单元208包含一个或多个滤波器,例如去方块滤波器、采样自适应补偿滤波器、自适应环路滤波器、亮度映射和色度缩放滤波器以及基于神经网络的滤波器等。或者,当滤波单元208确定重构块不用作对其它块解码时的参考时,滤波单元208对重构块中的一个或多个目标像素执行环路滤波。这里,滤波单元208的输出是解码图片或子图片,解码图片或子图片缓存至DPB单元209。DPB单元209根据时序和控制信息输出解码图片或子图片。存储在DPB单元209中的图片还可用作通过预测单元202执行帧间预测或帧内预测的参考。
进一步地,解码器200可以是具有第二处理器和记录计算机程序的第二存储器。当第一处理器读取并运行计算机程序时,解码器200读取输入码流并生成对应的解码视频。另外,解码器200还可以是具有一个或多个芯片的计算设备。在芯片上实现为集成电路的这些单元具有与图9中相应单元类似的连接和数据交换功能。
还需要说明的是,当本申请实施例应用于编码器100时,“当前块”具体是指视频图像中的当前待编码的块(也可以简称为“编码块”);当本申请实施例应用于解码器200时,“当前块”具体是指视频图像中的当前待解码的块(也可以简称为“解码块”)。
基于图8,本申请实施例中的编码方法,主要应用于编码器100中的“熵编码单元115”部分,针对该熵编码单元115,可以采用基于上下文模型的自适应二进制算术编码模式或者旁路模式对相关标识信息(或语法元素)进行熵编码,然后写入码流。
基于图9,本申请实施例中的解码方法,主要应用于解码器200中的“解析单元201”部分,针对该解析单元201,可以采用基于上下文模型的自适应二进制算术编码模式或者旁路模式进行解码,得到相关标识信息(或语法元素)的取值,进而重建系数。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
本申请的一实施例提出了一种解码方法,应用于解码器,图10为解码方法的实现流程示意图一,如图10所示,解码器进行解码的方法可以包括以下步骤:
步骤101、解码码流,确定当前块的高吞吐率模式标识信息。
步骤102、基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。
在本申请的实施例中,解码器可以通过解码码流,确定当前块的高吞吐率模式标识信息。然后可以基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。
需要说明的是,在本申请的实施中,高吞吐率模式标识信息可以用于提升编解码的吞吐率。
进一步地,在本申请中,当前块可以为未进行变换处理的图像块,也可以为经过变换处理后的变换块。例如,当前块可以为zero-out后的变换块。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数的标志位,或者,可以将高吞吐率模式标识信息理解为一个表明使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数的值的标志位。具体地,解码器解码码流,可以确定作为高吞吐率模式标识信息的一个变量,从而可以通过该变量的取值来实现高吞吐率模式标识信息的确定。
需要说明的是,在本申请中,高吞吐率模式标识信息的取值可以为第一值或第二值。具体地,高吞吐率模式标识信息的取值不同,确定当前块的系数(或确定当前块的系数的值)的方式也不同。
具体地,在本申请的实施例中,基于高吞吐率模式标识信息的取值,在确定当前块的系数时,可以选择使用上下文模式、旁路模式以及对齐处理等方式中的至少之一。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明是否进行对齐处理的标志位。
可选地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么可以选择使用对齐处理确定当前块的系数;如果高吞吐率模式标识信息的取值为第二值,那么可以选择跳过对齐处理确定当前块的系数。
可见,可以根据高吞吐率模式标识信息的取值判断是否使用对齐处理确定当前块的系数。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明是否仅使用旁路模式的标志位。
可选地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么可以选择使用旁路模式确定当前块的系数;如果高吞吐率模式标识信息的取值为第二值,那么可以选择使用上下文模式和旁路模式至少之一确定当前块的系数。
可见,可以根据高吞吐率模式标识信息的取值判断是否仅使用旁路模式确定当前块的系数,即可以基于高吞吐率模式标识信息的取值确定是否均使用旁路模式确定当前块的全部系数(或确定当前块的全部系数的值)。例如,如果高吞吐率模式标识信息的取值为第一值,那么当前块的所有的需要解码的语法元素sb_coded_flag使用旁路模式编码。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明减小数量参数的初始值(或将数量参数设置为0)的标志位。
可选地,在本申请中,可以先根据高吞吐率模式标识信息确定数量参数的初始值;如果数量参数的初始值的取值大于或者等于数量阈值,那么可以选择使用上下文模式和旁路模式至少之一确定当前块的系数;如果数量参数的初始值的取值小于数量阈值,那么可以选择使用旁路模式确定当前块的系数。
需要说明的是,在本申请的实施例中,数量参数的初始值指示了能使用上下文模式编解码的语法元素的个数的最大值。具体地,数量参数可以为一个表示当前块可用的剩余的上下文模式编码的语法元素的个数的参数,而数量参数的初始值即为该数量参数初始设定的值。
可见,可以根据高吞吐率模式标识信息的取值选择不同的方式确定数量参数的初始值,即高吞吐率模式标识信息可以用于确定数量参数的初始值,然后再基于数量参数的初始值判断是否使用上下文模式确定当前块的系数。
示例性的,在本申请中,可以设置第一值为1,第二值为0;也可以设置第一值为true,第二值为false。本申请不作任何限定。
示例性的,在本申请中,如果高吞吐率模式标识信息用于确定是否使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数(或当前块的系数的值),那么可以使用标志high_throughput_mode_enabled_flag来表示高吞吐率模式标识信息。
例如,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以表示在进行当前块的系数(或当前块的系数的值)的确定时,进行对齐处理;如果high_throughput_mode_enabled_flag的取值为0,那么可以表示在进行当前块的系数(或当前块的系数的值)的确定时,不进行对齐处理。
例如,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以表示仅使用旁路模式确定当前块的系数(或当前块的系数的值);如果high_throughput_mode_enabled_flag的取值为0,那么可以表示可以使用上下文模式和旁路模式至少之一确定当前块的系数(或当前块的系数的值)。
例如,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以将数量参数的初始值的取值确定为第一数量值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值);如果high_throughput_mode_enabled_flag的取值为0,那么可以根据当前块的高度参数和宽度参数确定数量参数的初始值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值)。
需要说明的是,在本申请的实施例中,解码器还可以确定当前块的高度参数和宽度参数。具体地,当前块的高度参数和宽度参数可以用于对当前块的尺寸进行确定。
示例性的,在本申请中,对于经过zero-out后的当前块,在确定当前块的尺寸的对数log2ZoTbWidth和log2ZoTbHeight之后,可以使用(1<<log2ZoTbHeight)表示对应的高度参数,同时可以使用(1<<log2ZoTbWidth)表示对应的宽度参数。
示例性的,在本申请中,第一数量值为大于或等于0,且小于数量阈值的整数。例如,如果数量阈值为4,那么第一数量值可以设置为0或1或2或3。
例如,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以将数量参数的初始值的取值确定为第二数量值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值);如果high_throughput_mode_enabled_flag的取值为0,那么可以根据当前块的高度参数和宽度参数确定数量参数的初始值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值)。
示例性的,在本申请中,第二数量值可以用于减小数量参数的初始值。具体地,第二数量值可以小于根据当前块的高度参数和宽度参数确定的数量参数的初始值的取值。
例如,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以根据当前块的高度参数和宽度参数以及第一移位参数确定数量参数的初始值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值);如果high_throughput_mode_enabled_flag的取值为0,那么可以根据根据当前块的高度参数和宽度参数以及第二移位参数确定数量参数的初始值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值)。
示例性的,在本申请中,第一移位参数和第二移位参数用于右移处理,第一移位参数大于第二移位参数。
进一步地,在本申请的实施例中,解码器还可以通过解码码流,确定出视频标识信息;如果视频标识信息指示视频满足第一预设条件,那么可以执行高吞吐率模式标识信息的确定流程,即确定当前块的高吞吐率模式标识信息。
需要说明的是,在本申请的实施例中,第一预设条件至少包括下述条件之一:位宽大于位宽阈值;码率大于码率阈值;帧率大于帧率阈值;量化参数(Quantization Parameter,QP)小于质量阈值;无损压缩。
具体地,在本申请中,位宽阈值可以设置为14bit(或者12bit,或者16bit),若待编解码的视频帧的位宽大于14bit,则可以认为其为高位宽的非常规视频;码率阈值可以设置为1Gbit/s,若待编解码的视频帧的码率大于1Gbit/s,则可以认为其为高码率的非常规视频;帧率阈值可以设置为90Hz(或者120Hz),若待编解码的视频帧的帧率大于90Hz,则可以认为其为高帧率的非常规视频;质量阈值可以按照不同的位宽设置不同的具体数值,例如设置输入位宽为12bit,且按照12bit编码时对应的质量阈值为0,若待编解码的视频帧的位宽为12bit且在按照12bit编码的情况下确定的量化参数小于对应的质量阈值为0,则可以认为其为高质量的非常规视频。
可以理解的是,在本申请中,对于常规视频而言,系数解码方法与相关技术中的已有方法相同;但是针对某种情况,比如高位宽或高质量或高码率或高帧率或无损压缩的非常规视频,本申请实施例在解码系数时,可以增加高吞吐率模式标识信息的确定流程,即确定当前块的高吞吐率模式标识信息。
也就是说,非常规视频的位宽比常规视频的位宽高,非常规视频的质量比常规视频的质量高,非常规视频的码率比常规视频的码率高,非常规视频的帧率比常规视频的帧率高,而且非常规视频为无损压缩。
进一步地,在本申请实施例中,首先需要判断当前的视频是否为常规视频,可以用视频标识信息来表示。具体地,如果视频标识信息的取值为第一值,那么可以确定视频标识信息指示视频满足第一预设条件,即视频为非常规视频;如果视频标识信息的取值为第二值,那么可以确定视频标识信息指示视频不满足第一预设条件,即视频为常规视频。
示例性的,在本申请中,可以设置第一值为1,第二值为0;也可以设置第一值为true,第二值为false。本申请不作任何限定。
进一步地,在本申请中,视频标识信息可以是序列(sequence)级的标志,甚至也可以是更高级别的标志,比如视频可用性信息(Video Usability Information,VUI)、补充增强信息(Supplemental Enhancement Information,SEI)等。判断视频是否满足第一预设条件,还可以通过判断该视频是否满足高位宽、或者是否满足高码率、或者是否满足高质量、或者是否满足无损压缩等,下面将以这四种情况为例分别进行描述。
可选地,在本申请中,当视频标识信息为高位宽序列标识信息时,若视频满足高位宽,则确定高位宽序列标识信息指示视频满足第一预设条件。
可选地,在本申请中,当视频标识信息为高码率序列标识信息时,若视频满足高码率,则确定高码率序列标识信息指示视频满足第一预设条件。
可选地,在本申请中,当视频标识信息为高质量序列标识信息时,若视频满足高质量,则确定高质量序列标识信息指示视频满足第一预设条件。
可选地,在本申请中,当视频标识信息为高帧率序列标识信息时,若视频满足高帧率,则确定高帧率序列标识信息指示视频满足第一预设条件。
可选地,在本申请中,当视频标识信息为无损压缩序列标识信息时,若视频满足无损压缩,则确定无损压缩序列标识信息指示视频满足第一预设条件。
也就是说,在本申请中,视频标识信息可以是高位宽序列标识信息(用sps_high_bit_depth_flag表示),用于指示当前的视频是否为高位宽序列;或者也可以替换为高码率序列标识信息(用sps_high_bit_rate_flag表示),用于指示当前的视频是否为高码率序列;或者也可以替换为其他指示高位宽、高码率、高质量、高帧率或者无损压缩的标识信息,本申请实施例不作具体限定。
可见,在本申请中,高吞吐率模式标识信息的确定可以依赖于视频标识信息的确定,即high_throughput_mode_enabled_flag可能依赖于一些其他的标志,比如说高位宽标志或高码率标志或SPS扩展标志(sps_extension_flag)等,SPS扩展标志在标准的扩展版本中可以打开,比如说VVC针对高位宽,高码率编码制定的扩展版本。
示例性的,在本申请中,当高位宽标志或高码率标志或SPS扩展标志的值为1时,需要解码上述high_throughput_mode_enabled_flag标志;当高位宽标志或高码率标志或SPS扩展标志的值不为1时,则不需要解码上述high_throughput_mode_enabled_flag标志。
需要说明的是,在本申请的实施例中,高吞吐率模式标识信息(high_throughput_mode_enabled_flag)可以是一个序列(sequence)级的标志或图像(picture)级的标志或片(slice)级的标志或块(block)级的标志或其他级别的标志,块级的标志包括最大编码单元(LCU)级的标志或编码树单元(CTU)级的标志或编码单元(CU)级的标志或其他块级的标志。其中,high_throughput_mode_enabled_flag甚至也可以是更高级别的标志,比如视频可用性信息(Video Usability Information,VUI)、补充增强信息(Supplemental Enhancement Information,SEI)等。
需要说明的是,视频标准中通常所说的系数编码可以包括编码和解码两部分,因此,系数编码包括编码器侧的系数编码方法和解码器侧的系数解码方法。本申请实施例则针对解码器侧的系数解码方法进行描述。
需要说明的是,在本申请实施例中,子块编码标识信息可以用sb_coded_flag表示。示例性的,如果sb_coded_flag的取值为1,那么可以确定需要对待解码子块内的所有系数依次进行解码;如果sb_coded_flag的取值为0,那么可以确定不需要对待解码子块内的所有系数依次进行解码,这时候待解码子块内的所有系数均为零。
可选地,在本申请中,针对某种情况,在系数编码时,扫描到的子块都默认需要编码,或者说扫描到的子块都默认包含非零系数。也就是说通常情况下,系数编码的方法还是与相关技术中的已有方法一样。某种情况,比如可以是指高位宽或高质量或高码率或高帧率的视频编解码或无损压缩的视频。这种情况下非零系数很多,扫描到的子块几乎都是需要编码;或者说,扫描到的子块几乎都包含非零系数。这样就不需要在码流中传输sb_coded_flag,编码器/解码器也就不需要处理这个标志,从而能够加快编解码速度。由于去掉了一个几乎没有的标志,此时还会带来一点压缩性能的提升。
进一步地,在本申请中,如果解码获得的高吞吐率模式标识信息的取值为第一值,那么可以使用旁路模式确定当前块的子块编码标识信息sb_coded_flag,而不再使用上下文模式确定当前块的子块编码标识信息sb_coded_flag。
需要说明的是,在本申请中,对于TSRC,sb_coded_flag是用上下文模式解码的,如果将sb_coded_flag去掉或者将sb_coded_flag改为旁路模式解码,那么整个块的所有的系数之间就都是用旁路模式解码的,会进一步提高编解码速度或吞吐量。
示例性的,在本申请中,如果high_throughput_mode_enabled_flag的取值为第一值,那么sb_coded_flag使用旁路模式解码;如果high_throughput_mode_enabled_flag的取值为第二值,那么sb_coded_flag使用上下文模式解码。
进一步地,在本申请中,如果解码获得的高吞吐率模式标识信息的取值为第一值,那么使用旁路模式确定当前块对应的最后一个非零系数的水平坐标的前缀信息last_sig_coeff_x_prefix、最后一个非零系数的竖直坐标的前缀信息last_sig_coeff_y_prefix、最后一个非零系数的水平坐标的后缀信息last_sig_coeff_x_prefix以及最后一个非零系数的竖直坐标的后缀信息last_sig_coeff_y_suffix。
需要说明的是,在本申请中,对于RRC,last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix是用上下文模式解码的,如果将last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix去掉或者将它们改为旁路模式解码,会进一步提高编解码速度或吞吐量。
示例性的,在本申请中,如果high_throughput_mode_enabled_flag的取值为第一值,那么last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix使用旁路模式解码;如果high_throughput_mode_enabled_flag的取值为第二值,那么last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、 last_sig_coeff_x_suffix、last_sig_coeff_y_suffix使用上下文模式解码。
可以理解的是,在本申请的实施例中,上述方法均是以视频中所有分量统一使用该技术为例,所有分量指如RGB格式视频的R、G、B或YUV格式的Y、U、V(Y,Cb,Cr)。上述方法也可以仅用于某一个分量,如仅用于YUV格式的Y分量。上述方法也可以分别用于各个分量,即每一个分量都可单独控制开关。本申请不进行具体限制。
由此可见,本申请实施例提出的解码方法,在编解码当前块的系数的过程中,可以通过高吞吐率模式(high throughput mode)的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。
可以理解的是,在本申请的实施例中,当高吞吐率模式被使能时,在系数值(coefficient level)编解码和残差值(residual level)编解码时不使用上下文模式编码的语法元素。RRC中的remBinsPass1和TSRC中的RemCcbs被设置为0,也就是说,当前TB可使用的上下文模式编码的二元符号(bin)个数被设置为0。那么所有的系数值或残差值都使用旁路模式编解码。
可以理解的是,在本申请的实施例中,当高吞吐率模式被使能时,所有的需要解码的语法元素sb_coded_flag使用旁路模式编解码。
进一步地,在本申请的实施例中,在使用所述对齐处理确定所述当前块的系数时,对于RRC,可以选择在使用所述上下文模式确定最后一个非零系数位置之后进行对齐处理,并使用所述旁路模式确定所述最后一个非零系数位置以外的其他语法元素;对于TSRC,可以选择在使用所述旁路模式确定第一个语法元素之前进行对齐处理。
可以理解的是,在本申请的实施例中,当高吞吐率模式被使能时,对齐(alignment)操作发生在进入子块之前,也就是说,对RRC,对齐处理在last_sig_coeff_x_prefix,last_sig_coeff_y_prefix,last_sig_coeff_x_suffix和last_sig_coeff_y_suffix之后,对TSRC,对齐处理就在整个TB的开始。或者说对齐处理发生在TB中第一个旁路模式编码的语法元素之前。
示例性的,图11为RRC中对齐处理的示意图一,如图11所示,在RRC的码流中,除了最后一个非零系数位置需要使用到上下文模式的编码外,其他所有的语法元素都使用旁路模式,即在水平坐标前缀标识信息last_sig_coeff_x_prefix,垂直坐标前缀标识信息last_sig_coeff_y_prefix,水平坐标后缀标识信息last_sig_coeff_x_suffix和垂直坐标后缀标识信息last_sig_coeff_y_suffix之后进行对齐处理,而且在最后一个非零系数位置后进行对齐处理,可以使后面的大段的旁路模式编码的内容解码更快。其中,Coefficient bits表示系数位,sb_coded_flag表示编码标识信息,Context coded bins表示上下文模式编码组,Bypass coded bins表示旁路模式编码组,Aign表示对齐处理的位置。
进一步地,在目前的VVC中,last_sig_coeff_x_prefix和last_sig_coeff_y_prefix可以使用上下文模式编码,而last_sig_coeff_x_suffix和last_sig_coeff_y_suffix可以使用旁路模式编码。因此,在一种实施例中,可以把last_sig_coeff_x_prefix,last_sig_coeff_y_prefix,last_sig_coeff_x_suffix和last_sig_coeff_y_suffix都作为最后一个非零系数的编码,而后面的都是子块及子块内部系数的编码。相应地,如上述图11所表示的对齐处理方法是在按照语法元素的意义来区分的基础上进行的。而在另一种实施例中,图12为RRC中对齐处理的示意图二,如图12所示,也可以在按照上下文模式编码的语法元素和旁路模式编码的语法元素来区分的基础上进行对齐处理,即在上下文模式编码的语法元素结束之后且在旁路模式编码的语法元素开始之前进行对齐操作。其中,Coefficient bits表示系数位,sb_coded_flag表示编码标识信息,Context coded bins表示上下文模式编码组,Bypass coded bins表示旁路模式编码组,Aign表示对齐处理的位置。因此,对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之前进行对齐操作。
可见,在使用对齐处理确定所述当前块的系数时,对于RRC,还可以选择在使用所述上下文模式确定最后一个非零系数的水平坐标前缀标识信息last_sig_coeff_x_prefix和垂直坐标前缀标识信息last_sig_coeff_y_prefix之后、使用旁路模式确定最后一个非零系数的水平坐标后缀标识信息last_sig_coeff_x_suffix和垂直坐标后缀标识信息last_sig_coeff_y_suffix之前进行对齐处理,并使用旁路模式最后一个非零系数位置以外的其他语法元素。
示例性的,在本申请中,当高吞吐率模式被使能时,可以将last_sig_coeff_x_prefix和last_sig_coeff_y_prefix也改为旁路模式编码,此时,最后一个非零系数位置也都是使用旁路模式进行编码的,而且整个TB也都是使用旁路模式编码的。这样,对RRC而言,对齐处理也可以放在整个TB的开始。
需要说明的是,在本申请中,如果整个TB都是旁路模式编码的了,如果TB之前也有旁路模式编码的语法元素,对齐处理也可以放在TB之前。
由此可见,在本申请中,对于RRC和TSRC,对齐处理均可以发生在TB中第一个旁路模式编码的语法元素之前。此时,对于RRC,可以选择使用旁路模式确定最后一个非零系数的水平坐标前缀标识信息last_sig_coeff_x_prefix、垂直坐标前缀标识信息last_sig_coeff_y_prefix、水平坐标后缀标识信息last_sig_coeff_x_suffix、垂直坐标后缀标识信息last_sig_coeff_y_suffix,即最后一个非零系数位置均是使用旁路模式进行编码的。
示例性的,图13为TSRC中对齐处理的示意图,如图13所示,在TSRC的码流中,整个TB的所有的语法元素都使用旁路模式,而且整个TB开始时就做了对齐处理,可以使整个TB的旁路模式编码的内容解码更快。其中,Coefficient bits表示系数位,sb_coded_flag表示编码标识信息,Aign表示对齐处理的位置。
示例性的,在本申请中,有一个序列级的标志sps_extension_flag。在序列级,如果sps_extension_flag的值为1,需要解码sps_range_extension_flag。如果sps_range_extension_flag的值为1,需要解码sps_high_throughput_mode_enabled_flag。sps_high_throughput_mode_enabled_flag是当前序列的高吞吐率模式使能的标志。如果sps_high_throughput_mode_enabled_flag的值为1,表示当前序列内的块使用高吞吐率模式,如果 sps_high_throughput_mode_enabled_flag的值为0,表示当前序列内的块不使用高吞吐率模式。
其中,可以认为sps_extension_flag是当前序列是否使用标准的扩展版本的标志。sps_range_extension_flag是当前序列是否使用范围扩展(range extension),比如高位宽,高码率等的标志。
具体地,序列参数集RBSP语法(Sequence parameter set RBSP syntax)如表3所示,序列参数集范围扩展语法(Sequence parameter set range extension syntax)如表4所示:
表3
Figure PCTCN2021103306-appb-000009
表4
Figure PCTCN2021103306-appb-000010
示例性的,在本申请中,在语法上,可以将上述表1的Residual coding syntax中residual_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中原来的一句remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如下表5所示的条件语句:
表5
Figure PCTCN2021103306-appb-000011
示例性的,在本申请中,在语法上,可以将上述表2的Residual coding syntax中residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中原来的一句RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如下表6所示的条件语句:
表6
Figure PCTCN2021103306-appb-000012
需要说明的是,在本申请的实施例中,对于需要解码的sb_coded_flag,如果sps_high_throughput_mode_enabled_flag的值为1,sb_coded_flag使用旁路模式解码,否则,sb_coded_flag使用常见的上下文模式解码。
在CABAC的片数据解析过程(CABAC parsing process for slice data)的概述(General)中加入,如果sps_high_throughput_mode_enabled_flag的值为1,在residual_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中last_sig_coeff_x_prefix,last_sig_coeff_y_prefix,last_sig_coeff_x_suffix和last_sig_coeff_y_suffix(如果存在)之后进行对齐处理,在residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)一开始进行对齐处理。或者在TB的第一个dec_abs_level或abs_remainder或sb_coded_flag之前进行对齐处理。或者在TB的第一个旁路模式编码的语法元素之前进行对齐处理。
需要说明的是,在本申请的实施例中,对齐处理过程的输入是变量ivlCurrRange,对齐处理过程的输出是更新的变量ivlCurrRange,其中,ivlCurrRange设置为256。
进一步地,在本申请的实施例中,可以使用序列级和片级的标识信息来控制是否使用高吞吐率模式进行编解码。具体地,高吞吐率模式标识信息可以包括序列级标识信息和片级标识信息;如果序列级标识信息的取值为第一值,那么可以确定所述片级标识信息的取值;如果片级标识信息的取值为第一值,那么可以选择使用高吞吐率模式,即可以使用所述对齐处理确定所述当前块的系数;和/或使用所述旁路模式确定所述当前块的系数;和/或使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
示例性的,在本申请中,有一个序列级的标志sps_extension_flag。在序列级,如果sps_extension_flag的值为1,需要解码sps_range_extension_flag。如果sps_range_extension_flag的值为1,需要解码序列级标识信息sps_high_throughput_mode_enabled_flag。具体地,序列参数集RBSP语法(Sequence parameter set RBSP syntax)如上述表3所示,序列参数集范围扩展语法(Sequence parameter set range extension syntax)如上述表4所示:
进一步地,在本申请中,sps_high_throughput_mode_enabled_flag是当前序列的高吞吐率模式使能的标志。如果sps_high_throughput_mode_enabled_flag的值为1,在片级(slice)需要解码片级的标识信息sh_high_throughput_mode_flag。如果sh_high_throughput_mode_flag的值为1,表示当前片内的块使用高吞吐率模式,如果sh_high_throughput_mode_flag的值为0,表示当前片内的块不使用高吞吐率模式。
需要说明的是,在本申请的实施例中,如果sps_high_throughput_mode_enabled_flag的值等于1,表示当前序列内的片头中会出现sh_high_throughput_mode_flag,如果sps_high_throughput_mode_enabled_flag的值等于0,表示当前序列内的片头中不会出现sh_high_throughput_mode_flag。其中,如果sps_high_throughput_mode_enabled_flag不出现,则可以认为sps_high_throughput_mode_enabled_flag的值为0。
具体地,在本申请中,片头语法(Slice header syntax)如表7所示:
表7
Figure PCTCN2021103306-appb-000013
其中,如果sh_high_throughput_mode_flag的值等于1,表示当前片内的块使用高吞吐率模式,如果sh_high_throughput_mode_flag的值等于0,表示当前片内的块不使用高吞吐率模式。如果sh_high_throughput_mode_flag不出现,则可以认为sh_high_throughput_mode_flag的值为0。
示例性的,在本申请中,在语法上,可以将上述表1的Residual coding syntax中residual_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中原来的一句remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如下表8所示的条件语句:
表8
Figure PCTCN2021103306-appb-000014
示例性的,在本申请中,在语法上,可以将上述表2的Residual coding syntax中residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中原来的一句RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如下表9所示的条件语句:
表9
Figure PCTCN2021103306-appb-000015
需要说明的是,在本申请的实施例中,对于需要解码的sb_coded_flag,如果sh_high_throughput_mode_flag的值为1,sb_coded_flag使用旁路模式解码,否则,sb_coded_flag使用常见的上下文模式解码。
在CABAC的片数据解析过程(CABAC parsing process for slice data)的概述(General)中加入,如果sh_high_throughput_mode_flag的值为1,在residual_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中last_sig_coeff_x_prefix,last_sig_coeff_y_prefix,last_sig_coeff_x_suffix和last_sig_coeff_y_suffix(如果存在)之后进行对齐处理,在residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)一开始进行对齐处理。或者在TB的第一个dec_abs_level或abs_remainder或sb_coded_flag之前进行对齐处理。或者在TB的第一个旁路模式编码的语法元素之前进行对齐处理。
需要说明的是,在本申请的实施例中,对齐处理过程的输入是变量ivlCurrRange,对齐处理过程的输出是更新的变量ivlCurrRange,其中,ivlCurrRange设置为256。
综上所述,在本申请的实施例中,通过上述步骤101至步骤102所提出的解码方法,在高位宽、高码率、高质量的视频编解码中,可以通过高吞吐率模式的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。 具体地,一方面,由于系数分布规律与普通视频场景不同,在系数解码中通过减少甚至消除上下文模式解码的语法元素的个数,可以提高系数解码的吞吐量。另一方面,高吞吐率模式可以形成大片连续的且对齐的旁路模式编码,能够进一步提升吞吐率。
本申请实施例提供一种解码方法,编解码器在进行系数的编解码时,可以通过高吞吐率模式的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。提高系数编码的吞吐量和编解码速度,降低复杂度,从而提升压缩性能。
基于上述实施例,在本申请的再一实施例中,可以将高吞吐率模式标识信息理解为一个表明减小数量参数的初始值的标志位,即高吞吐率模式标识信息用于确定当前块是否减小数量参数的初始值,那么可以使用标志high_throughput_mode_enabled_flag来表示高吞吐率模式标识信息。
具体地,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以表示减小数量参数的初始值;如果high_throughput_mode_enabled_flag的取值为0,那么可以表示不减小数量参数的初始值。
可以理解的是,在本申请的实施例中,数量参数的初始值指示了能使用上下文模式编解码的语法元素的个数的最大值。具体地,数量参数可以为一个表示当前块可用的剩余的上下文模式编码的语法元素的个数的参数,而数量参数的初始值即为该数量参数初始设定的值。
也就是说,在本申请中,可以将数量参数理解为一个表明当前块中使用上下文模式解码的语法元素的个数的参数。
进一步地,在本申请中,在数量参数未进入到语法元素的解码环节时所设置的参数值即为数量参数的初始值。
示例性的,基于上述表1,对于RRC,可以使用标志remBinsPass1来表示语法元素数量参数数量参数,那么在进行语法元素的编解码之前所设置的remBinsPass1的初值即为的数量参数初始值。
示例性的,基于上述表2,对于TSRC,可以使用标志RemCcbs来表示数量参数,那么在进行语法元素的编解码之前所设置的RemCcbs的初值即为的数量参数初始值。
进一步地,在本申请的实施例中,在根据高吞吐率模式标识信息确定数量参数的初始值时,若高吞吐率模式标识信息的取值为第一值,便可以将数量参数的初始值的取值确定为第一数量值;若高吞吐率模式标识信息的取值为第二值,便可以根据当前块的高度参数和宽度参数确定数量参数的初始值。
其中,第一数量值为大于或等于0,且小于数量阈值的整数。例如,如果数量阈值为4,那么第一数量值可以设置为0或1或2或3。
需要说明的是,在本申请中,基于上述表1,对于任意一个系数,最多可能需要处理4个上下文模式解码的语法元素,因此,仅当remBinsPass1>=4成立时才可以处理上下文模式解码的语法元素,即在remBinsPass1<4的情况下,便不会处理上下文模式解码的语法元素。
相应地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么可以直接将数量参数的初始值的取值确定为第一数量值,从而使得remBinsPass1>=4不成立,进而就不会处理上下文模式解码的语法元素。如果高吞吐率模式标识信息的取值为第二值,那么可以继续使用常见的方式,根据当前块的高度参数和宽度参数确定数量参数的初始值,例如,基于上述表1,令remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2。
也就是说,在本申请中,基于上述表1,对于RRC,如果高吞吐率模式标识信息用于确定是否使用上下文模式确定当前块的系数(或当前块的系数的值),使用标志high_throughput_mode_enabled_flag来表示高吞吐率模式标识信息,那么在根据高吞吐率模式标识信息确定数量参数的初始值remBinsPass1时,可以将上述表1中的语句remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如下述表10所示的条件语句:
表10
Figure PCTCN2021103306-appb-000016
可见,在解析码流,确定出当前块的高吞吐率模式标识信息high_throughput_mode_enabled_flag之后,如果high_throughput_mode_enabled_flag不为0,那么设置remBinsPass1=0(或1或2或3),因此remBinsPass1>=4不成立,进而就不会处理上下文模式解码的语法元素。如果high_throughput_mode_enabled_flag为0,remBinsPass1的初始值设置方法可以与上述表1一致,即设置remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2。
需要说明的是,在本申请中,基于上述表2,TSRC方法中把上下文模式解码的语法元素放在了两轮中,对于任意一个系数,可以在第一轮和第二轮中分别最多处理4个上下文模式解码的语法元素,因此,仅当RemCcbs>=4成立时,第一轮或第二轮才会处理上下文模式解码的语法元素,即在RemCcbs<4的情况下,便不会处理上下文模式解码的语法元素。
相应地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么可以直接将数量参数的初始值的取值确定为第一数量值,从而使得RemCcbs>=4不成立,进而就不会处理上下文模式解码的语法元素。如果高吞吐率模式标识信息的取值为第二值,那么可以继续使用常见的方式,根据当前块的高度参数和宽度参数确定数量参数的初始值,例如,基于上述表2,令RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2。
也就是说,在本申请中,基于上述表2,对于TSRC,如果高吞吐率模式标识信息用于确定是否使用上下文模式确定当前块的系数(或当前块的系数的值),即使用标志high_throughput_mode_enabled_flag来表示高吞吐率模式标识信息,那么在根据高吞吐率模式标识信息确定数量参数的初始值RemCcbs时,可以将上述表2中的语句RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如下述表11所示的条件语句:
表11
Figure PCTCN2021103306-appb-000017
可见,在解析码流,确定出当前块的高吞吐率模式标识信息high_throughput_mode_enabled_flag之后,如果high_throughput_mode_enabled_flag不为0,那么设置RemCcbs=0(或1或2或3),因此RemCcbs>=4不成立,进而就不会处理上下文模式解码的语法元素。如果high_throughput_mode_enabled_flag为0,RemCcbs的初始值设置方法可以与上述表2一致,即设置RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2。
进一步地,在本申请的实施例中,如果高吞吐率模式标识信息用于确定是否减小数量参数的初始值,那么在根据高吞吐率模式标识信息确定数量参数的初始值时,若高吞吐率模式标识信息的取值为第一值,便可以将数量参数的初始值的取值确定为第二数量值;若高吞吐率模式标识信息的取值为第二值,便可以根据当前块的高度参数和宽度参数确定数量参数的初始值。
需要说明的是,在本申请的实施例中,第二数量值可以用于减小数量参数的初始值。具体地,第二数量值可以小于根据当前块的高度参数和宽度参数确定的数量参数的初始值的取值。
可选地,在本申请中,如果高吞吐率模式标识信息用于确定是否减小数量参数的初始值,那么在根据高吞吐率模式标识信息确定数量参数的初始值时,若高吞吐率模式标识信息的取值为第一值,便可以根据当前块的高度参数和宽度参数以及第一移位参数确定数量参数的初始值;若高吞吐率模式标识信息的取值为第二值,便可以根据当前块的高度参数和宽度参数以及第二移位参数确定数量参数的初始值。
需要说明的是,在本申请的实施例中,第一移位参数和第二移位参数可以用于右移处理,其中,第一移位参数大于第二移位参数。也就是说,在其他条件相同的情况下,分别按照第一移位参数和第二移位参数进行右移处理之后,第一移位参数对应的数量参数的初始值的取值小于第二移位参数对应的数量参数的初始值的取值。
由此可见,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么无论是将数量参数的初始值的取值确定为一个固定数值(第二数量值),还是增大计算数量参数的初始值时的右移位数(将原有的第一移位参数调整为第二移位参数),最终的目的都是减小数量参数的初始值,即减小数量参数的初始值就是减少使用上下文模式解码的语法元素的个数。
需要说明的是,在本申请中,基于上述表1,对于任意一个系数,最多可能需要处理4个上下文模式解码的语法元素,因此,仅当remBinsPass1>=4成立时才可以处理上下文模式解码的语法元素,即在remBinsPass1<4的情况下,便不会处理上下文模式解码的语法元素。
相应地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么可以直接将数量参数的初始值的取值确定为一个固定数值,例如remBinsPass1等于第二数量值,或者将数量参数的初始值的取值确定为remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>4(即第一移位参数为4),从而实现减少使用上下文模式解码的语法元素的个数。如果高吞吐率模式标识信息的取值为第二值,那么可以继续使用常见的方式,根据当前块的高度参数和宽度参数确定数量参数的初始值,例如,基于上述表1,令remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2。
也就是说,在本申请中,基于上述表1,对于RRC,如果高吞吐率模式标识信息用于确定是否减小上下文模式的系数的语法元素,即使用标志high_throughput_mode_enabled_flag来表示高吞吐率模式标识信息,那么在根据高吞吐率模式标识信息确定数量参数的初始值remBinsPass1时,可以将上述表1中的语句remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如下述表12所示的条件语句:
表12
Figure PCTCN2021103306-appb-000018
可见,在解析码流,确定出当前块的高吞吐率模式标识信息high_throughput_mode_enabled_flag之后,如果high_throughput_mode_enabled_flag不为0,那么设置remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>4,因此后面处理上下文模式解码的语法元素的个数就会减少。如果high_throughput_mode_enabled_flag为0,remBinsPass1的初始值设置方法可以与上述表1一致,即设置remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2。
可选地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么也可以使用其他方式进行remBinsPass1的设置。例如,设置一个参数parameter,可以将remBinsPass1的初始值设置为remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>(2+parameter)。
其中,parameter可能由一个序列级或片级的标志或其他级别的标志来确定。具体地,如果这个标志不存在,parameter的值为0。parameter的值可能是0,1,2,3等。那么这样语法的修改就可以不用if、else的格式。可调节的范围也更灵活。
示例性的,在本申请中,可以设置一个ccb_right_shift_level_flag,这个ccb_right_shift_level_flag的值可取0,1,2,3,4,5,6。parameter的值等于ccb_right_shift_level_flag的值,如果ccb_right_shift_level_flag不存在,那么parameter的值为0。
需要说明的是,在本申请中,基于上述表2,TSRC方法中把上下文模式解码的语法元素放在了两轮中,对于任意一个系数,可以在第一轮和第二轮中分别最多处理4个上下文模式解码的语法元素,因此,仅当RemCcbs>=4成立时,第一轮或第二轮才会处理上下文模式解码的语法元素,即在RemCcbs<4的情况下,便不会处理上下文模式解码的语法元素。
相应地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么可以直接将数量参数的初始值的取值确定为一个固定数值,例如RemCcbs等于第二数量值,或者将数量参数的初始值的取值确定为RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>4(即第一移位参数为4),从而实现减少使用上下文模式解码的语法元素的个数。如果高吞吐率模式标识信息的取值为第二值,那么可以继续使用常见的方式,根据当前块的高度参数和宽度参数确定数量参数的初始值,例如,基于上述表2,令RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2。
也就是说,在本申请中,基于上述表2,对于TSRC,如果高吞吐率模式标识信息用于确定是否减小上下文模式的系数的语法元素,即使用标志high_throughput_mode_enabled_flag来表示高吞吐率模式标识信息,那么在根据高吞吐率模式标识信息确定数量参数的初始值RemCcbs时,可以将上述表2中的语句RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如下述表13所示的条件语句:
表13
Figure PCTCN2021103306-appb-000019
可见,在解析码流,确定出当前块的高吞吐率模式标识信息high_throughput_mode_enabled_flag之后,如果high_throughput_mode_enabled_flag不为0,那么设置RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>4,因此后面处理上下文模式解码的语法元素的个数就会减少。如果high_throughput_mode_enabled_flag为0,RemCcbs的初始值设置方法可以与上述表2一致,即设置RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2。
可选地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么也可以使用其他方式进行RemCcbs的设置。例如,设置一个参数parameter,可以将RemCcbs的初始值设置为RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>(2+parameter)。
其中,parameter可能由一个序列级或片级的标志或其他级别的标志来确定。具体地,如果这个标志不存在,parameter的值为0。parameter的值可能是0,1,2,3等。那么这样语法的修改就可以不用if、else的格式。可调节的范围也更灵活。
示例性的,在本申请中,可以设置一个ccb_right_shift_level_flag,这个ccb_right_shift_level_flag的值可取0,1,2,3,4,5,6。parameter的值等于ccb_right_shift_level_flag的值,如果ccb_right_shift_level_flag不存在,那么parameter的值为0。
进一步地,在本申请中,由于在数量参数未进入到语法元素的解码环节时所设置的参数值均可以认为是数量参数的初始值,因此,即使已经按照上述表1或表2的方式设置RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2,但是在进入到语法元素的解码环节之前(即在进行remBinsPass1--或RemCcbs--之前),只要高吞吐率模式标识信息(high_throughput_mode_enabled_flag)的取值为第一值成立,则可以按照本申请提出的方法重新对数量参数的初始值进行设置,并将重新设置的参数值确定为数量参数的初始值。
示例性的,基于上述表10,还可以替换为如下表14的条件语句:
表14
Figure PCTCN2021103306-appb-000020
示例性的,基于上述表11,还可以替换为如下表15的条件语句:
表15
Figure PCTCN2021103306-appb-000021
示例性的,基于上述表12,还可以替换为如下表16的条件语句:
表16
Figure PCTCN2021103306-appb-000022
示例性的,基于上述表13,还可以替换为如下表17的条件语句:
表17
Figure PCTCN2021103306-appb-000023
进一步地,在本申请的实施例中,解码器在根据高吞吐率模式标识信息确定数量参数的初始值之后,可以根据数量参数的初始值,确定是否使用上下文模式确定当前块的系数。
进一步地,在本申请的实施例中,如果数量参数的初始值的取值大于或者等于数量阈值,那么可以使用上下文模式确定当前块的系数;如果数量参数的初始值的取值小于数量阈值,那么可以使用旁路模式确定当前块的系数。
需要说明的是,在本申请的实施例中,如果数量参数的初始值的取值大于或者等于数量阈值,那么可以在使用上下文模式确定当前块的系数的同时,也使用旁路模式进行当前块的系数的确定,即至少使用上下文模式确定当前块的系数。
需要说明的是,在本申请的实施例中,如果数量参数的初始值的取值小于数量阈值,那么可以只使用旁路模式确定当前块的系数,而不再使用上下文模式确定当前块的系数。
可以理解的是,在本申请中,无论是RRC还是TSRC,仅当remBinsPass1>=4成立,或者RemCcbs>=4时,才处理上下文模式解码的语法元素,因此,数量阈值可以设置为4。
可以理解的是,在本申请的实施例中,在基于高吞吐率模式标识信息对数量参数的初始值进行减小或者置0(或1或2或3),并根据数量参数的初始值选择是否不再使用上下文模式进一步重建当前块的系数。
进一步地,在本申请中,可以基于上下文模式或旁路模式,对最后一个非零系数的位置之前的所有系数依次进行解码,最终便可以确定当前块的重建系数,即重建当前块的系数。
可以理解的是,在本申请中,可以按照预设扫描顺序对最后一个非零系数的位置之前的所有系数依次进行解码,其中,预设扫描顺序可以是对角线、Zigzag、水平、垂直、4×4子块扫描或者任何其它扫描顺序,本申请实施例不作任何限定。
需要说明的是,在本申请中,对于RRC,进入residual_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)函数后,需要确定一些块尺寸的信息,如确定zero-out后的块尺寸的对数log2ZoTbWidth,log2ZoTbHeight,横坐标在[0,(1<<log2ZoTbWidth)–1],纵坐标在[0,(1<<log2ZoTbHeight)–1]范围内的系数可能是非零系数。
(1<<log2ZoTbWidth)表示zero-out后的变换块的宽度,(1<<log2ZoTbHeight)表示zero-out后的变换块的高度。然后根据last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix等确定最后一个非零系数的位置。按扫描顺序最后一个非零系数之前的系数可能是非零系数。接着根据高吞吐率模式标识信息(high_throughput_mode_enabled_flag)进一步确定remBinsPass1的值,其中,在高吞吐率模式标识信息high_throughput_mode_enabled_flag的取值为第一值时,可以直接将remBinsPass1的值设置为0,或者,可以将remBinsPass1的值设置为小于((1<<(log2TbWidth+log2TbHeight))×7)>>2的数值。接着,通过remBinsPass1就确定了当前块中使用上下文模式解码的语法元素的个数。按扫描顺序最后一个非零系数之前的系数需要解码。对这些系数所在的子块,依次确定当前子块是否需要解码,如果需要解码,可以把一个子块中上下文模式解码的语法元素放在第一轮中,在第一轮中,每个系数最多可能需要处理4个上下文模式解码的语法元素1个sig_coeff_flag,2个abs_level_gtx_flag,1个par_level_flag,每次处理完一个上下文模式解码的语法元素remBinsPass1就会减1。如果一个系数足够大,在第一轮处理完上下文模式解码的几个语法元素后还需要处理剩余值,即abs_remainder。而如果remBinsPass1已经足够小了(不满足remBinsPass1>=4),第一轮就会结束,剩下的系数就会直接用旁路模式处理,即dec_abs_level。
相应地,在本申请中,对于TSRC,进入residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)函数后,需要确定一些块尺寸的信息。也同样需要根据高吞吐率模式标识信息(high_throughput_mode_enabled_flag)进一步确定RemCcbs的值,其中,在高吞吐率模式标识信息high_throughput_mode_enabled_flag的取值为第一值时,可以直接将RemCcbs的值设置为0,或者,可以将RemCcbs的值设置为小于((1<<(log2TbWidth+log2TbHeight))×7)>>2的数值。接着,通过RemCcbs就确定了当前块中使用上下文模式解码的语法元素的个数。按扫描顺序最后一个非零系数之前的系数需要解码。对这些系数所在的子块,依次确定当前子块是否需要解码,如果需要解码,可以把一个子块中上下文模式解码的语法元素放在两轮中,每个系数在第一轮和第二轮中分别最多处理4个上下文模式解码的语法元素。在第一轮和第二轮中,每次处理完一个上下文模式解码的语法元素RemCcbs就会减1。如果一个系数足够大,在第一轮和第二轮处理完上下文模式解码的几个语法元素后还需要处理剩余值,即abs_remainder。而如果RemCcbs已经足够小了(不满足RemCcbs>=4),前两轮就会结束,剩下的系数就会直接用旁路模式处理,这里仍然是abs_remainder。
进一步地,在本申请中,对于系数正负号标志信息coeff_sign_flag,如果transform_skip_flag[x0][y0][cIdx]==0||n>lastScanPosPass1||sh_ts_residual_coding_disabled_flag成立,coeff_sign_flag使用旁路模式解码,否则,coeff_sign_flag使用上下文模式解码。
可以理解的是,在本申请中,如果remBinsPass1或RemCcbs减小了,lastScanPosPass1就会减小,那么上下文模式解码的coeff_sign_flag也会减少。如果在high_throughput_mode_enabled_flag成立时把remBinsPass1或RemCcbs设为0,那么对应的RRC或TSRC在解码coeff_sign_flag时就不会用到上下文模式。如果在high_throughput_mode_enabled_flag成立时把remBinsPass1或RemCcbs的值设置的比现有方法小,那么对应的RRC或TSRC在解码coeff_sign_flag时就减少用到上下文模式的个数。这就进一步减少了上下文模式解码的语法元素的 数量。
综上所述,在本申请的实施例中,在高位宽、高码率、高质量的视频编解码中,由于系数分布规律与普通视频场景不同,在系数解码中通过减少甚至消除上下文模式解码的语法元素的个数,可以提高系数解码的吞吐量。同时由于上下文模式解码的语法元素设计时利用了普通视频中系数分布的规律,对普通视频的压缩效率有明显的提高。而上下文模式解码的语法元素设计并不符合高位宽、高码率、高质量的视频中系数分布的规律,减少甚至消除高位宽、高码率、高质量的视频上下文模式解码的语法元素的使用,不会降低压缩效率反而可以一定程度地提升压缩效率。
可以理解的是,在本申请中,对于特定的场景,可以选择在系数解码时减少使用上下文模式编码的语法元素的个数。也就是说,通常情况下,系数解码的方法还是和常见的方法一样。而在高位宽或高质量或高码率或高帧率的视频编解码情况下,在系数解码时减少使用上下文模式解码的语法元素的个数。
具体地,在本申请中,可以选择减少使用上下文模式解码的语法元素的个数到0。还可以选择减少使用上下文模式编码的语法元素的个数到0的同时,系数全部用旁路模式编码。其中,本申请提出的方法可以应用于RRC和/或TSRC。
示例性的,在本申请中,有一个序列级的标志sps_high_bit_depth_flag指示当前序列是否是高位宽序列。如果sps_high_bit_depth_flag的值为1,表示当前序列是高位宽序列,否则表示当前序列不是高位宽序列。在序列级,如果sps_high_bit_depth_flag的值为1,需要解码sps_high_throughput_mode_enabled_flag。sps_high_throughput_mode_enabled_flag是当前序列的高吞吐率模式使能的标志。如果sps_high_throughput_mode_enabled_flag的值为1,表示当前序列内的块使能高吞吐率模式,例如当前序列内的块不使用上下文模式编码的系数的语法元素,如果sps_high_throughput_mode_enabled_flag的值为0,表示当前序列内的块不使用高吞吐率模式。上述语法表中的high_throughput_mode_enabled_flag变为sps_high_throughput_mode_enabled_flag,具体地,序列参数集RBSP语法(Sequence parameter set RBSP syntax)如表18所示:
表18
Figure PCTCN2021103306-appb-000024
示例性的,在本申请中,有一个序列级的标志sps_extension_flag。在序列级,如果sps_extension_flag的值为1,需要解码sps_range_extension_flag。如果sps_range_extension_flag的值为1,需要解码sps_high_throughput_mode_enabled_flag。sps_high_throughput_mode_enabled_flag是当前序列的高吞吐率模式使能的标志。如果sps_high_throughput_mode_enabled_flag的值为1,表示当前序列内的块使能高吞吐率模式,例如当前序列内的块不使用上下文模式编码的系数的语法元素,如果sps_high_throughput_mode_enabled_flag的值为0,表示当前序列内的块不使用高吞吐率模式。上述语法表中的high_throughput_mode_enabled_flag变为sps_high_throughput_mode_enabled_flag。其中,可以认为sps_extension_flag是当前序列是否使用标准的扩展版本的标志。sps_range_extension_flag是当前序列是否使用范围扩展(range extension),比如高位宽,高码率等的标志。序列参数集RBSP语法(Sequence parameter set RBSP syntax)如上述表3所示,序列参数集范围扩展语法(Sequence parameter set range extension syntax)如上述表4所示。
其中,在语义上,sps_extension_flag等于1表示语法元素sps_range_extension_flag和sps_extension_7bits会出现在SPS RBSP语法结构中。sps_extension_flag等于0表示这些语法元素不会出现。sps_range_extension_flag等于1表示sps_range_extension()语法结构会在SPS RBSP语法结构中出现。如果sps_range_extension_flag没有出现,sps_range_extension_flag的值为0。
示例性的,在本申请中,有一个序列级的标志sps_extension_flag。在序列级,如果sps_extension_flag的值为1,需要解码sps_range_extension_flag。如果sps_range_extension_flag的值为1,需要解码sps_high_throughput_mode_enabled_flag。sps_high_throughput_mode_enabled_flag是当前序列的高吞吐率模式使能的标志。如果sps_high_throughput_mode_enabled_flag的值为1,表示当前序列内的块可以使能高吞吐率模式,例如当前序列内的块不使用上下文模式编码的系数的语法元素,如果sps_high_throughput_mode_enabled_flag的值为0,表示当前序列内的块不可以使能高吞吐率模式。如果sps_high_throughput_mode_enabled_flag没有出现,sps_high_throughput_mode_enabled_flag的值为0。
在片(slice)级,如果sps_high_throughput_mode_enabled_flag的值为1,需要解码sh_high_throughput_mode_flag。sh_high_throughput_mode_flag是当前片的高吞吐率模式使能的标志。如果sh_high_throughput_mode_flag的值为1,表示当前片使用高吞吐率模式,例如当前片内的块不使用上下文模式编码的系数的语法元素,如果sh_high_throughput_mode_flag的值为0,表示当前片不使用高吞吐率模式。具体地,序列参数集RBSP语法(Sequence parameter set RBSP syntax)如表19所示:
表19
Figure PCTCN2021103306-appb-000025
Figure PCTCN2021103306-appb-000026
也就是说,在本申请中,sps_high_throughput_mode_enabled_flag等于1,表示当前序列内的块使用高吞吐率模式;sps_high_throughput_mode_enabled_flag的值为0,表示当前序列内的块可以不使用高吞吐率模式。sh_high_throughput_mode_flag等于1,表示当前片内的块使用高吞吐率模式,例如设置当前片内的块的remBinsPass1和RemCcbs为0;sh_high_throughput_mode_flag的值为0,表示当前片内的块不使用高吞吐率模式。
需要说明的是,在本申请中,上述序列级的标志sps_high_bit_depth_flag指示当前序列是否是高位宽序列的标志,也可以替换为sps_high_bit_rate_flag指示当前序列是否是高码率序列的标志。或其他指示高位宽、高码率、高质量或无损编码的标志。
可以理解的是,在本申请的实施例中,上述方法均是以视频中所有分量统一使用该技术为例,所有分量指如RGB格式视频的R、G、B或YUV格式的Y、U、V(Y,Cb,Cr)。上述方法也可以仅用于某一个分量,如仅用于YUV格式的Y分量。上述方法也可以分别用于各个分量,即每一个分量都可单独控制开关。
本申请实施例提供一种解码方法,编解码器在进行系数的编解码时,可以通过高吞吐率模式的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。提高系数编码的吞吐量和编解码速度,降低复杂度,从而提升压缩性能。
本申请的另一实施例提出了一种解码方法,应用于解码器,图14为解码方法的实现流程示意图二,如图14所示,解码器进行解码的方法可以包括以下步骤:
步骤103、确定已解码信息,并根据已解码信息确定当前块的高吞吐率模式标识信息。
步骤102、基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。
在本申请的实施例中,可以先确定已解码信息,然后可以根据已解码信息确定当前块的高吞吐率模式标识信息。接着可以基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。其中,高吞吐率模式标识信息可以用于提升编解码的吞吐率。
可以理解的是,在本申请的实施例中,在对当前块进行编解码时,已解码信息可以表示当前已编解码块的信息。相应地,在对当前部分内容进行编解码时,已解码信息可以表示当前已编解码的部分内容的信息。
可选地,在本申请的实施例中,已解码信息至少为下述其中一项的解码信息:前n个已解码slice,前n个已解码最大编码单元LCU,前n个已解码编码树单元CTU,前n个已解码编码单元CU,前n个已解码变换单元TU,前n个已解码变换块TB;其中,n为大于0的整数。
也就是说,在本申请中,当前部分内容包括但不限于当前slice,当前编码树单元CTU,当前最大编码单元LCU,当前CU,当前TU或当前TB等。相应地,已编解码的部分内容包括但不限于已编解码的slice,已编解码的最大编码单元LCU,已编解码的CU,已编解码的TU或已编解码的TB等。
示例性的,在本申请的实施例中,已编解码的部分内容包括但不限于前n个slice,前n个CTU,前n个LCU,前n个CU,前n个TU或前n个TB等,其中n为1,2……等。
示例性的,在本申请的实施例中,已编解码的部分内容包括但不限于当前部分内容之前所有的(一定范围内)slice,CTU,LCU,CU,TU或TB等。
进一步地,在本申请的实施例中,已解码信息至少为下述其中一种信息:码率、系数、残差、比特数。
也就是说,在本申请中,已解码信息包括但不限于码率、系数、残差、比特数以及其他一些变量或参数或参数的统计。
进一步地,在本申请的实施例中,可以已解码信息确定当前块的高吞吐率模式标识信息的取值,从而可以基于高吞吐率模式标识信息的取值确定是否使用高吞吐率模式。也就是说,可以根据当前已编解码的部分内容的信息确定当前部分内容的编解码要不要使用高吞吐率的编解码方法(高吞吐率模式)。
需要说明的是,在本申请的实施例中,在根据已解码信息确定当前块的高吞吐率模式标识信息时,如果已解码信息满足第二预设条件,则确定高吞吐率模式标识信息的取值为第一值;如果已解码信息不满足第二预设条件,则确定高吞吐率模式标识信息的取值为第二值。
相应地,在本申请中,高吞吐率模式标识信息的取值可以为第一值或第二值。具体地,高吞吐率模式标识信息的取值不同,确定当前块的系数(或确定当前块的系数的值)的方式也不同。其中,高吞吐率模式下的编解码方法包括但不限于对齐(alignment)操作,全旁路模式等。
可以理解的是,在本申请的实施例中,可以将不使用上下文模式编码的系数的语法元素的方法确定为全旁路模式。
进一步地,在本申请的实施例中,第二预设条件可以用于对码率的高低进行确定,即第二预设条件可以对是否需要降低码率进行判断。具体地,第二预设条件可以包括下述条件之一:码率大于等于第一阈值,系数的绝对值的累加值大于等于第二阈值,系数的绝对值的平均值大于等于第三阈值,残差的绝对值的累加值大于等于第四阈值,残差的绝对值的平均值大于等于第五阈值,比特数大于等于第六阈值。
示例性的,在本申请的实施例中,对当前CTU,如果前一个CTU的一些变量或参数符合条件(已解码信息满足第二预设条件),例如,前一个CTU使用的比特数达到或超过一个阈值,或前一个CTU的系数值或残差值的绝对值累加值超过一个阈值,或前一个CTU的系数值或残差值的绝对值的平均值超过一个阈值,那么可以确定高吞吐率模式标识信息的取值为第一值,即可以确定当前CTU使用高吞吐率模式;否则认为已解码信息不满足第二预设条件,则确定高吞吐率模式标识信息的取值为第二值,即当前CTU不使用高吞吐率模式。
示例性的,在本申请的实施例中,对当前TB,如果前一个TB的一些变量或参数符合条件(已解码信息满足第 二预设条件),例如,前一个TB使用的比特数达到或超过一个阈值或前一个TB的系数值或残差值的绝对值累加值超过一个阈值,或前一个TB的系数值或残差值的绝对值的平均值超过一个,那么可以确定高吞吐率模式标识信息的取值为第一值,即可以确定当前TB使用高吞吐率模式;否则认为已解码信息不满足第二预设条件,则确定高吞吐率模式标识信息的取值为第二值,即当前TB不使用高吞吐率模式。
示例性的,在本申请的实施例中,对当前CTU,如果当前slice中前面已编码的CTU的一些变量或参数符合条件(已解码信息满足第二预设条件),例如,当前slice中前面已编码的CTU使用的比特数的平均值达到或超过一个阈值,或当前slice中前面已编码的CTU的系数值或残差值的绝对值的平均值超过一个阈值,那么可以确定高吞吐率模式标识信息的取值为第一值,即可以确定当前CTU使用高吞吐率模式;否则认为已解码信息不满足第二预设条件,则确定高吞吐率模式标识信息的取值为第二值,即当前CTU不使用高吞吐率模式。
具体地,在本申请的实施例中,基于高吞吐率模式标识信息的取值,在确定当前块的系数时,可以选择使用上下文模式、旁路模式以及对齐处理等方式中的至少之一。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明是否进行对齐处理的标志位。
可选地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么可以选择使用对齐处理确定当前块的系数;如果高吞吐率模式标识信息的取值为第二值,那么可以选择跳过对齐处理确定当前块的系数。
可见,可以根据高吞吐率模式标识信息的取值判断是否使用对齐处理确定当前块的系数。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明是否仅使用旁路模式的标志位。
可选地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么可以选择使用旁路模式确定当前块的系数;如果高吞吐率模式标识信息的取值为第二值,那么可以选择使用上下文模式和旁路模式至少之一确定当前块的系数。
可见,可以根据高吞吐率模式标识信息的取值判断是否仅使用旁路模式确定当前块的系数,即可以基于高吞吐率模式标识信息的取值确定是否均使用旁路模式确定当前块的全部系数(或确定当前块的全部系数的值)。例如,如果高吞吐率模式标识信息的取值为第一值,那么当前块的所有的需要解码的语法元素sb_coded_flag使用旁路模式编码。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明减小数量参数的初始值(或将数量参数设置为0)的标志位。
可选地,在本申请中,可以先根据高吞吐率模式标识信息确定数量参数的初始值;如果数量参数的初始值的取值大于或者等于数量阈值,那么可以选择使用上下文模式和旁路模式至少之一确定当前块的系数;如果数量参数的初始值的取值小于数量阈值,那么可以选择使用旁路模式确定当前块的系数。
需要说明的是,在本申请的实施例中,数量参数的初始值指示了能使用上下文模式编解码的语法元素的个数的最大值。具体地,数量参数可以为一个表示当前块可用的剩余的上下文模式编码的语法元素的个数的参数,而数量参数的初始值即为该数量参数初始设定的值。
可见,可以根据高吞吐率模式标识信息的取值选择不同的方式确定数量参数的初始值,即高吞吐率模式标识信息可以用于确定数量参数的初始值,然后再基于数量参数的初始值判断是否使用上下文模式确定当前块的系数。
示例性的,在本申请中,可以设置第一值为1,第二值为0;也可以设置第一值为true,第二值为false。本申请不作任何限定。
示例性的,在本申请中,如果高吞吐率模式标识信息用于确定是否使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数(或当前块的系数的值),那么可以使用标志high_throughput_mode_enabled_flag来表示高吞吐率模式标识信息。
需要说明的是,在本申请的实施例中,上述high_throughput_mode_enabled_flag可以是一个序列(sequence)级的标志或图像(picture)级的标志或片(slice)级的标志或块(block)级的标志或其他级别的标志,块级的标志包括最大编码单元(LCU)级的标志或编码树单元(CTU)级的标志或编码单元(CU)级的标志或其他块级的标志。其中,high_throughput_mode_enabled_flag甚至也可以是更高级别的标志,比如视频可用性信息(Video Usability Information,VUI)、补充增强信息(Supplemental Enhancement Information,SEI)等。
可以理解的是,在本申请中,正是由于全旁路模式或高吞吐率模式能明显提升编解码的吞吐率,因此全旁路模式或高吞吐率模式适用于超高码率的视频编解码。正是因为超高码率的视频编解码本身对解码的吞吐率的要求就很高,而且另一方面超高码率的视频的码流中的系数通常都很大,这时候sig_coeff_flag,abs_level_gtx_flag,par_level_flag等并不会起到明显的作用,相反可能会增加开销。也就是说,全旁路模式或高吞吐率模式在超高码率的视频编解码时,吞吐率明显提升了,而压缩效率并不会降低或明显降低。
但是,全旁路模式或高吞吐率模式并不适合于低码率的视频编解码或者码率不够高的视频编解码。这是由于在低码率的视频编解码的场景下,虽然吞吐率提高明显,但是压缩性能会明显下降。且在低码率的视频编解码中,系数通常比较小,这时候sig_coeff_flag,abs_level_gtx_flag,par_level_flag等对压缩性能非常有帮助,全旁路模式或高吞吐率模式可能会跳过sig_coeff_flag,abs_level_gtx_flag,par_level_flag,这样的操作无法保证压缩性能,高吞吐率模式把sb_coded_flag全都用旁路模式,以及对齐操作也会损失压缩效率。
可见,如果视频的码率不够高,便可以认为对解码吞吐率的要求也就不够高,那么也没有必要以牺牲压缩性能为代价换取更高的吞吐率。针对于此,本申请所提出的一种自适应高吞吐率模式(adaptive high throughput mode),能够根据已编解码的视频的情况自适应地判断当前部分是否使用高吞吐率模式,从而可以在码率足够高的时候能明显提高吞吐率而且不明显损失压缩性能,在码率不够高的时候也不会明显损失压缩性能,具有更高的适应性。
可以理解的是,在本申请的实施例中,针对自适应高吞吐率模式,主要选择以高吞吐率模式为例进行描述,而本申请实施例提出的自适应高吞吐率模式也可以套用到全旁路模式而演变为为自适应全旁路模式(adaptive  full-bypass mode),或者套用到其他用于提高吞吐率的模式中,本申请不进行具体限定。
进一步地,在本申请的实施例中,VVC在高位宽编码中采纳了一个基于历史的莱斯参数(rice parameter)导出技术。这个技术对每一个分量设置了一个变量StatCoeff[cIdx],其中cIdx可以取0,1,2,分别代表YUV的三个分量。变量StatCoeff[cIdx]在每个slice或tile开始时会被初始化,在每个TB编解码时会更新一次变量StatCoeff[cIdx]的值。变量StatCoeff[cIdx]用于推导系数编码的rice parameter。
也就是说,在本申请中,自适应高吞吐率模式(adaptive high throughput mode)可以利用变量StatCoeff[cIdx]来确定当前部分是否使用高吞吐率模式。
需要说明的是,在本申请的实施例中,在初始化变量StatCoeff[cIdx]时,如果当前序列不使用基于历史的莱斯参数(rice parameter)导出技术,变量StatCoeff[cIdx]初始化为0,其中cIdx等于0,1,2。否则,如果变量比特深度(bitDepth)大于12,变量StatCoeff[cIdx]初始化为4,否则变量StatCoeff[cIdx]初始化为2。具体地,变量StatCoeff[cIdx]更新的语法可以如表20所示,
表20
Figure PCTCN2021103306-appb-000027
其中,sps_persistent_rice_adaptation_enabled_flag是该序列是否使用基于历史的莱斯参数(rice parameter)导出技术的标志。
具体地,在本申请中,如果TB中第一个非零的指数哥伦布编码的系数使用了abs_remainder,对应分量的StatCoeff[cIdx]更新为StatCoeff[cIdx]=(StatCoeff[cIdx]+Floor(Log2(abs_remainder[n]))+2)>>1。如果TB中第一个非零的指数哥伦布编码的系数使用了dec_abs_level,对应分量的StatCoeff[cIdx]更新为StatCoeff[cIdx]=(StatCoeff[cIdx]+Floor(Log2(dec_abs_level[n])))>>1。
可见,使用abs_remainder的情况比dec_abs_level的情况多了一个“+2”,因为如果TB里有很多大的系数,TB中第一个非零的指数哥伦布编码的系数通常会使用abs_remainder,而如果TB中第一个非零的指数哥伦布编码的系数使用了dec_abs_level,那说明这个TB的系数普遍较小,因为所有使用上下文模式编码的系数都小于4。即说明使用abs_remainder的情况系数普遍偏大的可能性更大,而使用dec_abs_level的情况系数普遍偏大的可能性很小。
需要说明的是,在本申请的实施例中,由于在高吞吐率模式时,系数只能使用dec_abs_level,因此上述部分并没有考虑到高吞吐率模式。而高吞吐率模式下显然系数值应该都比较大,因此在这种情况下应该“+2”。
也就是说,在本申请中,每个TB开始解码之前都可以得到根据已编码端TB确定的变量StatCoeff[cIdx],所以可以根据变量StatCoeff[cIdx]来确定当前TB是否使用高吞吐率模式。其中,变量StatCoeff[cIdx]是在RRC中更新的,可以根据变量StatCoeff[cIdx]来确定RRC和TSRC的当前TB是否使用高吞吐率模式。也可以只根据变量StatCoeff[cIdx]来确定RRC的当前TB是否使用高吞吐率模式。也可以根据变量StatCoeff[cIdx]来确定RRC的当前CU或当前CTU是否使用高吞吐率模式。
进一步地,在本申请的实施例中,如果已编码信息为莱斯参数,那么在确定已编码信息时,可以先确定一变量的取值,其中,第一变量可以为变量StatCoeff[cIdx],然后可以根据第一变量的取值确定已编码信息。
具体地,在本申请中,在根据第一变量的取值确定已编码信息时,如果第一变量的取值大于等于第七阈值,则确定莱斯参数满足第二预设条件,即确定高吞吐率模式标识信息的取值为第一值,进而选择使用高吞吐率模式;如果第一变量的取值小于第七阈值,则确定莱斯参数指不满足第二预设条件,即确定高吞吐率模式标识信息的取值为第二值,进而选择不使用高吞吐率模式。
示例性的,如果变量StatCoeff[cIdx]的取值大于或者等于一个阈值,当前TB就使用高吞吐率模式,否则当前TB不使用高吞吐率模式。其中,该阈值的取值可能是3,4,5等。
进一步地,在本申请的实施例中,在SPS语法上,可以设置一个序列级的标志sps_high_throughput_mode_enabled_flag。设置一个TB级的标志high_throughput_mode_flag。其中,sps_high_throughput_mode_enabled_flag的取值等于1,表示当前序列内的块可以使用高吞吐率模式,否则表示当前序列内的块不使用高吞吐率模式。
可以理解的是,在本申请中,在序列级如果“可以”使用,在TB即确定是否使用。基于上述表1,sps_high_throughput_mode_enabled_flag的语义修改为如下表21所示(修改部分使用下划线标注),
表21
Figure PCTCN2021103306-appb-000028
Figure PCTCN2021103306-appb-000029
Figure PCTCN2021103306-appb-000030
Figure PCTCN2021103306-appb-000031
Figure PCTCN2021103306-appb-000032
示例性的,在本申请中,基于上述表2,sps_high_throughput_mode_enabled_flag的语义修改为如下表22所示(修改部分使用下划线标注),
表22
Figure PCTCN2021103306-appb-000033
进一步地,在本申请的实施例中,如果已编码信息为莱斯参数,那么在确定已编码信息时,可以先确定二变量的取值,其中,第二变量可以为变量sh_ts_residual_coding_rice_idx_minus1,然后可以根据第二变量的取值确定已编码信息。
具体地,在本申请中,在根据第二变量的取值确定已编码信息时,如果第二变量的取值大于等于第八阈值,则确定莱斯参数满足第二预设条件,即确定高吞吐率模式标识信息的取值为第一值,进而选择使用高吞吐率模式;如果第二变量的取值小于第八阈值,则确定莱斯参数指不满足第二预设条件,即确定高吞吐率模式标识信息的取值为第二值,进而选择不使用高吞吐率模式。
需要说明的是,在本申请的实施例中,VVC在高位宽编码中,对TSRC的莱斯参数rice parameter推导方法采用了和RRC不同的方式。TSRC的rice parameter是根据sh_ts_residual_coding_rice_idx_minus1推导出来的。其中,sh_ts_residual_coding_rice_idx_minus1+1确定了residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)用的莱斯参数rice parameter。所以对TSRC的TB,可以根据sh_ts_residual_coding_rice_idx_minus1确定当前TB是否使用高吞吐率模式。具体地,如果sh_ts_residual_coding_rice_idx_minus1的取值大于或者等于一个阈值,当前slice的TSRC的TB使用高吞吐率模式,否则当前slice的TSRC的TB不使用高吞吐率模式。进一步地,也可以根据sh_ts_residual_coding_rice_idx_minus1确定RRC的当前TB是否使用高吞吐率模式。
示例性的,在本申请中,基于上述表2,sps_high_throughput_mode_enabled_flag的语义修改为如下表23所示(修改部分使用下划线标注),
表23
Figure PCTCN2021103306-appb-000034
其中,可以认为(a=b?c:d)和(if(b){a=c;}else{a=d;})表达相同的含义。
可见,在本申请的实施例中,可以通过使用变量StatCoeff[cIdx]和\或变量sh_ts_residual_coding_rice_idx_minus1进行是否适合使用高吞吐率模式的确定,能够提升高吞吐率模式使用的适应性。
综上所述,在本申请的实施例中,可以通过高吞吐率模式的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。具体地,一方面,由于系数分布规律与普通视频场景不同,在系数解码中通过减少甚至消除上下文模式解码的语法元素的个数,可以提高系数解码的吞吐量。另一方面,高吞吐率模式可以形成大片连续的且对齐的旁路模式编码,能够进一步提升吞吐率。且自适应高吞吐率模式可以根据已编解码的视频的情况自适应地判断当前部分是否使用高吞吐率模式,能够在码率足够高的时候能明显提高吞吐率而且不明显损失压缩性能,在码率不够高的时候也不会明显损失压缩性能,具有更高的适应性。
也就是说,本申请提出的高吞吐率模式把是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,能够在使用高吞吐率模式的情况下,组成成片的且对齐的旁路模式编码。而本申请提出的自适应高吞吐率模式,可以基于已编解码的部分的信息确定当前部分是否使用高吞吐率模式,能够提升高吞吐率模式使用的适应性。
本申请实施例提供了一种解码方法,解码器解码码流,编解码器在进行系数的编解码时,可以通过高吞吐率模式的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。提高系数编码的吞吐量和编解码速度,降低复杂度,且自适应高吞吐率模式可以根据已编解码的视频的情况自适应地判断当前部分是否使用高吞吐率模式,能够在码率足够高的时候能明显提高吞吐率而且不明显损失压缩性能,在码率不够高的时候也不会明显损失压缩性能,具有更高的适应性,从而提升压缩性能。
基于上述实施例,本申请的另一实施例提出了一种编码方法,应用于编码器,图15为编码方法的实现流程示意图一,如图15所示,编码器进行编码的方法可以包括以下步骤:
步骤201、确定当前块的高吞吐率模式标识信息。
步骤202、基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码当前块的系数,生成码流。
在本申请的实施例中,编码器可以确定当前块的高吞吐率模式标识信息。然后可以基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码当前块的系数,从而生成码流。
需要说明的是,在本申请的实施中,高吞吐率模式标识信息可以用于提升编解码的吞吐率。
进一步地,在本申请中,当前块可以为未进行变换处理的图像块,也可以为经过变换处理后的变换块。例如,当前块可以为zero-out后的变换块。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数的标志位,或者,可以将高吞吐率模式标识信息理解为一个表明使用上下文 模式、旁路模式以及对齐处理至少之一确定当前块的系数的值的标志位。具体地,编码器可以确定作为高吞吐率模式标识信息的一个变量,从而可以通过该变量的取值来实现高吞吐率模式标识信息的确定。
需要说明的是,在本申请中,高吞吐率模式标识信息的取值可以为第一值或第二值。具体地,高吞吐率模式标识信息的取值不同,确定当前块的系数(或确定当前块的系数的值)的方式也不同。
具体地,在本申请的实施例中,基于高吞吐率模式标识信息的取值,在编码当前块的系数时,可以选择使用上下文模式、旁路模式以及对齐处理等方式中的至少之一。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明是否进行对齐处理的标志位。
可选地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么可以选择使用对齐处理编码当前块的系数,生成码流;如果高吞吐率模式标识信息的取值为第二值,那么可以选择跳过对齐处理编码当前块的系数,生成码流。
可见,可以根据高吞吐率模式标识信息的取值判断是否使用对齐处理编码当前块的系数。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明是否仅使用旁路模式的标志位。
可选地,在本申请中,如果高吞吐率模式标识信息的取值为第一值,那么可以选择使用旁路模式编码当前块的系数,生成码流;如果高吞吐率模式标识信息的取值为第二值,那么可以选择使用上下文模式和旁路模式至少之一编码当前块的系数,生成码流。
可见,可以根据高吞吐率模式标识信息的取值判断是否仅使用旁路模式编码当前块的系数,即可以基于高吞吐率模式标识信息的取值确定是否均使用旁路模式确定当前块的全部系数(或确定当前块的全部系数的值)。例如,如果高吞吐率模式标识信息的取值为第一值,那么当前块的所有的需要编码的语法元素sb_coded_flag使用旁路模式编码。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明减小数量参数的初始值(或将数量参数设置为0)的标志位。
可选地,在本申请中,可以先根据高吞吐率模式标识信息确定数量参数的初始值;如果数量参数的初始值的取值大于或者等于数量阈值,那么可以选择使用上下文模式和旁路模式至少之一编码当前块的系数,生成码流;如果数量参数的初始值的取值小于数量阈值,那么可以选择使用旁路模式编码当前块的系数,生成码流。
需要说明的是,在本申请的实施例中,数量参数的初始值指示了能使用上下文模式编解码的语法元素的个数的最大值。具体地,数量参数可以为一个表示当前块可用的剩余的上下文模式编码的语法元素的个数的参数,而数量参数的初始值即为该数量参数初始设定的值。
可见,可以根据高吞吐率模式标识信息的取值选择不同的方式确定数量参数的初始值,即高吞吐率模式标识信息可以用于确定数量参数的初始值,然后再基于数量参数的初始值判断是否使用上下文模式编码当前块的系数。
示例性的,在本申请中,可以设置第一值为1,第二值为0;也可以设置第一值为true,第二值为false。本申请不作任何限定。
示例性的,在本申请中,如果高吞吐率模式标识信息用于确定是否使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数(或当前块的系数的值),那么可以使用标志high_throughput_mode_enabled_flag来表示高吞吐率模式标识信息。
例如,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以表示在进行当前块的系数(或当前块的系数的值)的确定时,进行对齐处理;如果high_throughput_mode_enabled_flag的取值为0,那么可以表示在进行当前块的系数(或当前块的系数的值)的确定时,不进行对齐处理。
例如,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以表示仅使用旁路模式确定当前块的系数(或当前块的系数的值);如果high_throughput_mode_enabled_flag的取值为0,那么可以表示可以使用上下文模式和旁路模式至少之一确定当前块的系数(或当前块的系数的值)。
例如,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以将数量参数的初始值的取值确定为第一数量值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值);如果high_throughput_mode_enabled_flag的取值为0,那么可以根据当前块的高度参数和宽度参数确定数量参数的初始值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值)。
需要说明的是,在本申请的实施例中,编码器还可以确定当前块的高度参数和宽度参数。具体地,当前块的高度参数和宽度参数可以用于对当前块的尺寸进行确定。
示例性的,在本申请中,对于经过zero-out后的当前块,在确定当前块的尺寸的对数log2ZoTbWidth和log2ZoTbHeight之后,可以使用(1<<log2ZoTbHeight)表示对应的高度参数,同时可以使用(1<<log2ZoTbWidth)表示对应的宽度参数。
示例性的,在本申请中,第一数量值为大于或等于0,且小于数量阈值的整数。例如,如果数量阈值为4,那么第一数量值可以设置为0或1或2或3。
例如,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以将数量参数的初始值的取值确定为第二数量值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值);如果high_throughput_mode_enabled_flag的取值为0,那么可以根据当前块的高度参数和宽度参数确定数量参数的初始值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值)。
示例性的,在本申请中,第二数量值可以用于减小数量参数的初始值。具体地,第二数量值可以小于根据当前块的高度参数和宽度参数确定的数量参数的初始值的取值。
例如,在本申请中,如果high_throughput_mode_enabled_flag的取值为1,那么可以根据当前块的高度参数和宽度参数以及第一移位参数确定数量参数的初始值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值);如果high_throughput_mode_enabled_flag的取值为0,那么可以根据根据当前块的高度参数和宽度参数以及第二移位参数确定数量参数的初始值,进而再根据数量参数的初始值的取值确定是否使用上下文模式确定当前块的系数(或当前块的系数的值)。
示例性的,在本申请中,第一移位参数和第二移位参数用于右移处理,第一移位参数大于第二移位参数。
进一步地,在本申请的实施例中,编码器可以确定出视频标识信息;如果视频标识信息指示视频满足第一预设条件,那么可以执行高吞吐率模式标识信息的确定流程,即确定当前块的高吞吐率模式标识信息。
需要说明的是,在本申请的实施例中,第一预设条件至少包括下述条件之一:位宽大于位宽阈值;码率大于码率阈值;帧率大于帧率阈值;量化参数QP小于质量阈值;无损压缩。
具体地,在本申请中,位宽阈值可以设置为14bit(或者12bit,或者16bit),若待编解码的视频帧的位宽大于14bit,则可以认为其为高位宽的非常规视频;码率阈值可以设置为1Gbit/s,若待编解码的视频帧的码率大于1Gbit/s,则可以认为其为高码率的非常规视频;帧率阈值可以设置为90Hz(或者120Hz),若待编解码的视频帧的帧率大于90Hz,则可以认为其为高帧率的非常规视频;质量阈值可以按照不同的位宽设置不同的具体数值,例如设置输入位宽为12bit,且按照12bit编码时对应的质量阈值为0,若待编解码的视频帧的位宽为12bit且在按照12bit编码的情况下确定的量化参数小于对应的质量阈值为0,则可以认为其为高质量的非常规视频。
可以理解的是,在本申请中,对于常规视频而言,系数编解码方法与相关技术中的已有方法相同;但是针对某种情况,比如高位宽或高质量或高码率或高帧率或无损压缩的非常规视频,本申请实施例在编解码系数时,可以增加高吞吐率模式标识信息的确定流程,即确定当前块的高吞吐率模式标识信息。
也就是说,非常规视频的位宽比常规视频的位宽高,非常规视频的质量比常规视频的质量高,非常规视频的码率比常规视频的码率高,非常规视频的帧率比常规视频的帧率高,而且非常规视频为无损压缩。
进一步地,在本申请实施例中,首先需要判断当前的视频是否为常规视频,可以用视频标识信息来表示。具体地,如果视频标识信息的取值为第一值,那么可以确定视频标识信息指示视频满足第一预设条件,即视频为非常规视频;如果视频标识信息的取值为第二值,那么可以确定视频标识信息指示视频不满足第一预设条件,即视频为常规视频。
示例性的,在本申请中,可以设置第一值为1,第二值为0;也可以设置第一值为true,第二值为false。本申请不作任何限定。
进一步地,在本申请中,视频标识信息可以是序列(sequence)级的标志,甚至也可以是更高级别的标志,比如视频可用性信息(Video Usability Information,VUI)、补充增强信息(Supplemental Enhancement Information,SEI)等。判断视频是否满足第一预设条件,还可以通过判断该视频是否满足高位宽、或者是否满足高码率、或者是否满足高质量、或者是否满足无损压缩等,下面将以这四种情况为例分别进行描述。
可选地,在本申请中,当视频标识信息为高位宽序列标识信息时,若视频满足高位宽,则确定高位宽序列标识信息指示视频满足第一预设条件。
可选地,在本申请中,当视频标识信息为高码率序列标识信息时,若视频满足高码率,则确定高码率序列标识信息指示视频满足第一预设条件。
可选地,在本申请中,当视频标识信息为高质量序列标识信息时,若视频满足高质量,则确定高质量序列标识信息指示视频满足第一预设条件。
可选地,在本申请中,当视频标识信息为高帧率序列标识信息时,若视频满足高帧率,则确定高帧率序列标识信息指示视频满足第一预设条件。
可选地,在本申请中,当视频标识信息为无损压缩序列标识信息时,若视频满足无损压缩,则确定无损压缩序列标识信息指示视频满足第一预设条件。
也就是说,在本申请中,视频标识信息可以是高位宽序列标识信息(用sps_high_bit_depth_flag表示),用于指示当前的视频是否为高位宽序列;或者也可以替换为高码率序列标识信息(用sps_high_bit_rate_flag表示),用于指示当前的视频是否为高码率序列;或者也可以替换为其他指示高位宽、高码率、高质量、高帧率或者无损压缩的标识信息,本申请实施例不作具体限定。
可见,在本申请中,高吞吐率模式标识信息的确定可以依赖于视频标识信息的确定,即high_throughput_mode_enabled_flag可能依赖于一些其他的标志,比如说高位宽标志或高码率标志或SPS扩展标志(sps_extension_flag)等,SPS扩展标志在标准的扩展版本中可以打开,比如说VVC针对高位宽,高码率编码制定的扩展版本。
示例性的,在本申请中,当高位宽标志或高码率标志或SPS扩展标志的值为1时,需要解码上述high_throughput_mode_enabled_flag标志;当高位宽标志或高码率标志或SPS扩展标志的值不为1时,则不需要解码上述high_throughput_mode_enabled_flag标志。
需要说明的是,在本申请的实施例中,高吞吐率模式标识信息(high_throughput_mode_enabled_flag)可以是一个序列(sequence)级的标志或图像(picture)级的标志或片(slice)级的标志或块(block)级的标志或其他级别的标志,块级的标志包括最大编码单元(LCU)级的标志或编码树单元(CTU)级的标志或编码单元(CU)级的标志或其他块级的标志。其中,high_throughput_mode_enabled_flag甚至也可以是更高级别的标志,比如视频可用性信息(Video Usability Information,VUI)、补充增强信息(Supplemental Enhancement Information,SEI)等。
需要说明的是,视频标准中通常所说的系数编码可以包括编码和解码两部分,因此,系数编码包括编码器侧的系数编码方法和解码器侧的系数解码方法。本申请实施例则针对解码器侧的系数解码方法进行描述。
需要说明的是,在本申请实施例中,子块编码标识信息可以用sb_coded_flag表示。示例性的,如果sb_coded_flag的取值为1,那么可以确定需要对待解码子块内的所有系数依次进行解码;如果sb_coded_flag的取值为0,那么可以确定不需要对待解码子块内的所有系数依次进行解码,这时候待解码子块内的所有系数均为零。
可选地,在本申请中,针对某种情况,在系数编码时,扫描到的子块都默认需要编码,或者说扫描到的子块都默认包含非零系数。也就是说通常情况下,系数编码的方法还是与相关技术中的已有方法一样。某种情况,比如可以是指高位宽或高质量或高码率或高帧率的视频编解码或无损压缩的视频。这种情况下非零系数很多,扫描到的子块几乎都是需要编码;或者说,扫描到的子块几乎都包含非零系数。这样就不需要在码流中传输sb_coded_flag,编码器/解码器也就不需要处理这个标志,从而能够加快编解码速度。由于去掉了一个几乎没有的标志,此时还会带来一点压缩性能的提升。
进一步地,在本申请中,如果获得的高吞吐率模式标识信息的取值为第一值,那么可以使用旁路模式确定当前块的子块编码标识信息sb_coded_flag,而不再使用上下文模式确定当前块的子块编码标识信息sb_coded_flag。
需要说明的是,在本申请中,对于TSRC,sb_coded_flag是用上下文模式解码的,如果将sb_coded_flag去掉或者将sb_coded_flag改为旁路模式解码,那么整个块的所有的系数之间就都是用旁路模式解码的,会进一步提高编解码速度或吞吐量。
示例性的,在本申请中,如果high_throughput_mode_enabled_flag的取值为第一值,那么sb_coded_flag使用旁路模式解码;如果high_throughput_mode_enabled_flag的取值为第二值,那么sb_coded_flag使用上下文模式解码。
进一步地,在本申请中,如果解码获得的高吞吐率模式标识信息的取值为第一值,那么使用旁路模式确定当前块对应的最后一个非零系数的水平坐标的前缀信息last_sig_coeff_x_prefix、最后一个非零系数的竖直坐标的前缀信息last_sig_coeff_y_prefix、最后一个非零系数的水平坐标的后缀信息last_sig_coeff_x_prefix以及最后一个非零系数的竖直坐标的后缀信息last_sig_coeff_y_suffix。
需要说明的是,在本申请中,对于RRC,last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix是用上下文模式解码的,如果将last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix去掉或者将它们改为旁路模式解码,会进一步提高编解码速度或吞吐量。
示例性的,在本申请中,如果high_throughput_mode_enabled_flag的取值为第一值,那么last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix使用旁路模式解码;如果high_throughput_mode_enabled_flag的取值为第二值,那么last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix使用上下文模式解码。
可以理解的是,在本申请的实施例中,上述方法均是以视频中所有分量统一使用该技术为例,所有分量指如RGB格式视频的R、G、B或YUV格式的Y、U、V(Y,Cb,Cr)。上述方法也可以仅用于某一个分量,如仅用于YUV格式的Y分量。上述方法也可以分别用于各个分量,即每一个分量都可单独控制开关。本申请不进行具体限制。
由此可见,本申请实施例提出的编码方法,在编解码当前块的系数的过程中,可以通过高吞吐率模式(high throughput mode)的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一编码当前块的系数,生成码流。
可以理解的是,在本申请的实施例中,当高吞吐率模式被使能时,在系数值(coefficient level)编解码和残差值(residual level)编解码时不使用上下文模式编码的语法元素。RRC中的remBinsPass1和TSRC中的RemCcbs被设置为0,也就是说,当前TB可使用的上下文模式编码的二元符号(bin)个数被设置为0。那么所有的系数值或残差值都使用旁路模式编解码。
可以理解的是,在本申请的实施例中,当高吞吐率模式被使能时,所有的需要解码的语法元素sb_coded_flag使用旁路模式编解码。
进一步地,在本申请的实施例中,在使用所述对齐处理确定所述当前块的系数时,对于RRC,可以选择在使用所述上下文模式确定最后一个非零系数位置之后进行对齐处理,并使用所述旁路模式确定所述最后一个非零系数位置以外的其他语法元素;对于TSRC,可以选择在使用所述旁路模式确定第一个语法元素之前进行对齐处理。
可以理解的是,在本申请的实施例中,当高吞吐率模式被使能时,对齐(alignment)操作发生在进入子块之前,也就是说,对RRC,对齐处理在last_sig_coeff_x_prefix,last_sig_coeff_y_prefix,last_sig_coeff_x_suffix和last_sig_coeff_y_suffix之后,对TSRC,对齐处理就在整个TB的开始。或者说对齐处理发生在TB中第一个旁路模式编码的语法元素之前。
示例性的,如上述图11所示,在RRC的码流中,除了最后一个非零系数位置需要使用到上下文模式的编码外,其他所有的语法元素都使用旁路模式,即在last_sig_coeff_x_prefix,last_sig_coeff_y_prefix,last_sig_coeff_x_suffix和last_sig_coeff_y_suffix之后进行对齐处理,而且在最后一个非零系数位置后进行对齐处理,可以使后面的大段的旁路模式编码的内容解码更快。
进一步地,在目前的VVC中,last_sig_coeff_x_prefix和last_sig_coeff_y_prefix可以使用上下文模式编码,而last_sig_coeff_x_suffix和last_sig_coeff_y_suffix可以使用旁路模式编码。因此,在一种实施例中,可以把last_sig_coeff_x_prefix,last_sig_coeff_y_prefix,last_sig_coeff_x_suffix和last_sig_coeff_y_suffix都作为最后一个非零系数的编码,而后面的都是子块及子块内部系数的编码。相应地,如上述图11所表示的对齐处理方法是在按照语法元素的意义来区分的基础上进行的。而在另一种实施例中,如上述图12所示,也可以在按照上下文模式编码的语法元素和旁路模式编码的语法元素来区分的基础上进行对齐处理,即在上下文模式编码的语法元素结束之后且在旁路模式编码的语法元素开始之前进行对齐操作。因此,对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之前进行对齐操作。
可见,在使用对齐处理确定所述当前块的系数时,对于RRC,还可以选择在使用所述上下文模式确定最后一个非零系数的水平坐标前缀标识信息last_sig_coeff_x_prefix和垂直坐标前缀标识信息last_sig_coeff_y_prefix之后、使用旁路模式确定最后一个非零系数的水平坐标后缀标识信息last_sig_coeff_x_suffix和垂直坐标后缀标识信息last_sig_coeff_y_suffix之前进行对齐处理,并使用旁路模式最后一个非零系数位置以外的其他语法元素。
示例性的,在本申请中,当高吞吐率模式被使能时,可以将last_sig_coeff_x_prefix和last_sig_coeff_y_prefix也改为旁路模式编码,此时,最后一个非零系数位置也都是使用旁路模式进行编码的,而且整个TB也都是使用旁路模式编码的。这样,对RRC而言,对齐处理也可以放在整个TB的开始。
需要说明的是,在本申请中,如果整个TB都是旁路模式编码的了,如果TB之前也有旁路模式编码的语法元素,对齐处理也可以放在TB之前。
由此可见,在本申请中,对于RRC和TSRC,对齐处理均可以发生在TB中第一个旁路模式编码的语法元素之前。此时,对于RRC,可以选择使用旁路模式确定最后一个非零系数的水平坐标前缀标识信息last_sig_coeff_x_prefix、垂直坐标前缀标识信息last_sig_coeff_y_prefix、水平坐标后缀标识信息last_sig_coeff_x_suffix、垂直坐标后缀标识信息last_sig_coeff_y_suffix,即最后一个非零系数位置均是使用旁路模式进行编码的。
示例性的,如上述图13所示,在TSRC的码流中,整个TB的所有的语法元素都使用旁路模式,而且整个TB开始时就做了对齐处理,可以使整个TB的旁路模式编码的内容解码更快。
示例性的,在本申请中,有一个序列级的标志sps_extension_flag。在序列级,如果sps_extension_flag的值为1,需要解码sps_range_extension_flag。如果sps_range_extension_flag的值为1,需要解码sps_high_throughput_mode_enabled_flag。sps_high_throughput_mode_enabled_flag是当前序列的高吞吐率模式使能的标志。如果sps_high_throughput_mode_enabled_flag的值为1,表示当前序列内的块使用高吞吐率模式,如果sps_high_throughput_mode_enabled_flag的值为0,表示当前序列内的块不使用高吞吐率模式。
其中,可以认为sps_extension_flag是当前序列是否使用标准的扩展版本的标志。sps_range_extension_flag是当前序列是否使用范围扩展(range extension),比如高位宽,高码率等的标志。序列参数集RBSP语法(Sequence parameter set RBSP syntax)如上述表3所示,序列参数集范围扩展语法(Sequence parameter set range extension syntax)如上述表4所示。
示例性的,在本申请中,在语法上,可以将上述表1的Residual coding syntax中residual_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中原来的一句remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如上述表5所示的条件语句。
示例性的,在本申请中,在语法上,可以将上述表2的Residual coding syntax中residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中原来的一句RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如上述表6所示的条件语句。
需要说明的是,在本申请的实施例中,对于需要解码的sb_coded_flag,如果sps_high_throughput_mode_enabled_flag的值为1,sb_coded_flag使用旁路模式解码,否则,sb_coded_flag使用常见的上下文模式解码。
在CABAC的片数据解析过程(CABAC parsing process for slice data)的概述(General)中加入,如果sps_high_throughput_mode_enabled_flag的值为1,在residual_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中last_sig_coeff_x_prefix,last_sig_coeff_y_prefix,last_sig_coeff_x_suffix和last_sig_coeff_y_suffix(如果存在)之后进行对齐处理,在residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)一开始进行对齐处理。或者在TB的第一个dec_abs_level或abs_remainder或sb_coded_flag之前进行对齐处理。或者在TB的第一个旁路模式编码的语法元素之前进行对齐处理。
需要说明的是,在本申请的实施例中,对齐处理过程的输入是变量ivlCurrRange,对齐处理过程的输出是更新的变量ivlCurrRange,其中,ivlCurrRange设置为256。
进一步地,在本申请的实施例中,可以使用序列级和片级的标识信息来控制是否使用高吞吐率模式进行编解码。具体地,高吞吐率模式标识信息可以包括序列级标识信息和片级标识信息;如果序列级标识信息的取值为第一值,那么可以确定所述片级标识信息的取值;如果片级标识信息的取值为第一值,那么可以选择使用高吞吐率模式,即可以使用所述对齐处理确定所述当前块的系数;和/或使用所述旁路模式确定所述当前块的系数;和/或使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
示例性的,在本申请中,有一个序列级的标志sps_extension_flag。在序列级,如果sps_extension_flag的值为1,需要解码sps_range_extension_flag。如果sps_range_extension_flag的值为1,需要解码序列级标识信息sps_high_throughput_mode_enabled_flag。具体地,序列参数集RBSP语法(Sequence parameter set RBSP syntax)如上述表3所示,序列参数集范围扩展语法(Sequence parameter set range extension syntax)如上述表4所示:
进一步地,在本申请中,sps_high_throughput_mode_enabled_flag是当前序列的高吞吐率模式使能的标志。如果sps_high_throughput_mode_enabled_flag的值为1,在片级(slice)需要解码片级的标识信息sh_high_throughput_mode_flag。如果sh_high_throughput_mode_flag的值为1,表示当前片内的块使用高吞吐率模式,如果sh_high_throughput_mode_flag的值为0,表示当前片内的块不使用高吞吐率模式。
需要说明的是,在本申请的实施例中,如果sps_high_throughput_mode_enabled_flag的值等于1,表示当前序列内的片头中会出现sh_high_throughput_mode_flag,如果sps_high_throughput_mode_enabled_flag的值等于0,表示当前序列内的片头中不会出现sh_high_throughput_mode_flag。其中,如果sps_high_throughput_mode_enabled_flag不出 现,则可以认为sps_high_throughput_mode_enabled_flag的值为0。
具体地,在本申请中,片头语法(Slice header syntax)如上述表7所示。其中,如果sh_high_throughput_mode_flag的值等于1,表示当前片内的块使用高吞吐率模式,如果sh_high_throughput_mode_flag的值等于0,表示当前片内的块不使用高吞吐率模式。如果sh_high_throughput_mode_flag不出现,则可以认为sh_high_throughput_mode_flag的值为0。
示例性的,在本申请中,在语法上,可以将上述表1的Residual coding syntax中residual_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中原来的一句remBinsPass1=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如上述表8所示的条件语句。
示例性的,在本申请中,在语法上,可以将上述表2的Residual coding syntax中residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中原来的一句RemCcbs=((1<<(log2TbWidth+log2TbHeight))×7)>>2替换为如上述表9所示的条件语句。
需要说明的是,在本申请的实施例中,对于需要解码的sb_coded_flag,如果sh_high_throughput_mode_flag的值为1,sb_coded_flag使用旁路模式解码,否则,sb_coded_flag使用常见的上下文模式解码。
在CABAC的片数据解析过程(CABAC parsing process for slice data)的概述(General)中加入,如果sh_high_throughput_mode_flag的值为1,在residual_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)中last_sig_coeff_x_prefix,last_sig_coeff_y_prefix,last_sig_coeff_x_suffix和last_sig_coeff_y_suffix(如果存在)之后进行对齐处理,在residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)一开始进行对齐处理。或者在TB的第一个dec_abs_level或abs_remainder或sb_coded_flag之前进行对齐处理。或者在TB的第一个旁路模式编码的语法元素之前进行对齐处理。
进一步地,在本申请的实施例中,图16为编码方法的实现流程示意图二,如图16所示,编码器进行编码的方法可以包括以下步骤:
步骤203、确定已编码信息,并根据已编码信息确定当前块的高吞吐率模式标识信息。
步骤202、基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码当前块的系数,生成码流。
在本申请的实施例中,可以先确定已编码信息,然后可以根据已编码信息确定当前块的高吞吐率模式标识信息。接着可以基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码当前块的系数,生成码流。其中,高吞吐率模式标识信息可以用于提升编解码的吞吐率。
可以理解的是,在本申请的实施例中,在对当前块进行编解码时,已编码信息可以表示当前已编解码块的信息。相应地,在对当前部分内容进行编解码时,已编码信息可以表示当前已编解码的部分内容的信息。
可选地,在本申请的实施例中,已编码信息至少为下述其中一项的编码信息:前n个已编码slice,前n个已编码最大编码单元LCU,前n个已编码编码树单元CTU,前n个已编码编码单元CU,前n个已编码变换单元TU,前n个已编码变换块TB;其中,n为大于0的整数。
也就是说,在本申请中,当前部分内容包括但不限于当前slice,当前编码树单元CTU,当前最大编码单元LCU,当前CU,当前TU或当前TB等。相应地,已编解码的部分内容包括但不限于已编解码的slice,已编解码的最大编码单元LCU,已编解码的CU,已编解码的TU或已编解码的TB等。
示例性的,在本申请的实施例中,已编解码的部分内容包括但不限于前n个slice,前n个CTU,前n个LCU,前n个CU,前n个TU或前n个TB等,其中n为1,2……等。
示例性的,在本申请的实施例中,已编解码的部分内容包括但不限于当前部分内容之前所有的(一定范围内)slice,CTU,LCU,CU,TU或TB等。
进一步地,在本申请的实施例中,已编码信息至少为下述其中一种信息:码率、系数、残差、比特数。
也就是说,在本申请中,已编码信息包括但不限于码率、系数、残差、比特数以及其他一些变量或参数或参数的统计。
进一步地,在本申请的实施例中,可以已编码信息确定当前块的高吞吐率模式标识信息的取值,从而可以基于高吞吐率模式标识信息的取值确定是否使用高吞吐率模式。也就是说,可以根据当前已编解码的部分内容的信息确定当前部分内容的编解码要不要使用高吞吐率的编解码方法(高吞吐率模式)。
需要说明的是,在本申请的实施例中,在根据已编码信息确定当前块的高吞吐率模式标识信息时,如果已编码信息满足第二预设条件,则确定高吞吐率模式标识信息的取值为第一值;如果已编码信息不满足第二预设条件,则确定高吞吐率模式标识信息的取值为第二值。
相应地,在本申请中,高吞吐率模式标识信息的取值可以为第一值或第二值。具体地,高吞吐率模式标识信息的取值不同,确定当前块的系数(或确定当前块的系数的值)的方式也不同。其中,高吞吐率模式下的编解码方法包括但不限于对齐(alignment)操作,全旁路模式等。
可以理解的是,在本申请的实施例中,可以将不使用上下文模式编码的系数的语法元素的方法确定为全旁路模式。
进一步地,在本申请的实施例中,第二预设条件可以用于对码率的高低进行确定,即第二预设条件可以对是否需要降低码率进行判断。具体地,第二预设条件可以包括下述条件之一:码率大于等于第一阈值,系数的绝对值的累加值大于等于第二阈值,系数的绝对值的平均值大于等于第三阈值,残差的绝对值的累加值大于等于第四阈值,残差的绝对值的平均值大于等于第五阈值,比特数大于等于第六阈值。
示例性的,在本申请的实施例中,对当前CTU,如果前一个CTU的一些变量或参数符合条件(已编码信息满足第二预设条件),例如,前一个CTU使用的比特数达到或超过一个阈值,或前一个CTU的系数值或残差值的绝对值 累加值超过一个阈值,或前一个CTU的系数值或残差值的绝对值的平均值超过一个阈值,那么可以确定高吞吐率模式标识信息的取值为第一值,即可以确定当前CTU使用高吞吐率模式;否则认为已编码信息不满足第二预设条件,则确定高吞吐率模式标识信息的取值为第二值,即当前CTU不使用高吞吐率模式。
示例性的,在本申请的实施例中,对当前TB,如果前一个TB的一些变量或参数符合条件(已编码信息满足第二预设条件),例如,前一个TB使用的比特数达到或超过一个阈值或前一个TB的系数值或残差值的绝对值累加值超过一个阈值,或前一个TB的系数值或残差值的绝对值的平均值超过一个,那么可以确定高吞吐率模式标识信息的取值为第一值,即可以确定当前TB使用高吞吐率模式;否则认为已编码信息不满足第二预设条件,则确定高吞吐率模式标识信息的取值为第二值,即当前TB不使用高吞吐率模式。
示例性的,在本申请的实施例中,对当前CTU,如果当前slice中前面已编码的CTU的一些变量或参数符合条件(已编码信息满足第二预设条件),例如,当前slice中前面已编码的CTU使用的比特数的平均值达到或超过一个阈值,或当前slice中前面已编码的CTU的系数值或残差值的绝对值的平均值超过一个阈值,那么可以确定高吞吐率模式标识信息的取值为第一值,即可以确定当前CTU使用高吞吐率模式;否则认为已编码信息不满足第二预设条件,则确定高吞吐率模式标识信息的取值为第二值,即当前CTU不使用高吞吐率模式。
具体地,在本申请的实施例中,基于高吞吐率模式标识信息的取值,在编码当前块的系数时,可以选择使用上下文模式、旁路模式以及对齐处理等方式中的至少之一。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明是否进行对齐处理的标志位。如果高吞吐率模式标识信息的取值为第一值,那么可以选择使用对齐处理编码当前块的系数,生成码流;如果高吞吐率模式标识信息的取值为第二值,那么可以选择跳过对齐处理编码当前块的系数,生成码流。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明是否仅使用旁路模式的标志位。如果高吞吐率模式标识信息的取值为第一值,那么可以选择使用旁路模式编码当前块的系数,生成码流;如果高吞吐率模式标识信息的取值为第二值,那么可以选择使用上下文模式和旁路模式至少之一编码当前块的系数,生成码流。
进一步地,在本申请的实施例中,可以将高吞吐率模式标识信息理解为一个表明减小数量参数的初始值(或将数量参数设置为0)的标志位。可以先根据高吞吐率模式标识信息确定数量参数的初始值;如果数量参数的初始值的取值大于或者等于数量阈值,那么可以选择使用上下文模式和旁路模式至少之一编码当前块的系数,生成码流;如果数量参数的初始值的取值小于数量阈值,那么可以选择使用旁路模式编码当前块的系数,生成码流。
示例性的,在本申请中,可以设置第一值为1,第二值为0;也可以设置第一值为true,第二值为false。本申请不作任何限定。
可以理解的是,在本申请中,正是由于全旁路模式或高吞吐率模式能明显提升编解码的吞吐率,因此全旁路模式或高吞吐率模式适用于超高码率的视频编解码。正是因为超高码率的视频编解码本身对解码的吞吐率的要求就很高,而且另一方面超高码率的视频的码流中的系数通常都很大,这时候sig_coeff_flag,abs_level_gtx_flag,par_level_flag等并不会起到明显的作用,相反可能会增加开销。也就是说,全旁路模式或高吞吐率模式在超高码率的视频编解码时,吞吐率明显提升了,而压缩效率并不会降低或明显降低。
但是,全旁路模式或高吞吐率模式并不适合于低码率的视频编解码或者码率不够高的视频编解码。这是由于在低码率的视频编解码的场景下,虽然吞吐率提高明显,但是压缩性能会明显下降。且在低码率的视频编解码中,系数通常比较小,这时候sig_coeff_flag,abs_level_gtx_flag,par_level_flag等对压缩性能非常有帮助,全旁路模式或高吞吐率模式可能会跳过sig_coeff_flag,abs_level_gtx_flag,par_level_flag,这样的操作无法保证压缩性能,高吞吐率模式把sb_coded_flag全都用旁路模式,以及对齐操作也会损失压缩效率。
可见,如果视频的码率不够高,便可以认为对编解码吞吐率的要求也就不够高,那么也没有必要以牺牲压缩性能为代价换取更高的吞吐率。针对于此,本申请所提出的一种自适应高吞吐率模式(adaptive high throughput mode),能够根据已编解码的视频的情况自适应地判断当前部分是否使用高吞吐率模式,从而可以在码率足够高的时候能明显提高吞吐率而且不明显损失压缩性能,在码率不够高的时候也不会明显损失压缩性能,具有更高的适应性。
可以理解的是,在本申请的实施例中,针对自适应高吞吐率模式,主要选择以高吞吐率模式为例进行描述,而本申请实施例提出的自适应高吞吐率模式也可以套用到全旁路模式而演变为为自适应全旁路模式(adaptive full-bypass mode),或者套用到其他用于提高吞吐率的模式中,本申请不进行具体限定。
进一步地,在本申请的实施例中,VVC在高位宽编码中采纳了一个基于历史的莱斯参数(rice parameter)导出技术。这个技术对每一个分量设置了一个变量StatCoeff[cIdx],其中cIdx可以取0,1,2,分别代表YUV的三个分量。变量StatCoeff[cIdx]在每个slice或tile开始时会被初始化,在每个TB编解码时会更新一次变量StatCoeff[cIdx]的值。变量StatCoeff[cIdx]用于推导系数编码的rice parameter。
也就是说,在本申请中,自适应高吞吐率模式(adaptive high throughput mode)可以利用变量StatCoeff[cIdx]来确定当前部分是否使用高吞吐率模式。
需要说明的是,在本申请的实施例中,在初始化变量StatCoeff[cIdx]时,如果当前序列不使用基于历史的莱斯参数(rice parameter)导出技术,变量StatCoeff[cIdx]初始化为0,其中cIdx等于0,1,2。否则,如果变量比特深度(bitDepth)大于12,变量StatCoeff[cIdx]初始化为4,否则变量StatCoeff[cIdx]初始化为2。具体地,变量StatCoeff[cIdx]更新的语法可以如上述表17所示。其中,sps_persistent_rice_adaptation_enabled_flag是该序列是否使用基于历史的莱斯参数(rice parameter)导出技术的标志。
具体地,在本申请中,如果TB中第一个非零的指数哥伦布编码的系数使用了abs_remainder,对应分量的StatCoeff[cIdx]更新为StatCoeff[cIdx]=(StatCoeff[cIdx]+Floor(Log2(abs_remainder[n]))+2)>>1。如果TB中第一个非零的指数哥伦布编码的系数使用了dec_abs_level,对应分量的StatCoeff[cIdx]更新为 StatCoeff[cIdx]=(StatCoeff[cIdx]+Floor(Log2(dec_abs_level[n])))>>1。
可见,使用abs_remainder的情况比dec_abs_level的情况多了一个“+2”,因为如果TB里有很多大的系数,TB中第一个非零的指数哥伦布编码的系数通常会使用abs_remainder,而如果TB中第一个非零的指数哥伦布编码的系数使用了dec_abs_level,那说明这个TB的系数普遍较小,因为所有使用上下文模式编码的系数都小于4。即说明使用abs_remainder的情况系数普遍偏大的可能性更大,而使用dec_abs_level的情况系数普遍偏大的可能性很小。
需要说明的是,在本申请的实施例中,由于在高吞吐率模式时,系数只能使用dec_abs_level,因此上述部分并没有考虑到高吞吐率模式。而高吞吐率模式下显然系数值应该都比较大,因此在这种情况下应该“+2”。
也就是说,在本申请中,每个TB开始编解码之前都可以得到根据已编码端TB确定的变量StatCoeff[cIdx],所以可以根据变量StatCoeff[cIdx]来确定当前TB是否使用高吞吐率模式。其中,变量StatCoeff[cIdx]是在RRC中更新的,可以根据变量StatCoeff[cIdx]来确定RRC和TSRC的当前TB是否使用高吞吐率模式。也可以只根据变量StatCoeff[cIdx]来确定RRC的当前TB是否使用高吞吐率模式。也可以根据变量StatCoeff[cIdx]来确定RRC的当前CU或当前CTU是否使用高吞吐率模式。
进一步地,在本申请的实施例中,如果已编码信息为莱斯参数,那么在确定已编码信息时,可以先确定一变量的取值,其中,第一变量可以为变量StatCoeff[cIdx],然后可以根据第一变量的取值确定已编码信息。
具体地,在本申请中,在根据第一变量的取值确定已编码信息时,如果第一变量的取值大于等于第七阈值,则确定莱斯参数满足第二预设条件,即确定高吞吐率模式标识信息的取值为第一值,进而选择使用高吞吐率模式;如果第一变量的取值小于第七阈值,则确定莱斯参数指不满足第二预设条件,即确定高吞吐率模式标识信息的取值为第二值,进而选择不使用高吞吐率模式。
示例性的,如果变量StatCoeff[cIdx]的取值大于或者等于一个阈值,当前TB就使用高吞吐率模式,否则当前TB不使用高吞吐率模式。其中,该阈值的取值可能是3,4,5等。
进一步地,在本申请的实施例中,在SPS语法上,可以设置一个序列级的标志sps_high_throughput_mode_enabled_flag。设置一个TB级的标志high_throughput_mode_flag。其中,sps_high_throughput_mode_enabled_flag的取值等于1,表示当前序列内的块可以使用高吞吐率模式,否则表示当前序列内的块不使用高吞吐率模式。
可以理解的是,在本申请中,在序列级如果“可以”使用,在TB即确定是否使用。基于上述表1,sps_high_throughput_mode_enabled_flag的语义修改为如上述表18所示(修改部分使用下划线标注)。
示例性的,在本申请中,基于上述表2,sps_high_throughput_mode_enabled_flag的语义修改为如上述表19所示(修改部分使用下划线标注)。
进一步地,在本申请的实施例中,如果已编码信息为莱斯参数,那么在确定已编码信息时,可以先确定二变量的取值,其中,第二变量可以为变量sh_ts_residual_coding_rice_idx_minus1,然后可以根据第二变量的取值确定已编码信息。
具体地,在本申请中,在根据第二变量的取值确定已编码信息时,如果第二变量的取值大于等于第八阈值,则确定莱斯参数满足第二预设条件,即确定高吞吐率模式标识信息的取值为第一值,进而选择使用高吞吐率模式;如果第二变量的取值小于第八阈值,则确定莱斯参数指不满足第二预设条件,即确定高吞吐率模式标识信息的取值为第二值,进而选择不使用高吞吐率模式。
需要说明的是,在本申请的实施例中,VVC在高位宽编码中,对TSRC的莱斯参数rice parameter推导方法采用了和RRC不同的方式。TSRC的rice parameter是根据sh_ts_residual_coding_rice_idx_minus1推导出来的。其中,sh_ts_residual_coding_rice_idx_minus1+1确定了residual_ts_coding(x0,y0,log2TbWidth,log2TbHeight,cIdx)用的莱斯参数rice parameter。所以对TSRC的TB,可以根据sh_ts_residual_coding_rice_idx_minus1确定当前TB是否使用高吞吐率模式。具体地,如果sh_ts_residual_coding_rice_idx_minus1的取值大于或者等于一个阈值,当前slice的TSRC的TB使用高吞吐率模式,否则当前slice的TSRC的TB不使用高吞吐率模式。进一步地,也可以根据sh_ts_residual_coding_rice_idx_minus1确定RRC的当前TB是否使用高吞吐率模式。
示例性的,在本申请中,基于上述表2,sps_high_throughput_mode_enabled_flag的语义修改为如上述表20所示(修改部分使用下划线标注)。
其中,可以认为(a=b?c:d)和(if(b){a=c;}else{a=d;})表达相同的含义。
可见,在本申请的实施例中,可以通过使用变量StatCoeff[cIdx]和\或变量sh_ts_residual_coding_rice_idx_minus1进行是否适合使用高吞吐率模式的确定,能够提升高吞吐率模式使用的适应性。
综上所述,在本申请的实施例中,可以通过高吞吐率模式的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。具体地,一方面,由于系数分布规律与普通视频场景不同,在系数解码中通过减少甚至消除上下文模式解码的语法元素的个数,可以提高系数解码的吞吐量。另一方面,高吞吐率模式可以形成大片连续的且对齐的旁路模式编码,能够进一步提升吞吐率。且自适应高吞吐率模式可以根据已编解码的视频的情况自适应地判断当前部分是否使用高吞吐率模式,能够在码率足够高的时候能明显提高吞吐率而且不明显损失压缩性能,在码率不够高的时候也不会明显损失压缩性能,具有更高的适应性。
也就是说,本申请提出的高吞吐率模式把是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,能够在使用高吞吐率模式的情况下,组成成片的且对齐的旁路模式编码。而本申请提出的自适应高吞吐率模式,可以基于已编解码的部分的信息确定当前部分是否使用高吞吐率模式,能够提升高吞吐率模式使用的适应性。
本申请实施例提供了一种编码方法,编解码器在进行系数的编解码时,可以通过高吞吐率模式的设置,将是否 仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。提高系数编码的吞吐量和编解码速度,降低复杂度,且自适应高吞吐率模式可以根据已编解码的视频的情况自适应地判断当前部分是否使用高吞吐率模式,能够在码率足够高的时候能明显提高吞吐率而且不明显损失压缩性能,在码率不够高的时候也不会明显损失压缩性能,具有更高的适应性,从而提升压缩性能。
基于上述实施例,在本申请的再一实施例中,图17为本申请实施例提出的解码器的组成结构示意图一,如图17所示,本申请实施例提出的解码器300可以包括解码部分301,第一确定部分302,
所述解码部分301,配置为解码码流;
所述第一确定部分302,配置为确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
进一步地,在本申请的实施例中,所述第一确定部分302,配置为确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
图18为本申请实施例提出的解码器的组成结构示意图二,如图18所示,本申请实施例提出的解码器300还可以包括第一处理器303、存储有第一处理器303可执行指令的第一存储器304、第一通信接口305,和用于连接第一处理器303、第一存储器304以及第一通信接口305的第一总线306。
进一步地,在本申请的实施例中,上述第一处理器303,用于解码码流,确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
进一步地,在本申请的实施例中,上述第一处理器303,用于确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;
基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
图19为本申请实施例提出的编码器的组成结构示意图一,如图19所示,本申请实施例提出的编码器400可以包括第二确定部分401,编码部分402,
所述第一确定部分401,配置为确定当前块的高吞吐率模式标识信息;
所述编码部分402,配置为基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
进一步地,在本申请的实施例中,所述第一确定部分401,配置为确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;
所述编码部分402,配置为基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
图20为本申请实施例提出的编码器的组成结构示意图二,如图20所示,本申请实施例提出的编码器400还可以包括第二处理器403、存储有第二处理器403可执行指令的第二存储器404、第二通信接口405,和用于连接第二处理器403、第二存储器404以及第二通信接口405的第二总线406。
进一步地,在本申请的实施例中,上述第二处理器403,用于确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
进一步地,在本申请的实施例中,上述第二处理器403,用于确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
另外,在本实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
集成的单元如果以软件功能模块的形式实现并非作为独立的产品进行销售或使用时,可以存储在一个计算机可读取存储介质中,基于这样的理解,本实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或processor(处理器)执行本实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例提供了一种编码器和解码器,编解码器在进行系数的编解码时,可以通过高吞吐率模式的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。提高系数编码的吞吐量和编解码速度,降低复杂度,且自适应高吞吐率模式可以根据已编解码的视频的情况自适应地判断当前部分是否使用高吞吐率模式,能够在码率足够高的时候能明显提高吞吐率而且不明显损失压缩性能,在码率不够高的时候也不会明显损失压缩性能,具有更高的适应性,从而提升压缩性能。
本申请实施例提供计算机可读存储介质和计算机可读存储介质,其上存储有程序,该程序被处理器执行时实现如上述实施例所述的方法。
具体来讲,本实施例中的一种解码方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种解码方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:
解码码流,确定当前块的高吞吐率模式标识信息;
基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
进一步地,在本申请的实施例中,当存储介质中的与一种解码方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:
确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;
基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
具体来讲,本实施例中的一种编码方法对应的程序指令可以被存储在光盘,硬盘,U盘等存储介质上,当存储介质中的与一种编码方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:
确定当前块的高吞吐率模式标识信息;
基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
进一步地,在本申请的实施例中,当存储介质中的与一种编码方法对应的程序指令被一电子设备读取或被执行时,包括如下步骤:
确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;
基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的实现流程示意图和/或方框图来描述的。应理解可由计算机程序指令实现流程示意图和/或方框图中的每一流程和/或方框、以及实现流程示意图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在实现流程示意图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。
工业实用性
本申请实施例提供了一种编解码方法、编码器、解码器以及存储介质,解码器解码码流,确定当前块的高吞吐率模式标识信息;基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。解码器确定已解码信息,并根据已解码信息确定当前块的高吞吐率模式标识信息;基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。编码器确定当前块的高吞吐率模式标识信息;基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码当前块的系数,生成码流。编码器确定已解码信息,并根据已解码信息确定当前块的高吞吐率模式标识信息;基于高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码当前块的系数,生成码流。也就是说,在本申请的实施例中,编解码器在进行系数的编解码时,可以通过高吞吐率模式的设置,将是否仅使用旁路模式编解码、是否使用上下文模式编解码以及是否进行对齐处理结合起来,从而进一步使用上下文模式、旁路模式以及对齐处理至少之一确定当前块的系数。提高系数编码的吞吐量和编解码速度,降低复杂度,且自适应高吞吐率模式可以根据已编解码的视频的情况自适应地判断当前部分是否使用高吞吐率模式,能够在码率足够高的时候能明显提高吞吐率而且不明显损失压缩性能,在码率不够高的时候也不会明显损失压缩性能,具有更高的适应性,从而提升压缩性能。

Claims (81)

  1. 一种解码方法,应用于解码器,所述方法包括:
    解码码流,确定当前块的高吞吐率模式标识信息;
    基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
  2. 根据权利要求1所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;
    若所述高吞吐率模式标识信息的取值为第二值,则跳过所述对齐处理确定所述当前块的系数。
  3. 根据权利要求2所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述上下文模式确定最后一个非零系数位置之后进行对齐处理。
  4. 根据权利要求2所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述上下文模式确定最后一个非零系数的水平坐标前缀标识信息和垂直坐标前缀标识信息之后、使用所述旁路模式确定所述最后一个非零系数的水平坐标后缀标识信息和垂直坐标后缀标识信息之前进行对齐处理。
  5. 根据权利要求2所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述旁路模式确定第一个语法元素之前进行对齐处理。
  6. 根据权利要求1所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的系数;
    若所述高吞吐率模式标识信息的取值为第二值,则使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
  7. 根据权利要求6所述的方法,其中,所述方法还包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的全部编码标识信息。
  8. 根据权利要求1所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:
    根据所述高吞吐率模式标识信息确定数量参数的初始值;
    若所述数量参数的初始值的取值大于或者等于数量阈值,则使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数;
    若所述数量参数的初始值的取值小于数量阈值,则使用所述旁路模式确定所述当前块的系数。
  9. 根据权利要求8所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则将所述数量参数的初始值的取值确定为第一数量值;其中,所述第一数量值为大于或等于0且小于所述数量阈值的整数;
    若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数确定所述数量参数的初始值。
  10. 根据权利要求8所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则将所述数量参数的初始值的取值确定为第二数量值;
    若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数确定所述数量参数的初始值。
  11. 根据权利要求8所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则根据所述当前块的高度参数和宽度参数以及第一移位参数确定所述数量参数的初始值;
    若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数以及第二移位参数确定所述数量参数的初始值。
  12. 根据权利要求11所述的方法,其中,所述第一移位参数和所述第二移位参数用于右移处理,所述第一移位参数大于所述第二移位参数。
  13. 根据权利要求8所述的方法,其中,所述数量阈值为4。
  14. 根据权利要求1所述的方法,其中,所述方法还包括:
    解码所述码流,确定视频标识信息;
    若所述视频标识信息指示视频满足第一预设条件,则确定所述当前块的所述高吞吐率模式标识信息。
  15. 根据权利要求14所述的方法,其中,所述第一预设条件包括下述条件之一:
    位宽大于位宽阈值;码率大于码率阈值;帧率大于帧率阈值;量化参数QP小于质量阈值;无损压缩。
  16. 根据权利要求1所述的方法,其中,所述高吞吐率模式标识信息至少为下述其中一项的标识信息:序列(sequence)级、图像(picture)级、片(slice)级、图块(Tile)级、块(block)级、编码树单元(CTU)级。
  17. 根据权利要求1所述的方法,其中,所述高吞吐率模式标识信息包括序列级标识信息和片级标识信息;所述方法还包括:
    若所述序列级标识信息的取值为第一值,则确定所述片级标识信息的取值;
    若所述片级标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;和/或使用所述旁路模式确定所述当前块的系数;和/或使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
  18. 根据权利要求2、6、7、9-11、17任一项所述的方法,其中,
    所述第一值为1,所述第二值为0;或者,
    所述第一值设置为true,所述第二值设置为false。
  19. 一种解码方法,应用于解码器,所述方法包括:
    确定已解码信息,根据所述已解码信息确定当前块的高吞吐率模式标识信息;
    基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
  20. 根据权利要求19所述的方法,其中,所述根据所述已解码信息确定当前块的高吞吐率模式标识信息,包括:
    若所述已解码信息满足第二预设条件,则确定所述高吞吐率模式标识信息的取值为第一值;
    若所述已解码信息不满足第二预设条件,则确定所述高吞吐率模式标识信息的取值为第二值。
  21. 根据权利要求20所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;
    若所述高吞吐率模式标识信息的取值为第二值,则跳过所述对齐处理确定所述当前块的系数。
  22. 根据权利要求21所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述上下文模式确定最后一个非零系数位置之后进行对齐处理。
  23. 根据权利要求21所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述上下文模式确定最后一个非零系数的水平坐标前缀标识信息和垂直坐标前缀标识信息之后、使用所述旁路模式确定所述最后一个非零系数的水平坐标后缀标识信息和垂直坐标后缀标识信息之前进行对齐处理。
  24. 根据权利要求21所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述旁路模式确定第一个语法元素之前进行对齐处理。
  25. 根据权利要求20所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的系数;
    若所述高吞吐率模式标识信息的取值为第二值,则使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
  26. 根据权利要求25所述的方法,其中,所述方法还包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的全部编码标识信息。
  27. 根据权利要求20所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数,包括:
    根据所述高吞吐率模式标识信息确定数量参数的初始值;
    若所述数量参数的初始值的取值大于或者等于数量阈值,则使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数;
    若所述数量参数的初始值的取值小于数量阈值,则使用所述旁路模式确定所述当前块的系数。
  28. 根据权利要求19-27任一项所述的方法,其中,所述已解码信息至少为下述其中一项的解码信息:前n个已解码slice,前n个已解码最大编码单元LCU,前n个已解码编码树单元CTU,前n个已解码编码单元CU,前n个已解码变换单元TU,前n个已解码变换块TB;其中,所述n为大于0的整数。
  29. 根据权利要求19-27任一项所述的方法,其中,所述已解码信息至少为下述其中一种信息:码率、系数、残差、比特数。
  30. 根据权利要求29所述的方法,其中,所述第二预设条件包括下述条件之一:
    码率大于等于第一阈值,系数的绝对值的累加值大于等于第二阈值,系数的绝对值的平均值大于等于第三阈值,残差的绝对值的累加值大于等于第四阈值,残差的绝对值的平均值大于等于第五阈值,比特数大于等于第六阈值。
  31. 根据权利要求19所述的方法,其中,所述高吞吐率模式标识信息至少为下述其中一项的标识信息:序列(sequence)级、图像(picture)级、片(slice)级、图块(Tile)级、块(block)级、编码树单元(CTU)级。
  32. 根据权利要求20所述的方法,其中,所述高吞吐率模式标识信息包括序列级标识信息和片级标识信息;所述方法还包括:
    若所述序列级标识信息的取值为第一值,则确定所述片级标识信息的取值;
    若所述片级标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;和/或使用所述旁路模式确定所述当前块的系数;和/或使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
  33. 根据权利要求20、21、25、26、32任一项所述的方法,其中,
    所述第一值为1,所述第二值为0;或者,
    所述第一值设置为true,所述第二值设置为false。
  34. 根据权利要求20所述的方法,其中,所述已编码信息为莱斯参数,所述确定已编码信息,包括:
    确定第一变量的取值;
    根据所述第一变量的取值确定所述已编码信息。
  35. 根据权利要求34所述的方法,其中,所述根据所述第一变量的取值确定所述已编码信息,包括:
    若所述第一变量的取值大于等于第七阈值,则确定所述莱斯参数满足所述第二预设条件;
    若所述第一变量的取值小于所述第七阈值,则确定所述莱斯参数不满足所述第二预设条件。
  36. 根据权利要求20所述的方法,其中,所述已编码信息为莱斯参数,所述确定已编码信息,包括:
    确定第二变量的取值;
    根据所述第二变量的取值确定所述已编码信息。
  37. 根据权利要求36所述的方法,其中,所述根据所述第一变量的取值确定所述已编码信息,包括:
    若所述第二变量的取值大于等于第八阈值,则确定所述莱斯参数满足所述第二预设条件;
    若所述第二变量的取值小于所述第八阈值,则确定所述莱斯参数不满足所述第二预设条件。
  38. 一种编码方法,应用于编码器,所述方法包括:
    确定当前块的高吞吐率模式标识信息;
    基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
  39. 根据权利要求38所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述对齐处理编码所述当前块的系数,生成所述码流;
    若所述高吞吐率模式标识信息的取值为第二值,则跳过所述对齐处理编码所述当前块的系数,生成所述码流。
  40. 根据权利要求39所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述上下文模式确定最后一个非零系数位置之后进行对齐处理。
  41. 根据权利要求39所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述上下文模式确定最后一个非零系数的水平坐标前缀标识信息和垂直坐标前缀标识信息之后、使用所述旁路模式确定所述最后一个非零系数的水平坐标后缀标识信息和垂直坐标后缀标识信息之前进行对齐处理。
  42. 根据权利要求39所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述旁路模式确定第一个语法元素之前进行对齐处理。
  43. 根据权利要求38所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式编码所述当前块的系数,生成所述码流;
    若所述高吞吐率模式标识信息的取值为第二值,则使用所述上下文模式和所述旁路模式至少之一编码所述当前块的系数,生成所述码流。
  44. 根据权利要求43所述的方法,其中,所述方法还包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的全部编码标识信息。
  45. 根据权利要求38所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:
    根据所述高吞吐率模式标识信息确定数量参数的初始值;
    若所述数量参数的初始值的取值大于或者等于数量阈值,则使用所述上下文模式和所述旁路模式至少之一编码所述当前块的系数,生成所述码流;
    若所述数量参数的初始值的取值小于数量阈值,则使用所述旁路模式编码所述当前块的系数,生成所述码流。
  46. 根据权利要求45所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则将所述数量参数的初始值的取值确定为第一数量值;其中,所述第一数量值为大于或等于0且小于所述数量阈值的整数;
    若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数确定所述数量参数的初始值。
  47. 根据权利要求45所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则将所述数量参数的初始值的取值确定为第二数量值;
    若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数确定所述数量参数的初始值。
  48. 根据权利要求45所述的方法,其中,所述根据所述高吞吐率模式标识信息确定数量参数的初始值,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则根据所述当前块的高度参数和宽度参数以及第一移位参数确定所述数量参数的初始值;
    若所述高吞吐率模式标识信息的取值为第二值,则根据所述当前块的高度参数和宽度参数以及第二移位参数确定所述数量参数的初始值。
  49. 根据权利要求48所述的方法,其中,所述第一移位参数和所述第二移位参数用于右移处理,所述第一移位参数大于所述第二移位参数。
  50. 根据权利要求45所述的方法,其中,所述数量阈值为4。
  51. 根据权利要求38所述的方法,其中,所述方法还包括:
    确定视频标识信息;
    若所述视频标识信息指示视频满足第一预设条件,则确定所述当前块的所述高吞吐率模式标识信息。
  52. 根据权利要求51所述的方法,其中,所述第一预设条件包括下述条件之一:高位宽、高质量、高码率、高帧率以及无损压缩。
  53. 根据权利要求38所述的方法,其中,所述高吞吐率模式标识信息至少为下述其中一项的标识信息:序列(sequence)级、图像(picture)级、片(slice)级、图块(Tile)级、块(block)级、编码树单元(CTU)级。
  54. 根据权利要求38所述的方法,其中,所述高吞吐率模式标识信息包括序列级标识信息和片级标识信息;所述方法还包括:
    若所述序列级标识信息的取值为第一值,则确定所述片级标识信息的取值;
    若所述片级标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;和/或使用所述旁路模式确定所述当前块的系数;和/或使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
  55. 根据权利要求39、43、44、46-48、54任一项所述的方法,其中,
    所述第一值为1,所述第二值为0;或者,
    所述第一值设置为true,所述第二值设置为false。
  56. 一种编码方法,应用于编码器,所述方法包括:
    确定已编码信息,并根据所述已编码信息确定当前块的高吞吐率模式标识信息;
    基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
  57. 根据权利要求56所述的方法,其中,所述根据所述已编码信息确定当前块的高吞吐率模式标识信息,包括:
    若所述已编码信息满足第二预设条件,则确定所述高吞吐率模式标识信息的取值为第一值;
    若所述已编码信息不满足第二预设条件,则确定所述高吞吐率模式标识信息的取值为第二值。
  58. 根据权利要求57所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述对齐处理编码所述当前块的系数,生成所述码流;
    若所述高吞吐率模式标识信息的取值为第二值,则跳过所述对齐处理编码所述当前块的系数,生成所述码流。
  59. 根据权利要求58所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述上下文模式确定最后一个非零系数位置之后进行对齐处理。
  60. 根据权利要求58所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述上下文模式确定最后一个非零系数的水平坐标前缀标识信息和垂直坐标前缀标识信息之后、使用所述旁路模式确定所述最后一个非零系数的水平坐标后缀标识信息和垂直坐标后缀标识信息之前进行对齐处理。
  61. 根据权利要求58所述的方法,其中,所述使用所述对齐处理确定所述当前块的系数,包括:
    在使用所述旁路模式确定第一个语法元素之前进行对齐处理。
  62. 根据权利要求57所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式编码所述当前块的系数,生成所述码流;
    若所述高吞吐率模式标识信息的取值为第二值,则使用所述上下文模式和所述旁路模式至少之一编码所述当前块的系数,生成所述码流。
  63. 根据权利要求62所述的方法,其中,所述方法还包括:
    若所述高吞吐率模式标识信息的取值为第一值,则使用所述旁路模式确定所述当前块的全部编码标识信息。
  64. 根据权利要求57所述的方法,其中,所述基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流,包括:
    根据所述高吞吐率模式标识信息确定数量参数的初始值;
    若所述数量参数的初始值的取值大于或者等于数量阈值,则使用所述上下文模式和所述旁路模式至少之一编码所述当前块的系数,生成所述码流;
    若所述数量参数的初始值的取值小于数量阈值,则使用所述旁路模式编码所述当前块的系数,生成所述码流。
  65. 根据权利要求56-64任一项所述的方法,其中,所述已编码信息至少为下述其中一项的编码信息:前n个已解码slice,前n个已解码最大编码单元LCU,前n个已解码编码树单元CTU,前n个已解码编码单元CU,前n个已解码变换单元TU,前n个已解码变换块TB;其中,所述n为大于0的整数。
  66. 根据权利要求56-64任一项所述的方法,其中,所述已编码信息至少为下述其中一种信息:码率、系数、残差、比特数。
  67. 根据权利要求66所述的方法,其中,所述第二预设条件包括下述条件至少之一:
    码率大于等于第一阈值,系数的绝对值的累加值大于等于第二阈值,系数的绝对值的平均值大于等于第三阈值,残差的绝对值的累加值大于等于第四阈值,残差的绝对值的平均值大于等于第五阈值,比特数大于等于第六阈值。
  68. 根据权利要求56所述的方法,其中,所述高吞吐率模式标识信息至少为下述其中一项的标识信息:序列(sequence)级、图像(picture)级、片(slice)级、图块(Tile)级、块(block)级、编码树单元(CTU)级。
  69. 根据权利要求57所述的方法,其中,所述高吞吐率模式标识信息包括序列级标识信息和片级标识信息;所述方法还包括:
    若所述序列级标识信息的取值为第一值,则确定所述片级标识信息的取值;
    若所述片级标识信息的取值为第一值,则使用所述对齐处理确定所述当前块的系数;和/或使用所述旁路模式确定所述当前块的系数;和/或使用所述上下文模式和所述旁路模式至少之一确定所述当前块的系数。
  70. 根据权利要求57、58、62、63、69任一项所述的方法,其中,
    所述第一值为1,所述第二值为0;或者,
    所述第一值设置为true,所述第二值设置为false。
  71. 根据权利要求57所述的方法,其中,所述已编码信息为莱斯参数,所述确定已编码信息,包括:
    确定第一变量的取值;
    根据所述第一变量的取值确定所述已编码信息。
  72. 根据权利要求71所述的方法,其中,所述根据所述第一变量的取值确定所述已编码信息,包括:
    若所述第一变量的取值大于等于第七阈值,则确定所述莱斯参数满足所述第二预设条件;
    若所述第一变量的取值小于所述第七阈值,则确定所述莱斯参数不满足所述第二预设条件。
  73. 根据权利要求57所述的方法,其中,所述已编码信息为莱斯参数,所述确定已编码信息,包括:
    确定第二变量的取值;
    根据所述第二变量的取值确定所述已编码信息。
  74. 根据权利要求73所述的方法,其中,所述根据所述第一变量的取值确定所述已编码信息,包括:
    若所述第二变量的取值大于等于第八阈值,则确定所述莱斯参数满足所述第二预设条件;
    若所述第二变量的取值小于所述第八阈值,则确定所述莱斯参数不满足所述第二预设条件。
  75. 一种解码器,所述解码器包括:解码部分,第一确定部分,
    所述解码部分,配置为解码码流;
    所述第一确定部分,配置为确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
  76. 一种解码器,所述解码器包括:第一确定部分,
    所述第一确定部分,配置为确定已解码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一确定所述当前块的系数。
  77. 一种解码器,所述编码器包括第一处理器、存储有所述第一处理器可执行指令的第一存储器,当所述指令被执行时,所述第一处理器执行时实现如权利要求1-18或19-37任一项所述的方法。
  78. 一种编码器,所述编码器包括:第二确定部分,编码部分,
    所述第一确定部分,配置为确定当前块的高吞吐率模式标识信息;
    所述编码部分,配置为基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
  79. 一种编码器,所述编码器包括:第二确定部分,编码部分,
    所述第一确定部分,配置为确定已编码信息,并根据所述已解码信息确定当前块的高吞吐率模式标识信息;
    所述编码部分,配置为基于所述高吞吐率模式标识信息,使用上下文模式、旁路模式以及对齐处理至少之一编码所述当前块的系数,生成码流。
  80. 一种编码器,所述解码器包括第二处理器、存储有所述第二处理器可执行指令的第二存储器,当所述指令被执行时,所述第二处理器执行时实现如权利要求38-55或56-74任一项所述的方法。
  81. 一种计算机存储介质,其中,所述计算机存储介质存储有计算机程序,所述计算机程序被第一处理器执行时实现如权利要求1-18或19-37任一项所述的方法,或者,被第二处理器执行时实现如权利要求38-55或56-74任一项所述的方法。
PCT/CN2021/103306 2021-06-29 2021-06-29 编解码方法、编码器、解码器以及存储介质 Ceased WO2023272533A1 (zh)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2513110A (en) * 2013-04-08 2014-10-22 Sony Corp Data encoding and decoding

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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