A method of decoding a video signal based on adaptive multiple transforms, AMT, the method comprising: obtaining an AMT flag from a sequence level of the video signal, wherein the AMT flag is used for representing whether the AMT is performed; obtaining an AMT index from the video signal based on the AMT flag, wherein the AMT index indicates any one of a plurality of transform combinations within a transform configuration group, wherein the transform configuration group includes discrete sine transform type 7, DST7, and discrete cosine transform type 8, DCT8, and wherein the transform configuration group is selected based on an intra prediction mode; deriving (S830) a transform combination corresponding to the AMT index and the transform configuration group, wherein the transform combination is configured with a horizontal transform and a vertical transform and includes at least one of the DST-7 or the DCT-8, deriving a matrix for the inverse horizontal and vertical transform based on the transform combination, and; performing (S840) an inverse transform on a transform unit based on the matrix; and reconstructing the video signal based on the transform unit, wherein the inverse transform is only applied if both the width and height of the transform unit being 32 or less, and characterized in that the method further comprises checking whether a number of non-zero transform coefficients for the transform unit is smaller than a threshold, wherein the AMT index is not obtained from the video signal when the number of non-zero transform coefficients is smaller than the threshold and DST-7 is applied to both the row direction and the column direction. obtaining an AMT flag from a sequence level of the video signal, wherein the AMT flag is used for representing whether the AMT is performed; obtaining an AMT index from the video signal based on the AMT flag, wherein the AMT index indicates any one of a plurality of transform combinations within a transform configuration group, wherein the transform configuration group includes discrete sine transform type 7, DST7, and discrete cosine transform type 8, DCT8, and wherein the transform configuration group is selected based on an intra prediction mode; deriving (S830) a transform combination corresponding to the AMT index and the transform configuration group, wherein the transform combination is configured with a horizontal transform and a vertical transform and includes at least one of the DST-7 or the DCT-8, deriving a matrix for the inverse horizontal and vertical transform based on the transform combination, and; performing (S840) an inverse transform on a transform unit based on the matrix; and reconstructing the video signal based on the transform unit, wherein the inverse transform is only applied if both the width and height of the transform unit being 32 or less, and characterized in that the method further comprises checking whether a number of non-zero transform coefficients for the transform unit is smaller than a threshold, wherein the AMT index is not obtained from the video signal when the number of non-zero transform coefficients is smaller than the threshold and DST-7 is applied to both the row direction and the column direction. <EOS>