Offset parameter signaling in merge motion vector difference mode
A method for video encoding includes determining a corresponding motion vector for each of multiple control points of a base predictor. The method further includes determining a corresponding motion vector difference for each of the multiple control points of the base predictor based on the determined motion vector for each respective control point. The method further includes generating prediction information of the current block to be included in a coded video bitstream. The prediction information includes (i) a usage flag indicative of the affine merge mode with offset, (ii) offset parameters defining the determined corresponding motion vector difference for each of the one or more of the control points, and (iii) a zero motion vector difference flag for the multiple control points of the base predictor. The zero motion vector difference flag indicates whether offset parameters for the respective control point are provided in the prediction information.
1 . A method for video decoding, comprising:
acquiring coded information of a current block in a coded video bitstream, the coded information indicating that the current block is coded with affine merge mode with offset;
decoding, from the coded video bitstream, an offset direction index and an offset distance index for the affine merge mode with offset defining a corresponding a motion vector difference for a plurality of control points of a base predictor;
applying the motion vector difference defined by the offset direction index and the offset distance index to first motion vectors of the plurality of control points that are indicated by the base predictor of the current block to determine second motion vectors of the corresponding plurality of control points;
determining parameters of an affine model of the affine merge mode with offset based on the second motion vectors; and
reconstructing at least a sample of the current block according to the affine model.
2 . The method of claim 1 , further comprising:
decoding, from the coded video bitstream, a number of base predictor candidates; and
when the number of base predictor candidates is determined to be greater than one, decoding, from the coded video bitstream, a base predictor index indicating the base predictor, wherein
when the number of base predictor candidates is 1, the coded video bitstream does not include the base predictor index.
3 . The method of claim 1 , further comprising:
determining a number of base predictor candidates based on a predefined value; and
when the number of base predictor candidates is determined to be greater than one, decoding, from the coded video bitstream, a base predictor index indicating the base predictor, wherein
when the number of base predictor candidates is 1, the coded video bitstream does not include the base predictor index.
4 . The method of claim 1 , wherein the offset direction index refers to a predefined mapping table defining a correspondence between the offset direction index and a direction along at least one of an x axis and a y axis.
5 . The method of claim 1 , wherein the offset distance index refers to a predefined mapping table defining a correspondence between the offset distance index and a distance measured in pixels.
6 . The method of claim 1 , further comprising determining a number of the plurality of control points based on an affine model type of the base predictor.
7 . The method of claim 1 , wherein
the base predictor indicates a bi-prediction associated with a first reference picture and a second reference picture;
the first motion vectors and the second motion vectors refer to the first reference picture;
each of the second motion vectors is a sum of the motion vector difference and a respective one of the first motion vectors;
a control point of the plurality of control points is associated with (i) one of the first motion vectors that refers to the first reference picture and (ii) a third motion vector that refers to the second reference picture, the third motion vector being indicated by the base predictor;
the method includes applying a second motion vector difference that is opposite in direction to the motion vector difference to the third motion vector that is associated with the second reference picture to obtain a fourth motion vector associated with the second reference picture, the second motion vector difference being a mirror of the motion vector difference; and
the determining the parameters of the affine model includes determining the parameters of the affine model of the affine merge mode with offset based on the second motion vectors and the fourth motion vector.
8 . The method of claim 1 , wherein a zero motion vector difference flag for each of the plurality of control points that indicates whether the motion vector difference for a respective one of the first motion vectors is zero is not included in the coded information.
9 . A method for video encoding, comprising:
determining a corresponding second motion vector for each of a plurality of control points of a current block in a current picture, the current block being coded with an affine merge mode with offset;
determining a motion vector difference for the plurality of control points based on the determined second motion vectors and first motion vectors for the plurality of control points that are indicated by a base predictor;
determining parameters of an affine model of the affine merge mode with offset based on the determined second motion vectors;
encoding at least a sample of the current block according to the affine model;
generating coded information of the current block in the current picture to be included in a video bitstream, the coded information including an offset direction index and an offset distance index for the affine merge mode with offset, the offset direction index and the offset distance index defining the motion vector difference for the plurality of control points; and
generating the video bitstream including the generated coded information.
10 . The method of claim 9 , comprising:
indicating a number of base predictor candidates in the generated coded information; and
when the number of base predictor candidates is greater than one, indicating, in the video bitstream, a base predictor index indicating the base predictor, wherein
when the number of base predictor candidates is 1, the video bitstream does not include the base predictor index.
11 . The method of claim 9 , comprising:
when a number of base predictor candidates is greater than one, indicating, in the video bitstream, a base predictor index indicating the base predictor, wherein
when the number of base predictor candidates is 1, the video bitstream does not include the base predictor index.
12 . The method of claim 9 , wherein the offset direction index refers to a predefined mapping table defining a correspondence between the offset direction index and a direction along at least one of an x axis and a y axis.
13 . The method of claim 9 , wherein the offset distance index refers to a predefined mapping table defining a correspondence between the offset distance index and a distance measured in pixels.
14 . The method of claim 10 , further comprising determining a number of the plurality of control points based on an affine model type of the base predictor.
15 . The method of claim 9 , wherein
the base predictor indicates a bi-prediction associated with a first reference picture and a second reference picture;
the first motion vectors and the determined second motion vectors refer to the first reference picture;
each of the determined second motion vectors is a sum of the motion vector difference and a respective one of the first motion vectors;
a control point of the plurality of control points is associated with (i) one of the first motion vectors that refers to the first reference picture and (ii) a third motion vector that refers to the second reference picture, the third motion vector being indicated by the base predictor, a second motion vector difference associated with the second reference picture is opposite in direction to the determined motion vector difference and is a mirror of the determined motion vector difference, a fourth motion vector being a sum of the second motion vector difference and the third motion vector; and
the determining the parameters of the affine model includes determining the parameters of the affine model of the affine merge mode with offset based on the determined second motion vectors and the fourth motion vector.
16 . The method of claim 9 , wherein a zero motion vector difference flag for each of the plurality of control points that indicates whether the motion vector difference for a respective one of the first motion vectors is zero is not signaled in the coded information.
17 . The method of claim 1 , wherein
the base predictor indicates a uni-prediction associated with a first reference picture;
the first motion vectors and the second motion vectors refer to the first reference picture; and
each of the second motion vectors is a sum of the motion vector difference and a respective one of the first motion vectors.
18 . The method of claim 9 , wherein
the base predictor indicates a uni-prediction associated with a first reference picture;
the first motion vectors and the determined second motion vectors refer to the first reference picture; and
each of the determined second motion vectors is a sum of the motion vector difference and a respective one of the first motion vectors.
19 . A non-transitory computer-readable storage medium storing instructions which when executed by a processor cause the processor to perform a method of encoding a video bitstream comprising:
determining a corresponding second motion vector for each of a plurality of control points of a current block in a current picture, the current block being coded with an affine merge mode with offset;
determining a motion vector difference for the plurality of control points based on the determined second motion vectors and first motion vectors for the plurality of control points that are indicated by a base predictor;
determining parameters of an affine model of the affine merge mode with offset based on the determined second motion vectors;
encoding at least a sample of the current block according to the affine model;
generating coded information of the current block in the current picture to be included in a video bitstream, the coded information including an offset direction index and an offset distance index for the affine merge mode with offset, the offset direction index and the offset distance index defining the motion vector difference for the plurality of control points;
generating the video bitstream including the generated coded information; and
transmitting the generated video bitstream.