| CPC H04N 19/139 (2014.11) [H04N 19/119 (2014.11); H04N 19/172 (2014.11); H04N 19/174 (2014.11); H04N 19/176 (2014.11); H04N 19/52 (2014.11)] | 15 Claims |

|
1. A method for prediction refinement with optical flow (PROF) for an affine coded block, comprising:
when a first indicator is set equal to true, performing a PROF process for a current sub-block of the affine coded block to obtain refined prediction sample values of the current sub-block of the affine coded block;
wherein when a plurality of constraint conditions for applying PROF are not fulfilled for the affine coded block, the first indicator is set equal to true; when one or more of the plurality of constraint conditions for applying PROF is fulfilled for the affine coded block, the first indicator is set equal to false;
wherein the plurality of constraint conditions for applying PROF comprises:
first indication information indicating that PROF is disabled for a picture containing the affine coded block; and
second indication information indicating no partition of the affine coded block;
wherein the performing the PROF process for the current sub-block of the affine coded block comprises:
obtaining a second prediction matrix, wherein the second prediction matrix is generated based on motion information of the current sub-block;
generating a horizontal prediction gradient matrix and a vertical prediction gradient matrix based on the second prediction matrix, wherein the horizontal prediction gradient matrix and the vertical prediction gradient matrix have a same size and a size of the second prediction matrix is greater than or equal to the size of the horizontal prediction gradient matrix and the vertical prediction gradient matrix;
calculating a delta prediction value of a current sample of the current sub-block based on a horizontal prediction gradient value of a current sample in the horizontal prediction gradient matrix, a vertical prediction gradient value of a current sample in the vertical prediction gradient matrix, and a difference between a motion vector of the current sample of the current sub-block and a motion vector of a center sample of the current sub-block; and
obtaining a refined prediction sample value of the current sample of the current sub-block based on the delta prediction value of the current sample and a prediction sample value of the current sample of the current sub-block.
|