Patent ID: 11882273
Assignee: LG ELECTRONICS INC.
Field: Audio-visual technology (Electrical engineering)
Classification: CPC H | IPC H

Claim 5:
6. A method for encoding an image performed by an encoding apparatus, comprising:
generating prediction samples of a current block based on an intra prediction mode;
deriving residual samples of the current block based on the prediction samples;
performing a primary transform on the residual samples to obtain primary-transformed coefficients of the current block;
determining a secondary transform set among a pre-determined number of secondary transform sets based on the intra prediction mode;
generating a first syntax element related to a secondary transform matrix to be applied to the current block among secondary transform matrices included in the determined secondary transform set; and
performing a secondary transform on the primary-transformed coefficients based on the secondary transform matrix, the secondary transform being a non-separable transform,
wherein a number of input coefficients of the secondary transform and a number of output coefficients of the secondary transform are respectively determined as 16 and 8 based on the current block having a 4×4 size, and
wherein the number of the input coefficients of the secondary transform for the current block having the 4×4 size is not equal to the number of the input coefficients of the secondary transform for the current block having an 8×8 size, while the number of the output coefficients of the secondary transform for the current block having the 4×4 size is equal to the number of the output coefficients of the secondary transform for the current block having the 8×8 size.