Coefficient encoding and decoding method, encoder, decoder and computer storage medium
By using video identification information and the position flip identification of the last non-zero coefficient in high bit width, high code rate, high quality or lossless video encoding and decoding, the coefficient encoding and decoding process is optimized, reducing the overhead of syntax elements, and improving the encoding and decoding speed and compression efficiency.
Patent Information
- Application Number
- CN202510770378.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-12
- Publication Date
- 2025-07-22
AI Technical Summary
The existing high bit width, high code rate, high quality or lossless video encoding and decoding problems in coefficient encoding and slow encoding and decoding speed, especially due to the insufficient throughput and low compression efficiency caused by the existence of a large number of non-zero coefficients and complex context mode encoding.
By analyzing the code stream, obtaining the video identification information, determining the position and coordinate information of the last non-zero coefficient, flipping identification processing according to preset conditions, reducing or eliminating the syntax elements of context mode encoding, and encoding and decoding the coefficients before the non-zero coefficients are encoded and decoding using the preset scanning order to reduce the overhead of the code stream, and improving throughput and encoding and decoding speed.
In high bit width, high code rate, high quality or lossless video encoding and decoding scenarios, by reducing the syntax elements of context mode encoding, the throughput and codec speed of coefficient encoding are improved, and the compression efficiency is improved.
Smart Images

