CPC H04N 19/513 (2014.11) [H04N 19/139 (2014.11); H04N 19/159 (2014.11); H04N 19/176 (2014.11)] | 3 Claims |
1. An encoder comprising:
circuitry; and
memory coupled to the circuitry, wherein
a prediction mode for a current block to be encoded is an affine mode, and in operation, the circuitry:
derives a base motion vector which is a motion vector to be used in a prediction process for the current block, and is a motion vector at a control point in the current block, the control point being an affine-mode control point;
derives a first motion vector different from the base motion vector;
derives a motion vector difference based on a difference between the base motion vector and the first motion vector;
determines whether the motion vector difference is greater than a threshold;
sets a second motion vector to a first value when the motion vector difference is determined to be greater than the threshold, and sets the second motion vector to a second value being different from the first value when the motion vector difference is determined not to be greater than the threshold, the second motion vector being different from the base motion vector and the first motion vector; and
encodes the current block using the second motion vector, and
the threshold is different between a case where the prediction process is uni-directionally performed on the current block and a case where the prediction process is bi-directionally performed on the current block.
|