BR-122025010182-A2 - Coefficient Decoding Method Applied to a Decoder, Coefficient Encoding Method Applied to an Encoder, Encoder, Decoder, and Computer Storage Media
Abstract
The embodiments of the present disclosure provide a coefficient coding method, an encoder, a decoder, and a computer storage medium. The method includes the following. A bitstream is analyzed to obtain a video flag. When the video flag indicates that a video satisfies a predefined condition, the bitstream is analyzed to obtain a reverse position flag of the last significant coefficient and coordinate information of a last significant coefficient. When the reverse position flag of the last significant coefficient indicates that a last significant coefficient position is reversed for a current block, the last significant coefficient position is determined by calculation with the coordinate information of the last significant coefficient. According to a predefined scan order, all coefficients before the last significant coefficient position are decoded to determine the coefficients of the current block. As such, the throughput and speed of coefficient coding can be improved, and at the same time, compression efficiency is improved in video coding scenarios with high bit depth, high bit rate, high quality, or lossless compression.
Inventors
- Fan Wang
- Zhihuang XIE
Assignees
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP., LTD.
Dates
- Publication Date
- 20260310
- Application Date
- 20210412
Claims (10)
- 1. COEFFICIENT DECODING METHOD APPLIED TO A DECODER characterized by comprising: analyzing a bitstream to obtain a sequence-level flag; analyzing the bitstream to obtain a reverse position flag of the last significant coefficient when the sequence-level flag indicates that a video satisfies a predefined condition; analyzing the bitstream to obtain prefix information of a horizontal coordinate of a last significant coefficient, prefix information of a vertical coordinate of the last significant coefficient, suffix information of the horizontal coordinate of the last significant coefficient, and suffix information of the vertical coordinate of the last significant coefficient; determining the horizontal coordinate of the last significant coefficient according to the prefix information of the horizontal coordinate of the last significant coefficient and the suffix information of the horizontal coordinate of the last significant coefficient; determining the vertical coordinate of the last significant coefficient according to the prefix information of the vertical coordinate of the last significant coefficient and the suffix information of the vertical coordinate of the last significant coefficient; and determine the coordinate information of the last significant coefficient according to the horizontal coordinate of the last significant coefficient and the vertical coordinate of the last significant coefficient; when the reverse position flag of the last significant coefficient indicates that the position of the last significant coefficient is reversed for a current block, determine a position of the last significant coefficient by calculation with the coordinate information of the last significant coefficient, wherein the coordinate information of the last significant coefficient is a horizontal distance and a vertical distance from the position of the last significant coefficient to a lower right corner of the current block; and decode all coefficients before the position of the last significant coefficient to determine the coefficients of the current block, wherein a value of the horizontal coordinate of the last significant coefficient in a predefined scan order within the current block is derived as follows: if last_sig_coeff_x_suffix is not present, then: LastSignificantCoeffX = last_sig_coeff_x_prefix; If `last_sig_coeff_x_suffix` is present, then: `LastSignificantCoeffX = (1<<((last_sig_coeff_x_prefix>>1) -1)) * (2+(last_sig_coeff_x_prefix&1)) + last_sig_coeff_x_suffix;` and if `reverse_last_sig_coeff_flag` is equal to 1, then: `LastSignificantCoeffX = (1<<log2ZoTbWidth) -1-LastSignificantCoeffX;` and a vertical coordinate value of the last significant coefficient in a predefined scan order within the current block is derived as follows: if `last_sig_coeff_y_suffix` is not present, then: `LastSignificantCoeffY = last_sig_coeff_y_prefix;` if last_sig_coeff_y_suffix is present, then: LastSignificantCoeffY= (1<<((last_sig_coeff_y_prefix>>1) -1)) * (2+(last_sig_coeff_y_prefix&1)) + last_sig_coeff_y_suffix; and if reverse_last_sig_coeff_flag is equal to 1, then: LastSignificantCoeffY= (1<<log2ZoTbHeight) -1-LastSignificantCoeffY; where LastSignificantCoeffX represents the horizontal coordinate value of the last significant coefficient in the predefined scan order within the current block, LastSignificantCoeffY represents the vertical coordinate value of the last significant coefficient in the predefined scan order within the current block, last_sig_coeff_x_prefix represents the prefix information of the horizontal coordinate of the last significant coefficient, last_sig_coeff_y_prefix represents the prefix information of the vertical coordinate of the last significant coefficient, last_sig_coeff_x_suffix represents the suffix information of the horizontal coordinate of the last significant coefficient, last_sig_coeff_y_suffix represents the suffix information of the vertical coordinate of the last significant coefficient, and reverse_last_sig_coeff_flag represents the reverse position flag of the last significant coefficient.
- 2. METHOD, according to claim 1, characterized by further comprising: determining the position of the last significant coefficient directly according to the coordinate information of the last significant coefficient when the reverse position flag of the last significant coefficient indicates that the position of the last significant coefficient is not reversed for the current block; and decoding all coefficients before the position of the last significant coefficient to determine the coefficients of the current block.
- 3. METHOD, according to claim 1, characterized by further comprising: when the sequence level flag has a first value, determining that the sequence level flag indicates that the video satisfies the predefined condition; or when the sequence level flag has a second value, determining that the sequence level flag indicates that the video does not satisfy the predefined condition.
- 4. METHOD, according to claim 3, characterized by the predefined condition comprising at least one of: high bit depth, high quality, high bit rate, high frame rate or lossless compression.
- 5. METHOD, according to claim 1, characterized by further comprising: when the reverse position flag of the last significant coefficient has a first value, determining that the reverse position flag of the last significant coefficient indicates that the position of the last significant coefficient is reversed for the current block; or when the reverse position flag of the last significant coefficient has a second value, determining that the reverse position flag of the last significant coefficient indicates that the position of the last significant coefficient is not reversed for the current block.
- 6. METHOD, according to claim 1, characterized by determining the position of the last significant coefficient by calculation with the coordinate information of the last significant coefficient, comprises: determining a width and a height of the current block; obtaining a horizontal coordinate of the last significant coefficient by subtracting, from the width of the current block, the horizontal distance from the position of the last significant coefficient to the lower right corner of the current block; obtaining a vertical coordinate of the last significant coefficient by subtracting, from the height of the current block, the vertical distance from the position of the last significant coefficient to the lower right corner of the current block; and determining the position of the last significant coefficient according to the horizontal coordinate of the last significant coefficient and the vertical coordinate of the last significant coefficient.
- 7. COEFFICIENT CODING METHOD APPLIED TO AN ENCODER characterized by comprising: determining a sequence-level flag and a last significant coefficient position; determining a last significant coefficient reverse position flag when the sequence-level flag indicates that a video satisfies a predefined condition; determining the last significant coefficient coordinate information according to the last significant coefficient position and the last significant coefficient reverse position flag, wherein the last significant coefficient coordinate information is determined as a horizontal distance and a vertical distance from the last significant coefficient position to a lower-right corner of the current block when the last significant coefficient reverse position flag indicates that the last significant coefficient position is reversed for a current block; determining last significant coefficient horizontal coordinate prefix information, last significant coefficient vertical coordinate prefix information, last significant coefficient horizontal coordinate suffix information, and last significant coefficient vertical coordinate suffix information according to last significant coefficient coordinate information; and encode all coefficients before the position of the last significant coefficient and signal the bit information obtained by encoding, the sequence level flag, the horizontal coordinate prefix information of the last significant coefficient, the vertical coordinate prefix information of the last significant coefficient, the horizontal coordinate suffix information of the last significant coefficient, and the vertical coordinate suffix information of the last significant coefficient in a bitstream, wherein a value of the horizontal coordinate of the last significant coefficient in a predefined scan order within a current block is derived as follows: if last_sig_coeff_x_suffix is not present, then: LastSignificantCoeffX = last_sig_coeff_x_prefix; If `last_sig_coeff_x_suffix` is present, then: `LastSignificantCoeffX = (1<<((last_sig_coeff_x_prefix>>1) -1)) * (2+(last_sig_coeff_x_prefix&1)) + last_sig_coeff_x_suffix;` and if `reverse_last_sig_coeff_flag` is equal to 1, then: `LastSignificantCoeffX = (1<<log2ZoTbWidth) -1-LastSignificantCoeffX;` and a vertical coordinate value of the last significant coefficient in a predefined scan order within the current block is derived as follows: if `last_sig_coeff_y_suffix` is not present, then: `LastSignificantCoeffY = last_sig_coeff_y_prefix;` if last_sig_coeff_y_suffix is present, then: LastSignificantCoeffY= (1<<((last_sig_coeff_y_prefix>>1) -1)) * (2+(last_sig_coeff_y_prefix&1)) + last_sig_coeff_y_suffix; and if reverse_last_sig_coeff_flag is equal to 1, then: LastSignificantCoeffY= (1<<log2ZoTbHeight) -1-LastSignificantCoeffY; where LastSignificantCoeffX represents the horizontal coordinate value of the last significant coefficient in the predefined scan order within the current block, LastSignificantCoeffY represents the vertical coordinate value of the last significant coefficient in the predefined scan order within the current block, last_sig_coeff_x_prefix represents the prefix information of the horizontal coordinate of the last significant coefficient, last_sig_coeff_y_prefix represents the prefix information of the vertical coordinate of the last significant coefficient, last_sig_coeff_x_suffix represents the suffix information of the horizontal coordinate of the last significant coefficient, last_sig_coeff_y_suffix represents the suffix information of the vertical coordinate of the last significant coefficient, and reverse_last_sig_coeff_flag represents the reverse position flag of the last significant coefficient.
- 8. ENCODER characterized by comprising a processor and a memory that stores a computer program which, when executed by the processor, causes the processor to execute the method as defined in claim 7.
- 9. DECODER characterized by comprising a processor and a memory that stores a computer program which, when executed by the processor, causes the processor to execute the method as defined in any one of claims 1 to 6.
- 10. COMPUTER-READABLE STORAGE MEDIA characterized by storing a bitstream and a computer program that, when executed by a processor, causes the processor to implement the method, as defined in claim 7, to generate the bitstream.
Description
FIELD OF TECHNIQUE [001] The embodiments of the present disclosure relate to the field of video coding technology and, in particular, to a coefficient coding method, an encoder, a decoder and a computer storage medium. BACKGROUND [002] Fields related to computer vision have been receiving increasing attention as people demand higher quality video display. In recent years, image processing technology has had successful applications in all spheres of life. In a video image encoding process, on one side of the encoding, the image data to be encoded is transformed and quantized, and then subjected to compression encoding by an entropy encoding unit, and a bitstream generated from the entropy encoding will be transmitted to a decoding side. On the decoding side, the bitstream is analyzed, and then inverse quantization and inverse transformation are performed so that the original input image data can be recovered. [003] Currently, compared to low bit-depth, low-quality, low-bitrate video encoding (referred to as “conventional video”), high bit-depth, high-quality, high-bitrate video encoding (referred to as “triple-high video”) generally requires encoding more and higher coefficients. In this case, using existing related solutions for triple-high video may result in higher overhead and waste, and may even affect encoding speed and throughput. SUMMARY [004] The embodiments of the present disclosure provide a coefficient coding method, an encoder, a decoder, and a computer storage medium, which can improve the throughput and speed of coefficient coding, while improving compression efficiency in high bit depth, high bit rate, high quality or lossless video coding scenarios. [005] The technical solutions of the modalities of the present disclosure can be achieved in the following way. [006] In a first aspect, a coefficient decoding method is provided in revelation modes, which is applied to a decoder and includes the following. A bitstream is analyzed to obtain a video flag. When the video flag indicates that a video satisfies a predefined condition, the bitstream is analyzed to obtain a reverse position flag of the last significant coefficient and coordinate information of a last significant coefficient. When the reverse position flag of the last significant coefficient indicates that a position of the last significant coefficient is reversed for a current block, the position of the last significant coefficient is determined by calculation with the coordinate information of the last significant coefficient. According to a predefined scan order, all coefficients before the position of the last significant coefficient are decoded to determine the coefficients of the current block. [007] In a second aspect, a coefficient encoding method is provided in revelation modes, which is applied to an encoder and includes the following. A video flag and a last significant coefficient position are determined. When the video flag indicates that a video satisfies a predefined condition, a reverse last significant coefficient position flag is determined. The coordinate information of the last significant coefficient is determined according to the position of the last significant coefficient and the reverse last significant coefficient position flag. All coefficients before the last significant coefficient position are encoded according to a predefined scan order, and the bit information obtained by encoding, the video flag, and the last significant coefficient coordinate information are signaled in a bitstream. [008] In a third aspect, an encoder is provided in embodiments of the present disclosure. The encoder includes a first determination unit and an encoding unit. The first determination unit is configured to determine a video flag and a last significant coefficient position and to determine a last significant coefficient position inversion flag when the video flag indicates that a video satisfies a predefined condition. The first determination unit is further configured to determine last significant coefficient coordinate information according to the last significant coefficient position and the last significant coefficient position inversion flag. The encoding unit is configured to encode all coefficients before the last significant coefficient position according to a predefined scan order and the signal bit information obtained by encoding, the video flag, and the last significant coefficient coordinate information into a bitstream. [009] In a fourth aspect, an encoder is provided in embodiments of the present disclosure. The encoder includes a first memory and a first processor. The first memory is configured to store a computer program executable in the first processor. The first processor is configured to execute the method of the second aspect during execution of the computer program. [0010] In a fifth aspect, a decoder is provided in embodiments of the present disclosure. The decoder includes an analysis unit and a secon