主权项 |
1. A method of decoding an image, the method comprising:
obtaining a prediction mode of a current block, from a bitstream; when the prediction mode of the current block is inter-prediction, obtaining a motion vector predictor candidate list; adding, when a number of motion vector predictor candidates in the motion vector predictor candidate list is smaller than a predetermined number n (n is an integer), a zero vector to the motion vector predictor candidate list so that the number of the motion vector predictor candidates is to be the predetermined number n; and obtaining a motion vector predictor of the current block based on information indicating a motion vector predictor among the motion vector predictor candidate list, wherein a spatial motion vector predictor candidate in the motion vector predictor candidate list is obtained from neighboring blocks including a lower left block located on a lower left side of the current block, and wherein, when a first spatial motion vector predictor candidate is equal to a second spatial motion vector predictor candidate, the second spatial motion vector candidate is removed from the motion vector predictor candidate list. |