Patent ID: 9609352
Date: 2017-03-28
CPC Classifications: H04N

Claim:
1. An apparatus for encoding a moving picture, the apparatus comprising: a picture divider configured to determine a size and a prediction mode of each coding block; an inter predictor configured to determine a reference picture and a motion vector of a current block by performing motion estimation and extract a prediction block corresponding to the current block from the reference picture based on the motion vector when the current block is coded in inter prediction mode; an intra predictor configured to determine an intra prediction mode of a current block and generate the prediction block corresponding to the current block according to the intra prediction mode when the current block is coded in intra prediction mode; a transformer configured to transform a residual block obtained by calculating difference between the current block and the prediction block to generate a transform block; a quantizer configured to determine a quantization step size and quantize the transform block using the quantization step size to generate a quantized transform block; a scanner configured to scan quantized transform coefficients of the quantized transform block to generate one-dimensional (1D) quantized transform coefficients; and an entropy coder configured to entropy-code the 1D quantized transform coefficients, wherein the inter predictor determines an available motion vector out of motion vectors of neighboring blocks adjacent to the current block as a spatial motion vector candidate, determines an available motion vector of a block located at a position corresponding to the current block in a temporal motion vector candidate picture as a temporal motion vector candidate, determines a motion vector predictor of the current block out of the spatial motion vector candidate and the temporal motion vector candidate, and encodes a difference between the motion vector of the current block and the motion vector predictor of the current block, wherein the temporal motion vector candidate is a motion vector of a first available block out of two blocks which exist in the temporal motion vector candidate picture, wherein the two blocks are a first candidate block and a second candidate block, the first candidate block is a below right corner block neighbored to a corresponding block which is co-located with the current block in the temporal motion vector candidate picture or a below right block within the corresponding block, and the second candidate block is a first center block which includes an upper left neighboring pixel with respect to a center position of the corresponding block or a second center block which includes a below right neighboring pixel with respect to the center position of the corresponding block, wherein, when a size of the transform block is larger than 4×4, the quantized transform coefficients of the quantized transform block are divided into a plurality of sub-blocks, wherein, when the current block is coded in intra prediction, the plurality of sub-blocks are scanned according to a first scan pattern determined by the intra prediction mode of the current block and the quantized transform coefficients of each sub-block are scanned according to a second scan pattern determined by the intra prediction mode of the current block, and wherein the first scan pattern for scanning the plurality of sub-blocks is the same as the second scan pattern for scanning the quantized transform coefficients of each sub-block, wherein, when the prediction block is encoded in merge mode, the inter predictor determines an available motion vector out of motion vectors of neighboring blocks adjacent to the current block as a spatial merge candidate, determines an available motion vector of a block located at a position corresponding to the current block in a temporal merge candidate picture as a temporal merge candidate, determines a motion vector predictor of the current block out of the spatial merge candidate and the temporal merge candidate, and encodes a difference between the motion vector of the current block and the motion vector predictor of the current block, and wherein the temporal merge candidate includes a reference picture index and a motion vector, and the reference picture index of the temporal merge candidate is set to 0.