1. A method of decoding a moving picture, comprising: a step of generating a prediction block of a current prediction unit; and a step of generating a residual block of the current prediction unit, wherein the step of generating the prediction block of the current prediction unit includes the steps of: obtaining a reference picture index and motion vector difference of the current prediction unit from a received bit stream; constructing a motion vector candidate list using available spatial and temporal motion vector candidates; determining a motion vector candidate indicated by a motion vector index as a motion vector predictor and restoring a motion vector of the current prediction unit using the motion vector difference and the motion vector predictor; and generating a prediction block of the current prediction unit using the restored motion vector and the reference picture index, wherein the temporal motion vector candidate is a first available motion vector encountered when retrieving two blocks corresponding to the current prediction unit or a motion vector of a predetermined block, wherein the step of generating the residual block of the current prediction unit includes the steps of: entropy-decoding residual signals; inversely scanning the residual signals using a first scan pattern; restoring a transform block by inversely quantizing a quantized transform block; and inversely transforming the transform block, and wherein, when a size of the transform block is larger than a first reference size, the residual signals are inversely scanned in a unit of subsets and a scan pattern for scanning a plurality of subsets is the same as a scan pattern for scanning residual signals of each subset.