Search

CN-119893081-B - Method for encoding and decoding an image, and associated apparatus and system

CN119893081BCN 119893081 BCN119893081 BCN 119893081BCN-119893081-B

Abstract

The application relates to a method for encoding an image. In some embodiments, the method includes (i) determining a width and a height of a coded block in an image, (ii) if the width and the height are equal to N, determining a matrix-based intra-prediction (MIP) size identifier, the MIP size identifier indicating that a MIP prediction size is equal to N, where N is a positive integer power of 2, (iii) determining a set of reference samples of the coded block, and (iv) determining a MIP prediction value of the coded block based on the set of reference samples and a MIP matrix corresponding to the MIP size identifier.

Inventors

  • HUO JUNYAN
  • WAN SHUAI
  • MA YANZHUO
  • WANG HAIXIN
  • YANG FUZHENG

Assignees

  • OPPO广东移动通信有限公司

Dates

Publication Date
20260512
Application Date
20191210

Claims (20)

  1. 1. A method for encoding an image, comprising: determining the width and the height of the coding block; Determining a matrix-based intra-prediction (MIP) size identifier if the width and the height are equal to N, the MIP size identifier indicating that the MIP prediction size is equal to N, wherein N is a positive integer power of 2; determining a set of reference samples for the encoded block, and Determining a MIP prediction value for the encoded block based on the set of reference samples and a MIP matrix according to the MIP size identifier, comprising: Determining the MIP prediction value for the encoded block based on a set of reference samples, a shift offset parameter, and the MIP matrix according to the MIP size identifier; Wherein different MIP size identifiers correspond to the same shift offset parameter, wherein said shift offset parameter is a constant value; Wherein the method further comprises: Determining the set of reference samples for the encoded block based on neighboring samples; The prediction value of the coding block is set equal to the MIP prediction value of the coding block.
  2. 2. The method of claim 1, wherein the determining the MIP prediction value for the encoded block based on the set of reference samples and the MIP matrix according to the MIP size identifier further comprises: determining the MIP prediction value for the encoded block based on the equation: oW=(1<<(sW 1)) fO ( ), predMip[x][y]=((( ) + oW) > > sW) + pTemp [0], x is from 0 to "predSize 1", Y is from 0 to predSize 1”, Where "sW" is a shift number parameter, "fO" is a shift offset parameter, "inSize" indicates the number of reference samples used to determine the MIP predictor, "p [ i ]" indicates a reference sample, "predMip [ x ] [ y ]" indicates the MIP predictor, "mWeight [ i ] [ j ]" indicates a MIP weighting matrix, "predSize" indicates the size of the MIP prediction block, "pTemp [0]" indicates the 0 th value in the reference sample buffer, symbol "<" indicates a binary left shift operator, and symbol "> >" indicates a binary right shift operator.
  3. 3. The method of claim 2, further comprising: Downsampling the set of reference samples of the encoded block to obtain a reference sample buffer, the reference sample buffer containing the set of reference samples of the encoded block after downsampling; An input sample value is determined from the reference sample in the reference sample buffer, the MIP size identifier, and a luma bit depth.
  4. 4. A method according to claim 3, wherein said determining an input sample value from a reference sample in said reference sample buffer, said MIP size identifier, and a luma bit depth comprises: the input sampling value is obtained by deduction through the following formula: If the MIP size identifier is equal to 2, p [ x ] = pTemp [ x+1] pTemp[0]; If the MIP size identifier is less than 2, then Where "p [ x ]" represents a reference sample, "pTemp [ x ]" represents the xth value in the reference sample buffer, bitDepth is the luma bit depth.
  5. 5. The method of claim 4, wherein, In the case where the width and the height of the encoded block are equal to 4, the MIP size identifier is equal to 0; in the case where the width of the encoded block multiplied by the height is Nx4 or 4xN, the MIP size identifier is equal to 1; in the case where the width and the height of the encoded block are not equal to 4 and the width times the height of the encoded block are not Nx4 or 4xN, the MIP size identifier is equal to 2.
  6. 6. The method of claim 2, wherein the determining the MIP prediction value for the encoded block based on the set of reference samples and the MIP matrix according to the MIP size identifier further comprises: Determining the shift number parameter, and The MIP predictor of the encoded block is determined based on the set of reference samples, the shift number parameter and the MIP matrix according to the MIP size identifier.
  7. 7. The method of claim 6, wherein different MIP size identifiers correspond to the same number of shifts parameter.
  8. 8. The method of claim 6, wherein the shift number parameter is a constant value.
  9. 9. The method according to any of claims 6-8, wherein the shift number parameter is equal to 6.
  10. 10. The method of claim 1, wherein the encoded blocks comprise encoded blocks of size "8x 8".
  11. 11. The method of claim 1, wherein the neighboring samples comprise upper neighboring samples.
  12. 12. The method of claim 1, wherein the neighboring samples comprise left neighboring samples.
  13. 13. The method of claim 1, wherein the MIP prediction value comprises a value of a prediction sample of NxN.
  14. 14. A method for decoding an image, comprising: Determining the width, height and prediction mode of the decoding block; When the prediction mode indicates that the decoded block is decoded using a matrix-based intra-prediction (MIP) mode, determining a MIP size identifier if the width and the height are equal to N, the MIP size identifier indicating that a MIP prediction size is equal to N, wherein N is a positive integer power of 2; Determining a set of reference samples for the decoded block, and Determining, based on the set of reference samples and a MIP matrix corresponding to the MIP size identifier, a MIP prediction value for the decoded block, comprising: determining the MIP prediction value of the decoding block based on a set of reference samples, a shift offset parameter, and the MIP matrix corresponding to the MIP size identifier; Wherein different MIP size identifiers correspond to the same shift offset parameter, wherein said shift offset parameter is a constant value; Wherein the method further comprises: determining the set of reference samples for the decoding block based on neighboring samples; the prediction value of the decoded block is set equal to the MIP prediction value of the decoded block.
  15. 15. The method of claim 14, wherein the determining the MIP prediction value for the decoding block based on the set of reference samples and the MIP matrix corresponding to the MIP size identifier further comprises: Determining the MIP prediction value for the decoded block based on the equation: oW=(1<<(sW 1)) fO ( ), predMip[x][y]=((( ) + oW) > > sW) + pTemp [0], x is from 0 to "predSize 1", Y is from 0 to predSize 1”, Where "sW" is a shift number parameter, "fO" is a shift offset parameter, "inSize" indicates the number of reference samples used to determine the MIP predictor, "p [ i ]" indicates a reference sample, "predMip [ x ] [ y ]" indicates the MIP predictor, "mWeight [ i ] [ j ]" indicates a MIP weighting matrix, "predSize" indicates the size of the MIP prediction block, "pTemp [0]" indicates the 0 th value in the reference sample buffer, symbol "<" indicates a binary left shift operator, and symbol "> >" indicates a binary right shift operator.
  16. 16. The method of claim 15, further comprising: downsampling the set of reference samples of the decoding block to obtain a reference sample buffer, wherein the reference sample buffer contains the set of reference samples of the decoding block after downsampling; An input sample value is determined from the reference sample in the reference sample buffer, the MIP size identifier, and a luma bit depth.
  17. 17. The method of claim 16, wherein the determining an input sample value from the reference sample in the reference sample buffer, the MIP size identifier, and a luma bit depth comprises: the input sampling value is obtained by deduction through the following formula: If the MIP size identifier is equal to 2, p [ x ] = pTemp [ x+1] pTemp[0]; If the MIP size identifier is less than 2, then Where "p [ x ]" represents a reference sample, "pTemp [ x ]" represents the xth value in the reference sample buffer, bitDepth is the luma bit depth.
  18. 18. The method of claim 17, wherein, In the case where the width and the height of the decoding block are equal to 4, the MIP size identifier is equal to 0; in the case where the width multiplied by the height of the decoding block is Nx4 or 4xN, the MIP size identifier is equal to 1; In the case where the width and the height of the decoding block are not equal to 4 and the width times the height of the decoding block are not Nx4 or 4xN, the MIP size identifier is equal to 2.
  19. 19. The method of claim 15, wherein the determining the MIP prediction value for the decoding block based on the set of reference samples and the MIP matrix corresponding to the MIP size identifier further comprises: Determining the shift number parameter, and The MIP prediction value of the decoding block is determined based on the set of reference samples, the shift number parameter, and the MIP matrix corresponding to the MIP size identifier.
  20. 20. The method of claim 19, wherein different MIP size identifiers correspond to the same number of shifts parameter.

