| CPC H04N 19/137 (2014.11) [H04N 19/105 (2014.11); H04N 19/132 (2014.11); H04N 19/176 (2014.11)] | 6 Claims |

|
1. A method of bi-directional optical flow (BDOF) for encoding a video signal, comprising:
obtaining a first reference picture and a second reference picture associated with a video block, wherein the first reference picture is before a current picture and the second reference picture is after the current picture in display order;
obtaining first prediction samples of the video block from the first reference picture;
obtaining second prediction samples of the video block from the second reference picture;
obtaining padded prediction samples, and obtaining horizontal and vertical gradient values of the first prediction samples and the second prediction samples based on the padded prediction samples, comprising:
deriving rows and columns of prediction samples outside the video block for the first prediction samples;
deriving rows and columns of prediction samples outside the video block for the second prediction samples; and
obtaining horizontal and vertical gradient values of the first prediction samples and the second prediction samples based on the derived rows and columns of prediction samples,
wherein deriving the rows and columns of the prediction samples further comprises:
deriving a first part of prediction samples from integer reference samples in the reference picture left to a fractional sample position, and deriving a second part of prediction samples from integer reference samples in the reference picture above a fractional sample position; or
deriving a third part of prediction samples from integer reference samples in the reference picture that are closest to a fractional sample position in a horizontal direction, and deriving a fourth part of prediction samples from integer reference samples in the reference picture that are closest to a fractional sample position in a vertical direction;
obtaining motion refinements for samples in the video block based on the horizontal and vertical gradient values; and
obtaining bi-prediction samples of the video block based on the motion refinements.
|