| CPC H04N 19/80 (2014.11) [H04N 19/105 (2014.11); H04N 19/117 (2014.11); H04N 19/122 (2014.11); H04N 19/132 (2014.11); H04N 19/139 (2014.11); H04N 19/172 (2014.11); H04N 19/176 (2014.11); H04N 19/61 (2014.11); H04N 19/85 (2014.11)] | 18 Claims |

|
1. A method for coding a video implemented in an encoder or a decoder including an enhanced interpolation filter (EIF) for motion compensation, the method comprising:
determining control point motion vectors (CPMVs) for a block according to affine inter-prediction, the block being an affine block or a sub-block of the affine block;
determining a reference area from a reference frame for a sub-block of the block, the sub-block of the block having a predefined sub-block size according to values of the CPMVs, the reference frame separate from the sub-block;
comparing a size of the determined reference area with a predefined threshold;
applying the EIF for motion compensation, comprising deriving a pixel-based motion vector field for the block;
wherein the determined reference area is larger than the predefined threshold, and deriving the pixel-based motion vector field for the block further comprises motion vector clipping,
wherein a motion vector clipping range for the motion vector clipping is determined based on a motion model of the block and a size of the block,
wherein the predefined sub-block size for the EIF is equal to 4×4; wherein dX[0] corresponds to dHorX, dX[1] corresponds to dHorY, dY[0] corresponds to dVerX and dY[1] corresponds to dVerY; wherein determining the reference area for the sub-block with predefined sub-block size according to values of the CPMVs comprises:
setting the value of a variable eifSubblockSize equal to 4;
deriving a variable eifCanBeApplied as follows:
setting the value of eifCanBeApplied to TRUE;
deriving the arrays X[i], Y[i] as follows:
X[0]=0;
X[1]=(eifSubblockSize+1)*(dX[0]+(1<<9));
X[2]=(eifSubblockSize+1)*dY[0];
X[3]=X[1]+X[2];
Y[0]=0;
Y[1]=(eifSubblockSize+1)*dX[1];
Y[2]=(eifSubblockSize+1)*(dY[1]+(1<<9));
Y[3]=Y[1]+Y[2];
setting the value of a variable Xmax equal to maximum of X[i] for i being equal to 0 . . . 3
setting the value of a variable Xmin equal to minimum of X[i] for i being equal to 0 . . . 3
setting the value of a variable Ymax equal to maximum of Y[i] for i being equal to 0 . . . 3
setting the value of a variable Ymin equal to minimum of Y[i] for i being equal to 0 . . . 3
setting the value of a variable W equal to the value of (Xmax−Xmin+(1<<9)−1)>>9
setting the value of a variable H equal to the value of (Ymax−Ymin+(1<<9)−1)>>9.
|