JP-7856803-B2 - Encoding method, decoding method, encoder, decoder, and storage medium
Inventors
- フオ、チュンイェン
- ワン、シューアイ
- マー、イェンチュオ
Assignees
- オッポ広東移動通信有限公司
Dates
- Publication Date
- 20260511
- Application Date
- 20250116
- Priority Date
- 20200108
Claims (16)
- An encoding method applied to an encoder, wherein the encoding method is Determining the prediction parameters of the current block, wherein the prediction parameters include a prediction mode parameter and a size parameter of the current block. When the prediction mode parameter indicates that matrix-based intra prediction (MIP) is used to determine the intra-predicted value of the saturation component of the current block, Based on the size parameters of the current block, the block size index value of the current block is determined, Determining the adjacent sample values of the current block, The first temporary reference value is determined by downsampling the adjacent sample values of the current block, The MIP input sample value of the current block is determined based on the first temporary reference value, When the block size index value of the current block is within a preset range, the value corresponding to index 0 in the MIP input sample value is set to the difference between a second constant value and the value corresponding to index 0 in the first temporary reference value, and the value corresponding to index i in the MIP input sample value is set to the difference between the value corresponding to index i in the first temporary reference value and the value corresponding to index 0 in the first temporary reference value, wherein i is an integer greater than 0. If the block size index value of the current block is outside the preset range, the value corresponding to index j in the MIP input sample value is set to the difference between the value corresponding to index (j+1) in the first temporary reference value and the value corresponding to index 0 in the first temporary reference value, wherein j is an integer greater than or equal to 0. Based on the MIP input sample values, MIP weighting matrix, shift offset parameter, and shift number parameter, the MIP predicted value of the saturation component of the current block is determined. By filtering the MIP predicted values, the intra-predicted value of the saturation component of the current block is determined, Based on the intra-predicted value of the saturation component of the current block, the predicted residual value of the saturation component of the current block is determined. The first transformation coefficient is determined by performing a first transformation on the predicted residual value, Based on the decision to perform low-frequency non-separable transformation (LFNST) on at least some of the first transformation coefficients, the LFNST coefficients are determined by performing LFNST on at least some of the first transformation coefficients. Determining the LFNST index value, The process includes encoding the LFNST index and the LFNST coefficient, and writing the encoded LFNST index and the encoded LFNST coefficient to a bitstream. An encoding method characterized by the following.
- Determining the predicted MIP value of the saturation component of the current block based on the MIP input sample value, the MIP weighting matrix, the shift offset parameter, and the shift number parameter is: The product of the sum of the MIP input sample values and the value of the shift offset parameter is determined, The first offset value is set to the difference between the first constant value and the product thereof, Based on the aforementioned prediction parameters, the MIP weighting matrix for the current block is determined, Calculate the first weighted sum of the MIP weighting matrix and the MIP input sample values, Calculate the first sum of the first weighted sum and the first offset, The first right-shift value is determined by performing a binary right-shift on the first sum, wherein the number of bits shifted to the right is equal to the value of the shift number parameter. The method of setting the MIP prediction value of the saturation component of the current block to the sum of the first right-shifted value and the value corresponding to index 0 in the first temporary reference value, wherein the first temporary reference value is obtained by downsampling the adjacent sample value of the current block, The encoding method according to feature 1.
- Determining the block size index value of the current block based on the size parameter of the current block is: When the condition is met that the width and height of the current block are both equal to 4, the block size index value of the current block is determined to be 0. The block size index value of the current block is determined to be 1 if the conditions are met that the width and height of the current block are both equal to 8 , or that one of the width and height of the current block is equal to 4. If the width and height of the current block do not satisfy the two conditions above, the block size index value of the current block is determined to be 2. including, The encoding method according to feature 1.
- The second constant value is equal to 1 << (BitDepth - 1), where BitDepth is the bit depth of the saturation component of the current block. The encoding method according to feature 1.
- The value of the aforementioned shift number parameter is set to 6. The first constant value is set to 32, The value of the shift offset parameter is set to 32. The encoding method according to feature 2.
- Encoding the LFNST coefficients and writing the encoded LFNST coefficients to a bitstream is, The quantization coefficient is determined by quantizing the LFNST coefficient, The process includes encoding the quantization coefficients and writing the encoded quantization coefficients to the bitstream. The encoding method according to feature 1.
- A decoding method applied to a decoder, wherein the decoding method is The bitstream is analyzed to obtain the prediction parameters and low-frequency non-separable transform (LFNST) index of the current block, wherein the prediction parameters include the prediction mode parameter and the size parameter of the current block. When the prediction mode parameter indicates that matrix-based intra prediction (MIP) is used to determine the intra-predicted value of the saturation component of the current block, Based on the size parameters of the current block, the block size index value of the current block is determined, Determining the adjacent sample values of the current block, Determining a first temporary reference value by downsampling the adjacent sample values of the current block, and determining the MIP input sample value of the current block based on the first temporary reference value, When the block size index value of the current block is within a preset range, the value corresponding to index 0 in the MIP input sample value is set to the difference between a second constant value and the value corresponding to index 0 in the first temporary reference value, and the value corresponding to index i in the MIP input sample value is set to the difference between the value corresponding to index i in the first temporary reference value and the value corresponding to index 0 in the first temporary reference value, wherein i is an integer greater than 0. If the block size index value of the current block is outside the preset range, the value corresponding to index j in the MIP input sample value is set to the difference between the value corresponding to index (j+1) in the first temporary reference value and the value corresponding to index 0 in the first temporary reference value, wherein j is an integer greater than or equal to 0. Based on the MIP input sample values, MIP weighting matrix, shift offset parameter, and shift number parameter, the MIP predicted value of the saturation component of the current block is determined. By filtering the MIP predicted values, the intra-predicted value of the saturation component of the current block is determined, The reconstruction transformation coefficients of the current block are determined, When the LFNST index indicates that the LFNST should be performed on the current block, the second transformation coefficient is determined by performing the LFNST on at least some of the reconstruction transformation coefficients. The reconstruction residual value of the saturation component of the current block is determined by performing the first transformation on the second transformation coefficient, This includes determining the reconstructed value of the saturation component of the current block based on the intra-predicted value and the reconstructed residual value of the saturation component of the current block, A decryption method characterized by the following:
- Determining the predicted MIP value of the saturation component of the current block based on the MIP input sample value, the MIP weighting matrix, the shift offset parameter, and the shift number parameter is: The product of the sum of the MIP input sample values and the value of the shift offset parameter is determined, The first offset value is set to the difference between the first constant value and the product thereof, Based on the aforementioned prediction parameters, the MIP weighting matrix for the current block is determined, Calculate the first weighted sum of the MIP weighting matrix and the MIP input sample values, Calculate the first sum of the first weighted sum and the first offset, The first right-shift value is determined by performing a binary right-shift on the first sum, wherein the number of bits shifted to the right is equal to the value of the shift number parameter. The method of setting the MIP prediction value of the saturation component of the current block to the sum of the first right-shifted value and the value corresponding to index 0 in the first temporary reference value, wherein the first temporary reference value is obtained by downsampling the adjacent sample value of the current block, The decryption method according to feature 7.
- Determining the block size index value of the current block based on the size parameter of the current block is: When the condition is met that the width and height of the current block are both equal to 4, the block size index value of the current block is determined to be 0. The block size index value of the current block is determined to be 1 if the conditions are met that the width and height of the current block are both equal to 8 , or that one of the width and height of the current block is equal to 4. If the width and height of the current block do not satisfy the two conditions above, the block size index value of the current block is determined to be 2. including, The decryption method according to feature 7.
- The second constant value is equal to 1 << (BitDepth - 1), where BitDepth is the bit depth of the saturation component of the current block. The decryption method according to feature 7.
- The value of the aforementioned shift number parameter is set to 6. The first constant value is set to 32, The value of the shift offset parameter is set to 32. The decryption method according to feature 8.
- Analyzing the bitstream to obtain the LFNST index is If the value of the LFNST index is greater than 0, it is decided to perform the LFNST on the current block. This includes deciding not to perform the LFNST on the current block if the value of the LFNST index is equal to 0. The decryption method according to feature 7.
- Determining the reconstruction transformation coefficient of the current block is: Analyzing the bitstream to obtain the quantization coefficient of the current block, This includes obtaining the reconstruction transformation coefficients of the current block by scaling the quantization coefficients, The decryption method according to feature 7.
- A decoder including at least one processor and memory, The memory is connected to the at least one processor and stores at least one computer-executable instruction, and when the at least one computer-executable instruction is executed by the at least one processor, it causes the at least one processor to execute the decoding method according to any one of claims 7 to 13. A decoder characterized by the following features.
- An encoder comprising at least one processor and memory, The memory is connected to the at least one processor and stores at least one computer-executable instruction, and the at least one computer-executable instruction is executed by the at least one processor, causing the at least one processor to execute the encoding method according to any one of claims 1 to 6. An encoder characterized by the following features.
- A method for transmitting a bitstream, The bitstream is generated by performing the encoding method described in any one of claims 1 to 6, The transmission of the aforementioned bitstream, including, A method for transmitting a bitstream characterized by the following.
Description
[Reference to related applications] This application claims priority to U.S. Provisional Application No. 62/958,582, titled "VIDEO ENCODEING AND DECODEING METHOD, APPARATUS AND COMMUNICATION SYSTEM," filed on 8 January 2020 in the names of Junyan Huo, Shuai Wan, and Yanzhuo Ma, the entire contents of which are incorporated into this application by reference. Embodiments of the present invention relate to the technical field of video encoding, and more particularly to encoding methods, decoding methods, encoders, decoders, and storage media. As people's demands for higher video display quality increase, new video application forms such as high-definition and ultra-high-definition video are emerging. H.265/High Efficiency Video Coding (HEVC) is no longer able to meet the needs of these rapidly evolving video applications. Therefore, JVET (Joint Video Exploration Team) has proposed H.266/Versatile Video Coding (VVC), a next-generation video coding standard. In H.266/VVC, Matrix-based Intra Prediction (MIP) is one intra prediction mode used to obtain the intra-predicted block of the current block. Next, the prediction residual of the current block is determined using the Low-Frequency Non-Separable Transform (LFNST) technique. However, there is a challenge in that the LFNST technique negatively impacts the coding efficiency of VVC when applied to MIP mode prediction. In embodiments of the present invention, an encoding method, a decoding method, an encoder, a decoder, and a storage medium capable of improving encoding and decoding efficiency are provided. The technical solutions of the embodiments of the present invention can be realized as follows: In the first embodiment of the present invention, an encoding method applicable to an encoder is provided. This method may include the following: Determine the prediction parameters for the current block. These prediction parameters include the prediction mode parameters. If the prediction mode parameter indicates that the intra-predicted value of the saturation component of the current block will be determined using matrix-based intra-prediction (MIP) mode, the adjacent sample values of the current block are obtained, and the MIP input sample values of the current block are determined based on the adjacent sample values of the current block. Based on the MIP input sample values, MIP weighting matrix, and shift parameters, the MIP predicted value for the saturation component of the current block is determined. The MIP predicted value is the predicted value for a subset of samples in the saturation component of the current block. By filtering the MIP prediction values, the intra-predicted value of the saturation component of the current block is determined. Based on the intra-predicted value of the current block's saturation component, the predicted residual value of the current block's saturation component is determined. The LFNST parameters are determined by performing a low-frequency non-separable transform (LFNST) on the predicted residual values. Encode the LFNST parameters and write them to the bitstream. In a second embodiment of the present invention, a decoding method applied to a decoder is provided. This method may include the following: The bitstream is analyzed to obtain the prediction parameters and low-frequency unseparated transform (LFNST) parameters for the current block. The prediction parameters include the prediction mode parameters. If the prediction mode parameter indicates that the matrix-based intra-prediction (MIP) mode is used to determine the intra-predicted value of the saturation component of the current block, the adjacent sample values of the current block are obtained, and the MIP input sample values of the current block are determined based on the adjacent sample values of the current block. Based on the MIP input sample values, MIP weighting matrix, and shift parameters, the MIP predicted value for the saturation component of the current block is determined. The MIP predicted value is the predicted value for a subset of samples in the saturation component of the current block. By filtering the MIP prediction values, the intra-predicted value of the saturation component of the current block is determined. If the LFNST parameter indicates that LFNST should be performed on the current block, the reconstruction transformation coefficient block of the current block is determined, and a second transformation coefficient block is obtained by performing LFNST on at least some of the reconstruction transformation coefficients in the reconstruction transformation coefficient block. By performing the first transformation on the second transformation coefficient block, the reconstructed residual block of the saturation component of the current block is obtained. Based on the intra-predicted value of the current block's saturation component and the reconstructed residual block, the reconstructed block of the current block's saturation component