| CPC H04N 19/11 (2014.11) [H04N 19/176 (2014.11); H04N 19/593 (2014.11)] | 20 Claims |

|
1. A method for intra prediction, applied to a decoder, comprising:
acquiring a prediction mode parameter of a current block, the prediction mode parameter indicating that a template-based intra mode derivation (TIMD) is used to determine an intra prediction value of the current block;
determining first weights of at least two prediction modes on a first unit of the current block, respectively, and determining second weights of the at least two prediction modes on a second unit of the current block, respectively; wherein coordinates of the first unit and coordinates of the second unit are different in a first direction;
determining first change rates of the at least two prediction modes in the first direction based on the first weights, the second weights, the coordinates of the first unit and the coordinates of the second unit;
determining fourth weights of the at least two prediction modes on a fourth unit based on the first change rates and coordinates of the fourth unit; and
determining the intra prediction value of the current block based on the first weights, the second weights and the fourth weights.
|