Image coding method and apparatus with candidate motion vectors
View Patent ↗An image coding method derives a first candidate having a first motion vector that has been used to code a first block, and derives a second candidate having a second motion vector that has been used to code a second block. It is determined whether a total number of candidates having the first candidate and the second candidate is less than a maximum candidate number, and a third bi-directional candidate is derived when the total number of candidates is less than the maximum candidate number. The third bi-directional candidate has a third motion vector that is identical to the first motion vector, and a fourth motion vector that is identical to the second motion vector. A merging candidate for coding a current block is selected from the candidates having the first candidate, the second candidate, and the third candidate.
1. An image coding method for coding a current block, comprising:
deriving a first candidate having a first motion vector that has been used to code a first block;
deriving a second candidate having a second motion vector that has been used to code a second block, the second block being different from the first block;
determining whether or not a total number of candidates having the first candidate and the second candidate is less than a maximum candidate number;
deriving a third candidate having a third motion vector and a fourth motion vector when the total number of candidates having the first candidate and the second candidate is less than the maximum candidate number, the third motion vector being identical to the first motion vector, the fourth motion vector being identical to the second motion vector;
coding an index corresponding to a candidate having a motion vector; and
generating a bitstream having the coded index,
wherein the maximum candidate number is used to code the index,
wherein the motion vector is used to code the current block, and
wherein the candidate is one of a plurality of candidates having the first candidate, the second candidate, and the third candidate.
2. The image coding method according to claim 1 ,
wherein the third candidate is different from one of the first candidate and the second candidate.
3. The image coding method according to claim 1 ,
wherein the deriving of the first candidate includes deriving a plurality of first candidates, and
the image coding method further comprises:
removing an identical candidate from the plurality of first candidates before the determining.
4. The image coding method according to claim 1 ,
wherein the deriving of the first candidate includes deriving a plurality of first candidates, and
the image coding method further comprises:
removing an unusable-for-merging candidate from the plurality of first candidates before the determining.
5. An image coding apparatus that codes a current block, comprising:
a first deriver configured to derive a first candidate having a first motion vector that has been used to code a first block;
a second deriver configured to derive a second candidate having a second motion vector that has been used to code a second block, the second block being different from the first block;
a determiner configured to determine whether or not a total number of candidates having the first candidate and the second candidate is less than a maximum candidate number;
a third deriver configured to derive a third candidate having a third motion vector and a fourth motion vector when the total number of candidates having the first candidate and the second candidate is less than the maximum candidate number, the third motion vector being identical to the first motion vector, the fourth motion vector being identical to the second motion vector; and
a coder configured to code an index corresponding to a candidate having a motion vector; and
a generator configured to generate a bitstream having the coded index,
wherein the maximum candidate number is used to code the index,
wherein the motion vector is used to code the current block, and
wherein the candidate is one of a plurality of candidates having the first candidate, the second candidate, and the third candidate.