1. Field of the Invention
The present invention relates to encoding and decoding of image data, and more particularly, to an apparatus and method for spatially predicting image data, an apparatus and method for encoding image data, an apparatus and method for compensating for spatial prediction of image data, and an apparatus and method for decoding image data.
2. Description of Related Art
Conventionally, spatial prediction (referred to as Intra prediction) is required to encode image data. Intra spatial predictive encoding is a technology for predicting pixel values of a current block using spatial correlation of an image. To be more specific, a differential value of decoded pixel values of blocks adjacent to the current block and correlated with pixel values of the current block is used to predict pixel values of the current block.
FIG. 1 is a diagram illustrating eight directions predicted by performing a conventional spatial prediction. Referring to FIG. 1, pixel values of an upper row or a left row of a current block are used to perform the spatial prediction in a variety of directions.
However, since the conventional spatial prediction is performed using pixel values of blocks on the left of the current block, it is impossible to perform real time spatial prediction and encoding.
FIG. 2 is a diagram illustrating a pipeline processing that is not performed using the conventional spatial prediction. The pipeline processing is a technology for performing the spatial prediction of the current block immediately after performing the spatial prediction of a previous block. However, the spatial prediction of the current block using pixel values of blocks on the left of the current block can be performed using pixel values of restored blocks adjacent to the current block after performing the spatial prediction, transform and quantization, inverse quantization and inverse transform, and spatial prediction compensation of blocks adjacent to the current block. Referring to FIG. 2, the pipeline processing is not performed using pixel values of blocks on the left of the current block. Such a pipeline processing failure causes failures of a real time encoding and decoding of image data.