Description

Method for encoding and decoding an image, and associated apparatus and system Technical Field The present application relates to the field of telecommunications technology, and in particular to a method for encoding and decoding images (e.g. images or video). Background Multifunctional video coding (VERSATILE VIDEO CODING, VVC) is a next generation video compression standard used to replace current standards such as the high efficiency video coding standard (HEVC). The VVC coding standard provides higher coding quality than the current standard. To achieve this goal, various intra and inter prediction modes are considered. When these prediction modes are used, video can be compressed, so that data transmitted in a code stream (binary form) can be reduced. Matrix-based intra prediction (MIP) is one of these modes. MIP is an intra prediction mode. When implemented in MIP mode, an encoder (or codec) or decoder may predict an intra-predicted block based on a current block (e.g., a set of bits or numbers that are transmitted as a unit and may be encoded and/or decoded together). However, predicting such a prediction block may require a significant amount of computing resources and additional memory space. Accordingly, an improved method for solving this problem is advantageous and desirable. Disclosure of Invention In the current MIP mode, in order to generate a prediction block of the current block, the size of the prediction block is smaller than that of the current block. For example, a current block of "8x8" may have a predicted block of "4x 4". In the current MIP mode, a MIP prediction block smaller than the size of the current block is obtained by matrix calculation, which consumes less calculation resources than matrix calculation with a larger block. After matrix calculation, the MIP prediction block is up-sampled to obtain the intra-frame prediction block with the same size as the current block. For example, an intra-prediction block of "8x8" may be determined from a MIP prediction block of "4x4" by invoking an interpolated and/or extrapolated upsampling process. The application provides a method for realizing MIP mode without up-sampling process, thereby remarkably reducing the calculation complexity and improving the overall efficiency. More specifically, when the MIP mode is implemented, the present method determines an appropriate size identifier (or MIP size identifier) such that the size of the MIP prediction block (e.g., "8x 8") is the same as the size of the current block ("8 x 8"), and thus does not need to perform an upsampling process. The embodiment of the application provides a method for encoding an image. The method may also be applied to encode video comprising a sequence of images. The method includes, for example, (i) determining a width and a height of a coded block (e.g., a coded block) in an image, (ii) if the width and the height are "N" ("N" is a positive integer power of 2), determining a matrix-based intra prediction (matrix-based intra prediction, MIP) size identifier indicating that a MIP prediction size is equal to "N", (iii) determining a set of reference samples of the coded block (e.g., determined using neighboring samples of the coded block), and (iv) determining a MIP prediction value of the coded block using the set of reference samples and a MIP weight matrix according to the MIP size identifier, (v) setting the prediction value of the coded block to be equal to the MIP prediction value of the coded block. In some embodiments, the method further comprises generating a code stream based on the predicted value of the encoded block. According to another aspect of the present application, a method for decoding an image may include, for example, (a) parsing a bitstream to determine a width, a height, and a prediction mode (e.g., whether the bitstream indicates that a MIP mode is used) of a decoding block (e.g., the decoding block), (b) if the width and the height are "N" and the MIP mode is used, determining a MIP size identifier indicating that a MIP prediction size is equal to "N" ("N" is a positive integer power of 2), (c) determining a set of reference samples of the decoding block (e.g., determined using neighboring samples of the decoding block), (d) determining a MIP prediction value of the decoding block using the set of reference samples and a MIP weight matrix according to the MIP size identifier, (e) setting the MIP prediction value of the decoding block to be equal to the MIP prediction value of the decoding block. In some embodiments, the MIP prediction value may comprise a value of a prediction sample of "NxN" (e.g., "8x 8"). In some embodiments, the MIP matrix may be selected from a set of predefined MIP matrices. Another aspect of the application includes a system for encoding/decoding images and video. The system may include an encoding subsystem (or encoder) and a decoding subsystem (or decoder). The encoding subsystem includes a partitioning unit, a firs