| CPC H04N 19/132 (2014.11) [G06F 5/01 (2013.01); G06F 17/16 (2013.01); H04N 19/159 (2014.11); H04N 19/176 (2014.11); H04N 19/186 (2014.11)] | 12 Claims |

|
1. A method for colour component prediction, applicable for an encoder and comprising:
determining prediction parameters of a current block, the prediction parameters comprising a prediction mode parameter;
when the prediction mode parameter indicates that a Matrix-based Intra Prediction (MIP) mode is adopted to determine an intra prediction value of the current block, determining an MIP weight matrix of the current block, a shift factor of the current block and an MIP input sample matrix of the current block; and
determining the intra prediction value of the current block according to the MIP weight matrix, the shift factor and the MIP input sample matrix,
wherein the MIP weight matrix of the current block is at least determined according to a block size index value of the current block;
when both a width and a height of the current block are equal to 4, setting the block size index value of the current block equal to 0;
when both the width and height of the current block are equal to 8 or only one of the width and height of the current block is equal to 4, setting the block size index value of the current block equal to 1; or
when both the width and height of the current block do not meet the above conditions, setting the block size index value of the current block equal to 2,
wherein determining the intra prediction value of the current block according to the MIP weight matrix, the shift factor and the MIP input sample matrix comprises:
performing matrix multiplication processing on the MIP input sample matrix, the MIP weight matrix and the shift factor by use of a preset calculation model to obtain an MIP-based prediction block of the current block.
|