Method and apparatus for coefficient scan based on partition mode of prediction unit
Provided are a method and an apparatus for coefficient scan on the base of a partition mode of a prediction unit. The method comprises the steps of: determining a scan method on the basis of a partition mode of a prediction unit; and encoding the information about the scan method, wherein the scan method is determined, on the basis of RDO (Rate Distortion optimization), from among the extracted candidate scan methods which have been extracted with consideration of the shapes of the partitions of the partition mode.
1. A method of decoding a video signal having a current block to be decoded with a decoding apparatus, comprising:
obtaining, from the video signal,
residual samples of a current block and
index information for specifying a temporal motion vector candidate of the current block;
obtaining a spatial motion vector candidate from a spatial neighboring block of the current block;
selecting, based on the index information, a collocated picture relating to the temporal motion vector candidate of the current block;
obtaining the temporal motion vector candidate from a collocated block included in the selected collocated picture;
generating a motion vector candidate list including the spatial motion vector candidate and the temporal motion vector candidate;
deriving a motion vector predictor based on the motion vector candidate list and a candidate index of the current block,
the candidate index specifying one of motion vector candidates included in the motion vector candidate list;
deriving a motion vector of the current block using
the motion vector predictor and
a motion vector difference, the motion vector difference being representative of a difference between the motion vector and the motion vector predictor;
obtaining prediction samples of the current block by using the motion vector; and
reconstructing the current block by using the residual samples and the prediction samples.
2. The method of claim 1 , wherein the collocated picture has a temporal order different from a current picture including the current block.
3. The method of claim 2 , wherein the collocated block is representative of a block corresponding to a same position as the current block.
4. The method of claim 1 , wherein the spatial neighboring block includes at least one of a left neighboring block or a top neighboring block.
5. The method of claim 4 , wherein the motion vector candidates in the motion vector candidate list are arranged in priority order.
6. The method of claim 5 , wherein the motion vector candidates are arranged in sequence of the spatial motion vector candidate and the temporal motion vector candidate.