Combined motion vector and reference index prediction for video coding
A system and method for improving the coding efficiency of motion vector information in video coding. According to various embodiments, a list of motion vector predictor candidates is arranged according to predefined rules. Each motion vector also has a reference index associated with it. One of the motion vector candidates is then selected as a predictor based on predefined rules, or the selection is explicitly signaled in the bitstream. The reference index associated with the selected motion vector is used as a reference index for the current block. The reference index is predicted along with the motion vector. Such embodiments can improve the compression efficiency of modern video codecs.
1. A method for encoding an image, comprising:
selecting a plurality of motion vector predictors of a current image block based at least in part on at least one of a coding mode of a block from which the respective motion vector predictor is derived and a reference index of the block from which the respective motion vector predictor is derived, wherein the blocks having a coding mode of intra or not available are excluded from the plurality of motion vector predictors;
selecting two candidate motion vector predictors from the plurality of motion vector predictors, wherein the two candidate motion vector predictors each have a distinct value;
selecting a particular motion vector predictor of the current image block from the two candidate motion vector predictors; and
providing in an encoded bitstream a flag representative of the selected motion vector predictor, wherein the flag value of 0 indicates the selection of the first candidate, while the flag value of 1 indicates the selection of the second candidate.
2. The method of claim 1 , further comprising:
adding a zero motion vector to the candidate motion vector predictors, when the candidate list is empty.
3. The method of claim 1 , wherein the coding mode indicates partitioning information for the block from which the respective motion vector predictor is derived.
4. The method of claim 3 , wherein the partitioning information represents the size and the shape of the block from which the respective motion vector predictor is derived.
5. The method of claim 1 , wherein the plurality of motion vector predictors comprise at least one motion vector for blocks selected from the group consisting of a neighboring block of the current image block, a block in a second image, a co-located block in the second image, a neighboring block of the co-located block in the second image, a block in a second layer and a block in a second view.
6. The method of claim 1 , wherein an additional motion vector predictor is added to the plurality of motion vector predictors if a value of the additional motion vector predictor is not represented by the plurality of motion vector predictors.
7. The method of claim 1 , further comprising:
using the reference index associated with the selected motion vector predictor as a reference index for the current image block.
8. A computer program product, embodied on a non-transitory machine readable medium, for causing a machine, when executed, to perform the process of claim 1 .
9. An apparatus, comprising:
a processor; and
a memory communicatively connected to the processor and including computer code configured to:
select a plurality of motion vector predictors of a current image block based at least in part on at least one of a coding mode of a block from which the respective motion vector predictor is derived and a reference index of the block from which the respective motion vector predictor is derived, wherein the blocks having a coding mode of intra or not available are excluded from the plurality of motion vector predictors;
select two candidate motion vector predictors from the plurality of motion vector predictors, wherein the two candidate motion vector predictors each have a distinct value; select a particular motion vector predictor of the current image block from the two candidate motion vector predictors; and
provide in an encoded bitstream a flag representative of the selected motion vector predictor, wherein the flag value of 0 indicates the selection of the first candidate, while the flag value of 1 indicates the selection of the second candidate.
10. The apparatus of claim 9 , wherein the apparatus is further configured:
add a zero motion vector to the candidate motion vector predictors, when the candidate list is empty.
11. The apparatus of claim 9 , wherein the coding mode indicates partitioning information for the block from which the respective motion vector predictor is derived.
12. The apparatus of claim 11 , wherein the partitioning information represents the size and the shape of the block from which the respective motion vector predictor is derived.
13. The apparatus of claim 9 , wherein the plurality of motion vector predictors comprise at least one motion vector for blocks selected from the group consisting of a neighboring block of the current image block, a block in a second image, a co-located block in the second image, a neighboring block of the co-located block in the second image, a block in a second layer and a block in a second view.
14. The apparatus of claim 9 , wherein an additional motion vector predictor is added to the plurality of motion vector predictors if a value of the additional motion vector predictor is not represented by the plurality of motion vector predictors.
15. The apparatus of claim 9 , wherein the apparatus is further configured to use the reference index associated with the selected motion vector predictor as a reference index for the current image block.
16. An apparatus, comprising:
means for selecting a plurality of motion vector predictors of a current image block based at least in part on at least one of a coding mode of a block from which the respective motion vector predictor is derived and a reference index of the block from which the respective motion vector predictor is derived, wherein the blocks having a coding mode of intra or not available are excluded from the plurality of motion vector predictors;
means for selecting two candidate motion vector predictors from the plurality of motion vector predictors, wherein the two candidate motion vector predictors each have a distinct value; means for selecting a particular motion vector predictor of the current image block from the two candidate motion vector predictors; and
means for providing in an encoded bitstream a flag representative of the selected motion vector predictor, wherein the flag value of 0 indicates the selection of the first candidate, while the flag value of 1 indicates the selection of the second candidate.
17. A method for decoding an image, comprising:
selecting a plurality of motion vector predictors of a current image block based at least in part on at least one of a coding mode of a block from which the respective motion vector predictor is derived and a reference index of the block from which the respective motion vector predictor is derived, wherein the blocks having a coding mode of intra or not available are excluded from the plurality of motion vector predictors;
selecting two candidate motion vector predictors from the plurality of motion vector predictors, wherein the two candidate motion vector predictors each have a distinct value; receiving from an encoded bitstream a flag representative of a selected motion vector predictor; and
selecting a particular motion vector predictor of the current image block from the two candidate motion vector predictors for use in decoding based on the received flag, wherein the flag value of 0 indicates the selection of the first candidate, while the flag value of 1 indicates the selection of the second candidate.
18. The method of claim 17 , further comprising:
adding zero motion vector to the candidate motion vector predictors, when the candidate list is empty.
19. The method of claim 17 , wherein the coding mode indicates partitioning information for the block from which the respective motion vector predictor is derived.
20. The method of claim 19 , wherein the partitioning information represents a size and a shape of the block from which the respective motion vector predictor is derived.
21. The method of claim 17 , wherein the plurality of motion vector predictors comprise at least one motion vector for blocks selected from the group consisting of a neighboring block of the current image block, a block in a second image, a co-located block in the second image, a neighboring block of the co-located block in the second image, a block in a second layer and a block in a second view.
22. The method of claim 17 , further comprising:
using the reference index associated with the selected motion vector predictor as a reference index for the current image block.
23. A computer program product, embodied on a non-transitory machine readable medium, for causing a machine, when executed, to perform the process of claim 17 .
24. An apparatus, comprising:
a processor; and
a memory communicatively connected to the processor and including computer code configured to:
select a plurality of motion vector predictors of a current image block based at least in part on at least one of a coding mode of a block from which the respective motion vector predictor is derived and a reference index of the block from which the respective motion vector predictor is derived, wherein the blocks having a coding mode of intra or not available are excluded from the plurality of motion vector predictors;
select two candidate motion vector predictors from the plurality of motion vector predictors, wherein the two candidate motion vector predictors each have a distinct value;
receive from an encoded bitstream a flag representative of a selected motion vector predictor; and
select a particular motion vector predictor of the current image block from the two candidate motion vector predictors for use in decoding based on the received flag, wherein the flag value of 0 indicates the selection of the first candidate, while the flag value of 1 indicates the selection of the second candidate.
25. The apparatus of claim 24 , wherein the apparatus is further configured:
add a zero motion vector to the candidate motion vector predictors, when the candidate list is empty.
26. The apparatus of claim 24 , wherein the coding mode indicates partitioning information for the block from which the respective motion vector predictor is derived.
27. The apparatus of claim 26 , wherein the partitioning information represents a size and a shape of the block from which the respective motion vector predictor is derived.
28. The apparatus of claim 24 , wherein the plurality of motion vector predictors comprise at least one motion vector for blocks selected from the group consisting of a neighboring block of the current image block, a block in a second image, a co-located block in the second image, a neighboring block of the co-located block in the second image, a block in a second layer and a block in a second view.
29. The apparatus of claim 24 , wherein the apparatus is further configured to use the reference index associated with the selected motion vector predictor as a reference index for the current image block.
30. An apparatus, comprising:
means for selecting a plurality of motion vector predictors of a current image block based at least in part on at least one of a coding mode of a block from which the respective motion vector predictor is derived and a reference index of the block from which the respective motion vector predictor is derived, wherein the blocks having a coding mode of intra or not available are excluded from the plurality of motion vector predictors;
means for selecting two candidate motion vector predictors from the plurality of motion vector predictors, wherein the two candidate motion vector predictors each have a distinct value,
means for receiving from an encoded bitstream a flag representative of a selected motion vector predictor; and
means for selecting a particular motion vector predictor of the current image block from the two candidate motion vector predictors for use in decoding based on the received flag, wherein the flag value of 0 indicates the selection of the first candidate, while the flag value of 1 indicates the selection of the second candidate.