Patent Document ID: 9313496
Application ID: 14135731
Patent Flag: 1

Claim One:
1. A video encoder that encodes, in a bidirectional prediction mode, a coding-target block among a plurality of blocks obtained by dividing a coding-target picture included in video data, the video encoder comprising: a motion vector calculating unit that calculates, for the coding-target block, a first motion vector representing an amount of spatial movement between a reference region in a first reference picture positioned in a first direction from the coding-target picture and the coding-target block, and that calculates, for the coding-target block, a second motion vector representing an amount of spatial movement between a reference region in a second reference picture positioned in a second direction from the coding-target picture and the coding-target block; a predictive vector selecting unit that, from among motion vectors calculated for respective blocks encoded before the coding-target block, selects a plurality of candidates for a first predictive vector for predicting the first motion vector and a plurality of candidates for a second predictive vector for predicting the second motion vector; a prediction error calculating unit that calculates first difference vectors representing errors between the first motion vector and respective candidates for the first predictive vector, and that calculates second difference vectors representing errors between the second motion vector and respective candidates for the second predictive vector; a selection information setting unit that sets first selection information for identifying, as a first predictive vector in the first difference vectors, a candidate corresponding to the first difference vector whose amount of information is the smallest, from among the plurality of candidates for the first predictive vector, and that sets second selection information for identifying, as the second predictive vector, a candidate corresponding to a second difference vector in the second difference vectors whose amount of information is the smallest, from among the plurality of candidates for the second predictive vector; and a variable length coding unit that performs variable length coding on the first selection information and the second selection information, wherein the video encoder applies, on the basis of the first selection information, predetermined code to the second selection information representing that the second predictive vector is a candidate determined on the basis of a motion vector in the second direction for the encoded block corresponding to the first predictive vector, from among the plurality of candidates for the second predictive vector.