Patent ID: 8179968

Claim:
A motion vector coding apparatus that generates a predicted motion vector for a current block to be coded and codes a motion vector of the motion vector using the predicted motion vector, the motion vector coding apparatus comprising: a specifying unit operable to specify neighboring blocks which are located around the current block and have already been coded; an assigning unit operable to assign, when at least one block among the neighboring blocks has two motion vectors which refer to reference pictures in the same direction in a display order, an identifier to respective motion vector of the neighboring blocks; a deriving unit operable to derive the predicted vector for each motion vector of the current block by using the motion vectors having the same identifier as assigned to the each motion vector of the current block among the motion vectors of the neighboring blocks; and a coding unit operable to code a difference motion vector between the motion vector of the current block and the predicted motion vector, wherein said deriving unit is operable to: select a motion vector which refers to the same reference picture as referred to by the motion vector of the current block, from among the motion vectors of the neighboring blocks having the same identifier as the identifier assigned to the motion vector of the current block, and when the selected motion vector of the neighboring blocks is plural, derive, as the predicted motion vector of the current block, a median value of the selected motion vectors.