主权项 |
1. A moving picture decoding method for calculating a motion vector predictor to be used when decoding a motion vector of a current block included in a bitstream, and decoding the current block, the method comprising:
obtaining a fixed number of motion vector predictor candidates, the fixed number being at least two, each of the motion vector predictor candidates being a candidate for the motion vector predictor; decoding, according to the fixed number, an index for identifying the motion vector predictor from among the fixed number of the motion vector predictor candidates, the index being coded and added to the bitstream; and selecting, from among the fixed number of the motion vector predictor candidates based on the decoded index, the motion vector predictor to be used for decoding the current block, wherein the fixed number of the motion vector predictor candidates includes a plurality of candidates each having a motion vector of value 0, the fixed number of the motion vector predictor candidates includes at least one of one or more first candidates and one or more new candidates, the one or more first candidates are candidates each derived based on a motion vector used for coding an adjacent block spatially or temporally adjacent to the current block, the one or more new candidates are candidates each derived based on a motion vector used for coding a block different from the adjacent block, or each having a predetermined fixed vector as a motion vector, and the obtaining of the fixed number of the motion vector predictor candidates includes:
performing first derivation processing of deriving the one or more first candidates, and setting, if the one or more first candidates are derived, each of the derived one or more first candidates as one of the fixed number of the motion vector predictor candidates;performing second derivation processing of deriving the one or more new candidates if a total number of the one or more first candidates is smaller than the fixed number, and setting, if the one or more new candidates are derived, each of the derived one or more new candidates as one of the fixed number of the motion vector predictor candidates; andsetting, if a sum of the total number of the one or more first candidates and a total number of the one or more new candidates is smaller than the fixed number, at least one of the plurality of candidates as one of the fixed number of the motion vector predictor candidates, to make a sum of the total number of the one or more first candidates, a total number of the plurality of candidates, and the total number of the one or more new candidates equal to the fixed number. |