Method of decoding moving pictures in intra prediction
A method for encoding an image, the method including determining an intra prediction mode of a current block, generating a prediction block of the current block according to the intra prediction mode, generating a residual block by calculating a difference between the current block and the prediction block, transforming the residual block to generate a transform block, quantizing the transform block to generate a quantized block, and entropy-coding coefficients of the quantized block, wherein the generating the prediction block of the current block according to the intra prediction mode includes deriving, via an intra-predictor, an intra prediction mode, generating, via the intra-predictor, reference pixels on an unavailable position if there exist unavailable reference pixels of the current block, determining, via the intra-predictor, whether reference pixels of the current block are filtered or not based on the intra prediction mode and a block size of the current block, and filtering the reference pixels of the current block using a filter if it is determined that the reference pixels of the current block are filtered, wherein the reference pixels are adaptively filtered based on the block size of the current block, wherein the filter is not applied if it is determined that the size of the current block is smaller than a first size, wherein as the size of the current block is increased within the first size and a second size, a number of intra prediction modes to which the filter is applied is increased, and wherein the filter is not applied to the intra prediction mode corresponding to a DC mode.
1 . A method for encoding an image, the method comprising:
determining an intra prediction mode of a current block;
generating a prediction block of the current block according to the intra prediction mode;
generating a residual block by calculating a difference between the current block and the prediction block;
transforming the residual block to generate a transform block;
quantizing the transform block to generate a quantized block; and
entropy-coding coefficients of the quantized block,
wherein the generating the prediction block of the current block according to the intra prediction mode includes:
deriving, via an intra-predictor, an intra prediction mode;
generating, via the intra-predictor, reference pixels on an unavailable position if there exist unavailable reference pixels of the current block;
determining, via the intra-predictor, whether reference pixels of the current block are filtered or not based on the intra prediction mode and a block size of the current block; and
filtering the reference pixels of the current block using a filter if it is determined that the reference pixels of the current block are filtered,
wherein the reference pixels are adaptively filtered based on the block size of the current block,
wherein the filter is not applied if it is determined that the size of the current block is smaller than a first size,
wherein as the size of the current block is increased within the first size and a second size, a number of intra prediction modes to which the filter is applied is increased, and
wherein the filter is not applied to the intra prediction mode corresponding to a DC mode.
2 . The method of claim 1 , wherein based on that upper reference pixels adjacent to an upper boundary of the current block are unavailable, the upper reference pixels are generated by copying an available left reference pixel.
3 . The method of claim 1 , wherein, based on that there does not exist any available reference pixel in a predetermined direction, the reference pixels are generated using an available reference pixel closest to the unavailable reference pixel in a reverse direction.
4 . The method of claim 1 , wherein reference pixels of an inter-coded block are set as unavailable.
5 . The method of claim 1 , wherein when the reference pixels are filtered in a first intra prediction mode between a diagonal intra prediction mode and a horizontal intra prediction mode, the reference pixels are filtered in directional modes between the first intra prediction mode and the diagonal intra prediction mode.