Figure CN120358364A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present application relate to the field of video encoding and decoding technologies, and in particular, to a coefficient encoding and decoding method, an encoder, a decoder, and a computer storage medium. Background Art
[0002] With the improvement of people's requirements for video display quality, the field related to computer vision has received more and more attention. In recent years, image processing technologies have been successfully applied in various industries. For the encoding and decoding process of video images, at the encoding end, for the image data to be encoded, after transformation and quantization processing, it will be compressed and encoded through an entropy encoding unit, and the bitstream generated after entropy encoding processing will be transmitted to the decoding end; then the bitstream is parsed, and after inverse quantization and inverse transformation processing, the original input image data can be restored.
[0003] Currently, compared with video encoding and decoding with a lower bit width, lower quality, and lower bit rate (which can be called "conventional video"), video encoding and decoding with a high bit width, high quality, and high bit rate (abbreviated as "three-high video") usually requires more coefficients to be encoded and decoded, and the coefficients are larger. In this way, for three-high videos, existing related solutions may bring greater overhead, cause waste, and even affect the encoding and decoding speed and throughput. Summary of the Invention
[0004] Embodiments of the present application provide a coefficient encoding and decoding method, an encoder, a decoder, and a computer storage medium, which can improve the throughput and encoding and decoding speed of coefficient encoding, and at the same time can also improve the compression efficiency in the video encoding and decoding scenarios with a high bit width, high bit rate, high quality, or lossless.
[0005] The technical solution of the embodiments of the present application can be implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a coefficient decoding method, which is applied to a decoder, and the method includes:
[0007] Parse the bitstream to obtain video identification information;
[0008] When the video identification information indicates that the video meets a preset condition, parse the bitstream to obtain the last non-zero coefficient position flip identification information and the coordinate information of the last non-zero coefficient;
[0009] When the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip, calculate the coordinate information of the last non-zero coefficient to determine the position of the last non-zero coefficient;
[0010] Decode all the coefficients before the position of the last non-zero coefficient according to a preset scanning order to determine the coefficients of the current block.
[0011] In a second aspect, an embodiment of the present application provides a coefficient encoding method, which is applied to an encoder. The method includes:
[0012] Determine video identification information and the position of the last non-zero coefficient;
[0013] When the video identification information indicates that the video meets a preset condition, determine the flip identification information of the position of the last non-zero coefficient;
[0014] According to the position of the last non-zero coefficient and the flip identification information of the position of the last non-zero coefficient, determine the coordinate information of the last non-zero coefficient;
[0015] Encode all the coefficients before the position of the last non-zero coefficient according to a preset scanning order, and write the encoded bit information, video identification information, and the coordinate information of the last non-zero coefficient into the bitstream.
[0016] In a third aspect, an embodiment of the present application provides an encoder, which includes a first determination unit and an encoding unit; wherein,
[0017] The first determination unit is configured to determine video identification information and the position of the last non-zero coefficient; and when the video identification information indicates that the video meets a preset condition, determine the flip identification information of the position of the last non-zero coefficient;
[0018] The first determination unit is further configured to determine the coordinate information of the last non-zero coefficient according to the position of the last non-zero coefficient and the flip identification information of the position of the last non-zero coefficient;
[0019] The encoding unit is configured to encode all the coefficients before the position of the last non-zero coefficient according to a preset scanning order, and write the encoded bit information, video identification information, and the coordinate information of the last non-zero coefficient into the bitstream.
[0020] In a fourth aspect, an embodiment of the present application provides an encoder, which includes a first memory and a first processor; wherein,
[0021] The first memory is used to store a computer program that can run on the first processor;
[0022] The first processor is configured to execute the method described in the second aspect when running the computer program.
[0023] In a fifth aspect, an embodiment of the present application provides a decoder, which includes a parsing unit and a second determination unit; wherein,
[0024] A parsing unit, configured to parse a bitstream to obtain video identification information; and when the video identification information indicates that the video meets a preset condition, parse the bitstream to obtain the last non-zero coefficient position flipping identification information and the coordinate information of the last non-zero coefficient;
[0025] A second determination unit, configured to calculate the coordinate information of the last non-zero coefficient to determine the position of the last non-zero coefficient when the last non-zero coefficient position flipping identification information indicates that the current block uses the last non-zero coefficient position flipping;
[0026] The parsing unit is further configured to decode all coefficients before the position of the last non-zero coefficient in a preset scanning order to determine the coefficients of the current block.
[0027] In a sixth aspect, an embodiment of the present application provides a decoder, which includes a second memory and a second processor; wherein,
[0028] The second memory is used to store a computer program that can run on the second processor;
[0029] The second processor is configured to execute the method described in the first aspect when running the computer program.
[0030] In a seventh aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program, and when the computer program is executed, it implements the method described in the first aspect or implements the method described in the second aspect.
[0031] The embodiments of the present application provide a coefficient encoding and decoding method, an encoder, a decoder, and a computer storage medium. In the encoder, video identification information and the position of the last non-zero coefficient are determined; when the video identification information indicates that the video meets a preset condition, the position flip identification information of the last non-zero coefficient is determined; according to the position of the last non-zero coefficient and the position flip identification information of the last non-zero coefficient, the coordinate information of the last non-zero coefficient is determined; all coefficients before the position of the last non-zero coefficient are encoded according to a preset scanning order, and the encoded bit information, video identification information, and coordinate information of the last non-zero coefficient are written into the code stream. In the decoder, the code stream is parsed to obtain the video identification information; when the video identification information indicates that the video meets a preset condition, the code stream is parsed to obtain the position flip identification information of the last non-zero coefficient and the coordinate information of the last non-zero coefficient; when the position flip identification information of the last non-zero coefficient indicates that the current block uses the position flip of the last non-zero coefficient, the coordinate information of the last non-zero coefficient is calculated to determine the position of the last non-zero coefficient; all coefficients before the position of the last non-zero coefficient are decoded according to a preset scanning order to determine the coefficients of the current block. In this way, in high-bitwidth, high-bitrate, high-quality, or lossless video encoding and decoding scenarios, since the coefficient distribution law is different from that in conventional video scenarios, in coefficient encoding, the number of syntax elements of context mode encoding is reduced or even eliminated, such as syntax elements regarding the position of the last non-zero coefficient, sub-block encoding identification, etc. Even when the value of the coordinate information of the last non-zero coefficient is relatively large, coordinate transformation can be performed, thereby reducing the overhead caused by encoding in the code stream, and then improving the throughput and encoding and decoding speed of coefficient encoding; in addition, since the reduced or eliminated syntax elements have little impact on high-bitwidth, high-bitrate, high-quality, or lossless video encoding and decoding, the compression efficiency can also be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 FIG. 6 is a schematic application diagram of an encoding framework provided by the related art;
[0033] Figure 2 FIG. 10 is a schematic diagram of the positional relationship between a current coefficient and adjacent coefficients provided by the related art;
[0034] Figure 3 FIG. 14 is a schematic flowchart of an arithmetic decoding process of a bin provided by the related art;
[0035] Figure 4 FIG. 18 is a schematic flowchart of an arithmetic decoding process of a binary symbol provided by the related art;
[0036] Figure 5 FIG. 22 is a schematic flowchart of the renormalization of an arithmetic decoding engine provided by the related art;
[0037] Figure 6 Flow diagram of a bypass decoding process provided for the related art;
[0038] Figure 7 Schematic diagram of the positional relationship between a possible non-zero coefficient region and a region forced to be zero provided for the related art;
[0039] Figure 8A Schematic diagram of the system composition of an encoder provided for an embodiment of the present application;
[0040] Figure 8B Schematic diagram of the system composition of a decoder provided for an embodiment of the present application;
[0041] Figure 9 Flow diagram of a coefficient decoding method provided for an embodiment of the present application;
[0042] Figure 10A Schematic diagram of the position of the last non-zero coefficient relative to the upper left corner of the current block provided for an embodiment of the present application;
[0043] Figure 10B Schematic diagram of the position of the last non-zero coefficient relative to the lower right corner of the current block provided for an embodiment of the present application;
[0044] Figure 11 Flow diagram of a coefficient encoding method provided for an embodiment of the present application;
[0045] Figure 12 Schematic diagram of the composition structure of an encoder provided for an embodiment of the present application;
[0046] Figure 13 Schematic diagram of the specific hardware structure of an encoder provided for an embodiment of the present application;
[0047] Figure 14 Schematic diagram of the composition structure of a decoder provided for an embodiment of the present application;
[0048] Figure 15 Schematic diagram of the specific hardware structure of a decoder provided for an embodiment of the present application. Detailed implementation manners
[0049] In order to more thoroughly understand the features and technical content of the embodiments of the present application, the implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are only for reference and explanation purposes and are not used to limit the embodiments of the present application.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this application belongs. The terms used herein are for the purpose of describing embodiments of this application only and are not intended to limit this application.
[0051] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict. It should also be noted that the terms "first / second / third" used in the embodiments of this application are only used to distinguish similar objects and do not represent a specific order for the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence when permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0052] In video images, generally, a coding block (CB) is characterized by a first image component, a second image component, and a third image component; among them, these three image components are respectively a luminance component, a blue chrominance component, and a red chrominance component. Specifically, the luminance component is usually represented by the symbol Y, the blue chrominance component is usually represented by the symbol Cb or U, and the red chrominance component is usually represented by the symbol Cr or V; thus, video images can be represented in the YCbCr format or the YUV format.
[0053] Before further elaborating on the embodiments of this application, the nouns and terms involved in the embodiments of this application are described first. The nouns and terms involved in the embodiments of this application are applicable to the following explanations:
[0054] Moving Picture Experts Group (MPEG)
[0055] International Standardization Organization (ISO)
[0056] International Electrotechnical Commission (IEC)
[0057] Joint Video Experts Team (JVET)
[0058] Alliance for Open Media (AOM)
[0059] The new generation of video coding standard H.266 / Versatile Video Coding (VVC)
[0060] The reference software test platform of VVC (VVC Test Model, VTM)
[0061] Audio Video Standard (AVS)
[0062] The high-performance test model of AVS (High-Performance Model, HPM)
[0063] Context-based Adaptive Binary Arithmetic Coding (CABAC)
[0064] Regular Residual Coding (RRC)
[0065] Transform Skip Residual Coding (TSRC)
[0066] It can be understood that the currently common video coding and decoding standards (such as VVC) all adopt a block-based hybrid coding framework. Each frame in a video image is divided into square largest coding units (LCUs) of the same size (such as 128×128, 64×64, etc.), and each largest coding unit can also be divided into rectangular coding units (CUs) according to rules; moreover, the coding unit may also be divided into smaller prediction units (PUs), transform units (TUs), etc. Specifically, such as Figure 1As shown in the figure, the hybrid coding framework may include modules such as Prediction, Transform, Quantization, Entropy Coding, and In Loop Filter. Among them, the prediction module may include Intra Prediction and Inter Prediction, and the Inter Prediction may include Motion Estimation and Motion Compensation. Since there is a strong correlation between adjacent pixels within a frame of a video image, using the intra prediction method in video coding and decoding technology can eliminate the spatial redundancy between adjacent pixels; however, since there is also a strong similarity between adjacent frames in a video image, using the inter prediction method in video coding and decoding technology can eliminate the temporal redundancy between adjacent frames, thereby improving the coding and decoding efficiency.
[0067] The basic process of a video codec is as follows: In the encoder, a frame of image is divided into blocks, and the current block uses intra prediction or inter prediction to generate a predicted block of the current block. The original block of the current block minus the predicted block gets the residual block. The residual block is transformed and quantized to obtain a quantized coefficient matrix, and the quantized coefficient matrix is entropy encoded and output to the bitstream. In the decoder, the current block uses intra prediction or inter prediction to generate a predicted block of the current block. On the other hand, the bitstream is decoded to obtain a quantized coefficient matrix, and the quantized coefficient matrix is inverse quantized and inverse transformed to obtain a residual block. The predicted block and the residual block are added together to get a reconstructed block. The reconstructed blocks form a reconstructed image, and the reconstructed image is loop-filtered based on the image or based on the blocks to obtain a decoded image. The encoder also needs to perform operations similar to those of the decoder to obtain a decoded image. The decoded image can be used as a reference frame for inter prediction for subsequent frames. If necessary, the block partitioning information, prediction, transform, quantization, entropy coding, loop filtering and other mode information or parameter information determined by the encoder need to be output to the bitstream; then the decoder determines the same block partitioning information, prediction, transform, quantization, entropy coding, loop filtering and other mode information or parameter information as the encoder by parsing and analyzing based on the existing information, so as to ensure that the decoded image obtained by the encoder is the same as the decoded image obtained by the decoder. The decoded image obtained by the encoder is usually also called a reconstructed image. When predicting, the current block can be divided into prediction units, and when transforming, the current block can be divided into transform units, and the partitioning of the prediction units and the transform units can be different. The above is the basic process of a video encoder and decoder under the block-based hybrid coding framework. With the development of technology, some modules or steps of this framework or process may be optimized. The embodiments of this application are applicable to the basic process of a video codec under this block-based hybrid coding framework, but are not limited to this framework and process.
[0068] The current block can be the current coding unit (CU), the current prediction unit (PU), or the current transform block (TU), etc.
[0069] Among them, block partitioning information, various modes and parameter information of prediction, transformation, and quantization, coefficients, etc. are written into the bitstream through entropy coding. Assuming that the probabilities of different elements are different, shorter codewords are assigned to elements with higher occurrence probabilities, and longer codewords are assigned to elements with lower occurrence probabilities, which can obtain higher coding efficiency than fixed-length coding. However, if the probabilities of different elements are similar or basically the same, the compression space of entropy coding is limited. CABAC is a commonly used entropy coding method, and HEVC, VVC, etc. all use CABAC for entropy coding. CABAC can use context models to improve compression efficiency, but the use and update of context modes also make the operation more complex. 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 the embodiments of this application, the mode that needs to use and update the context model in CABAC can be called the context mode.
[0070] Generally, it is necessary to first determine the context model according to the defined method. When calling the arithmetic decoding process of the defined binary symbol, the parameters of the context model can be used as input. There is also a dependency relationship in the selection of the context model between adjacent coefficients. For example, Figure 2 shows a schematic diagram of the positional relationship between a current coefficient and adjacent coefficients provided by the related art. In Figure 2 the black-filled block represents the current coefficient, and the grid-line filled block represents the adjacent coefficient; as Figure 2 shown, which context model to select for the sig_coeff_flag of the current coefficient needs to be determined according to the information of the 5 adjacent coefficients on its right, below, and lower right. According to Figure 2 it can be further seen that the operation of the context mode is much more complex than that of the bypass mode, and there is also a dependency between adjacent coefficients.
[0071] For the arithmetic coding engine of CABAC, if the context mode needs to be used, it is necessary to call the arithmetic decoding process of the defined binary symbol, which includes the state transition process, that is, the update of the context model. And the renormalization process of the arithmetic decoding engine will be called during the arithmetic decoding process of the binary symbol. And when using the bypass mode, the bypass decoding process needs to be called.
[0072] The following takes the use of CABAC in VVC as an example for introduction:
[0073] For the arithmetic coding engine of CABAC, the inputs of the arithmetic decoding process are 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.
[0074] Among them, ctxTable is the table used when selecting the context mode, and ctxIdx is the context model index.
[0075] Figure 3 The flowchart of an arithmetic decoding process of a bin provided by the related art is shown. As Figure 3 shown, to decode the value of bin, the context index table ctxTable, ctxIdx, bypassFlag are transmitted as inputs to the arithmetic decoding process DecodeBin(ctxTable, ctxIdx, bypassFlag), specifically as follows:
[0076] If the value of bypassFlag is 1, the bypass decoding process DecodeBypass() is called;
[0077] Otherwise, if the value of bypassFlag is 0, the value of ctxTable is 0, and the value of ctxIdx is 0, then DecodeTerminate() is called;
[0078] Otherwise (the value of bypassFlag is 0 and the value of ctxTable is not 0), the arithmetic decoding process DecodeDecision(ctxTable, ctxIdx) of the defined binary symbol is called.
[0079] Furthermore, for the arithmetic decoding process of the binary symbol, the inputs of this process are the variables ctxTable, ctxIdx, ivlCurrRange, and ivlOffset, and the outputs of this process are the decoded value binVal, and the updated variables ivlCurrRange and ivlOffset.
[0080] Figure 4 The flowchart of an arithmetic decoding process of a binary symbol provided by the related art is shown. As Figure 4 shown, among them, pStateIdx0 and pStateIdx1 are the two states of the current context model.
[0081] (1) The value of the variable ivlLpsRange is derived as follows:
[0082] Given the current value of ivlCurrRange, the variable qRangeIdx is derived as follows:
[0083] qRangeIdx = ivlCurrRange >> 5
[0084] Given qRangeIdx, the corresponding pStateIdx0 and pStateIdx1 for ctxTable and ctxIdx, valMps and ivlLpsRange are derived as follows:
[0085] pState = pStateIdx1 + 16 × pStateIdx0;
[0086] valMps = pState >> 14;
[0087] ivlLpsRange = (qRangeIdx × ((valMps? 32767 - pState : pState) >> 9) >> 1) + 4.
[0088] (2) Set the value of variable ivlCurrRange to ivlCurrRange - ivlLpsRange, and perform the following operations:
[0089] If ivlOffset is greater than or equal to ivlCurrRange, then the value of variable binVal is 1 - valMps, the value of ivlOffset is ivlOffset minus ivlCurrRange, and the value of ivlCurrRange is ivlLpsRange;
[0090] Otherwise (ivlOffset is less than ivlCurrRange), the value of variable binVal is valMps.
[0091] Given the value of binVal, perform the defined state transition. Based on the current value of ivlCurrRange, the defined renormalization can be performed.
[0092] Furthermore, for the state transition process, the inputs of this process are the current pStateIdx0 and pStateIdx1, and the solved value binVal; the outputs are the context variables pStateIdx0 and pStateIdx1 corresponding to the updated ctxTable and ctxIdx. Among them, variables shift0 and shift1 are derived from shiftIdx, and the corresponding relationship between shiftIdx and ctxTable and ctxIdx is defined as follows:
[0093] shift0 = (shiftIdx >> 2) + 2;
[0094] shift1 = (shiftIdx & 3) + 3 + shift0。
[0095] Based on the solved value binVal, the update of the two variables pStateIdx0 and pStateIdx1 corresponding to ctxTable and ctxIdx is as follows:
[0096] pStateIdx0 = pStateIdx0 - (pStateIdx0 >> shift0) + (1023 * binVal >> shift0);
[0097] pStateIdx1 = pStateIdx1 - (pStateIdx1 >> shift1) + (16383 * binVal >> shift1)。
[0098] Furthermore, 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 is the updated variables ivlCurrRange and ivlOffset.
[0099] Figure 5 The flowchart of the renormalization of an arithmetic decoding engine provided by the related art is shown, as Figure 5 shown, the current value of ivlCurrRange is first compared with 256, and the subsequent steps are as follows:
[0100] If ivlCurrRange is greater than or equal to 256, then no renormalization is required and the RenormD process ends;
[0101] Otherwise (ivlCurrRange is less than 256), enter the renormalization loop. In this loop, the value of ivlCurrRange is multiplied by 2, that is, shifted left by one bit. The value of ivlOffset is multiplied by 2, that is, shifted left by one bit. One bit obtained by read_bits(1) is shifted into ivlOffset.
[0102] During the whole process, the data in the code stream should not cause ivlOffset to be greater than or equal to ivlCurrRange.
[0103] Furthermore, the input of the bypass decoding process for binary symbols is the bits in the slice data and the variables ivlCurrRange and ivlOffset, and the output is the updated variable ivlOffset and the solved value binVal.
[0104] When bypassFlag is 1, the bypass decoding process is called,Figure 6 FIG. 1 shows a schematic flowchart of a bypass decoding process provided by the related art. As Figure 6 shown, first, the value of ivlOffset is multiplied by 2, that is, shifted left by one bit. One bit obtained by read_bits(1) is shifted into ivlOffset. Then the value of ivlOffset is compared with the value of ivlCurrRange, and the subsequent steps are as follows:
[0105] If ivlOffset is greater than or equal to ivlCurrRange, then the value of binVal is set to 1, and ivlOffset is equal to ivlOffset minus CurrRange;
[0106] Otherwise (ivlOffset is less than ivlCurrRange), the value of binVal is set to 0.
[0107] During the whole process, the data in the bitstream should not cause ivlOffset to be greater than or equal to ivlCurrRange.
[0108] It should also be understood that in the current video coding and decoding standards, usually one or more transforms and transform skips are supported for residuals. Transforms include Discrete Cosine Transform (DCT), etc. The residual blocks using transforms usually exhibit certain characteristics after transform (and quantization). For example, after some transforms (and quantization), since most of the energy is concentrated in the low-frequency region, the coefficients in the upper-left region are larger, and the coefficients in the lower-right region are smaller or even many zero coefficients appear. And for transform skip, as the name implies, no transform is performed, and the distribution law of the coefficients after transform skip is different from that of the coefficients after transform. Therefore, different coefficient coding methods can be used. For example, in VVC, RRC is used for the coefficients after transform skip, and TSRC is used for the coefficients with transform skipped.
[0109] For general transforms, such as DCT transform, at this time, for the transformed block, from left to right represents frequencies from low to high, and from top to bottom represents frequencies from low to high. The upper-left corner represents low frequency, and the lower-right corner represents high frequency. The human eye is more sensitive to low-frequency information and not particularly sensitive to high-frequency information. Utilizing this characteristic, some high-frequency information is processed more or removed with less visual impact. Some techniques, such as zero-out, can force certain high-frequency information to be set to 0. For example, for a 64x64 block, the coefficients at positions where the abscissa is greater than or equal to 32 or the ordinate is greater than or equal to 32 are forced to be set to 0. The above is just a simple example, and there may be more complex derivation methods for the zero-out range, which will not be elaborated here. As Figure 7As shown, there may be non-zero coefficients in the upper left corner part (i.e., the area where non-zero coefficients may exist), and the lower right corner part will be all set to zero (i.e., the forced zero area). In this way, for the subsequent coefficient coding, the coefficients in the zero-out forced zero area do not need to be coded because they are definitely zero.
[0110] Furthermore, since the coefficient distribution shows the characteristic that the coefficients in the upper left corner are larger and there are many zero coefficients in the lower right corner after the transformation (and quantization) of the residuals of a normal video, some methods are usually used in coefficient coding to make the coefficients within a certain range in the upper left corner need to be coded, while the coefficients within a certain range in the lower right corner do not need to be coded, that is, these coefficients are defaulted to be zero. One method is to determine the position of the last non-zero coefficient in the scanning order of a block when coding the coefficients of the block. After determining this position, all the coefficients after the position of the last non-zero coefficient in the scanning order are considered to be zero, that is, they do not need to be coded; only the coefficients at and before the position of the last non-zero coefficient need to be coded. For example, in VVC, last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix are used to determine the position (LastSignificantCoeffX, LastSignificantCoeffY) of the last non-zero coefficient.
[0111] (a) last_sig_coeff_x_prefix determines the prefix of the horizontal (or column) coordinate of the last non-zero coefficient in the current block in the scanning order. The value of last_sig_coeff_x_prefix should be in the range from 0 to (log2ZoTbWidth << 1) - 1, including these two boundary values.
[0112] If last_sig_coeff_x_prefix does not exist, then the value of last_sig_coeff_x_prefix is 0.
[0113] (b) last_sig_coeff_y_prefix determines the prefix of the vertical (or row) coordinate of the last non-zero coefficient in the current block in the scanning order. The value of last_sig_coeff_y_prefix should be in the range from 0 to (log2ZoTbHeight << 1) - 1, including these two boundary values.
[0114] If last_sig_coeff_y_prefix does not exist, then the value of last_sig_coeff_y_prefix is 0.
[0115] (c) The last_sig_coeff_x_suffix determines the suffix of the horizontal (or column) coordinate of the last non-zero coefficient in the current block in scan order. The value of last_sig_coeff_x_suffix should be in the range from 0 to (1<<((last_sig_coeff_x_prefix>>1)-1))-1, inclusive of both boundary values.
[0116] The value of the horizontal (or column) coordinate of the last non-zero coefficient in the current transform block in scan order, LastSignificantCoeffX, is derived as follows:
[0117] If last_sig_coeff_x_suffix does not exist, then
[0118] LastSignificantCoeffX = last_sig_coeff_x_prefix;
[0119] Otherwise (last_sig_coeff_x_suffix exists),
[0120] LastSignificantCoeffX = (1<<((last_sig_coeff_x_prefix>>1)-1))*(2+(last_sig_coeff_x_prefix&1)) +
[0121] last_sig_coeff_x_suffix.
[0122] (d) The last_sig_coeff_y_suffix determines the suffix of the vertical (or row) coordinate of the last non-zero coefficient in the current block in scan order. The value of last_sig_coeff_x_suffix should be in the range from 0 to (1<<((last_sig_coeff_y_prefix>>1)-1))-1, inclusive of both boundary values.
[0123] The value of the vertical (or row) coordinate of the last non-zero coefficient in the current transform block in scan order, LastSignificantCoeffY, is derived as follows:
[0124] If last_sig_coeff_y_suffix does not exist, then
[0125] LastSignificantCoeffY = last_sig_coeff_y_prefix;
[0126] Otherwise (if last_sig_coeff_y_suffix exists),
[0127] LastSignificantCoeffY = (1 << ((last_sig_coeff_y_prefix >> 1) - 1)) * (2 + (last_sig_coeff_y_prefix & 1)) +
[0128] last_sig_coeff_y_suffix.
[0129] Furthermore, all the coefficients up to and including the last non-zero coefficient need to be encoded. However, in ordinary videos, even among these coefficients, a certain proportion of them are still 0. In VVC, the flag sb_coded_flag indicating whether the current sub-block is coded is used to determine whether the coefficients in the current sub-block need to be encoded. If not, it is considered that all the coefficients in the current sub-block are 0. Here, a sub-block is usually an n×n sub-block, such as a 4×4 sub-block.
[0130] sb_coded_flag[xS][yS] determines the following information for the sub-block at position (xS, yS) in the current transform block, where the sub-block is an array of transform coefficient values:
[0131] If the value of sb_coded_flag[xS][yS] is 0, then all the values of the transform coefficients within the sub-block at position (xS, yS) in the current transform block are 0;
[0132] If sb_coded_flag[xS][yS] does not exist, then the value of sb_coded_flag[xS][yS] is 1.
[0133] Furthermore, when processing coefficient coding, the characteristics of coefficients can be utilized to improve the compression efficiency. For example, in a typical video, among the coefficients to be coded, a certain proportion of the coefficients are 0. Therefore, a syntax element can be used to indicate whether the current coefficient is 0. This syntax element is usually a binary symbol. If the current coefficient is 0, it means that the coding of the current coefficient has ended; otherwise, the coding of the current coefficient needs to continue. Another example is that in a typical video, among the non-zero coefficients, a certain proportion of the coefficients have an absolute value of 1. Therefore, a syntax element can be used to indicate whether the absolute value of the current coefficient is greater than 1. 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 coding of the current coefficient has ended; otherwise, the coding of the current coefficient needs to continue. For example, the syntax elements involved in VVC are as follows,
[0134] sig_coeff_flag[xC][yC] is used to determine whether the corresponding transform coefficient at the transform coefficient position (xC, yC) of the current transform block is a non-zero coefficient:
[0135] If the value of sig_coeff_flag[xC][yC] is 0, then the value of the transform coefficient at the position (xC, yC) is set to 0;
[0136] Otherwise (the value of sig_coeff_flag[xC][yC] is 1), the transform coefficient at the position (xC, yC) is a non-zero coefficient.
[0137] If sig_coeff_flag[xC][yC] does not exist, then the following inference is made:
[0138] If the value of transform_skip_flag[x0][y0][cIdx] is 0 or the value of sh_ts_residual_coding_disabled_flag is 1:
[0139] If (xC, yC) is the position of the last non-zero coefficient in the scan order (LastSignificantCoeffX, LastSignificantCoeffY) or all of the following conditions are true, then the value of sig_coeff_flag[xC][yC] is inferred to be 1:
[0140] (xC & ((1 << log2SbW) - 1), yC & ((1 << log2SbH) - 1)) is equal to (0, 0);
[0141] The value of inferSbDcSigCoeffFlag is equal to 1;
[0142] The value of sb_coded_flag[xS][yS] is 1;
[0143] Otherwise, the value of sig_coeff_flag[xC][yC] is inferred to be 0;
[0144] Otherwise (when transform_skip_flag[x0][y0][cIdx] is 1 and sh_ts_residual_coding_disabled_flag is 0):
[0145] If all of the following conditions are true, then the value of sig_coeff_flag[xC][yC] is inferred to be 1:
[0146] (xC & ((1 << log2SbW) - 1), yC & ((1 << log2SbH) - 1)) is equal to ((1 <<
[0147] log2SbW) - 1, (1 << log2SbH) - 1);
[0148] The value of inferSbSigCoeffFlag is 1;
[0149] The value of sb_coded_flag[xS][yS] is 1;
[0150] Otherwise, the value of sig_coeff_flag[xC][yC] is inferred to be 0.
[0151] abs_level_gtx_flag[n][j] is used to determine whether the absolute value of the (n-th in scan order) transform coefficient 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.
[0152] Thus, if after processing the above flags (or called syntax elements), the current coefficient has not been coded completely, then the remaining value of the absolute value of the coefficient needs to be coded. Such as abs_remainder in VVC.
[0153] abs_remainder[n] is used to determine the remaining absolute value of the (n-th in scan order) transform coefficient coded with Golomb - Rice. If abs_remainder[n] does not exist, then the value of abs_remainder[n] is 0.
[0154] Furthermore, in VVC, syntax elements such as sig_coeff_flag and abs_level_gtx_flag are encoded using the context mode, while abs_remainder is encoded using the bypass mode. As mentioned above, the context mode encoding is more complex than the bypass mode encoding, which intuitively means it is slower to process. If there are many coefficients to be encoded, using too much context mode encoding will affect the decoding speed. Therefore, the number of syntax elements encoded using the context mode can be restricted. For example, when the number of binary symbols encoded using the context mode exceeds a threshold, subsequent coefficient encoding is forced to use the bypass mode encoding. Such as dec_abs_level in VVC.
[0155] dec_abs_level[n] is an intermediate value encoded with Golomb - Rice at scan position n. When parsing dec_abs_level[n], ZeroPos[n] can be derived. The absolute value AbsLevel[xC][yC] of the quantized coefficient at position (xC, yC) is derived as follows:
[0156] If 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;
[0157] Otherwise, if the value of dec_abs_level[n] is less than ZeroPos[n], then the value of AbsLevel[xC][yC] is dec_abs_level[n] + 1;
[0158] Otherwise (the value of dec_abs_level[n] is greater than ZeroPos[n]), the value of AbsLevel[xC][yC] is dec_abs_level[n].
[0159] All of the above involve the absolute values of the coefficients. The positive or negative sign of a non - zero coefficient can be determined using the coefficient sign flag coeff_sign_flag or some methods for deriving the sign. coeff_sign_flag[n] can determine the positive or negative sign of the transform coefficient at scan position n as follows:
[0160] If the value of coeff_sign_flag[n] is 0, then the corresponding transform coefficient is positive;
[0161] Otherwise (the value of coeff_sign_flag[n] is 1), the corresponding transform coefficient is negative.
[0162] If coeff_sign_flag[n] does not exist, then the value of coeff_sign_flag[n] is 0; at this time, the sign of the transform coefficient at the coordinate (xC, yC) is determined according to CoeffSignLevel[xC][yC]:
[0163] If the value of CoeffSignLevel[xC][yC] is 0, then the corresponding transform coefficient is 0;
[0164] Otherwise, if the value of CoeffSignLevel[xC][yC] is 1, then the corresponding transform coefficient is positive; otherwise (the value of CoeffSignLevel[xC][yC] is -1), the corresponding transform coefficient is negative.
[0165] It should also be noted that CoeffSignLevel[xC][yC] can also be derived using some other methods, which will not be elaborated here.
[0166] In addition, in VVC, a parity flag par_level_flag of the value of a coefficient is also used. According to this flag, the parity of the current coefficient value can be known, and it will be used in determining the current coefficient value and DependentQuantization.
[0167] par_level_flag[n] determines the parity of the transform coefficient at the scan order position n. If par_level_flag[n] does not exist, then the value of par_level_flag[n] is 0.
[0168] In addition to determining the parity of the transform coefficient, par_level_flag can also be used together with abs_level_gtx_flag, abs_remainder, etc. to determine the magnitude of the coefficient.
[0169] Here, since context mode coding requires selecting, using, and updating the context mode, while bypass mode coding does not require selecting, using, and updating the context mode, the usual practice is to place the syntax elements of context mode coding together within a certain range, and the syntax elements of bypass mode coding together, which is more friendly to hardware design. For example, first process all the syntax elements of context mode coding in a block, and then process the syntax elements of bypass mode coding. All the syntax elements of context mode coding in the current block may be divided into several groups, and all the syntax elements of bypass mode coding in a block may also be divided into several groups.
[0170] In a specific example, the specific syntax of RRC is shown in Table 1.
[0171] Table 1
[0172]
[0173]
[0174]
[0175]
[0176]
[0177] Among them, the array AbsLevel[xC][yC] represents the array of the absolute values of the transform coefficients of the current transform block. The array AbsLevelPass1[xC][yC] represents the array of the absolute values of the partial reconstruction 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.
[0178] After entering the function residual_coding(x0, y0, log2TbWidth, log2TbHeight, cIdx), it is necessary to determine some information about the block size, such as determining the logarithms log2ZoTbWidth and log2ZoTbHeight of the block size after zero-out. The coefficients with the abscissa in the range [0, (1<<log2ZoTbWidth)–1] and the ordinate in the range [0, (1<<log2ZoTbHeight)–1] may be non-zero coefficients. Here, (1<<log2ZoTbWidth) represents the width of the transform block after zero-out, and (1<<log2ZoTbHeight) represents the height of the transform block after zero-out. Then, determine the position of the last non-zero coefficient according to last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_suffix, etc. The coefficients before the last non-zero coefficient in the scanning order may be non-zero coefficients. Then determine the value of remBinsPass1, that is, use the equation remBinsPass1 = ((1<<(log2TbWidth + log2TbHeight))×7)>>2 to determine. remBinsPass1 determines the number of syntax elements encoded using the context mode in the current block. In the embodiments of the present application, remBinsPass1 can be understood as the meaning of remaining binaries in pass1, that is, the number of remaining binary symbols in the first round. The coefficients before the last non-zero coefficient in the scanning order need to be encoded. For the sub-blocks where these coefficients are located, it is determined in turn whether the current sub-block needs to be encoded. If it needs to be encoded, in this method, the syntax elements encoded using the context mode in a sub-block are placed in the first round, and the syntax elements encoded using the bypass mode are placed later. Each coefficient may need to process up to 4 syntax elements encoded using the context mode: 1 sig_coeff_flag, 2 abs_level_gtx_flag, and 1 par_level_flag. In the first round, each time a syntax element encoded using the context mode is processed, remBinsPass1 will be decremented by 1. If a coefficient is large enough, after processing several syntax elements encoded using the context mode in the first round, the remaining value, that is, abs_remainder, still needs to be processed. And if remBinsPass1 is small enough (not satisfying remBinsPass1 >= 4), the first round will end, and the remaining coefficients will be directly processed using the bypass mode, that is, dec_abs_level.
[0179] In another specific example, the specific syntax of TSRC is shown in Table 2.
[0180] Table 2
[0181]
[0182]
[0183]
[0184] After entering the residual_ts_coding(x0, y0, log2TbWidth, log2TbHeight, cIdx) function, some information about the block size needs to be determined. Then the value of RemCcbs is determined, that is, determined using the equation RemCcbs = ((1 << (log2TbWidth + log2TbHeight)) × 7) >> 2. RemCcbs determines the number of syntax elements encoded using the context mode in the current block. In the embodiments of the present application, RemCcbs can be understood as the meaning of remaining context coded binaries, that is, the number of binary symbols of the remaining context mode encoding. For each sub-block, it is determined whether the current sub-block needs to be encoded. If encoding is required, different from the above RRC, in the TSRC method, the syntax elements encoded in the context mode in a sub-block are placed in two rounds, and each coefficient processes at most 4 syntax elements encoded in the context mode in the first round and the second round respectively. The syntax elements encoded in the bypass mode are placed behind. In the first round and the second round, each time a syntax element encoded in the context mode remBinsPass1 is processed, it will be decremented by 1. If a coefficient is large enough, after processing several syntax elements encoded in the context mode in the first round and the second round, the remaining value, that is, abs_remainder, still needs to be processed. And if remBinsPass1 is small enough (not satisfying remBinsPass1 >= 4), the first two rounds will end, and the remaining coefficients will be directly processed using the bypass mode, and here it is still abs_remainder.
[0185] In short, in the related art, the existing coefficient coding method has good compression efficiency for currently common videos, such as consumer videos. Consumer videos usually have a bit width of 8 bits or 10 bits per pixel, and the bit rate of consumer videos is usually not too high, usually several megabits per second (MB / s) or lower. However, for some application videos, the pixels require a higher bit width, such as 12 bits, 14 bits, 16 bits or more per pixel. A higher bit width usually brings larger coefficients and more non-zero coefficients, thus resulting in a higher bit rate. Some application videos require higher quality, and higher quality usually also brings larger coefficients and more non-zero coefficients, thus resulting in a higher bit rate. A higher bit rate requires higher processing capabilities of the decoder, such as throughput.
[0186] Videos with high bit width, high quality, and high bit rate (high-three videos) usually require more and larger coefficients to be encoded and decoded than videos with low bit width, low quality, and low bit rate (conventional videos). For example, the number of coefficients to be encoded and decoded in a block of high-three videos is much larger than that in a block of the same size in conventional videos. Because many of the coefficients after prediction, transformation, and quantization in the blocks of conventional videos become 0, while many of the coefficients after prediction, transformation, and quantization in the blocks of high-three videos are still non-zero coefficients. A large proportion of the coefficients to be encoded among the coefficients after prediction, transformation, and quantization in the blocks of conventional videos are 0. Therefore, it is very effective to use the last significant coefficient positions (LastSignificantCoeffX, LastSignificantCoeffY) to distinguish the coefficient regions to be encoded. Even a large proportion of the coefficients before the last significant coefficient position are still 0. Therefore, it is very effective to use the flag sb_coded_flag indicating whether the sub-block is encoded to further distinguish whether the current sub-block needs to be encoded. However, when there are a large number of non-zero coefficients in the current block, even the vast majority or all of the coefficients are non-zero coefficients, the above-mentioned last significant coefficient positions and the flag indicating whether the sub-block is encoded will not filter out too many non-zero coefficients. Moreover, encoding the non-zero coefficient positions and the flag indicating whether the sub-block is encoded in the bitstream itself will occupy a certain overhead and cause waste.
[0187] On the other hand, the last significant coefficient positions and the flag indicating whether the sub-block is encoded, etc. are all encoded in the context mode. The context mode encoding is more complex than the bypass mode, and processing this information will also affect the speed and throughput of software and hardware encoding and decoding.
[0188] On the other hand, the current encoding method of the last non-zero coefficient position (LastSignificantCoeffX, LastSignificantCoeffY) is to encode the coordinates of the last non-zero coefficient position. In conventional videos, since most of the non-zero coefficients are concentrated in the upper left corner and the large area in the lower right corner is 0, the values of LastSignificantCoeffX and LastSignificantCoeffY are usually small. In the three-high video, a large number of non-zero coefficients will also appear in the lower right corner, which leads to the values of LastSignificantCoeffX and LastSignificantCoeffY being usually large, so encoding larger values in the bitstream will bring greater overhead. In addition, there is also the possibility of using this method in lossless compression, because quantization cannot be used in lossless compression, and at this time the coefficients are usually more and larger. At this time, using existing related schemes may bring greater overhead, waste, and even affect the speed and throughput of encoding and decoding.
[0189] The embodiment of the present application provides a coefficient decoding method, which is applied to a decoder. Parse a bitstream to obtain video identification information; when the video identification information indicates that the video meets a preset condition, parse the bitstream to obtain the last non-zero coefficient position flip identification information and the coordinate information of the last non-zero coefficient; when the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip, calculate the coordinate information of the last non-zero coefficient to determine the position of the last non-zero coefficient; decode all coefficients before the position of the last non-zero coefficient according to a preset scanning order to determine the coefficient of the current block.
[0190] The embodiment of the present application also provides a coefficient encoding method, which is applied to an encoder. Determine video identification information and the position of the last non-zero coefficient; when the video identification information indicates that the video meets a preset condition, determine the last non-zero coefficient position flip identification information; determine the coordinate information of the last non-zero coefficient according to the position of the last non-zero coefficient and the last non-zero coefficient position flip identification information; encode all coefficients before the position of the last non-zero coefficient according to a preset scanning order, and write the bit information obtained after encoding, the video identification information, and the coordinate information of the last non-zero coefficient into the bit stream.
[0191] In this way, in high-bitwidth, high-bitrate, high-quality or lossless video encoding and decoding scenarios, since the coefficient distribution law is different from that in conventional video scenarios, in coefficient encoding, the number of syntax elements for context mode encoding is reduced or even eliminated, such as syntax elements regarding the position of the last non-zero coefficient, sub-block encoding identification, etc. Moreover, when the value of the coordinate information of the last non-zero coefficient is relatively large, coordinate transformation can even be performed, thereby reducing the overhead brought by encoding in the bitstream, and further improving the throughput and encoding / decoding speed of coefficient encoding. Additionally, since the influence of the reduced or eliminated syntax elements in high-bitwidth, high-bitrate, high-quality or lossless video encoding and decoding is relatively small, the compression efficiency can also be improved.
[0192] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0193] See Figure 8A , which shows an example of the system composition block diagram of an encoder provided by an embodiment of the present application. As Figure 8A shown, the encoder 100 may include: a splitting unit 101, a prediction unit 102, a first adder 107, a transformation unit 108, a quantization unit 109, an inverse quantization unit 110, an inverse transformation unit 111, a second adder 112, a filtering unit 113, a decoded picture buffer (DPB) unit 114, and an entropy encoding unit 115. Here, the input of the encoder 100 may be a video composed of a series of pictures or a static picture, and the output of the encoder 100 may be a bitstream (also referred to as a "code stream") for representing a compressed version of the input video.
[0194] Among them, the splitting unit 101 splits the pictures in the input video into one or more coding tree units (CTUs). The splitting unit 101 divides the picture into multiple tiles (or called tiles), and can further divide a tile into one or more bricks. Here, one tile or one brick may include one or more complete and / or partial CTUs. Additionally, the splitting unit 101 may form one or more slices, where one slice may include one or more tiles arranged in raster order in the picture, or one or more tiles covering a rectangular area in the picture. The splitting unit 101 may also form one or more sub-pictures, where one sub-picture may include one or more slices, tiles, or bricks.
[0195] During the encoding process of the encoder 100, the splitting unit 101 transfers the CTU to the prediction unit 102. Generally, the prediction unit 102 may be composed of a block splitting unit 103, a Motion Estimation (ME) unit 104, a Motion Compensation (MC) unit 105, and an intra prediction unit 106. Specifically, the block splitting unit 103 further divides the input CTU into smaller Coding Units (CUs) by iteratively using quadtree splitting, binary tree splitting, and ternary tree splitting. The prediction unit 102 can obtain the inter prediction block of the CU by using the ME unit 104 and the MC unit 105. The intra prediction unit 106 can obtain the intra prediction block of the CU by using various intra prediction modes including the MIP mode. In the example, the rate-distortion optimized motion estimation method can be called by the ME unit 104 and the MC unit 105 to obtain the inter prediction block, and the rate-distortion optimized mode determination method can be called by the intra prediction unit 106 to obtain the intra prediction block.
[0196] The prediction unit 102 outputs the prediction block of the CU. The first adder 107 calculates the difference between the CU in the output of the splitting unit 101 and the prediction block of the CU, that is, the residual CU. The transformation unit 108 reads the residual CU and performs one or more transformation operations on the residual CU to obtain coefficients. The quantization unit 109 quantizes the coefficients and outputs the quantized coefficients (i.e., levels). The inverse quantization unit 110 performs a scaling operation on the quantized coefficients to output the reconstructed coefficients. The inverse transformation unit 111 performs one or more inverse transformations corresponding to the transformations in the transformation unit 108 and outputs the reconstructed residual. The second adder 112 calculates the reconstructed CU by adding the reconstructed residual and the prediction block of the CU from the prediction unit 102. The second adder 112 also sends its output to the prediction unit 102 to be used as an intra prediction reference. After all the CUs in the picture or sub-picture are reconstructed, the filtering unit 113 performs loop filtering on the reconstructed picture or sub-picture. Here, the filtering unit 113 includes one or more filters, such as a deblocking filter, a Sample Adaptive Offset (SAO) filter, an Adaptive Loop Filter (ALF), a Luma Mapping with Chroma Scaling (LMCS) filter, and a neural network-based filter, etc. Alternatively, when the filtering unit 113 determines that the CU is not used as a reference for the encoding of other CUs, the filtering unit 113 performs loop filtering on one or more target pixels in the CU.
[0197] The output of the filtering unit 113 is a decoded picture or sub-picture, and these decoded pictures or sub-pictures are cached in the DPB unit 114. The DPB unit 114 outputs the decoded picture or sub-picture according to the timing and control information. Here, the pictures stored in the DPB unit 114 can also be used as references for the prediction unit 102 to perform inter-frame prediction or intra-frame prediction. Finally, the entropy encoding unit 115 converts the parameters (such as control parameters and supplementary information, etc.) necessary for the decoded pictures in the encoder 100 into binary form, and writes such binary form into the bitstream according to the syntax structure of each data unit, that is, the encoder 100 finally outputs the bitstream.
[0198] Furthermore, the encoder 100 can be a first processor and a first memory that records a computer program. When the first processor reads and runs the computer program, the encoder 100 reads the input video and generates the corresponding bitstream. In addition, the encoder 100 can also be a computing device with one or more chips. These units implemented as integrated circuits on the chip have connection and data exchange functions similar to those of the Figure 8A corresponding units.
[0199] See Figure 8B , which shows an example of the system composition block diagram of a decoder provided by an embodiment of the present application. As Figure 8B shown, the decoder 200 may include: a parsing unit 201, a prediction unit 202, an inverse quantization unit 205, an inverse transform unit 206, an adder 207, a filtering unit 208, and a decoded picture buffer unit 209. Here, the input of the decoder 200 is a bitstream representing a compressed version of a video or a static picture, and the output of the decoder 200 can be a decoded video composed of a series of pictures or a decoded static picture.
[0200] Among them, the input bitstream of the decoder 200 can be the bitstream generated by the encoder 100. The parsing unit 201 parses the input bitstream and obtains the values of the syntax elements from the input bitstream. The parsing unit 201 converts the binary representation of the syntax elements into numerical values and sends the numerical values to the units in the decoder 200 to obtain one or more decoded pictures. The parsing unit 201 can also parse one or more syntax elements from the input bitstream to display the decoded pictures.
[0201] During the decoding process of the decoder 200, the parsing unit 201 sends the values of the syntax elements and one or more variables set or determined according to the values of the syntax elements for obtaining one or more decoded pictures to the units in the decoder 200.
[0202] The prediction unit 202 determines the prediction block of the current decoded block (e.g., CU). Here, the prediction unit 202 may include a motion compensation unit 203 and an intra prediction unit 204. Specifically, when the inter prediction mode is indicated for decoding the current decoded block, the prediction unit 202 passes the relevant parameters from the parsing unit 201 to the motion compensation unit 203 to obtain an inter prediction block; when the intra prediction mode (including the MIP mode indicated based on the MIP mode index value) is indicated for decoding the current decoded block, the prediction unit 202 passes the relevant parameters from the parsing unit 201 to the intra prediction unit 204 to obtain an intra prediction block.
[0203] The inverse quantization unit 205 has the same function as the inverse quantization unit 110 in the encoder 100. The inverse quantization unit 205 performs a scaling operation on the quantization coefficients (i.e., levels) from the parsing unit 201 to obtain reconstructed coefficients.
[0204] 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 inverse transform operations (i.e., the inverse operations of the one or more transform operations performed by the inverse transform unit 111 in the encoder 100) to obtain a reconstructed residual.
[0205] The adder 207 performs an addition operation on its inputs (the prediction block from the prediction unit 202 and the reconstructed residual from the inverse transform unit 206) to obtain the reconstructed block of the current decoded block. The reconstructed block is also sent to the prediction unit 202 to be used as a reference for other blocks encoded in the intra prediction mode.
[0206] After all CUs in a picture or sub-picture are reconstructed, the 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 sample adaptive offset filter, an adaptive loop filter, a luminance mapping and chrominance scaling filter, and a neural network-based filter, etc. Alternatively, when the filtering unit 208 determines that the reconstructed block is not used as a reference for decoding other blocks, the filtering unit 208 performs loop filtering on one or more target pixels in the reconstructed block. Here, the output of the filtering unit 208 is the decoded picture or sub-picture, and the decoded picture or sub-picture is cached to the DPB unit 209. The DPB unit 209 outputs the decoded picture or sub-picture according to the timing and control information. The pictures stored in the DPB unit 209 can also be used as references for performing inter prediction or intra prediction through the prediction unit 202.
[0207] Further, the decoder 200 may be a device having a second processor and a second memory storing a computer program. When the first processor reads and runs the computer program, the decoder 200 reads the input bitstream and generates a corresponding decoded video. Additionally, the decoder 200 may also be a computing device having one or more chips. These units implemented as integrated circuits on the chip have connection and data exchange functions similar to those of the corresponding units in Figure 8B The connection and data exchange functions of the corresponding units in
[0208] It should also be noted that when the embodiments of the present application are applied to the encoder 100, the "current block" specifically refers to the block to be encoded currently in the video image (which can also be simply referred to as the "encoding block"); when the embodiments of the present application are applied to the decoder 200, the "current block" specifically refers to the block to be decoded currently in the video image (which can also be simply referred to as the "decoding block").
[0209] In an embodiment of the present application, referring to Figure 9 FIG. Figure 9 shown in FIG., the flowchart of a coefficient decoding method provided by the embodiments of the present application is shown. As
[0210] shown, the method may include:
[0211] It should be noted that the coefficient decoding method of the embodiments of the present application is applied to the decoder. Specifically, based on the composition structure of the decoder 200 shown in Figure 8B FIG., the coefficient decoding method of the embodiments of the present application is mainly applied to the "parsing unit 201" part in the decoder 200. For this parsing unit 201, decoding can be performed using the context model-based adaptive binary arithmetic coding mode or the bypass mode to obtain the values of relevant identification information (or syntax elements), and then determine the coefficients of the current block.
[0212] It should also be noted that the coefficient coding usually mentioned in video standards may include two parts: encoding and decoding. Therefore, coefficient coding includes the coefficient coding method on the encoder side and the coefficient decoding method on the decoder side. The embodiments of the present application describe the coefficient decoding method on the decoder side.
[0213] Generally, for example, for conventional videos, the coefficient decoding method is the same as the existing methods in the related art; however, for certain situations, such as high-bitwidth or high-quality or high-bitrate or lossless compression video coding and decoding scenarios, the embodiments of the present application can modify the method for deriving the position of the last non-zero coefficient.
[0214] In the embodiments of the present application, it is first necessary to determine whether the current video meets a preset condition, which can be represented by video identification information. In some embodiments, the step of parsing the bitstream to obtain video identification information may include:
[0215] If the value of the video identification information is the first value, it is determined that the video identification information indicates that the video meets a preset condition; or,
[0216] If the value of the video identification information is the second value, it is determined that the video identification information indicates that the video does not meet the preset condition.
[0217] Here, the first value is 1 and the second value is 0.
[0218] It should be noted that in another specific example, the first value can also be set to true and the second value can also be set to false. Even in yet another specific example, the first value can also be set to 0 and the second value can also be set to 1; or, the first value can also be set to false and the second value can also be set to true. There is no limitation here.
[0219] It should also be noted that the preset condition includes at least one of the following: high bit width, high quality, high bit rate, high frame rate, and lossless compression.
[0220] That is to say, compared with a conventional video, the video described in the embodiments of the present application has characteristics such as high bit width, high quality, high bit rate, high frame rate, and lossless compression.
[0221] Furthermore, the video identification information can be a sequence-level flag, and can even be a higher-level flag, such as Video Usability Information (VUI), Supplemental Enhancement Information (SEI), etc. To determine whether a video meets the preset condition, it can be determined whether the video meets the high bit width, or whether it meets the high bit rate, or whether it meets the high quality, or whether it meets the lossless compression, etc. The following describes these four cases as examples respectively.
[0222] In some embodiments, when the video identification information is high bit width identification information, the method may further include:
[0223] If the high bit width identification information indicates that the video meets the high bit width, it is determined that the video meets the preset condition.
[0224] In some embodiments, when the video identification information is high bit rate identification information, the method may further include:
[0225] If the high bit rate identification information indicates that the video meets the high bit rate, it is determined that the video meets the preset condition.
[0226] In some embodiments, when the video identification information is high quality identification information, the method may further include:
[0227] If the high-quality identification information indicates that the video meets the high quality, it is determined that the video meets the preset conditions.
[0228] In some embodiments, when the video identification information is lossless compression identification information, the method may further include:
[0229] If the lossless compression identification information indicates that the video meets the lossless compression, it is determined that the video meets the preset conditions.
[0230] Exemplarily, taking the sequence level as an example, the video identification information may be high-bitwidth identification information (represented by sps_high_bit_depth_flag) for indicating whether the current video sequence is a high-bitwidth sequence; or it may be replaced by high-bitrate identification information (represented by sps_high_bit_rate_flag) for indicating whether the current video sequence is a high-bitrate sequence; or it may be replaced by other identification information indicating high-bitwidth, high-bitrate, high quality, or lossless compression, which is not specifically limited in the embodiments of the present application.
[0231] S902: When the video identification information indicates that the video meets the preset conditions, parse the bitstream to obtain the last non-zero coefficient position flip identification information and the coordinate information of the last non-zero coefficient.
[0232] It should be noted that when the video identification information indicates that the video meets the preset conditions, the bitstream can be further parsed at this time to obtain the last non-zero coefficient position flip identification information and the coordinate information of the last non-zero coefficient.
[0233] For the coordinate information of the last non-zero coefficient, it can be determined by last_sig_coeff_x_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_prefix, and last_sig_coeff_y_suffix. Therefore, in some embodiments, the parsing the bitstream to obtain the coordinate information of the last non-zero coefficient may include:
[0234] Parse the bitstream to obtain the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient;
[0235] Determine the horizontal coordinate of the last non-zero coefficient according to the prefix information of the horizontal coordinate of the last non-zero coefficient and the suffix information of the horizontal coordinate of the last non-zero coefficient;
[0236] Determine the vertical coordinate of the last non-zero coefficient according to the prefix information of the vertical coordinate of the last non-zero coefficient and the suffix information of the vertical coordinate of the last non-zero coefficient;
[0237] Determine the coordinate information of the last non-zero coefficient according to the horizontal coordinate of the last non-zero coefficient and the vertical coordinate of the last non-zero coefficient.
[0238] It should be noted that the prefix information of the horizontal coordinate of the last non-zero coefficient is represented by last_sig_coeff_x_prefix, that is, the prefix for determining the horizontal (or column) coordinate of the last non-zero coefficient in the current block according to the preset scanning order; the prefix information of the vertical coordinate of the last non-zero coefficient is represented by last_sig_coeff_y_prefix, that is, the prefix for determining the vertical (or row) coordinate of the last non-zero coefficient in the current block according to the preset scanning order; the suffix information of the horizontal coordinate of the last non-zero coefficient is represented by last_sig_coeff_x_suffix, that is, the suffix for determining the horizontal (or column) coordinate of the last non-zero coefficient in the current block according to the preset scanning order; the suffix information of the vertical coordinate of the last non-zero coefficient is represented by last_sig_coeff_y_suffix, that is, the suffix for determining the vertical (or row) coordinate of the last non-zero coefficient in the current block according to the preset scanning order.
[0239] It should also be noted that last_sig_coeff_x_prefix and last_sig_coeff_x_suffix determine the abscissa (i.e., horizontal coordinate) of the last non-zero coefficient, and last_sig_coeff_y_prefix and last_sig_coeff_y_suffix determine the ordinate (i.e., vertical coordinate) of the last non-zero coefficient, thus obtaining the coordinate information of the last non-zero coefficient.
[0240] Regarding the flipping identification information of the last non-zero coefficient position, it can be represented by reverse_last_sig_coeff_flag. In the embodiments of the present application, the flipping identification information of the last non-zero coefficient position can be at least one of the following identification information: sequence level, picture level, slice level, and block level; and it can even be the identification information of a higher level (such as VUI, SEI, etc.), which is not limited here.
[0241] That is to say, reverse_last_sig_coeff_flag may be a sequence-level or higher-level flag, or it may also be an image-level flag, or a slice-level flag, or a block-level flag, or a flag at other levels. Additionally, block-level flags may include flags at the largest coding unit (LCU) level, or coding unit (CU) level, or other block-level flags, and the embodiments of the present application do not make any limitations thereto.
[0242] In some embodiments, the method may further include:
[0243] If the value of the last non-zero coefficient position flip identification information is the first value, it is determined that the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip; or,
[0244] If the value of the last non-zero coefficient position flip identification information is the second value, it is determined that the last non-zero coefficient position flip identification information indicates that the current block does not use the last non-zero coefficient position flip.
[0245] That is to say, taking the first value as 1 and the second value as 0 as an example, if the value of reverse_last_sig_coeff_flag is 1, then it can be determined that reverse_last_sig_coeff_flag indicates that the current block uses the last non-zero coefficient position flip; or, if the value of reverse_last_sig_coeff_flag is 0, then it can be determined that reverse_last_sig_coeff_flag indicates that the current block does not use the last non-zero coefficient position flip.
[0246] S903: When the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip, calculate the coordinate information of the last non-zero coefficient to determine the position of the last non-zero coefficient.
[0247] S904: Decode all the coefficients before the position of the last non-zero coefficient according to a preset scanning order to determine the coefficients of the current block.
[0248] It should be noted that in the embodiments of the present application, when the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip, it can be determined that the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the lower right corner position of the current block.
[0249] At this time, in some embodiments, the calculating the coordinate information of the last non-zero coefficient to determine the position of the last non-zero coefficient may include:
[0250] Determine the width and height of the current block;
[0251] Perform a subtraction calculation based on the horizontal distance between the width of the current block and the position of the last non-zero coefficient relative to the lower-right corner position of the current block to obtain the horizontal coordinate of the last non-zero coefficient; and
[0252] Perform a subtraction calculation based on the vertical distance between the height of the current block and the position of the last non-zero coefficient relative to the lower-right corner position of the current block to obtain the vertical coordinate of the last non-zero coefficient;
[0253] Determine the position of the last non-zero coefficient based on the horizontal coordinate of the last non-zero coefficient and the vertical coordinate of the last non-zero coefficient.
[0254] It should be noted that the coordinate information of the last non-zero coefficient is usually the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the upper-left corner position of the current block. For conventional videos, since most non-zero coefficients are concentrated in the upper left corner and a large area in the lower right corner is 0; however, for high-bitwidth, high-quality, and high-bitrate video coding and decoding, a large number of non-zero coefficients will also appear in the lower right corner, making the values of the coordinate information of the last non-zero coefficient usually large. In this case, in order to save overhead, coordinate transformation needs to be performed during coefficient coding (specifically, it can be coordinate flipping calculation, that is, after coordinate flipping, the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the lower-right corner position of the current block). Then, coordinate flipping calculation also needs to be performed during coefficient decoding. After flipping again, the coordinate information of the last non-zero coefficient can be restored to the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the upper-left corner position of the current block, so as to determine the position of the last non-zero coefficient, and decode all the coefficients before the position of the last non-zero coefficient in the current block according to the preset scanning order.
[0255] It should also be noted that the current block here can be a block without zero-out transformation or a block after zero-out transformation. Taking the block after zero-out transformation as an example, at this time, the width of the current block is 1<<log2ZoTbWidth, and the height of the current block is 1<<log2ZoTbHeight; then in the case where reverse_last_sig_coeff_flag indicates that the last non-zero coefficient position of the current block is flipped (that is, the value of reverse_last_sig_coeff_flag is 1),
[0256] LastSignificantCoeffX = (1 << log2ZoTbWidth) - 1 - LastSignificantCoeffX;
[0257] LastSignificantCoeffY = (1 << log2ZoTbHeight) - 1 - LastSignificantCoeffY.
[0258] Among them, (LastSignificantCoeffX, LastSignificantCoeffY) on the right side of the equation represents the coordinate information of the last non - zero coefficient obtained through decoding, and (LastSignificantCoeffX, LastSignificantCoeffY) on the left side of the equation represents the position of the last non - zero coefficient (which can also be regarded as the target coordinate information of the last non - zero coefficient).
[0259] In the embodiments of the present application, when the value of reverse_last_sig_coeff_flag is 0, in some embodiments, the method may further include:
[0260] When the last non - zero coefficient position flip identification information indicates that the current block does not use the last non - zero coefficient position flip, determine that the coordinate information of the last non - zero coefficient is the horizontal distance and the vertical distance between the position of the last non - zero coefficient and the upper - left corner position of the current block;
[0261] Determine the position of the last non - zero coefficient according to the horizontal distance and the vertical distance between the position of the last non - zero coefficient and the upper - left corner position of the current block.
[0262] It should be noted that if reverse_last_sig_coeff_flag indicates that the current block does not use the last non - zero coefficient position flip, then the coordinate information of the last non - zero coefficient obtained through decoding can be regarded as the target coordinate information of the last non - zero coefficient. In the embodiments of the present application, the target coordinate information of the last non - zero coefficient is the horizontal distance and the vertical distance between the position of the last non - zero coefficient and the upper - left corner position of the current block.
[0263] Furthermore, in some embodiments, the method may further include:
[0264] When the last non - zero coefficient position flip identification information indicates that the current block does not use the last non - zero coefficient position flip, directly determine the position of the last non - zero coefficient according to the coordinate information of the last non - zero coefficient;
[0265] Decode all coefficients before the position of the last non-zero coefficient according to the preset scanning order to determine the coefficients of the current block.
[0266] It should be noted that the preset scanning order can be diagonal, Zigzag, horizontal, vertical, 4×4 sub-block scanning or any other scanning order, and the embodiments of the present application do not make any limitation.
[0267] It should also be noted that after obtaining reverse_last_sig_coeff_flag, if the value of reverse_last_sig_coeff_flag is 1, that is, the position of the last non-zero coefficient needs to be flipped, then after decoding the coordinate information of the last non-zero coefficient, the coordinate information of the last non-zero coefficient needs to be calculated to determine the position of the last non-zero coefficient; then decode all coefficients before the position of the last non-zero coefficient according to the preset scanning order. If the value of reverse_last_sig_coeff_flag is 0, that is, the position of the last non-zero coefficient does not need to be flipped, then after decoding the coordinate information of the last non-zero coefficient, the position of the last non-zero coefficient can be directly determined according to the coordinate information of the last non-zero coefficient; then decode all coefficients before the position of the last non-zero coefficient according to the preset scanning order.
[0268] In this way, for a certain situation, when encoding coefficients, the embodiments of the present application provide a method for deriving and modifying the position of the last non-zero coefficient. That is to say, usually, the coefficient encoding and decoding method is still the same as the existing method in the related art. A certain situation can refer to video encoding and decoding with high bit width, high quality, high bit rate or lossless compression. Usually, last_sig_coeff_x_prefix and last_sig_coeff_x_suffix encode the abscissa of the position of the last non-zero coefficient, that is, the horizontal distance relative to the upper left corner of the current block; last_sig_coeff_y_prefix and last_sig_coeff_y_suffix encode the ordinate of the position of the last non-zero coefficient, that is, the vertical distance relative to the upper left corner of the current block, as Figure 10AAs shown. In the case of high-bitwidth, high-quality, high-bitrate, or lossless compression video coding and decoding, the position of the last non-zero coefficient generally approaches the lower right corner of the area where all possible non-zero coefficients in the current block are located. In this case, last_sig_coeff_x_prefix and last_sig_coeff_x_suffix encode the horizontal distance of the position of the last non-zero coefficient relative to the lower right corner of the area where all possible non-zero coefficients in the current block are located; last_sig_coeff_y_prefix and last_sig_coeff_y_suffix encode the vertical distance of the position of the last non-zero coefficient relative to the lower right corner of the area where all possible non-zero coefficients in the current block are located, as Figure 10B shown. For example, if the area where all possible non-zero coefficients in the current block is a rectangular area from (0, 0) to ((1 << log2ZoTbWidth) - 1, (1 << log2ZoTbHeight) - 1), then last_sig_coeff_x_prefix and last_sig_coeff_x_suffix encode the horizontal distance of the position of the last non-zero coefficient relative to ((1 << log2ZoTbWidth) - 1, (1 << log2ZoTbHeight) - 1) of the current block. last_sig_coeff_y_prefix and last_sig_coeff_y_suffix encode the vertical distance of the position of the last non-zero coefficient relative to ((1 << log2ZoTbWidth) - 1, (1 << log2ZoTbHeight) - 1) of the current block.
[0269] The modifications to the semantics are as follows:
[0270] The value of the horizontal (or column) coordinate of the last non-zero coefficient in the current block in the preset scan order, LastSignificantCoeffX, is derived as follows:
[0271] If last_sig_coeff_x_suffix does not exist, then,
[0272] LastSignificantCoeffX = last_sig_coeff_x_prefix;
[0273] Otherwise (last_sig_coeff_x_suffix exists),
[0274] LastSignificantCoeffX = (1 << ((last_sig_coeff_x_prefix >> 1) - 1)) * (2 + (last_sig_coeff_x_prefix & 1)) + last_sig_coeff_x_suffix;
[0275] If the value of reverse_last_sig_coeff_flag is 1, then
[0276] LastSignificantCoeffX = (1 << log2ZoTbWidth) - 1 - LastSignificantCoeffX;
[0277] The value of the vertical (or row) coordinate of the last non-zero coefficient in the current block in scan order, LastSignificantCoeffY, is derived as follows:
[0278] If last_sig_coeff_y_suffix does not exist, then
[0279] LastSignificantCoeffY = last_sig_coeff_y_prefix;
[0280] Otherwise (last_sig_coeff_y_suffix exists):
[0281] LastSignificantCoeffY = (1 << ((last_sig_coeff_y_prefix >> 1) - 1)) * (2 + (last_sig_coeff_y_prefix & 1)) + last_sig_coeff_y_suffix;
[0282] If the value of reverse_last_sig_coeff_flag is 1, then
[0283] LastSignificantCoeffY = (1 << log2ZoTbHeight) - 1 - LastSignificantCoeffY.
[0284] Among them, reverse_last_sig_coeff_flag is the last non-zero coefficient position flipping flag, indicating whether the position of the last non-zero coefficient needs to be flipped. If the value of reverse_last_sig_coeff_flag is 1, it means the position of the last non-zero coefficient needs to be flipped; otherwise, it means the position of the last non-zero coefficient does not need to be flipped.
[0285] It should also be noted that reverse_last_sig_coeff_flag may be a sequence-level or higher-level flag, or it may be a picture-level flag, or a slice-level flag, or a block-level flag, or a flag of other levels. Block-level flags include flags at the largest coding unit (LCU) level, or coding unit (CU) level, or other block-level flags.
[0286] In addition, reverse_last_sig_coeff_flag may depend on some other flags, such as high bit-width identification information or high bit-rate identification information, etc. That is, when the value of the high bit-width identification information or high bit-rate identification information is 1, the reverse_last_sig_coeff_flag needs to be decoded at this time; otherwise, the reverse_last_sig_coeff_flag does not need to be decoded.
[0287] In a specific example, taking the sequence level as an example, assume there is a sequence-level flag sps_high_bit_depth_flag indicating whether the current video sequence is a high-bit-depth sequence. If the value of sps_high_bit_depth_flag is 1, it means the current video sequence is a high-bit-depth sequence; otherwise, it means the current video sequence is not a high-bit-depth sequence. At the sequence level, if the value of sps_high_bit_depth_flag is 1, then it is necessary to decode sps_reverse_last_sig_coeff_flag. Here, sps_reverse_last_sig_coeff_flag is the last non-zero coefficient position flipping flag of the current sequence. If the value of sps_reverse_last_sig_coeff_flag is 1, it means the blocks within the current sequence use the last non-zero coefficient position flipping; otherwise (i.e., the value of sps_reverse_last_sig_coeff_flag is 0), it means the blocks within the current sequence do not use the last non-zero coefficient position flipping. The reverse_last_sig_coeff_flag in the above syntax table is changed to sps_reverse_last_sig_coeff_flag.
[0288] Its syntax elements are as follows (Sequence parameter set RBSP syntax), see Table 3.
[0289] Table 3
[0290]
[0291]
[0292] In another specific example, taking the slice level as an example, assume that there is a sequence-level flag sps_high_bit_depth_flag indicating whether the current video sequence is a high-bitwidth sequence. If the value of sps_high_bit_depth_flag is 1, it means that the current video sequence is a high-bitwidth sequence; otherwise, it means that the current video sequence is not a high-bitwidth sequence. At the slice level, if the value of sps_high_bit_depth_flag is 1, then it is necessary to decode sh_reverse_last_sig_coeff_flag. Here, sh_reverse_last_sig_coeff_flag is the last non-zero coefficient position flip flag of the current slice. If the value of sh_reverse_last_sig_coeff_flag is 1, it means that the blocks within the current slice use the last non-zero coefficient position flip; otherwise (i.e., the value of sh_reverse_last_sig_coeff_flag is 0), it means that the blocks within the current slice do not use the last non-zero coefficient position flip. The reverse_last_sig_coeff_flag in the above syntax table is changed to sh_reverse_last_sig_coeff_flag.
[0293] Its syntax elements are as follows (Slice header syntax), see Table 4.
[0294] Table 4
[0295]
[0296] It can also be understood that when the video identification information indicates that the video meets the preset conditions, at this time, it can also be defaulted that all coefficients that may need to be encoded need to be encoded, that is, instead of using the position of the last non-zero coefficient, all coefficients that may not be 0 in the current block are scanned in the preset scan order; therefore, the embodiment of the present application can also introduce the last coefficient enable identification information to determine whether the current block uses the last coefficient position.
[0297] In some embodiments, when the video identification information indicates that the video meets the preset conditions, the method may further include:
[0298] Analyze the code stream to obtain the last coefficient enable identification information;
[0299] When the last coefficient enable identification information indicates that the current block uses the last coefficient position, decode all the coefficients before the last coefficient position in the preset scan order to determine the coefficients of the current block.
[0300] It should be noted that for the last coefficient enable identification information, it can be represented by default_last_coeff_enabled_flag. In the embodiments of the present application, the last coefficient enable identification information can be at least one of the following: sequence level, picture level, slice level, and block level; or even can be identification information at a higher level (such as VUI, SEI, etc.), which is not limited here.
[0301] That is to say, default_last_coeff_enabled_flag may be a flag at the sequence level or a higher level, or may be a flag at the picture level, or a flag at the slice level, or a flag at the block level, or a flag at other levels. In addition, the flag at the block level may include a flag at the largest coding unit (LCU) level, or a flag at the coding unit (CU) level, or other flags at the block level, which is not limited in the embodiments of the present application.
[0302] In some embodiments, the method may further include:
[0303] If the value of the last coefficient enable identification information is the first value, it is determined that the last coefficient enable identification information indicates that the current block uses the last coefficient position; or,
[0304] If the value of the last coefficient enable identification information is the second value, it is determined that the last coefficient enable identification information indicates that the current block does not use the last coefficient position.
[0305] Here, the first value is 1 and the second value is 0.
[0306] It should be noted that in another specific example, the first value can also be set to true, and the second value can also be set to false. Even in yet another specific example, the first value can also be set to 0, and the second value can also be set to 1; or, the first value can also be set to false, and the second value can also be set to true. This is not limited here.
[0307] Thus, taking the first value as 1 and the second value as 0 as an example, if the value of default_last_coeff_enabled_flag is 1, it can be determined that default_last_coeff_enabled_flag indicates that the current block uses the last coefficient position; or, if the value of default_last_coeff_enabled_flag is 0, it can be determined that default_last_coeff_enabled_flag indicates that the current block does not use the last coefficient position.
[0308] In the case where the last coefficient position is used for the current block, at this time, all coefficients before the last coefficient position can be decoded according to a preset scanning order, so as to determine the coefficients of the current block.
[0309] Further, in the case where the last coefficient position is not used for the current block, that is, the value of the last coefficient enable identification information is 0. In some embodiments, the method may further include:
[0310] Parse the code stream to obtain the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient;
[0311] Determine the position of the last non-zero coefficient according to the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient;
[0312] Decode all coefficients before the position of the last non-zero coefficient according to a preset scanning order to determine the coefficients of the current block.
[0313] It should be noted that if the last coefficient position is not used for the current block, then at this time, it is necessary to decode to obtain the position of the last non-zero coefficient. Specifically, by parsing the code stream, obtain last_sig_coeff_x_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_prefix, last_sig_coeff_y_suffix; then according to last_sig_coeff_x_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_prefix, last_sig_coeff_y_suffix, further determine the position of the last non-zero coefficient. Otherwise, if the last coefficient position is used for the current block, at this time, it is no longer necessary to determine the position of the last non-zero coefficient, and it is no longer necessary to decode to obtain last_sig_coeff_x_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_prefix, last_sig_coeff_y_suffix.
[0314] It should also be noted that if the current block uses the last coefficient position, then all the coefficients before the last coefficient position can be decoded in accordance with a preset scanning order; if the current block does not use the last coefficient position, then all the coefficients before the position of the last non-zero coefficient can be decoded in accordance with a preset scanning order. Here, the preset scanning order can be diagonal, Zigzag, horizontal, vertical, 4×4 sub-block scanning, or any other scanning order, and the embodiments of the present application do not make any limitations.
[0315] Furthermore, for the last coefficient position, in some embodiments, the last coefficient position is the lower right corner position of the matrix formed by all the coefficients that may be non-zero in the current block; or, the last coefficient position is the last position where all the coefficients that may be non-zero in the current block are scanned according to the preset scanning order.
[0316] It should be noted that the last coefficient position in the embodiments of the present application does not represent the position of the last non-zero coefficient. Because the coefficient at the last coefficient position may be 0, while the coefficient at the position of the last non-zero coefficient must not be 0.
[0317] In a specific example, the method may further include: setting the position of the last non-zero coefficient at the last coefficient position.
[0318] That is to say, the embodiments of the present application can still use the position of the last non-zero coefficient. At this time, it is necessary to place the position of the last non-zero coefficient at the last position of all the coefficients that may not be 0 in the current block according to the preset scanning order.
[0319] Furthermore, the last coefficient position can be represented by (LastCoeffX, LastCoeffY), that is, the last position of all the coefficients that may not be 0 in the current block according to the preset scanning order. In some embodiments, the method may further include:
[0320] Determining the width and height of the transformed block obtained after the preset operation on the current block;
[0321] Performing coordinate calculation according to the width and height of the transformed block to obtain the lower right corner coordinate information of the transformed block;
[0322] Determining the last coefficient position according to the lower right corner coordinate information of the transformed block.
[0323] Here, the preset operation includes at least: a zero-out operation.
[0324] It should be noted that (LastCoeffX, LastCoeffY) represents the bottom-right coordinate information of the transformed block after zero-out; among them, the derivation method of (LastCoeffX, LastCoeffY) is as follows:
[0325] LastCoeffX = (1 << log2ZoTbWidth) - 1; LastCoeffY = (1 << log2ZoTbHeight) - 1.
[0326] In this way, if the value of default_last_coeff_enabled_flag is 1, then the position of the last coefficient can be determined according to (LastCoeffX, LastCoeffY).
[0327] In a specific example, the position of the last non-zero coefficient is still used. At this time, the position of the last non-zero coefficient can be placed at the last position of all possible zero coefficients in the current block according to the preset scanning order. In some embodiments, this method may further include:
[0328] When the position of the last non-zero coefficient is set at the position of the last coefficient, the position of the last non-zero coefficient is determined according to the bottom-right coordinate information of the transformed block.
[0329] That is to say, the position of the last non-zero coefficient can be represented by (LastSignificantCoeffX, LastSignificantCoeffY), and the derivation method of (LastSignificantCoeffX, LastSignificantCoeffY) is as follows:
[0330] LastSignificantCoeffX = (1 << log2ZoTbWidth) - 1; LastSignificantCoeffY = (1 << log2ZoTbHeight) - 1.
[0331] Among them, (LastSignificantCoeffX, LastSignificantCoeffY) represents the bottom-right coordinate information of the transformed block after zero-out. If the value of default_last_coeff_enabled_flag is 1, then the position of the last non-zero coefficient can be determined according to (LastSignificantCoeffX, LastSignificantCoeffY).
[0332] Thus, for a certain situation, when encoding coefficients, it is default to encode all the coefficients that may need to be encoded. That is to say, usually, the coefficient encoding and decoding method is still the same as the existing methods in the related technologies. A certain situation can refer to, for example, videos with high bitwidth or high quality or high bitrate, or video encoding and decoding with lossless compression. Default to encode all the coefficients that may need to be encoded, which means that instead of using the position of the last non-zero coefficient, all the coefficients that may not be 0 in the current block are scanned in the preset scanning order; or rather, the position of the last coefficient to be encoded is placed at the last position of all the coefficients that may not be 0 in the current block in the preset scanning order. This position usually refers to the lower right corner position of the matrix composed of all the coefficients that may not be 0 in the current block. Here, the position of the last coefficient to be encoded is used instead of the position of the last non-zero coefficient. Because the coefficient at the position of the last coefficient to be encoded may be 0, while the coefficient at the position of the last non-zero coefficient must not be 0.
[0333] A special case is still to use the position of the last non-zero coefficient. At this time, the position of the last non-zero coefficient is placed at the last position of all the coefficients that may not be 0 in the current block in the preset scanning order.
[0334] In addition, for all the coefficients that may not be 0 in the current block in the preset scanning order, it is because in addition to the last non-zero coefficient, there are some other techniques that make some coefficients in a block default to 0. For example, it can be the zero-out mentioned above.
[0335] The modification for semantics is shown in Table 5.
[0336] Table 5
[0337]
[0338] In the embodiments of the present application, a condition can be added before the information required to decode the last non-zero coefficient, that is, if the default_last_coeff_enabled_flag is not established (i.e., the value of the default_last_coeff_enabled_flag is equal to 0), then it is necessary to decode syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix. If the default_last_coeff_enabled_flag is established (i.e., the value of the default_last_coeff_enabled_flag is equal to 1), then it is not necessary to decode syntax elements such as last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix.
[0339] Here, the default_last_coeff_enabled_flag is the default last coefficient enable flag, which is used to indicate whether to use the default last coefficient. If the value of the default_last_coeff_enabled_flag is 1, it means to use the default last coefficient position, that is, to place the position of the last coefficient to be encoded at the last position of all possible non-zero coefficients of the current block in the preset scan order; otherwise, it means not to use the default last coefficient position.
[0340] If the value of the default_last_coeff_enabled_flag is 1, then the default last coefficient positions (LastCoeffX, LastCoeffY) are the last positions of all possible non-zero coefficients of the current block in the preset scan order. All coefficients before the preset scan order (LastCoeffX, LastCoeffY) need to be scanned. In the embodiments of the present application, the derivation method of (LastCoeffX, LastCoeffY) is as follows:
[0341] LastCoeffX = (1 << log2ZoTbWidth) - 1; LastCoeffY = (1 << log2ZoTbHeight) - 1.
[0342] Among them, (LastCoeffX, LastCoeffY) is the coordinate information of the lower right corner position of the transformed block after zero-out.
[0343] A special case is to still use the position of the last non-zero coefficient, and place the position of the last non-zero coefficient at the last position among all the coefficients that may be non-zero in the current block in the preset scanning order. In the embodiments of the present application, the method for deriving the position of the last non-zero coefficient (LastSignificantCoeffX, LastSignificantCoeffY) is as follows:
[0344] LastSignificantCoeffX = (1 << log2ZoTbWidth) - 1; LastSignificantCoeffY = (1 << log2ZoTbHeight) - 1.
[0345] Among them, (LastSignificantCoeffX, LastSignificantCoeffY) is the coordinate information of the lower right corner position of the transformed block after zero-out.
[0346] It should also be noted that default_last_coeff_enabled_flag may be a sequence-level or higher-level flag, or it may be a picture-level flag, a slice-level flag, a block-level flag, or a flag of other levels. The block-level flag includes a flag at the largest coding unit (LCU) level, a flag at the coding unit (CU) level, or a flag of other block levels.
[0347] In addition, default_last_coeff_enabled_flag may depend on some other flags, such as high bit-width identification information or high bit-rate identification information, etc. That is, when the value of the high bit-width identification information or the high bit-rate identification information is 1, the default_last_coeff_enabled_flag needs to be decoded; otherwise, the default_last_coeff_enabled_flag does not need to be decoded.
[0348] In a specific example, taking the sequence level as an example, assume that there is a sequence-level flag sps_high_bit_depth_flag indicating whether the current video sequence is a high-bitwidth sequence. If the value of sps_high_bit_depth_flag is 1, it means that the current video sequence is a high-bitwidth sequence; otherwise, it means that the current video sequence is not a high-bitwidth sequence. At the sequence level, if the value of sps_high_bit_depth_flag is 1, then it is necessary to decode sps_default_last_coeff_enabled_flag. Here, sps_default_last_coeff_enabled_flag is the default last coefficient enable flag of the current sequence. If the value of sps_default_last_coeff_enabled_flag is 1, it means that the blocks within the current sequence use the default last coefficient; otherwise (that is, the value of sps_default_last_coeff_enabled_flag is 0), it means that the blocks within the current sequence do not use the default last coefficient. The default_last_coeff_enabled_flag in the above syntax table is changed to sps_default_last_coeff_enabled_flag.
[0349] Its syntax elements are as follows (Sequence parameter set RBSP syntax), see Table 6.
[0350] Table 6
[0351]
[0352] In another specific example, taking the slice level as an example, assume that there is a sequence-level flag sps_high_bit_depth_flag indicating whether the current video sequence is a high bit-depth sequence. If the value of sps_high_bit_depth_flag is 1, it means that the current video sequence is a high bit-depth sequence; otherwise, it means that the current video sequence is not a high bit-depth sequence. At the slice level, if the value of sps_high_bit_depth_flag is 1, then it is necessary to decode the sh_default_last_coeff_enabled_flag. Here, sh_default_last_coeff_enabled_flag is the default last coefficient enable flag of the current slice. If the value of sh_default_last_coeff_enabled_flag is 1, it means that the blocks within the current slice use the default last coefficient; otherwise (i.e., the value of sh_default_last_coeff_enabled_flag is 0), it means that the blocks within the current slice do not use the default last coefficient. The default_last_coeff_enabled_flag in the above syntax table is changed to sh_default_last_coeff_enabled_flag.
[0353] Its syntax elements are as follows (Slice header syntax), see Table 7.
[0354] Table 7
[0355]
[0356] It can also be understood that when the video identification information indicates that the video meets the preset conditions, all sub-blocks that can be scanned are default-encoded, and at this time, there is no need to transmit the sb_coded_flag in the bitstream, that is, neither the encoder nor the decoder needs to process this flag to speed up the encoding and decoding speed. Therefore, the embodiments of the present application can also introduce sub-block default encoding identification information to determine whether the sub-blocks to be decoded within the current block are default-encoded.
[0357] In some embodiments, when the video identification information indicates that the video meets the preset conditions, the method may further include:
[0358] Parsing the bitstream to obtain sub-block default encoding identification information;
[0359] When the sub-block default encoding identification information indicates that the sub-blocks to be decoded within the current block are default-encoded, determining that the value of the sub-block encoding identification information is the first value, and decoding all the coefficients within the sub-blocks to be decoded.
[0360] It should be noted that for the default identification information of sub - blocks, it can be represented by default_sb_coded_flag. In the embodiments of the present application, the default coding identification information of sub - blocks is at least the identification information of one of the following: sequence level, picture level, slice level, and block level; or even it can be the identification information of a higher level (such as VUI, SEI, etc.), and there is no limitation here.
[0361] That is to say, default_sb_coded_flag may be a flag at the sequence level or a higher level, or it may be a flag at the picture level, or a flag at the slice level, or a flag at the block level, or a flag at other levels. In addition, the flag at the block level may include a flag at the largest coding unit (LCU) level, or a flag at the coding unit (CU) level, or other flags at the block level, and there is no limitation in the embodiments of the present application.
[0362] In some embodiments, the method may further include:
[0363] If the value of the default coding identification information of the sub - block is the first value, it is determined that the default coding identification information of the sub - block indicates that the sub - block to be decoded is default - coded; or,
[0364] If the value of the default coding identification information of the sub - block is the second value, it is determined that the default coding identification information of the sub - block indicates that the sub - block to be decoded is not default - coded.
[0365] Here, the first value is 1 and the second value is 0.
[0366] It should be noted that in another specific example, the first value can also be set to true, and the second value can also be set to false. Even in yet another specific example, the first value can also be set to 0, and the second value can also be set to 1; or, the first value can also be set to false, and the second value can also be set to true. There is no limitation here.
[0367] Thus, taking the first value as 1 and the second value as 0 as an example, if the value of default_sb_coded_flag is 1, then it can be determined that default_sb_coded_flag indicates that the sub - block to be decoded is default - coded; or, if the value of default_sb_coded_flag is 0, then it can be determined that default_sb_coded_flag indicates that the sub - block to be decoded is not default - coded.
[0368] When the sub-block to be decoded is default-required to be encoded, the value of default_sb_coded_flag is 1 at this time, which means the value of sb_coded_flag is 1, that is, there is no need to decode sb_coded_flag anymore. At this time, it is default-required to decode all coefficients in the sub-block to be decoded.
[0369] Further, when the sub-block to be decoded is not default-required to be encoded, that is, the value of default_sb_coded_flag is 0, in some embodiments, the method may further include:
[0370] Parse the code stream to obtain the sub-block coding identification information;
[0371] When the value of the sub-block coding identification information is the first value, decode all coefficients in the sub-block to be decoded.
[0372] It should be noted that if the sub-block to be decoded is not default-required to be encoded, then at this time, it is also necessary to decode to obtain the sub-block coding identification information; then determine whether to decode all coefficients in the sub-block to be decoded according to the sub-block coding identification information.
[0373] Further, for the sub-block coding identification information, the method may further include:
[0374] If the value of the sub-block coding identification information is the first value, determine to decode all coefficients in the sub-block to be decoded; or,
[0375] If the value of the sub-block coding identification information is the second value, determine that all coefficients in the sub-block to be decoded are zero.
[0376] In the embodiments of the present application, the sub-block coding identification information may be represented by sb_coded_flag. Taking the first value as 1 and the second value as 0 as an example, if the value of sb_coded_flag is 1, then it can be determined that it is necessary to decode all coefficients in the sub-block to be decoded; or, if the value of sb_coded_flag is 0, then it can be determined that it is not necessary to decode all coefficients in the sub-block to be decoded, and at this time, all coefficients in the sub-block to be decoded are zero.
[0377] Thus, for a certain situation, during coefficient coding, all scanned sub-blocks are default to be coded, or in other words, all scanned sub-blocks are default to contain non-zero coefficients. That is to say, usually, the coefficient coding method is still the same as the existing methods in the related technologies. A certain situation can refer to, for example, videos with high bit-width or high quality or high bit-rate or lossless compressed video coding and decoding. In this case, there are many non-zero coefficients, and almost all scanned sub-blocks need to be coded; or rather, almost all scanned sub-blocks contain non-zero coefficients. In this way, there is no need to transmit sb_coded_flag in the bitstream, and the encoder / decoder does not need to process this flag, thus being able to accelerate the coding and decoding speed. Since a flag that hardly exists is removed, there will also be a slight improvement in compression performance at this time.
[0378] The modifications to the semantics are shown in Table 8.
[0379] Table 8
[0380]
[0381] Among them, default_sb_coded_flag is the flag indicating that the sub-block is default to be coded. If the value of default_sb_coded_flag is 1, then it can be determined that the value of sb_coded_flag[xS][yS] is 1, and at this time, there is no need to decode it from the bitstream; otherwise (the value of default_sb_coded_flag is 0), it is still necessary to decode sb_coded_flag[xS][yS] from the bitstream.
[0382] It should also be noted that default_sb_coded_flag may be a sequence-level or higher-level flag, or it may be a picture-level flag or a slice-level flag or a block-level flag or a flag of other levels. The block-level flags include flags at the largest coding unit (LCU) level or coding unit (CU) level or other block-level flags.
[0383] In addition, default_sb_coded_flag may depend on some other flags, such as high bit-width identification information or high bit-rate identification information, etc. That is, when the value of the high bit-width identification information or high bit-rate identification information is 1, it is necessary to decode the default_sb_coded_flag; otherwise, there is no need to decode the default_sb_coded_flag.
[0384] In a specific example, taking the sequence level as an example, assume that there is a sequence-level flag sps_high_bit_depth_flag indicating whether the current video sequence is a high-bit-depth sequence. If the value of sps_high_bit_depth_flag is 1, it means that the current video sequence is a high-bit-depth sequence; otherwise, it means that the current video sequence is not a high-bit-depth sequence. At the sequence level, if the value of sps_high_bit_depth_flag is 1, then it is necessary to decode sps_default_sb_coded_flag. Here, sps_default_sb_coded_flag is the flag indicating that the default sub-block of the current sequence needs to be coded. If the value of sps_default_sb_coded_flag is 1, it means that the default sub-block of the blocks within the current sequence needs to be coded; otherwise (i.e., the value of sps_default_sb_coded_flag is 0), it means that the blocks within the current sequence do not have default sub-blocks that need to be coded. The default_sb_coded_flag in the above syntax table is changed to sps_default_sb_coded_flag.
[0385] Its syntax elements are as follows (Sequence parameter set RBSP syntax), see Table 9.
[0386] Table 9
[0387]
[0388] In another specific example, taking the slice level as an example, assume that there is a sequence-level flag sps_high_bit_depth_flag indicating whether the current video sequence is a high-bit-depth sequence. If the value of sps_high_bit_depth_flag is 1, it means that the current video sequence is a high-bit-depth sequence; otherwise, it means that the current video sequence is not a high-bit-depth sequence. At the slice level, if the value of sps_high_bit_depth_flag is 1, then the sh_default_sb_coded_flag needs to be decoded. Here, sh_default_sb_coded_flag is the flag indicating that the default sub-block of the current slice needs to be coded. If the value of sh_default_sb_coded_flag is 1, it means that the default sub-block of the blocks within the current slice needs to be coded; otherwise (i.e., the value of sh_default_sb_coded_flag is 0), it means that the default sub-block of the blocks within the current slice does not need to be coded. The default_sb_coded_flag in the above syntax table is changed to sh_default_sb_coded_flag.
[0389] Its syntax elements are as follows (Slice header syntax), see Table 10.
[0390] Table 10
[0391]
[0392] It can be understood that the embodiments of the present application involve three optimization methods, which are as follows:
[0393] Method 1, for a certain situation, when coefficient coding, by default, all coefficients that may need to be coded are to be coded. That is to say, generally, the method of coefficient coding is still the same as the existing method in the related art. A certain situation, for example, can refer to high-bit-depth or high-quality or high-bitrate video or lossless compression video coding and decoding. By default, all coefficients that may need to be coded are to be coded, that is, instead of using the position of the last non-zero coefficient, all coefficients that may not be 0 in the current block are scanned in the preset scan order; or rather, the position of the last coefficient to be coded is placed at the last position of all coefficients that may not be 0 in the current block in the preset scan order. Here, the position of the last coefficient to be coded is used instead of the position of the last non-zero coefficient. Because the coefficient at the position of the last coefficient to be coded may be 0, while the coefficient at the position of the last non-zero coefficient must not be 0.
[0394] In addition, a specific example is still using the position of the last non-zero coefficient, and placing the position of the last non-zero coefficient at the last position among all the coefficients that may be non-zero in the current block in the preset scanning order.
[0395] Method 2: For a certain situation, when encoding coefficients, modify the derivation method of the position of the last non-zero coefficient. That is to say, generally, the method of encoding coefficients is still the same as the existing method in the related art. A certain situation, for example, can refer to high-bitwidth or high-quality or high-bitrate video or lossless compressed video coding and decoding. Generally, last_sig_coeff_x_prefix and last_sig_coeff_x_suffix encode the abscissa of the position of the last non-zero coefficient, that is, the horizontal distance relative to the upper left corner of the current block; last_sig_coeff_y_prefix and last_sig_coeff_y_suffix encode the ordinate of the position of the last non-zero coefficient, that is, the vertical distance relative to the upper left corner of the current block. In the case of high-bitwidth or high-quality or high-bitrate video or lossless compressed video coding and decoding, the position of the last non-zero coefficient generally approaches the lower right corner of the area where all the coefficients in the current block may be non-zero. In this case, last_sig_coeff_x_prefix and last_sig_coeff_x_suffix encode the horizontal distance of the position of the last non-zero coefficient relative to the lower right corner of the area where all the coefficients in the current block may be non-zero; last_sig_coeff_y_prefix and last_sig_coeff_y_suffix encode the vertical distance of the position of the last non-zero coefficient relative to the lower right corner of the area where all the coefficients in the current block may be non-zero. For example, if the area where all the coefficients in the current block may be non-zero is a rectangular area from (0, 0) to ((1 << log2ZoTbWidth) - 1, (1 << log2ZoTbHeight) - 1), then last_sig_coeff_x_prefix and last_sig_coeff_x_suffix encode the horizontal distance of the position of the last non-zero coefficient relative to the current block ((1 << log2ZoTbWidth) - 1, (1 << log2ZoTbHeight) - 1); last_sig_coeff_y_prefix and last_sig_coeff_y_suffix encode the vertical distance of the position of the last non-zero coefficient relative to the current block ((1 << log2ZoTbWidth) - 1, (1 << log2ZoTbHeight) - 1).
[0396] Method 3: For a certain situation, during coefficient coding, all scanned sub-blocks are default to be coded; or rather, all scanned sub-blocks are default to contain non-zero coefficients. That is to say, usually, the coefficient coding method is still the same as the existing method in the related technology. A certain situation can be, for example, a video with high bit-width or high quality or high bit-rate or lossless compressed video coding and decoding. In this case, there are many non-zero coefficients, and almost all scanned sub-blocks need to be coded, or rather, almost all scanned sub-blocks contain non-zero coefficients. At this time, there is no need to transmit the sb_coded_flag in the bitstream, and the encoder / decoder does not need to process this flag.
[0397] For the above three methods, in the video coding and decoding scenarios of high bit-width, high bit-rate, high quality or lossless, due to the different coefficient distribution rules from the ordinary video scenarios, in coefficient coding, by reducing or even eliminating the number of syntax elements of context mode coding, such as syntax elements about the position of the last non-zero coefficient, sub-block coding flag, etc., the throughput and coding and decoding speed of coefficient coding can be improved; at the same time, since the above-mentioned flags have little effect in the video coding and decoding of high bit-width, high bit-rate, high quality or lossless, not using these flags will not reduce the compression efficiency but can instead improve the compression efficiency to a certain extent.
[0398] In addition, in the embodiments of the present application, taking the sequence level as an example, the sequence-level flag sps_high_bit_depth_flag indicating whether the current video sequence is a high bit-width sequence can also be replaced by the sps_high_bit_rate_flag indicating whether the current video sequence is a high bit-rate sequence; or even can be replaced by other flags indicating high bit-width, high bit-rate, high quality or lossless coding, etc.
[0399] It should also be noted that the coefficient decoding methods in the embodiments of the present application are all exemplified by uniformly using this technology for all components in the video. All components refer to, for example, R, G, B in the RGB format video, or Y, U, V (Y, Cb, Cr) in the YUV format, etc. The coefficient decoding methods in the embodiments of the present application can also be only used for a certain component, such as only used for the Y component in the YUV format. The coefficient decoding methods in the embodiments of the present application can also be used for each component separately, that is, each component can be controlled by a switch independently.
[0400] This embodiment provides a coefficient decoding method, which is applied to a decoder. By parsing the code stream, video identification information is obtained; when the video identification information indicates that the video meets a preset condition, the code stream is parsed to obtain the last non-zero coefficient position flip identification information and the coordinate information of the last non-zero coefficient; when the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip, the coordinate information of the last non-zero coefficient is calculated to determine the position of the last non-zero coefficient; all the coefficients before the position of the last non-zero coefficient are decoded according to a preset scanning order to determine the coefficients of the current block. In this way, in high-bitwidth, high-bitrate, high-quality or lossless video coding and decoding scenarios, since the coefficient distribution law is different from that of conventional video scenarios, in coefficient coding, the number of syntax elements of context mode coding is reduced or even eliminated, such as syntax elements about the position of the last non-zero coefficient, sub-block coding identification, etc. Even when the value of the coordinate information of the last non-zero coefficient is relatively large, coordinate transformation can be performed, so that the overhead brought by coding in the code stream can be reduced, thereby improving the throughput and coding and decoding speed of coefficient coding; in addition, since the reduced or eliminated syntax elements have little impact on high-bitwidth, high-bitrate, high-quality or lossless video coding and decoding, the compression efficiency can also be improved.
[0401] In another embodiment of the present application, refer to Figure 11 , which shows a schematic flowchart of a coefficient coding method provided by an embodiment of the present application. As Figure 11 shown, the method may include:
[0402] S1101: Determine video identification information and the position of the last non-zero coefficient.
[0403] S1102: When the video identification information indicates that the video meets a preset condition, determine the last non-zero coefficient position flip identification information.
[0404] S1103: Determine the coordinate information of the last non-zero coefficient according to the position of the last non-zero coefficient and the last non-zero coefficient position flip identification information.
[0405] S1104: Encode all the coefficients before the position of the last non-zero coefficient according to a preset scanning order, and write the encoded bit information, video identification information, and the coordinate information of the last non-zero coefficient into the code stream.
[0406] It should be noted that the coefficient coding method of the embodiment of the present application is applied to an encoder. Specifically, based on Figure 8ARegarding the composition structure of the encoder 100 shown, the coefficient encoding method in the embodiments of the present application is mainly applied to the "entropy encoding unit 115" part in the encoder 100. For this entropy encoding unit 115, an adaptive binary arithmetic coding mode based on a context model or a bypass mode can be used to perform entropy encoding on relevant identification information (or syntax elements), and then write it into the code stream.
[0407] It should also be noted that the coefficient encoding generally mentioned in video standards can include two parts: encoding and decoding. Therefore, coefficient encoding includes the coefficient encoding method on the encoder side and the coefficient decoding method on the decoder side. The embodiments of the present application will describe the coefficient encoding method on the encoder side.
[0408] Generally, for example, for conventional videos, the coefficient encoding method is the same as the existing methods in the related art; however, for a certain situation, such as video coding and decoding with high bitwidth or high quality or high bitrate or lossless compression, the embodiments of the present application can modify the method for deriving the position of the last non-zero coefficient. In this case, the embodiments of the present application need to introduce video identification information and the last non-zero coefficient position flip identification information to determine the position of the last non-zero coefficient, and then encode all the coefficients before the position of the last non-zero coefficient in the current block according to the preset scanning order.
[0409] Among them, the embodiments of the present application first need to determine whether the current video meets the preset conditions, which can be represented by video identification information. In some embodiments, the determining the video identification information may include:
[0410] If the video meets the preset conditions, it is determined that the value of the video identification information is the first value; or,
[0411] If the video does not meet the preset conditions, it is determined that the value of the video identification information is the second value.
[0412] Here, the first value is 1 and the second value is 0.
[0413] It should be noted that in another specific example, the first value can also be set to true, and the second value can also be set to false. Even in yet another specific example, the first value can also be set to 0, and the second value can also be set to 1; or, the first value can also be set to false, and the second value can also be set to true. There is no limitation here.
[0414] It should also be noted that the preset conditions include at least one of the following: high bitwidth, high quality, high bitrate, high frame rate, and lossless compression.
[0415] Further, the video identification information may be a sequence-level flag, or even a higher-level flag (such as VUI, SEI, etc.). To determine whether a video meets the preset conditions, it can also be determined whether the video meets high bit width, or high bit rate, or high quality, or lossless compression, etc. The following describes these four cases as examples respectively.
[0416] In some embodiments, when the video identification information is high bit width identification information, the method may further include:
[0417] If the video meets the high bit width, it is determined that the high bit width identification information indicates that the video meets the preset conditions.
[0418] In some embodiments, when the video identification information is high bit rate identification information, the method may further include:
[0419] If the video meets the high bit rate, it is determined that the high bit rate identification information indicates that the video meets the preset conditions.
[0420] In some embodiments, when the video identification information is high quality identification information, the method may further include:
[0421] If the video meets the high quality, it is determined that the high quality identification information indicates that the video meets the preset conditions.
[0422] In some embodiments, when the video identification information is lossless compression identification information, the method may further include:
[0423] If the video meets the lossless compression, it is determined that the lossless compression identification information indicates that the video meets the preset conditions.
[0424] Exemplarily, taking the sequence level as an example, the video identification information may be high bit width identification information (represented by sps_high_bit_depth_flag) for indicating whether the current video sequence is a high bit width sequence; or it may be replaced by high bit rate identification information (represented by sps_high_bit_rate_flag) for indicating whether the current video sequence is a high bit rate sequence; or it may be replaced by other identification information indicating high bit width, high bit rate, high quality or lossless compression, which is not specifically limited in the embodiments of the present application.
[0425] Further, for the last non-zero coefficient position flip identification information, the determination of the last non-zero coefficient position flip identification information may include:
[0426] If the current block uses the last non-zero coefficient position flip, it is determined that the value of the last non-zero coefficient position flip identification information is the first value; or,
[0427] If the current block does not use the last non-zero coefficient position flipping, determine that the value of the last non-zero coefficient position flipping identification information is the second value.
[0428] In the embodiments of the present application, the last non-zero coefficient position flipping identification information can be represented by reverse_last_sig_coeff_flag. Here, the last non-zero coefficient position flipping identification information can be at least one of the following identification information: sequence level, picture level, slice level, and block level; and can even be identification information at a higher level (such as VUI, SEI, etc.), which is not limited herein.
[0429] That is to say, reverse_last_sig_coeff_flag may be a sequence-level or higher-level flag, or may also be a picture-level flag, or a slice-level flag, or a block-level flag, or a flag at other levels. In addition, the block-level flag can include a largest coding unit (LCU)-level flag, or a coding unit (CU)-level flag, or other block-level flags, which are not limited in the embodiments of the present application.
[0430] In this way, taking the first value as 1 and the second value as 0 as an example, if it is determined that the current block uses the last non-zero coefficient position flipping, then the value of reverse_last_sig_coeff_flag is 1; or, if it is determined that the current block does not use the last non-zero coefficient position flipping, then the value of reverse_last_sig_coeff_flag is 0.
[0431] Furthermore, the position of the last non-zero coefficient can include the initial horizontal coordinate and the initial vertical coordinate of the last non-zero coefficient. When the initial horizontal coordinate and the initial vertical coordinate are the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the upper left corner position of the current block, the determining of the coordinate information of the last non-zero coefficient according to the position of the last non-zero coefficient and the last non-zero coefficient position flipping identification information can include:
[0432] If the value of the last non-zero coefficient position flipping identification information is the first value, calculate according to the initial horizontal coordinate and the initial vertical coordinate of the last non-zero coefficient to determine the coordinate information of the last non-zero coefficient; or,
[0433] If the value of the last non-zero coefficient position flipping identification information is the second value, directly determine the coordinate information of the last non-zero coefficient according to the initial horizontal coordinate and the initial vertical coordinate of the last non-zero coefficient.
[0434] In other words, in some embodiments, the method may further include:
[0435] If the value of the last non-zero coefficient position flip flag information is the first value, determine that the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the bottom-right position of the current block; or,
[0436] If the value of the last non-zero coefficient position flip flag information is the second value, the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the top-left position of the current block.
[0437] That is to say, the coordinate information of the last non-zero coefficient is generally the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the top-left position of the current block. For a conventional video, since most non-zero coefficients are concentrated in the top left corner and a large area in the bottom right corner is 0; however, for high-bitwidth, high-quality, high-bitrate video coding and decoding, a large number of non-zero coefficients also appear in the bottom right corner, making the value of the coordinate information of the last non-zero coefficient generally large. At this time, in order to save overhead, coordinate transformation is required during coefficient coding (specifically, it can be coordinate flip calculation, that is, after coordinate flipping, the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the bottom-right position of the current block). Then, in the decoder later, coordinate flip calculation is also required during coefficient decoding. After flipping again, the coordinate information of the last non-zero coefficient can be restored to be the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the top-left position of the current block, so as to determine the position of the last non-zero coefficient.
[0438] Further, in some embodiments, the calculating according to the initial horizontal coordinate and the initial vertical coordinate of the last non-zero coefficient to determine the coordinate information of the last non-zero coefficient may include:
[0439] Determine the width and height of the current block;
[0440] Perform a subtraction calculation based on the width of the current block and the initial horizontal coordinate of the last non-zero coefficient to obtain the horizontal coordinate of the last non-zero coefficient; and perform a subtraction calculation based on the height of the current block and the initial vertical coordinate of the last non-zero coefficient to obtain the vertical coordinate of the last non-zero coefficient;
[0441] Determine the coordinate information of the last non-zero coefficient according to the horizontal coordinate of the last non-zero coefficient and the vertical coordinate of the last non-zero coefficient.
[0442] It should be noted that the current block here can be a block without zero-out transformation or a block after zero-out transformation. Taking the block after zero-out transformation as an example, at this time, the width of the current block is 1 << log2ZoTbWidth, and the height of the current block is 1 << log2ZoTbHeight; then in the case where reverse_last_sig_coeff_flag indicates to use the position of the last non-zero coefficient for flipping (that is, the value of reverse_last_sig_coeff_flag is 1),
[0443] LastSignificantCoeffX = (1 << log2ZoTbWidth) - 1 - LastSignificantCoeffX;
[0444] LastSignificantCoeffY = (1 << log2ZoTbHeight) - 1 - LastSignificantCoeffY.
[0445] Among them, (LastSignificantCoeffX, LastSignificantCoeffY) on the right side of the equation represents the coordinate information of the directly determined last non-zero coefficient (that is, the initial horizontal coordinate and the initial vertical coordinate of the last non-zero coefficient), and (LastSignificantCoeffX, LastSignificantCoeffY) on the left side of the equation represents the coordinate information of the last non-zero coefficient obtained after coordinate flipping (that is, in the case where the position of the last non-zero coefficient is used for flipping in the current block, the coordinate information of the last non-zero coefficient written into the bitstream).
[0446] In some embodiments, writing the coordinate information of the last non-zero coefficient into the bitstream may include:
[0447] Determining the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient according to the coordinate information of the last non-zero coefficient;
[0448] Writing the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient into the bitstream.
[0449] It should be noted that the prefix information of the horizontal coordinate of the last non-zero coefficient is represented by last_sig_coeff_x_prefix, the prefix information of the vertical coordinate of the last non-zero coefficient is represented by last_sig_coeff_y_prefix, the suffix information of the horizontal coordinate of the last non-zero coefficient is represented by last_sig_coeff_x_suffix, and the suffix information of the vertical coordinate of the last non-zero coefficient is represented by last_sig_coeff_y_suffix; then last_sig_coeff_x_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_prefix, and last_sig_coeff_y_suffix are written into the bitstream so that the decoder can determine the coordinate information of the last non-zero coefficient by parsing the bitstream.
[0450] Thus, the embodiment of the present application provides a method for deriving the position of modifying the last non-zero coefficient. That is to say, usually, the coefficient encoding and decoding method is the same as the existing method in the related art. In some cases, such as high bit-width or high quality or high bit-rate video or lossless compression video encoding and decoding. Since usually, last_sig_coeff_x_prefix and last_sig_coeff_x_suffix encode the abscissa of the position of the last non-zero coefficient, that is, the horizontal distance relative to the upper left corner of the current block; last_sig_coeff_y_prefix and last_sig_coeff_y_suffix encode the ordinate of the position of the last non-zero coefficient, that is, the vertical distance relative to the upper left corner of the current block, as Figure 10A shown. In the case of high bit-width or high quality or high bit-rate video or lossless compression video encoding and decoding, the position of the last non-zero coefficient generally approaches the lower right corner of the area where all possible non-zero coefficients of the current block are located. In this case, last_sig_coeff_x_prefix and last_sig_coeff_x_suffix encode the horizontal distance of the position of the last non-zero coefficient relative to the lower right corner of the area where all possible non-zero coefficients of the current block are located; last_sig_coeff_y_prefix and last_sig_coeff_y_suffix encode the vertical distance of the position of the last non-zero coefficient relative to the lower right corner of the area where all possible non-zero coefficients of the current block are located, as Figure 10B shown; Therefore, the embodiment of the present application can introduce reverse_last_sig_coeff_flag, thereby solving the problem that encoding larger values in the bitstream will bring greater overhead.
[0451] Further, when the video identification information indicates that the video meets a preset condition, at this time, it can be defaulted that all coefficients that may need to be encoded are to be encoded, that is, instead of using the position of the last non-zero coefficient, all coefficients that may not be 0 in the current block are scanned in the preset scan order; therefore, the embodiments of the present application can also introduce the last coefficient enable identification information to determine whether the current block uses the position of the last coefficient.
[0452] In some embodiments, when the video identification information indicates that the video meets a preset condition, the method may further include:
[0453] Determine the last coefficient enable identification information;
[0454] When the last coefficient enable identification information indicates that the current block uses the position of the last coefficient, encode all coefficients before the position of the last coefficient in the preset scan order, and write the encoded bit information, video identification information, and the last coefficient enable identification information into the code stream.
[0455] It should be noted that for the last coefficient enable identification information, it can be represented by default_last_coeff_enabled_flag. In the embodiments of the present application, the last coefficient enable identification information can be at least one of the following identification information: sequence level, picture level, slice level, and block level; or even can be identification information at a higher level (such as VUI, SEI, etc.), which is not limited here.
[0456] It should also be noted that for the last coefficient enable identification information, in some embodiments, the determining the last coefficient enable identification information may include:
[0457] If the current block uses the position of the last coefficient, determine that the value of the last coefficient enable identification information is the first value; or, if the current block does not use the position of the last coefficient, determine that the value of the last coefficient enable identification information is the second value.
[0458] That is, taking the first value as 1 and the second value as 0 as an example, if it is determined that the current block uses the position of the last coefficient, then the value of default_last_coeff_enabled_flag is 1; or, if it is determined that the current block does not use the position of the last coefficient, then the value of default_last_coeff_enabled_flag is 0.
[0459] Further, for the last coefficient position, in some embodiments, the last coefficient position is the lower right corner position of the matrix composed of all possible non-zero coefficients in the current block; or, the last coefficient position is the last position where all possible non-zero coefficients in the current block are scanned according to a preset scanning order.
[0460] It should be noted that the last coefficient position in the embodiments of the present application does not represent the position of the last non-zero coefficient. Because the coefficient at the last coefficient position may be 0, while the coefficient at the position of the last non-zero coefficient must not be 0.
[0461] In a specific example, the method may further include: setting the position of the last non-zero coefficient at the last coefficient position.
[0462] That is to say, the embodiments of the present application can still use the position of the last non-zero coefficient. At this time, it is necessary to place the position of the last non-zero coefficient at the last position of all possible non-zero coefficients in the current block according to the preset scanning order.
[0463] Further, the last coefficient position can be represented by (LastCoeffX, LastCoeffY), that is, the last position of all possible non-zero coefficients in the current block according to the preset scanning order. In some embodiments, the method may further include:
[0464] Determining the width and height of the transformed block obtained after the preset operation on the current block;
[0465] Calculating coordinates according to the width and height of the transformed block to obtain the lower right corner coordinate information of the transformed block;
[0466] Determining the last coefficient position according to the lower right corner coordinate information of the transformed block.
[0467] Here, the preset operation includes at least: a zero-out operation.
[0468] It should be noted that (LastCoeffX, LastCoeffY) represents the lower right corner coordinate information of the transformed block after zero-out; among them, the derivation method of (LastCoeffX, LastCoeffY) is as follows:
[0469] LastCoeffX = (1 << log2ZoTbWidth) - 1; LastCoeffY = (1 << log2ZoTbHeight) - 1.
[0470] Thus, if the value of default_last_coeff_enabled_flag is 1, the position of the last coefficient can be determined according to (LastCoeffX, LastCoeffY).
[0471] In a specific example, the position of the last non-zero coefficient is still used. At this time, the position of the last non-zero coefficient can be placed at the last position of all possible zero coefficients in the current block according to the preset scanning order. In some embodiments, the method may further include:
[0472] When setting the position of the last non-zero coefficient at the position of the last coefficient, determine the position of the last non-zero coefficient according to the lower right corner coordinate information of the transform block.
[0473] That is to say, the position of the last non-zero coefficient can be represented by (LastSignificantCoeffX, LastSignificantCoeffY), and the derivation method of (LastSignificantCoeffX, LastSignificantCoeffY) is as follows:
[0474] LastSignificantCoeffX = (1 << log2ZoTbWidth) - 1; LastSignificantCoeffY = (1 << log2ZoTbHeight) - 1.
[0475] Among them, (LastSignificantCoeffX, LastSignificantCoeffY) represents the lower right corner coordinate information of the transformed block after zero-out. If the value of default_last_coeff_enabled_flag is 1, the position of the last non-zero coefficient can be determined according to (LastSignificantCoeffX, LastSignificantCoeffY).
[0476] Furthermore, in the case where the position of the last coefficient is not used in the current block, that is, the value of the last coefficient enable identification information is 0, in some embodiments, the method may further include:
[0477] Determine the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient;
[0478] Determine the position of the last non-zero coefficient according to the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient;
[0479] Encode all the coefficients before the position of the last non-zero coefficient according to a preset scanning order, and write the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient into the bitstream.
[0480] It should be noted that if the last coefficient position is not used for the current block, then the position of the last non-zero coefficient needs to be determined at this time. Specifically, it is necessary to determine last_sig_coeff_x_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_prefix, last_sig_coeff_y_suffix; then write last_sig_coeff_x_prefix, last_sig_coeff_x_suffix, last_sig_coeff_y_prefix, last_sig_coeff_y_suffix into the bitstream.
[0481] In this way, during coefficient encoding, it is default to encode all the coefficients that may need to be encoded. That is to say, usually, the coefficient encoding and decoding method is still the same as the existing method in the related technology. In a certain situation, such as a video with a high bit width or high quality or high bit rate or lossless compression video coding and decoding, it is default to encode all the coefficients that may need to be encoded. That is to say, the position of the last non-zero coefficient is no longer used, but all the coefficients that may not be 0 in the current block are scanned in the preset scanning order; or rather, the position of the last coefficient to be encoded is placed at the last position of all the coefficients that may not be 0 in the current block in the preset scanning order. This position usually refers to the lower right corner position of the matrix composed of all the coefficients that may not be 0 in the current block. Therefore, in the embodiment of the present application, by introducing default_last_coeff_enabled_flag, the related syntax elements regarding the position of the last non-zero coefficient can be reduced or even eliminated at this time, which can save overhead and avoid waste.
[0482] Further, when the video identification information indicates that the video meets the preset conditions, all sub-blocks that can still be scanned are defaulted to need encoding. At this time, there is no need to transmit the sb_coded_flag in the bitstream, that is, neither the encoder nor the decoder needs to process this flag to accelerate the encoding and decoding speed. Therefore, the embodiments of the present application can also introduce sub-block default encoding identification information to determine whether the sub-blocks to be decoded within the current block are default encoded.
[0483] In some embodiments, when the video identification information indicates that the video meets the preset conditions, the method may further include:
[0484] Determine the sub-block default encoding identification information of the sub-blocks to be encoded within the current block;
[0485] When the sub-block default encoding identification information indicates that the sub-blocks to be encoded are default encoded, encode all coefficients within the sub-blocks to be encoded, and write the bit information obtained after encoding and the sub-block default encoding identification information into the bitstream.
[0486] It should be noted that for the sub-block default identification information, it can be represented by default_sb_coded_flag. In the embodiments of the present application, the sub-block default encoding identification information is at least the identification information of one of the following: sequence level, picture level, slice level, and block level; and even can be the identification information of a higher level (such as VUI, SEI, etc.), which is not limited here.
[0487] It should also be noted that for the sub-block default identification information, in some embodiments, the determining the sub-block default encoding identification information of the sub-blocks to be encoded may include:
[0488] If the sub-blocks to be encoded are default encoded, determine that the value of the sub-block default encoding identification information is the first value; or,
[0489] If the sub-blocks to be encoded are not default encoded, determine that the value of the sub-block default encoding identification information is the second value.
[0490] In this way, taking the first value as 1 and the second value as 0 as an example, if it is determined that the sub-blocks to be decoded are default encoded, then the value of default_sb_coded_flag is 1; or, if it is determined that the sub-blocks to be decoded are not default encoded, then the value of default_sb_coded_flag is 0.
[0491] When the sub-block to be decoded is default to be encoded, the value of default_sb_coded_flag is 1 at this time, which means the value of sb_coded_flag is 1, that is, there is no need to encode sb_coded_flag anymore. However, when the sub-block to be decoded is not default to be encoded, that is, when the sub-block default encoding identification information indicates that the sub-block to be encoded is not default to be encoded, in some embodiments, the method may further include: determining the sub-block encoding identification information of the sub-block to be encoded, and writing the sub-block encoding identification information into the bitstream.
[0492] Further, in some embodiments, the determining the sub-block encoding identification information of the sub-block to be encoded may include:
[0493] If encoding is required within the sub-block, determine that the value of the sub-block encoding identification information is the first value; or,
[0494] If all coefficients within the sub-block are zero, determine that the value of the sub-block encoding identification information is the second value.
[0495] In the embodiments of the present application, the sub-block encoding identification information may be represented by sb_coded_flag. Taking the first value as 1 and the second value as 0 as an example, if it is determined that the sub-block to be encoded needs to be encoded, it means that there are non-zero coefficients to be encoded within the sub-block to be encoded, then the value of sb_coded_flag is 1; or, if it is determined that the sub-block to be encoded does not need to be encoded, it means that all coefficients within the sub-block to be encoded are zero, then the value of sb_coded_flag is 0.
[0496] In this way, during coefficient encoding, the scanned sub-blocks are all default to be encoded, or it can be said that the scanned sub-blocks all default to contain non-zero coefficients. That is to say, usually, the method of coefficient encoding is still the same as the existing methods in the related art. A certain situation, for example, may refer to videos with high bitwidth or high quality or high bitrate or lossless compressed video coding and decoding. In this case, there are many non-zero coefficients, and almost all the scanned sub-blocks need to be encoded; or, it can be said that almost all the scanned sub-blocks contain non-zero coefficients. In this way, there is no need to transmit sb_coded_flag in the bitstream, and the encoder does not need to process this flag, thus being able to speed up the encoding and decoding speed. Since a flag that is almost non-existent is removed, there will also be a slight improvement in compression performance at this time.
[0497] This embodiment also provides a coefficient encoding method, which is applied to an encoder. By determining video identification information and the position of the last non-zero coefficient; when the video identification information indicates that the video meets a preset condition, determining the flipping identification information of the position of the last non-zero coefficient; according to the position of the last non-zero coefficient and the flipping identification information of the position of the last non-zero coefficient, determining the coordinate information of the last non-zero coefficient; encoding all the coefficients before the position of the last non-zero coefficient in a preset scanning order, and writing the obtained bit information, video identification information, and the coordinate information of the last non-zero coefficient into the code stream. In this way, in high-bitwidth, high-bitrate, high-quality, or lossless video coding and decoding scenarios, since the coefficient distribution law is different from that in conventional video scenarios, in coefficient encoding, the number of syntax elements of context mode encoding is reduced or even eliminated, such as syntax elements regarding the position of the last non-zero coefficient, sub-block encoding identification, etc. Even when the value of the coordinate information of the last non-zero coefficient is relatively large, coordinate transformation can be performed, thereby reducing the overhead brought by encoding in the code stream, and then improving the throughput and encoding speed of coefficient encoding; in addition, since the reduced or eliminated syntax elements have little impact on high-bitwidth, high-bitrate, high-quality, or lossless video coding, the compression efficiency can also be improved.
[0498] In another embodiment of this application, based on the same inventive concept as the foregoing embodiment, refer to Figure 12 , which shows a schematic structural diagram of an encoder 120 provided by an embodiment of this application. As Figure 12 shown, the encoder 120 may include: a first determination unit 1201 and an encoding unit 1202; where
[0499] The first determination unit 1201 is configured to determine video identification information and the position of the last non-zero coefficient; and when the video identification information indicates that the video meets a preset condition, determine the flipping identification information of the position of the last non-zero coefficient;
[0500] The first determination unit 1201 is further configured to determine the coordinate information of the last non-zero coefficient according to the position of the last non-zero coefficient and the flipping identification information of the position of the last non-zero coefficient;
[0501] The encoding unit 1202 is configured to encode all the coefficients before the position of the last non-zero coefficient in a preset scanning order, and write the obtained bit information, video identification information, and the coordinate information of the last non-zero coefficient into the code stream.
[0502] In some embodiments, the first determination unit 1201 is further configured to, if the video meets a preset condition, determine that the value of the video identification information is a first value; or, if the video does not meet the preset condition, determine that the value of the video identification information is a second value.
[0503] In some embodiments, the preset conditions include at least one of the following: high bit width, high quality, high bit rate, high frame rate, and lossless compression.
[0504] In some embodiments, the first determination unit 1201 is further configured to determine that the value of the last non-zero coefficient position flip flag information is the first value if the current block uses the last non-zero coefficient position flip; or determine that the value of the last non-zero coefficient position flip flag information is the second value if the current block does not use the last non-zero coefficient position flip.
[0505] In some embodiments, the position of the last non-zero coefficient includes the initial horizontal coordinate and the initial vertical coordinate of the last non-zero coefficient, and the initial horizontal coordinate and the initial vertical coordinate are the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the upper left corner position of the current block;
[0506] Accordingly, the first determination unit 1201 is further configured to calculate based on the initial horizontal coordinate and the initial vertical coordinate of the last non-zero coefficient to determine the coordinate information of the last non-zero coefficient if the value of the last non-zero coefficient position flip flag information is the first value; or directly determine the coordinate information of the last non-zero coefficient based on the initial horizontal coordinate and the initial vertical coordinate of the last non-zero coefficient if the value of the last non-zero coefficient position flip flag information is the second value.
[0507] In some embodiments, the first determination unit 1201 is further configured to determine the width and height of the current block; perform a subtraction calculation based on the width of the current block and the initial horizontal coordinate of the last non-zero coefficient to obtain the horizontal coordinate of the last non-zero coefficient; perform a subtraction calculation based on the height of the current block and the initial vertical coordinate of the last non-zero coefficient to obtain the vertical coordinate of the last non-zero coefficient; and determine the coordinate information of the last non-zero coefficient based on the horizontal coordinate and the vertical coordinate of the last non-zero coefficient.
[0508] In some embodiments, the first determination unit 1201 is further configured to determine that the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the lower right corner position of the current block if the value of the last non-zero coefficient position flip flag information is the first value; or the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the upper left corner position of the current block if the value of the last non-zero coefficient position flip flag information is the second value.
[0509] In some embodiments, the encoding unit 1202 is further configured to determine prefix information of the horizontal coordinate of the last non-zero coefficient, prefix information of the vertical coordinate of the last non-zero coefficient, suffix information of the horizontal coordinate of the last non-zero coefficient, and suffix information of the vertical coordinate of the last non-zero coefficient according to the coordinate information of the last non-zero coefficient; and write the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient into the bitstream.
[0510] In some embodiments, the last non-zero coefficient position flip flag information is at least one of the following: sequence level, picture level, slice level, and block level.
[0511] In some embodiments, the first determination unit 1201 is further configured to determine the last coefficient enable flag information when the video identification information indicates that the video meets a preset condition.
[0512] The encoding unit 1202 is further configured to, when the last coefficient enable flag information indicates that the current block uses the last coefficient position, encode all the coefficients before the last coefficient position in a preset scanning order, and write the encoded bit information, the video identification information, and the last coefficient enable flag information into the bitstream.
[0513] In some embodiments, the first determination unit 1201 is further configured to, if the current block uses the last coefficient position, determine that the value of the last coefficient enable flag information is a first value; or, if the current block does not use the last coefficient position, determine that the value of the last coefficient enable flag information is a second value.
[0514] In some embodiments, the last coefficient position is the lower right corner position of the matrix formed by all the coefficients that may be non-zero in the current block; or, the last coefficient position is the last position where all the coefficients that may be non-zero in the current block are scanned according to a preset scanning order.
[0515] In some embodiments, the first determination unit 1201 is further configured to set the position of the last non-zero coefficient at the last coefficient position.
[0516] In some embodiments, the first determination unit 1201 is further configured to determine the width and height of the transformed block obtained after the preset operation on the current block; perform coordinate calculation according to the width and height of the transformed block to obtain the lower right corner coordinate information of the transformed block; and determine the last coefficient position according to the lower right corner coordinate information of the transformed block.
[0517] In some embodiments, the preset operation at least includes: a zero-out operation.
[0518] In some embodiments, the first determination unit 1201 is further configured to determine the position of the last non-zero coefficient according to the coordinate information of the lower right corner of the transform block when the position of the last non-zero coefficient is set at the last coefficient position.
[0519] In some embodiments, the first determination unit 1201 is further configured to determine the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient when the current block does not use the last coefficient position; and determine the position of the last non-zero coefficient according to the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient;
[0520] The encoding unit 1202 is further configured to encode all the coefficients before the position of the last non-zero coefficient in accordance with a preset scanning order, and write the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient into the code stream.
[0521] In some embodiments, the last coefficient enable identification information is at least one of the following identification information: sequence level, picture level, slice level, and block level.
[0522] In some embodiments, the first determination unit 1201 is further configured to determine the sub-block default encoding identification information of the sub-block to be encoded within the current block when the video identification information indicates that the video meets a preset condition;
[0523] The encoding unit 1202 is further configured to encode all the coefficients within the sub-block to be encoded when the sub-block default encoding identification information indicates that the sub-block to be encoded is default encoded, and write the obtained bit information and the sub-block default encoding identification information into the code stream.
[0524] In some embodiments, the first determination unit 1201 is further configured to determine the sub-block encoding identification information of the sub-block to be encoded and write the sub-block encoding identification information into the code stream when the sub-block default encoding identification information indicates that the sub-block to be encoded is not default encoded.
[0525] In some embodiments, the first determination unit 1201 is further configured to, if the sub-block to be encoded is default encoded, determine that the value of the sub-block default encoding identification information is a first value; or, if the sub-block to be encoded is not default encoded, determine that the value of the sub-block default encoding identification information is a second value.
[0526] In some embodiments, the first determination unit 1201 is further configured to, if encoding is required within the sub-block, determine that the value of the sub-block encoding identification information is a first value; or, if all coefficients within the sub-block are zero, determine that the value of the sub-block encoding identification information is a second value.
[0527] In some embodiments, the sub-block default encoding identification information is at least the identification information of one of the following: sequence level, picture level, slice level, and block level.
[0528] In some embodiments, the first value is 1 and the second value is 0.
[0529] In some embodiments, the first determination unit 1201 is further configured to, when the video identification information is high-bitwidth identification information, if the video meets the high-bitwidth requirement, determine that the high-bitwidth identification information indicates that the video meets a preset condition.
[0530] In some embodiments, the first determination unit 1201 is further configured to, when the video identification information is high-bitrate identification information, if the video meets the high-bitrate requirement, determine that the high-bitrate identification information indicates that the video meets a preset condition.
[0531] In some embodiments, the first determination unit 1201 is further configured to, when the video identification information is high-quality identification information, if the video meets the high-quality requirement, determine that the high-quality identification information indicates that the video meets a preset condition.
[0532] In some embodiments, the first determination unit 1201 is further configured to, when the video identification information is lossless compression identification information, if the video meets the lossless compression requirement, determine that the lossless compression identification information indicates that the video meets a preset condition.
[0533] It can be understood that in the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc. Of course, it may also be a module or non-modular. Moreover, the components in this embodiment may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated units may be implemented in the form of hardware or in the form of software functional modules.
[0534] When the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0535] Therefore, an embodiment of the present application provides a computer storage medium, which is applied to the encoder 120. The computer storage medium stores a computer program, and when the computer program is executed by a first processor, it implements the method described in any one of the foregoing embodiments.
[0536] Based on the composition of the foregoing encoder 120 and the computer storage medium, refer to Figure 13 , which shows a specific hardware structure diagram of the encoder 120 provided by an embodiment of the present application. As Figure 13 shown, it may include: a first communication interface 1301, a first memory 1302, and a first processor 1303; each component is coupled together through a first bus system 1304. It can be understood that the first bus system 1304 is used to realize the connection and communication between these components. The first bus system 1304 includes, in addition to a data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 13 all kinds of buses are labeled as the first bus system 1304. Among them,
[0537] The first communication interface 1301 is used for receiving and sending signals during the process of receiving and sending information to and from other external network elements;
[0538] The first memory 1302 is used to store a computer program that can run on the first processor 1303;
[0539] The first processor 1303 is used for, when running the computer program, executing:
[0540] Determine the video identification information and the position of the last non-zero coefficient;
[0541] When the video identification information indicates that the video meets a preset condition, determine the last non-zero coefficient position flipping identification information;
[0542] Determine the coordinate information of the last non-zero coefficient according to the position of the last non-zero coefficient and the last non-zero coefficient position flipping identification information;
[0543] Encode all the coefficients before the position of the last non-zero coefficient in accordance with a preset scanning order, and write the bit information obtained after encoding, the video identification information, and the coordinate information of the last non-zero coefficient into the bitstream.
[0544] It can be understood that the first memory 1302 in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM). The first memory 1302 of the systems and methods described in the present application is intended to include but not be limited to these and any other suitable types of memories.
[0545] The first processor 1303 may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method can be completed by the integrated logic circuit of the hardware in the first processor 1303 or the instructions in the form of software. The above first processor 1303 may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or completed by the combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the first memory 1302, and the first processor 1303 reads the information in the first memory 1302 and combines its hardware to complete the steps of the above method.
[0546] It can be understood that these embodiments described in the present application can be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof. For software implementation, the techniques described in the present application can be implemented by executing modules (such as procedures, functions, etc.) that perform the functions described in the present application. The software code can be stored in a memory and executed by a processor. The memory can be implemented inside or outside the processor.
[0547] Optionally, as another embodiment, the first processor 1303 is further configured to execute the method described in any one of the foregoing embodiments when running the computer program.
[0548] This embodiment provides an encoder, which may include a first determination unit and an encoding unit. In this way, in high-bitwidth, high-bitrate, high-quality, or lossless video encoding and decoding scenarios, since the coefficient distribution law is different from that in conventional video scenarios, the number of syntax elements for context mode encoding can be reduced or even eliminated in coefficient encoding, thereby reducing the overhead brought by encoding in the bitstream, and then improving the throughput and encoding / decoding speed of coefficient encoding; in addition, since the reduced or eliminated syntax elements have less impact in high-bitwidth, high-bitrate, high-quality, or lossless video encoding and decoding, the compression efficiency can also be improved.
[0549] In another embodiment of the present application, based on the same inventive concept as the foregoing embodiment, refer to Figure 14 , which shows a schematic structural diagram of a decoder 140 provided in an embodiment of the present application. As Figure 14 shown, the decoder 140 may include: a parsing unit 1401 and a second determination unit 1402; wherein,
[0550] The parsing unit 1401 is configured to parse the bitstream to obtain video identification information; and when the video identification information indicates that the video meets a preset condition, parse the bitstream to obtain the last non-zero coefficient position flip identification information and the coordinate information of the last non-zero coefficient;
[0551] The second determination unit 1402 is configured to calculate the coordinate information of the last non-zero coefficient to determine the position of the last non-zero coefficient when the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip;
[0552] The parsing unit 1401 is further configured to decode all coefficients before the position of the last non-zero coefficient in a preset scan order to determine the coefficients of the current block.
[0553] In some embodiments, the second determination unit 1402 is further configured to directly determine the position of the last non-zero coefficient according to the coordinate information of the last non-zero coefficient when the last non-zero coefficient position flip identification information indicates that the current block does not use the last non-zero coefficient position flip;
[0554] The parsing unit 1401 is further configured to decode all coefficients before the position of the last non-zero coefficient in a preset scan order to determine the coefficients of the current block.
[0555] In some embodiments, the second determination unit 1402 is further configured to determine that the video identification information indicates that the video meets a preset condition if the value of the video identification information is a first value; or determine that the video identification information indicates that the video does not meet the preset condition if the value of the video identification information is a second value.
[0556] In some embodiments, the preset condition includes at least one of the following: high bit width, high quality, high bit rate, high frame rate, and lossless compression.
[0557] In some embodiments, the second determination unit 1402 is further configured to determine that the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip if the value of the last non-zero coefficient position flip identification information is a first value; or determine that the last non-zero coefficient position flip identification information indicates that the current block does not use the last non-zero coefficient position flip if the value of the last non-zero coefficient position flip identification information is a second value.
[0558] In some embodiments, the parsing unit 1401 is further configured to parse the bitstream to obtain the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient.
[0559] The second determination unit 1402 is further configured to determine the horizontal coordinate of the last non-zero coefficient according to the prefix information of the horizontal coordinate of the last non-zero coefficient and the suffix information of the horizontal coordinate of the last non-zero coefficient; determine the vertical coordinate of the last non-zero coefficient according to the prefix information of the vertical coordinate of the last non-zero coefficient and the suffix information of the vertical coordinate of the last non-zero coefficient; and determine the coordinate information of the last non-zero coefficient according to the horizontal coordinate of the last non-zero coefficient and the vertical coordinate of the last non-zero coefficient.
[0560] In some embodiments, the second determination unit 1402 is further configured to determine that the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the lower right corner position of the current block when the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip.
[0561] Further, the second determination unit 1402 is further configured to determine the width and height of the current block; perform a subtraction calculation based on the horizontal distance between the width of the current block and the position of the last non-zero coefficient relative to the lower right corner position of the current block to obtain the horizontal coordinate of the last non-zero coefficient; and perform a subtraction calculation based on the vertical distance between the height of the current block and the position of the last non-zero coefficient relative to the lower right corner position of the current block to obtain the vertical coordinate of the last non-zero coefficient; and determine the position of the last non-zero coefficient based on the horizontal coordinate and the vertical coordinate of the last non-zero coefficient.
[0562] In some embodiments, the second determination unit 1402 is further configured to, when the last non-zero coefficient position flip flag information indicates that the current block does not use the last non-zero coefficient position flip, determine that the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the upper left corner position of the current block; and determine the position of the last non-zero coefficient based on the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the upper left corner position of the current block.
[0563] In some embodiments, the last non-zero coefficient position flip flag information is at least one of the following identification information: sequence level, picture level, slice level, and block level.
[0564] In some embodiments, the parsing unit 1401 is further configured to parse the code stream to obtain the last coefficient enable flag information; and when the last coefficient enable flag information indicates that the current block uses the last coefficient position, decode all the coefficients before the last coefficient position according to a preset scanning order to determine the coefficients of the current block.
[0565] In some embodiments, the second determination unit 1402 is further configured to, if the value of the last coefficient enable flag information is the first value, determine that the last coefficient enable flag information indicates that the current block uses the last coefficient position; or, if the value of the last coefficient enable flag information is the second value, determine that the last coefficient enable flag information indicates that the current block does not use the last coefficient position.
[0566] In some embodiments, the parsing unit 1401 is further configured to, when the value of the last coefficient enable flag information is the second value, parse the code stream to obtain the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient.
[0567] The second determination unit 1402 is further configured to determine the position of the last non-zero coefficient according to the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient; and decode all the coefficients before the position of the last non-zero coefficient according to a preset scanning order to determine the coefficients of the current block.
[0568] In some embodiments, the position of the last coefficient is the lower right corner position of the matrix formed by all the coefficients that may be non-zero in the current block; or, the position of the last coefficient is the last position of scanning all the coefficients that may be non-zero in the current block according to a preset scanning order.
[0569] In some embodiments, the second determination unit 1402 is further configured to set the position of the last non-zero coefficient at the position of the last coefficient.
[0570] In some embodiments, the second determination unit 1402 is further configured to determine the width and height of the transformed block obtained after a preset operation on the current block; and perform coordinate calculation according to the width and height of the transformed block to obtain the lower right corner coordinate information of the transformed block; and determine the position of the last coefficient according to the lower right corner coordinate information of the transformed block.
[0571] In some embodiments, the preset operation at least includes: a zero-out operation.
[0572] In some embodiments, when the position of the last non-zero coefficient is set at the position of the last coefficient, the second determination unit 1402 is further configured to determine the position of the last non-zero coefficient according to the lower right corner coordinate information of the transformed block.
[0573] In some embodiments, the last coefficient enable identification information is at least one of the following identification information: sequence level, picture level, slice level, and block level.
[0574] In some embodiments, when the video identification information indicates that the video meets a preset condition, the parsing unit 1401 is further configured to parse the bitstream to obtain sub-block default coding identification information; and when the sub-block default coding identification information indicates that the sub-block to be decoded is default coded, determine that the value of the sub-block coding identification information is the first value, and decode all the coefficients in the sub-block to be decoded.
[0575] In some embodiments, when the sub-block default coding identification information indicates that the sub-block to be decoded is not default coded, the parsing unit 1401 is further configured to parse the bitstream to obtain sub-block coding identification information; and when the value of the sub-block coding identification information is the first value, decode all the coefficients in the sub-block to be decoded.
[0576] In some embodiments, the second determination unit 1402 is further configured to, if the value of the sub-block default coding identification information is the first value, determine that the sub-block default coding identification information indicates the default coding of the sub-block to be decoded; or, if the value of the sub-block default coding identification information is the second value, determine that the sub-block default coding identification information indicates that the sub-block to be decoded is not default coded.
[0577] In some embodiments, the second determination unit 1402 is further configured to, if the value of the sub-block coding identification information is the first value, determine to decode all coefficients in the sub-block to be decoded; or, if the value of the sub-block coding identification information is the second value, determine that all coefficients in the sub-block to be decoded are zero.
[0578] In some embodiments, the sub-block default coding identification information is at least one of the following identification information: sequence level, picture level, slice level, and block level.
[0579] In some embodiments, the first value is 1 and the second value is 0.
[0580] In some embodiments, the second determination unit 1402 is further configured to, when the video identification information is high-bitwidth identification information, if the high-bitwidth identification information indicates that the video meets the high-bitwidth, determine that the video meets the preset condition.
[0581] In some embodiments, the second determination unit 1402 is further configured to, when the video identification information is high-bitrate identification information, if the high-bitrate identification information indicates that the video meets the high-bitrate, determine that the video meets the preset condition.
[0582] In some embodiments, the second determination unit 1402 is further configured to, when the video identification information is high-quality identification information, if the high-quality identification information indicates that the video meets the high-quality, determine that the video meets the preset condition.
[0583] In some embodiments, the second determination unit 1402 is further configured to, when the video identification information is lossless compression identification information, if the lossless compression identification information indicates that the video meets the lossless compression, determine that the video meets the preset condition.
[0584] It can be understood that in the embodiments of the present application, a "unit" may be a part of a circuit, a part of a processor, a part of a program or software, etc. Of course, it may also be a module or non-modular. Moreover, the components in this embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated units may be implemented in the form of hardware or in the form of software function modules.
[0585] When the integrated unit is implemented in the form of a software functional module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0586] Therefore, the embodiment of this application provides a computer storage medium, which is applied to the decoder 140. This computer storage medium stores a computer program, and when the computer program is executed by the first processor, it implements the method described in any one of the foregoing embodiments.
[0587] Based on the composition of the foregoing decoder 140 and the computer storage medium, refer to Figure 15 , which shows the specific hardware structure diagram of the decoder 140 provided by the embodiment of this application. As Figure 15 shown, it may include: a second communication interface 1501, a second memory 1502, and a second processor 1503; each component is coupled together through a second bus system 1504. It can be understood that the second bus system 1504 is used to realize the connection and communication between these components. In addition to the data bus, the second bus system 1504 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, in Figure 15 all kinds of buses are labeled as the second bus system 1504. Among them,
[0588] The second communication interface 1501 is used for receiving and sending signals during the process of receiving and sending information with other external network elements;
[0589] The second memory 1502 is used to store a computer program that can run on the second processor 1503;
[0590] The second processor 1503 is used for, when running the computer program, executing:
[0591] Analyzing the code stream to obtain video identification information;
[0592] When the video identification information indicates that the video meets a preset condition, parse the bitstream to obtain the last non-zero coefficient position flip identification information and the coordinate information of the last non-zero coefficient;
[0593] When the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip, calculate the coordinate information of the last non-zero coefficient to determine the position of the last non-zero coefficient;
[0594] Decode all the coefficients before the position of the last non-zero coefficient according to a preset scanning order to determine the coefficients of the current block.
[0595] Optionally, as another embodiment, the second processor 1503 is further configured to execute the method described in any one of the foregoing embodiments when running the computer program.
[0596] It can be understood that the hardware functions of the second memory 1502 and the first memory 1302 are similar, and the hardware functions of the second processor 1503 and the first processor 1303 are similar; details are not described herein again.
[0597] This embodiment provides a decoder, which may include a parsing unit and a second determining unit. In this way, in high-bitwidth, high-bitrate, high-quality or lossless video scenarios, since the coefficient distribution law is different from that in conventional video coding and decoding scenarios, the number of syntax elements for context mode coding is reduced or even eliminated in coefficient coding, thereby reducing the overhead caused by coding in the bitstream, and then improving the throughput and coding and decoding speed of coefficient coding; in addition, since the reduced or eliminated syntax elements have little impact on high-bitwidth, high-bitrate, high-quality or lossless video coding and decoding, the compression efficiency can also be improved.
[0598] It should be noted that in this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "including a..." does not exclude the presence of additional identical elements in the process, method, article or device including the element.
[0599] The serial numbers of the above embodiments of this application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0600] The methods disclosed in several method embodiments provided by this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0601] The features disclosed in several product embodiments provided by this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0602] The features disclosed in several method or device embodiments provided by this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0603] As described above, it is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0604] Industrial applicability
[0605] In the embodiments of this application, whether it is an encoder or a decoder, in high-bitwidth, high-bitrate, high-quality, or lossless video coding and decoding scenarios, due to the different coefficient distribution rules from conventional video scenarios, the number of syntax elements for context mode coding can be reduced or even eliminated in coefficient coding, such as syntax elements regarding the position of the last non-zero coefficient, sub-block coding identification, etc. Moreover, coordinate transformation can even be performed when the value of the coordinate information of the last non-zero coefficient is relatively large, thereby reducing the overhead brought by coding in the bitstream, and further improving the throughput and coding and decoding speed of coefficient coding; in addition, since the influence of the reduced or eliminated syntax elements in high-bitwidth, high-bitrate, high-quality, or lossless video coding and decoding is relatively small, the compression efficiency can also be improved.
Claims
1. A coefficient decoding method, applied to a decoder, the method comprising: Parsing a bitstream to obtain sequence-level identification information; When the sequence-level identification information indicates that the video meets a preset condition, parsing the bitstream to obtain last non-zero coefficient position flip identification information; Parsing the bitstream to obtain prefix information of the horizontal coordinate of the last non-zero coefficient, prefix information of the vertical coordinate of the last non-zero coefficient, suffix information of the horizontal coordinate of the last non-zero coefficient, and suffix information of the vertical coordinate of the last non-zero coefficient; Determining the horizontal coordinate of the last non-zero coefficient according to the prefix information of the horizontal coordinate of the last non-zero coefficient and the suffix information of the horizontal coordinate of the last non-zero coefficient; Determining the vertical coordinate of the last non-zero coefficient according to the prefix information of the vertical coordinate of the last non-zero coefficient and the suffix information of the vertical coordinate of the last non-zero coefficient; Determining the coordinate information of the last non-zero coefficient according to the horizontal coordinate of the last non-zero coefficient and the vertical coordinate of the last non-zero coefficient; When the last non-zero coefficient position flip identification information indicates that the current block uses the last non-zero coefficient position flip, calculating the coordinate information of the last non-zero coefficient to determine the position of the last non-zero coefficient, wherein the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the bottom right corner position of the current block; Decoding all coefficients before the position of the last non-zero coefficient in a preset scanning order to determine the coefficients of the current block, wherein, the value of the horizontal coordinate of the last non-zero coefficient in the current block in the preset scanning order is derived as follows: If last_sig_coeff_x_suffix does not exist, then LastSignificantCoeffX = last_sig_coeff_x_prefix; If last_sig_coeff_x_suffix exists, then LastSignificantCoeffX = (1 << ((last_sig_coeff_x_prefix >> 1) - 1)) * (2 + (last_sig_coeff_x_prefix & 1)) + last_sig_coeff_x_suffix; If the value of reverse_last_sig_coeff_flag is 1, then LastSignificantCoeffX = (1 << log2ZoTbWidth) - 1 - LastSignificantCoeffX; The value of the vertical coordinate of the last non-zero coefficient in the current block in the preset scanning order is derived as follows: If last_sig_coeff_y_suffix does not exist, then LastSignificantCoeffY = last_sig_coeff_y_prefix; If last_sig_coeff_y_suffix exists, then LastSignificantCoeffY = (1 << ((last_sig_coeff_y_prefix >> 1) - 1)) * (2 + (last_sig_coeff_y_prefix & 1)) + last_sig_coeff_y_suffix; If the value of reverse_last_sig_coeff_flag is 1, then LastSignificantCoeffY = (1 << log2ZoTbHeight) - 1 - LastSignificantCoeffY, wherein, LastSignificantCoeffX represents the value of the horizontal coordinate of the last non - zero coefficient in the current block according to the preset scanning order, LastSignificantCoeffY represents the value of the vertical coordinate of the last non - zero coefficient in the current block according to the preset scanning order, last_sig_coeff_x_prefix represents the prefix information of the horizontal coordinate of the last non - zero coefficient, last_sig_coeff_y_prefix represents the prefix information of the vertical coordinate of the last non - zero coefficient, last_sig_coeff_x_suffix represents the suffix information of the horizontal coordinate of the last non - zero coefficient, last_sig_coeff_y_suffix represents the suffix information of the vertical coordinate of the last non - zero coefficient, and reverse_last_sig_coeff_flag represents the last non - zero coefficient position flip identification information.
2. The method according to claim 1, wherein The method further includes: When the last non - zero coefficient position flip identification information indicates that the current block does not use the last non - zero coefficient position flip, directly determine the position of the last non - zero coefficient according to the coordinate information of the last non - zero coefficient; Decode all the coefficients before the position of the last non - zero coefficient according to the preset scanning order to determine the coefficients of the current block.
3. The method according to claim 1, wherein The method further includes: If the value of the sequence - level identification information is the first value, then determine that the sequence - level identification information indicates that the video meets the preset conditions; or, If the value of the sequence - level identification information is the second value, then determine that the sequence - level identification information indicates that the video does not meet the preset conditions.
4. The method according to claim 3, wherein, The preset conditions include at least one of the following: high bit - width, high quality, high bit - rate, high frame - rate, and lossless compression.
5. The method according to claim 1, wherein The method further includes: If the value of the last non - zero coefficient position flip identification information is the first value, then determine that the last non - zero coefficient position flip identification information indicates that the current block uses the last non - zero coefficient position flip; or, If the value of the last non-zero coefficient position flip flag information is the second value, determine that the last non-zero coefficient position flip flag information indicates that the current block does not use the last non-zero coefficient position flip.
6. A coefficient coding method, applied to an encoder, the method comprising: Determine sequence-level identification information and the position of the last non-zero coefficient; When the sequence-level identification information indicates that the video meets a preset condition, determine the last non-zero coefficient position flip flag information; According to the position of the last non-zero coefficient and the last non-zero coefficient position flip flag information, determine the coordinate information of the last non-zero coefficient, wherein when the last non-zero coefficient position flip flag information indicates that the current block uses the last non-zero coefficient position flip, the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the lower right corner position of the current block; According to the coordinate information of the last non-zero coefficient, determine the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient; Encode all the coefficients before the position of the last non-zero coefficient in a preset scan order, and write the encoded bit information, the sequence-level identification information, the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient into the code stream, wherein, the value of the horizontal coordinate of the last non-zero coefficient in the current block in the preset scan order is derived as follows: If last_sig_coeff_x_suffix does not exist, then LastSignificantCoeffX = last_sig_coeff_x_prefix; If last_sig_coeff_x_suffix exists, then LastSignificantCoeffX = (1 << ((last_sig_coeff_x_prefix >> 1) - 1)) * (2 + (last_sig_coeff_x_prefix & 1)) + last_sig_coeff_x_suffix; If the value of reverse_last_sig_coeff_flag is 1, then LastSignificantCoeffX = (1 << log2ZoTbWidth) - 1 - LastSignificantCoeffX; The value of the vertical coordinate of the last non-zero coefficient in the current block in the preset scan order is derived as follows: If last_sig_coeff_y_suffix does not exist, then LastSignificantCoeffY = last_sig_coeff_y_prefix; If last_sig_coeff_y_suffix exists, then LastSignificantCoeffY = (1 << ((last_sig_coeff_y_prefix >> 1) - 1)) * (2 + (last_sig_coeff_y_prefix & 1)) + last_sig_coeff_y_suffix; If the value of reverse_last_sig_coeff_flag is 1, then LastSignificantCoeffY = (1 << log2ZoTbHeight) - 1 - LastSignificantCoeffY, wherein, LastSignificantCoeffX represents the value of the horizontal coordinate of the last non-zero coefficient in the current block according to the preset scanning order, LastSignificantCoeffY represents the value of the vertical coordinate of the last non-zero coefficient in the current block according to the preset scanning order, last_sig_coeff_x_prefix represents the prefix information of the horizontal coordinate of the last non-zero coefficient, last_sig_coeff_y_prefix represents the prefix information of the vertical coordinate of the last non-zero coefficient, last_sig_coeff_x_suffix represents the suffix information of the horizontal coordinate of the last non-zero coefficient, last_sig_coeff_y_suffix represents the suffix information of the vertical coordinate of the last non-zero coefficient, and reverse_last_sig_coeff_flag represents the position flip identification information of the last non-zero coefficient.
7. The method according to claim 6, wherein, The determining of the sequence-level identification information includes: If the video meets the preset conditions, then determine that the value of the sequence-level identification information is the first value; or, If the video does not meet the preset conditions, then determine that the value of the sequence-level identification information is the second value.
8. An encoder, the encoder includes a first determination unit and an encoding unit; wherein, The first determination unit is configured to determine the sequence-level identification information and the position of the last non-zero coefficient; and when the sequence-level identification information indicates that the video meets the preset conditions, determine the position flip identification information of the last non-zero coefficient; The first determination unit is further configured to determine the coordinate information of the last non-zero coefficient according to the position of the last non-zero coefficient and the position flip identification information of the last non-zero coefficient, wherein when the position flip identification information of the last non-zero coefficient indicates that the current block uses the position flip of the last non-zero coefficient, the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the lower right corner position of the current block; The first determining unit is further configured to determine prefix information of the horizontal coordinate of the last non-zero coefficient, prefix information of the vertical coordinate of the last non-zero coefficient, suffix information of the horizontal coordinate of the last non-zero coefficient, and suffix information of the vertical coordinate of the last non-zero coefficient according to the coordinate information of the last non-zero coefficient; The encoding unit is configured to encode all coefficients before the position of the last non-zero coefficient in a preset scanning order, and write the obtained bit information after encoding, the sequence-level identification information, the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient into the code stream. Among them, the value of the horizontal coordinate of the last non-zero coefficient in the current block in the preset scanning order is derived as follows: If last_sig_coeff_x_suffix does not exist, then LastSignificantCoeffX = last_sig_coeff_x_prefix; If last_sig_coeff_x_suffix exists, then LastSignificantCoeffX = (1 << ((last_sig_coeff_x_prefix >> 1) - 1)) * (2 + (last_sig_coeff_x_prefix & 1)) + last_sig_coeff_x_suffix; If the value of reverse_last_sig_coeff_flag is 1, then LastSignificantCoeffX = (1 << log2ZoTbWidth) - 1 - LastSignificantCoeffX; The value of the vertical coordinate of the last non-zero coefficient in the current block in the preset scanning order is derived as follows: If last_sig_coeff_y_suffix does not exist, then LastSignificantCoeffY = last_sig_coeff_y_prefix; If last_sig_coeff_y_suffix exists, then LastSignificantCoeffY = (1 << ((last_sig_coeff_y_prefix >> 1) - 1)) * (2 + (last_sig_coeff_y_prefix & 1)) + last_sig_coeff_y_suffix; If the value of reverse_last_sig_coeff_flag is 1, then LastSignificantCoeffY = (1 << log2ZoTbHeight) - 1 - LastSignificantCoeffY, Wherein, LastSignificantCoeffX represents the value of the horizontal coordinate of the last non-zero coefficient in the current block according to the preset scanning order, LastSignificantCoeffY represents the value of the vertical coordinate of the last non-zero coefficient in the current block according to the preset scanning order, last_sig_coeff_x_prefix represents the prefix information of the horizontal coordinate of the last non-zero coefficient, last_sig_coeff_y_prefix represents the prefix information of the vertical coordinate of the last non-zero coefficient, last_sig_coeff_x_suffix represents the suffix information of the horizontal coordinate of the last non-zero coefficient, last_sig_coeff_y_suffix represents the suffix information of the vertical coordinate of the last non-zero coefficient, and reverse_last_sig_coeff_flag represents the last non-zero coefficient position flipping identification information.
9. A decoder, the decoder includes a parsing unit and a second determination unit; wherein, The parsing unit is configured to Parse the bitstream to obtain sequence-level identification information; When the sequence-level identification information indicates that the video meets a preset condition, parse the bitstream to obtain the last non-zero coefficient position flipping identification information; Parse the bitstream to obtain the prefix information of the horizontal coordinate of the last non-zero coefficient, the prefix information of the vertical coordinate of the last non-zero coefficient, the suffix information of the horizontal coordinate of the last non-zero coefficient, and the suffix information of the vertical coordinate of the last non-zero coefficient; The second determination unit is configured to calculate the coordinate information of the last non-zero coefficient to determine the position of the last non-zero coefficient when the last non-zero coefficient position flipping identification information indicates that the current block uses the last non-zero coefficient position flipping, wherein the coordinate information of the last non-zero coefficient is the horizontal distance and the vertical distance between the position of the last non-zero coefficient and the lower right corner position of the current block; The parsing unit is further configured to decode all the coefficients before the position of the last non-zero coefficient according to a preset scanning order to determine the coefficients of the current block, Wherein, the value of the horizontal coordinate of the last non-zero coefficient in the current block according to the preset scanning order is derived as follows: If last_sig_coeff_x_suffix does not exist, then LastSignificantCoeffX = last_sig_coeff_x_prefix; If last_sig_coeff_x_suffix exists, then LastSignificantCoeffX = (1 << ((last_sig_coeff_x_prefix >> 1) - 1)) * (2 + (last_sig_coeff_x_prefix & 1)) + last_sig_coeff_x_suffix; If the value of reverse_last_sig_coeff_flag is 1, then LastSignificantCoeffX = (1 << log2ZoTbWidth) - 1 - LastSignificantCoeffX; The value of the vertical coordinate of the last non-zero coefficient in the current block in the preset scanning order is derived as follows: If last_sig_coeff_y_suffix does not exist, then LastSignificantCoeffY = last_sig_coeff_y_prefix; If last_sig_coeff_y_suffix exists, then LastSignificantCoeffY = (1 << ((last_sig_coeff_y_prefix >> 1) - 1)) * (2 + (last_sig_coeff_y_prefix & 1)) + last_sig_coeff_y_suffix; If the value of reverse_last_sig_coeff_flag is 1, then LastSignificantCoeffY = (1 << log2ZoTbHeight) - 1 - LastSignificantCoeffY, wherein, LastSignificantCoeffX represents the value of the horizontal coordinate of the last non-zero coefficient in the current block in the preset scanning order, LastSignificantCoeffY represents the value of the vertical coordinate of the last non-zero coefficient in the current block in the preset scanning order, last_sig_coeff_x_prefix represents the prefix information of the horizontal coordinate of the last non-zero coefficient, last_sig_coeff_y_prefix represents the prefix information of the vertical coordinate of the last non-zero coefficient, last_sig_coeff_x_suffix represents the suffix information of the horizontal coordinate of the last non-zero coefficient, last_sig_coeff_y_suffix represents the suffix information of the vertical coordinate of the last non-zero coefficient, and reverse_last_sig_coeff_flag represents the last non-zero coefficient position flip identification information.
10. A computer storage medium, wherein, The computer storage medium stores a computer program, and when the computer program is executed, it implements the method described in any one of claims 1 to 5, or implements the method described in claim 6 or 7.
Citation Information
Patent Citations
Devices and methods for context reduction in last significant coefficient position coding
CN104995919A
Method and device for entropy encoding, decoding video signal
CN110622510A
Coding of last significant coefficient flags
CN110710217A
Transform coefficient optimization method and device, coding and decoding method and device, medium and electronic equipment
CN112449184A
Residual signalling
GB2582929A