A method of controlling residual coding for decoding or encoding of a video sequence, is performed by at least one processor and includes determining whether a small transform size of a primary transform is to be used for the residual coding of a coded block of the video sequence. The method further includes based on the small transform size of the primary transform being determined to be used, identifying, as the primary transform, a first transform set including discrete sine transform (DST)-4 and discrete cosine transform (DCT)-4, based on the small transform size of the primary transform being determined to not be used, identifying, as the primary transform, a second transform set including DST-7 and DCT-8, and performing the residual coding of the coded block, using the identified primary transform.