| CPC H04N 19/61 (2014.11) [H04N 19/132 (2014.11); H04N 19/176 (2014.11); H04N 19/18 (2014.11); H04N 19/70 (2014.11)] | 15 Claims | 

| 
               1. A video decoding method, the method performed by an apparatus and comprising: 
            obtaining syntax information related to a secondary transform of a coding unit; 
                determining whether or not the secondary transform is applied to a transform block included in the coding unit based on the obtained syntax information; 
                obtaining one or more inverse transform coefficients based on the secondary transform when the secondary transform is applied to the transform block; and 
                obtaining a residual sample for the transform block based on the one or more inverse transform coefficients, 
                wherein the secondary transform is low frequency non-separable transform (LFNST), 
                wherein the syntax information is obtained when one or more conditions are satisfied, 
                wherein a first condition of the one or more conditions is that an index of a last significant coefficient according to a preset scan order in a sub-block is greater than a preset value, 
                wherein a second condition of the one or more conditions is that a height of the transform block and a width of the transform block are equal to or greater than 4, and 
                wherein the sub-block is a sub-block having sub-block index 0 according to the preset scan order in the transform block. 
               |