| CPC H04N 19/513 (2014.11) [H04N 19/176 (2014.11); H04N 19/96 (2014.11)] | 18 Claims |

|
1. A method for video encoding in an encoder, the method comprising:
encoding a first block in a picture;
when the first block is encoded according to bi-directional prediction,
adding motion information of the first block and a first bi-prediction weight index of the first block as a History-based Motion Vector Prediction (HMVP) candidate to an HMVP list, the first bi-prediction weight index indicating bi-prediction weights used for performing the bi-directional prediction for the first block;
when the first block is encoded according to uni-directional prediction,
the first bi-prediction weight index indicates equal bi-prediction weights;
encoding a second block in the picture based on a plurality of candidates that includes the HMVP candidate; and
when the second block is encoded according to the bi-directional prediction,
storing the motion information of the HMVP candidate as a merge candidate, and
setting a second bi-prediction weight index to the first bi-prediction weight index.
|