Motion vector resolution based motion vector prediction for video coding
Techniques are described for motion vector resolution based motion vector prediction for video coding. A motion vector precision level for coding a current block is determined, a motion vector reference list is generated using the motion vector precision level, an index into the motion vector reference list is determined, where the index identifies a motion vector candidate from the motion vector reference list, and a motion vector for inter prediction of the current block is coded using the motion vector candidate. The motion vector precision level can indicate a single resolution for generating the motion vector reference list or a first resolution for generating the motion vector reference list and a second resolution for coding motion vector residuals of the motion vector.
1 . A method, comprising:
determining a motion vector precision level for coding a current block;
generating a motion vector reference list using the motion vector precision level, wherein generating the motion vector reference list comprises:
identifying a motion vector for inter-prediction of a reference block coded before the current block;
determining that a difference between the motion vector and each motion vector candidate stored in the motion vector reference list is greater than a threshold value that is based on the motion vector precision level; and
storing the motion vector in the motion vector reference list when the difference is greater than the threshold value;
determining an index into the motion vector reference list, the index identifying a motion vector candidate from the motion vector reference list; and
coding a motion vector for inter prediction of the current block using the motion vector candidate.
2 . The method of claim 1 , wherein coding the motion vector comprises coding a motion vector difference between the motion vector and the motion vector candidate using the motion vector precision level.
3 . The method of claim 1 , wherein the motion vector precision level includes a first pixel resolution for generating the motion vector reference list and a second pixel resolution for coding the motion vector.
4 . The method of claim 3 , wherein the first pixel resolution is equal to the second pixel resolution.
5 . The method of claim 3 , wherein the first pixel resolution is a finer resolution than the second pixel resolution.
6 . The method of claim 1 , wherein determining the motion vector precision level comprises decoding, from a compressed bitstream, an index into a motion vector precision level list that identifies from the motion vector precision level, the motion vector precision level list having multiple motion vector precision levels.
7 . The method of claim 1 , wherein coding the motion vector for inter prediction of the current block using the motion vector candidate comprises:
decoding a flag indicating that the motion vector is the motion vector candidate.
8 . The method of claim 1 , wherein coding the motion vector for inter prediction of the current block using the motion vector candidate comprises:
decoding, from a compressed bitstream, a motion vector residual using the motion vector precision level; and
adding the motion vector residual to the motion vector candidate to reconstruct the motion vector.
9 . An apparatus, comprising:
at least one processor configured to:
determine a motion vector precision level for coding a current block;
generate a motion vector reference list using the motion vector precision level, wherein to generate the motion vector reference list comprises to:
identify a motion vector for inter-prediction of a reference block coded before the current block;
determine that a difference between the motion vector and each motion vector candidate stored in the motion vector reference list is greater than a threshold value that is based on the motion vector precision level; and
store the motion vector in the motion vector reference list when the difference is greater than the threshold value;
determine an index into the motion vector reference list, the index identifying a motion vector candidate from the motion vector reference list; and
code a motion vector for inter prediction of the current block using the motion vector candidate.
10 . The apparatus of claim 9 , wherein the motion vector precision level includes a first resolution for generating the motion vector reference list and a second resolution for coding the motion vector.
11 . The apparatus of claim 10 , wherein to code the motion vector comprises to code a motion vector residual using the second resolution, wherein the motion vector residual comprises a difference between the motion vector and the motion vector candidate.
12 . The apparatus of claim 10 , wherein the second resolution shares a common resolution value with the first resolution, or the second resolution is a more coarse resolution value than the first resolution, and wherein to generate the motion vector reference list using the motion vector precision level comprises to include each of the motion vector candidates within the motion vector reference list at the first resolution.
13 . The apparatus of claim 9 , wherein to determine the motion vector precision level comprises to decode, from a compressed bitstream, an index into a motion vector precision level list that identifies the motion vector precision level, the motion vector precision level list having multiple motion vector precision levels, each multiple motion vector precision level having a respective first resolution for generating the motion vector reference list and a respective second resolution for coding the motion vector.
14 . The apparatus of claim 9 , wherein the difference between the motion vector and the motion vector candidate is an absolute difference.
15 . The apparatus of claim 9 , wherein:
the motion vector comprises a row component and a column component; and
the motion vector candidate comprises a row component and a column component; and
the processor is configured to determine the difference between the motion vector and the motion vector candidate is greater than the threshold value when:
the difference between the row component of the motion vector and the row component of the motion vector candidate is greater than the threshold value; and
the difference between the column component of the motion vector and the column component of the motion vector candidate is greater than the threshold value.
16 . The apparatus of claim 9 , wherein to determine a motion vector precision level comprises to decode an index for a motion vector precision level list, wherein the motion vector precision level list includes multiple entries, each associated with a respective resolution for generating the motion vector reference list, and the index indicates an entry within the motion vector precision level list.
17 . A non-transitory, computer-readable storage medium comprising instructions that, when executed by a processor, perform operations comprising:
determining a motion vector precision level for coding a current block;
generating a motion vector reference list using the motion vector precision level, wherein generating the motion vector reference list comprises:
identifying a motion vector for inter-prediction of a reference block coded before the current block;
determining that a difference between the motion vector and each motion vector candidate stored in the motion vector reference list is greater than a threshold value that is based on the motion vector precision level; and
storing the motion vector in the motion vector reference list when the difference is greater than the threshold value;
determining an index into the motion vector reference list, the index identifying a motion vector candidate from the motion vector reference list; and
coding a motion vector for inter prediction of the current block using the motion vector candidate.
18 . The non-transitory, computer-readable storage medium of claim 17 , wherein coding the motion vector comprises coding a motion vector difference between the motion vector and the motion vector candidate using the motion vector precision level.
19 . The non-transitory, computer-readable storage medium of claim 17 , wherein the motion vector precision level includes a first pixel resolution for generating the motion vector reference list and a second pixel resolution for coding the motion vector.
20 . The non-transitory, computer-readable storage medium of claim 17 , wherein determining the motion vector precision level comprises decoding, from a compressed bitstream, an index into a motion vector precision level list that identifies from the motion vector precision level, the motion vector precision level list having multiple motion vector precision levels.