Image encoding apparatus
Provided is a moving picture coding apparatus for increasing a compression ratio of a moving picture signal while maintaining high image quality. To minimize the number of bits required for a residual block, quantized transform coefficients are adaptively divided into a plurality of subsets according to a size of a transform block, and non-zero quantized transform coefficients of each subset are scanned and encoded. Also, an intra prediction mode of the current block is determined using reference pixels obtained by filtering reference pixels of the current block. Accordingly, it is possible to minimize the amount of data required for the residual block of the current block.
1. An image encoding method, comprising:
determining, by an intra prediction unit, an intra prediction mode for image or video data;
generating, by the intra prediction unit, a prediction block;
generating, by a transform/quantization unit, a residual block of the prediction block;
transforming and quantizing, by the transform/quantization unit, the residual block to generate a quantized block; and
entropy-coding, by an entropy coder, quantized coefficients of the quantized block,
wherein, when a size of the quantized block is equal to 8×8, the coefficients of the quantized block are divided into a plurality of subsets, and the plurality of subsets are scanned using a scan pattern determined according to the intra prediction mode,
wherein a scan pattern for scanning non-zero coefficients of each subset is same with the scan pattern for the plurality of subsets,
wherein a scan pattern for scanning flags indicating non-zero coefficients of each subset is same with the scan pattern for scanning non-zero coefficients of each subset,
wherein the intra prediction mode is encoded using a upper intra prediction mode and a left intra prediction mode,
wherein when the upper intra prediction mode or the left intra prediction mode is unavailable, the upper intra prediction mode or the left intra prediction mode is set to a DC mode.
2. The method of claim 1 , wherein, the plurality of subsets are scanned in a reverse direction.
3. The method of claim 1 , further comprising generating, by the intra prediction unit, reference pixels when unavailable reference pixels exist.