Image encoding/decoding method and device therefor
The present invention relates to a video signal decoding method based on a Multiple Transform Selection (MTS). The method may comprise the steps of: parsing a first syntax element representing whether MTS applies to the inverse transformation of a current block, wherein the MTS represents a transform mode which uses a transform type other than a default transform type predefined for the current block; by performing inverse quantization on the current block, deriving an inverse-quantized transform coefficient array having the width and the height of the current block; determining, on the basis of the first syntax element, a vertical transform type applying to the vertical direction of the current block, and a horizontal transform type applying to the horizontal direction of the current block; and, by performing inverse transformation on the inverse-quantized transform coefficient array by using the vertical transform type and the horizontal transform type, deriving a residual sample array having the width and the height of the current block.
1. A method of decoding a video signal based on a Multiple Transform Selection (MTS) by an apparatus, comprising:
obtaining a first syntax element from the video signal, wherein the first syntax element includes a MTS index corresponding to any one of a plurality of transform combinations within a transform configuration group, and wherein the MTS indicates a transform method performed based on a transform combination adaptively selected from a plurality of transform combinations;
deriving an inverse quantized transform coefficient array with a width and height of a current block by performing inverse quantization on the current block;
determining a vertical transform type applied to a vertical direction and horizontal transform type applied to a horizontal direction of the current block based on the first syntax element; and
deriving a residual sample array with the width and height of the current block by performing an inverse transform on the inverse quantized transform coefficient array based on the vertical transform type and the horizontal transform type,
wherein the step of deriving the residual sample array includes
performing a one-dimensional transform process in the vertical direction on each of columns of the inverse quantized transform coefficient array based on the vertical transform type, and
performing, based on the horizontal transform type, a one-dimensional transform process in the horizontal direction on each of rows of an intermediate sample array output by the one-dimensional transform process for each of the columns,
wherein the step of performing the one-dimensional transform process in the horizontal direction includes
clipping an intermediate sample value output by the one-dimensional transform process for each of the columns based on a minimum value and maximum value of a predefined coefficient.
2. The method of claim 1 ,
wherein the plurality of transform combinations includes at least one of discrete cosine transform type 2 (DCT2), discrete sine transform type 7 (DST7), and discrete cosine transform type 8 (DCT8).
3. The method of claim 1 ,
wherein when the first syntax element has a value of zero, the vertical transform type and the horizontal transform type are determined as DCT2, and
wherein when the first syntax element has a value of non-zero, each of the vertical transform type and the horizontal transform type is determined as any one of DST7 and DCT8.
4. The method of claim 1 , further comprising
parsing a second syntax element indicating whether the MTS is available for an intra coding block and a third syntax element indicating whether the MTS is available for an inter coding block,
wherein when the second syntax element is 1, the first syntax element is present in a transform unit syntax for the intra coding block, and
wherein when the third syntax element is 1, the first syntax element is present in a transform unit syntax for the inter coding block.
5. A method of encoding a video signal based on a Multiple Transform Selection (MTS) by an apparatus, comprising:
generating a residual sample array;
determining a vertical transform type applied to a vertical direction and horizontal transform type applied to a horizontal direction of a current block;
performing a transform on the current block based on the vertical transform type and horizontal transform type;
generating a first syntax element, wherein the first syntax element includes a MTS index corresponding to a transform combination including the vertical transform type and horizontal transform type, and wherein the MTS indicates a transform method performed based on a transform combination adaptively selected from a plurality of transform combinations;
deriving a quantized transform coefficient array with a width and height of the current block by performing a quantization on the current block; and
performing an entropy-encoding on the current block,
wherein the step of generating the residual sample array includes
performing, based on the horizontal transform type, a one-dimensional transform process in the horizontal direction on each of rows of an intermediate sample array,
performing, based on the vertical transform type, a one-dimensional transform process in the vertical direction on each of columns of the quantized transform coefficient array, and
wherein the step of performing the one-dimensional transform process in the horizontal direction includes
clipping an intermediate sample value based on a minimum value and maximum value of a predefined coefficient.
6. A non-transitory computer-readable medium storing video information generated by performing the steps of:
generating a residual sample array;
determining a vertical transform type applied to a vertical direction and horizontal transform type applied to a horizontal direction of a current block;
performing a transform on the current block based on the vertical transform type and horizontal transform type;
generating a first syntax element, wherein the first syntax element includes a MTS index corresponding to a transform combination including the vertical transform type and horizontal transform type, and wherein the MTS indicates a transform method performed based on a transform combination adaptively selected from a plurality of transform combinations;
deriving a quantized transform coefficient array with a width and height of the current block by performing a quantization on the current block; and
performing an entropy-encoding on the current block,
wherein the step of generating the residual sample array includes
performing, based on the horizontal transform type, a one-dimensional transform process in the horizontal direction on each of rows of an intermediate sample array,
performing, based on the vertical transform type, a one-dimensional transform process in the vertical direction on each of columns of the quantized transform coefficient array, and
wherein the step of performing the one-dimensional transform process in the horizontal direction includes
clipping an intermediate sample value based on a minimum value and maximum value of a predefined coefficient.