A non-transitory computer readable storage medium, storing executable instructions, the executable instructions, when executed by a processor of an electronic device, causing the electronic device to implement a video encoding method including:
- decoding a bitstream to obtain a first flag, a first index value, and a second index value, the first flag being used for identifying whether to use an intra weighted prediction mode for a current block;
- determining a target intra prediction mode in a first intra prediction mode list according to the first index value and a target weighting list in a weighting list set according to the second index value, in response to a value of the first flag satisfying a first preset condition;
- determining reference samples of a first category and reference samples of a second category according to reference samples corresponding to the current block, and weighting the reference samples of the first category and the reference samples of the second category based on the target weighting list to obtain weighted reference samples;
- and
- predicting samples the in the current block according to the weighted reference samples and the target intra prediction mode to obtain predicted samples of the current block.