| CPC H04N 19/625 (2014.11) [H04N 19/12 (2014.11); H04N 19/176 (2014.11); H04N 19/61 (2014.11)] | 9 Claims |

|
1. A video decoding method, the method performed by an apparatus and comprising:
obtaining a plurality of transform coefficients for residual samples of a current block, wherein the plurality of transform coefficients are two-dimensionally arranged;
determining, based on length information of a first side of the current block, a horizontal transform kernel for horizontal transformation of the plurality of transform coefficients, regardless of a length of a second side of the current block, wherein the second side is orthogonal to the first side;
determining, based on length information of the second side of the current block, a vertical transform kernel for vertical transformation of the plurality of transform coefficients, regardless of a length of the first side of the current block;
obtaining the residual samples of the current block by performing, based on the plurality of transform coefficients, inverse transformation using the horizontal transform kernel and the vertical transform kernel; and
reconstructing the current block based on the obtained residual samples,
wherein, based on the length information of the first side and the length information of the second side having values outside a preconfigured range, the horizontal transform kernel and the vertical transform kernel are determined to be a first transform kernel,
wherein, based on the length information of the first side and the length information of the second side having values within the preconfigured range, the horizontal transform kernel and the vertical transform kernel are determined to be a second transform kernel, and
wherein the first transform kernel is a discrete cosine transform type 2 (DCT-2)-based transform kernel, and the second transform kernel is not the DCT-2-based transform kernel.
|