Apparatus for decoding an image
Provided is an apparatus for decoding an image. The apparatus restores a plurality of sub-blocks by applying a scan pattern determined according to the intra prediction mode of the current block on the quantization coefficient sequence and restores the quantized transform block by applying a scan pattern determined according to the intra prediction mode of the current block on the plurality of sub-blocks. Therefore, it is possible to reduce the amount of coding bits and computing resources required to decode a current prediction block.
1. A non-transitory recording medium which includes a bit stream decoded by an image decoding device, the bit stream being generated by dividing an image into a plurality of blocks and by performing intra prediction for the block and including:
information indicating a size and an intra prediction mode of a current prediction block,
information indicating a remaining quantization step size of a current coding block obtained by calculating difference between a quantization step size of the current coding block and a quantization step size predictor of the current coding block,
information indicating one-dimensional (1D) quantized transform coefficients generated by scanning quantized transform coefficients of the quantized transform block,
wherein the quantized transform block is generated by transforming a residual block, being obtained by calculating difference between the current prediction block and a prediction block corresponding to the current prediction block, being generated according to the intra prediction mode, and quantizing the transformed residual block using the quantization step size of the current coding block,
wherein the image decoding device
restores the intra prediction mode of the current prediction block and the 1D quantized transform coefficients from the bit stream,
restores the quantized transform block by inversely scanning the 1D quantized transform coefficients,
generates the quantization step size predictor, restores the quantization step size by adding the quantization step size predictor and the remaining quantization step size, and generates a transform block by inversely quantizing the quantized transform block using the quantization step size,
restores a residual block by inversely transforming the transform block,
generate the prediction block of the current prediction block according to the intra prediction mode, and
generates an original block by adding the prediction block and the residual block,
wherein a quantization step size of a previous coding block according to scan order is determined as the quantization step size predictor of the current coding block of which quantization step sizes of an above coding block and a left coding block of the current coding block are unavailable, and
wherein the image decoding device inversely scans the quantized transform coefficients in a reverse direction.