Adaptive transform method based on in-screen prediction and apparatus using the method
Disclosed is an adaptive transform method based on an in-screen prediction, and an apparatus using the method. A method for encoding an image can comprise a step of determining in-screen prediction mode groups, and a step of transforming by using a different transform method according to the in-screen prediction mode group. As a result, transforming can be performed by applying the different transform method according to the in-screen prediction mode group.
1. A method of decoding a video signal having a current block to be decoded with a decoding apparatus, comprising:
obtaining quantized coefficients of the current block from the video signal;
obtaining inverse-quantized coefficients of the current block by inverse-quantizing the quantized coefficients;
obtaining, based on a transform skip flag specifying whether an inverse-transform is skipped for the current block, residual samples from the inverse-quantized coefficients of the current block, wherein when the transform skip flag is equal to 0, the residual samples are obtained by performing the inverse-transform for the inverse-quantized coefficients of the current block, and when the transform skip flag is equal to 1, the residual samples are obtained by skipping the inverse-transform for the inverse-quantized coefficients of the current block;
determining, based on an least one of a prediction mode relating to the current block and a size of the current block, whether a transform type of the current block is discrete cosine transform (DCT) or a discrete sine transform (DST), the prediction mode indicating whether the current block is an intra-coded block or an inter-coded block;
performing the inverse-transform for the inverse-quantized coefficients of the current block by using the determined transform type; and
decoding the current block by using the residual samples.
2. The method of claim 1 , wherein the inverse-transform includes a transform on rows of the current block and a transform on columns of the current block.