Intra prediction method and device
The present invention relates to an intra prediction method and apparatus. The image decoding method according to the present invention may comprise decoding information on intra prediction; and generating a prediction block by performing intra prediction for a current block based on the information on intra prediction. The information on intra prediction may include information on an intra prediction mode, and the intra prediction mode may include a curved intra prediction mode.
1. An image decoding method performed by an image decoding apparatus, the method comprising:
obtaining, through a bitstream, image information comprising information on quantized transform coefficient levels;
deriving transform coefficients of a current block based on the information on quantized transform coefficient levels;
determining a transform set for a secondary inverse-transform based on an intra prediction mode of a current block;
determining a transform kernel for the secondary inverse-transform based on the transform set and a size of the current block;
deriving modified transform coefficients by performing the secondary inverse-transform based on the transform coefficients and the transform kernel for the secondary inverse-transform;
deriving a reconstructed residual signal by performing a primary inverse-transform based on the modified transform coefficients; and
reconstructing the current block based on the reconstructed residual signal,
wherein the secondary inverse-transform is a non-separable inverse-transform.
2. The image decoding method of claim 1 ,
wherein a number of transform kernels related to the transform set is determined differently based on the size of the current block.
3. The image decoding method of claim 1 ,
wherein a type of the transform kernel is determined differently based on the size of the current block.
4. An image encoding method performed by an image encoding apparatus, the method comprising:
deriving a residual signal for a current block;
deriving transform coefficients by performing a primary transform based on the residual signal;
determining a transform set for a secondary transform based on an intra prediction mode of the current block;
determining a transform kernel for the secondary transform based on the transform set and a size of the current block;
deriving modified transform coefficients by performing the secondary transform on the transform coefficients based on the transform kernel for the secondary transform;
deriving quantized transform coefficient levels based on the modified transform coefficients; and
encoding image information including information on the quantized transform coefficient levels,
wherein the secondary transform is a non-separable transform.
5. The image encoding method of claim 4 ,
wherein a number of transform kernels related to the transform set is determined differently based on the size of the current block.
6. The image encoding method of claim 4 ,
wherein a type of the transform kernel is determined differently based on the size of the current block.
7. A non-transitory computer-readable recording medium storing a bitstream which is generated by an image encoding method according to claim 4 .
8. A transmission method for image data, the method comprising:
obtaining a bitstream of encoded image information, wherein the encoded image information is generated based on deriving a residual signal for a current block, deriving transform coefficients by performing a primary transform based on the residual signal, determining a transform set for a secondary transform based on an intra prediction mode of the current block, determining a transform kernel for the secondary transform based on the transform set and a size of the current block, deriving modified transform coefficients by performing the secondary transform based on the transform coefficients and the transform kernel for the secondary transform, deriving quantized transform coefficient levels based on the modified transform coefficients, and encoding image information including information on the quantized transform coefficient levels; and
transmitting the image data comprising the bitstream,
wherein the secondary transform is a non-separable transform.