CPC H04N 19/105 (2014.11) [H04N 19/132 (2014.11); H04N 19/159 (2014.11); H04N 19/176 (2014.11)] | 14 Claims |
1. A method for decoding a picture, comprising:
parsing a bitstream to determine a width, a height and a prediction mode of a coding block;
when the prediction mode indicates a matrix-based intra prediction (MIP) mode is used in decoding the coding block, if the width and the height are equal to N, determining an MIP size identifier indicating that an MIP prediction size equal to N, wherein N is a positive integer power of 2;
deriving a group of reference samples of the coding block; and
deriving an MIP prediction of the coding block based on the group of reference samples and an MIP matrix corresponding to the MIP size identifier by:
deriving the MIP prediction of the coding block based on following equations:
oW=(1<<(sW−1))−fO*(Σi=0inSize−1p[i]), and
predMip[x][y]=(((Σi=0inSize−1mWeight[i][y*predSize+x]*p[i])+oW)>>sW)+pTemp[0], for x from 0 to “predSize−1”, for y from 0 to “predSize−1”,
wherein “sW” represents a shifting number parameter, “fO” represents a shifting offset parameter, “oW” represents a parameter based on the shifting offset parameter and the shifting number parameter, “inSize” represents a variable indicating the number of reference samples used in deriving the MIP prediction, “p[i]” represents a reference sample, “predMip[x][y]” represents the MIP prediction, “mWeight[i][j]” represents an MIP weighting matrix, “predSize” represents a size of the MIP prediction, “pTemp[0]” represents the 0-th value in a reference sample buffer, symbol “<<” represents a binary left shifting operator, and symbol “>>” represents a binary right shifting operator;
determining the shifting number parameter; and
deriving the MIP prediction of the coding block based on the group of reference samples, the shifting number parameter, and the MIP matrix according to the MIP size identifier, wherein different MIP size identifiers correspond to the same shifting number parameter, and the shifting number parameter is a constant equal to 6.
|