A method of controlling residual coding for decoding or encoding of a video sequence, the method being performed by at least one processor, and the method comprising: based on a multiple transform selection, MTS, index indicating that a transform skip mode is enabled for a coded block of the video sequence, identifying an identity transform as each of a horizontal transform and a vertical transform; and performing 640) the residual coding of the coded block, using the identified horizontal transform and the identified vertical transform, characterized by based on the MTS index indicating that the transform skip mode is not enabled for the coded block, identifying one of a discrete cosine transform, DCT, a discrete sine transform, DST, a Hadamard transform and a Haar transform, as either one or both of the horizontal transform and the vertical transform,wherein the identifying the one of the DCT, the DST, the Hadamard transform and the Haar transform, as either one or both of the horizontal transform and the vertical transform, comprises, based on the MTS index indicating that the transform skip mode is not enabled for the coded block and indicating a first value: identifying the identity transform as the horizontal transform; and identifying one of a DCT-2, a DST-7, the Hadamard transform and the Haar transform, as the vertical transform, and wherein the identifying the one of the DCT, the DST, the Hadamard transform and the Haar transform, as either one or both of the horizontal transform and the vertical transform, comprises, based on the MTS index indicating that the transform skip mode is not enabled for the coded block and indicating a second value different than the first value: identifying one of the DCT-2, the DST-7, the Hadamard transform and the Haar transform, as the horizontal transform; and identifying the identity transform as the vertical transform. based on a multiple transform selection, MTS, index indicating that a transform skip mode is enabled for a coded block of the video sequence, identifying an identity transform as each of a horizontal transform and a vertical transform; and performing 640) the residual coding of the coded block, using the identified horizontal transform and the identified vertical transform, characterized by based on the MTS index indicating that the transform skip mode is not enabled for the coded block, identifying one of a discrete cosine transform, DCT, a discrete sine transform, DST, a Hadamard transform and a Haar transform, as either one or both of the horizontal transform and the vertical transform,wherein the identifying the one of the DCT, the DST, the Hadamard transform and the Haar transform, as either one or both of the horizontal transform and the vertical transform, comprises, based on the MTS index indicating that the transform skip mode is not enabled for the coded block and indicating a first value: identifying the identity transform as the horizontal transform; and identifying one of a DCT-2, a DST-7, the Hadamard transform and the Haar transform, as the vertical transform, and identifying the identity transform as the horizontal transform; and identifying one of a DCT-2, a DST-7, the Hadamard transform and the Haar transform, as the vertical transform, and wherein the identifying the one of the DCT, the DST, the Hadamard transform and the Haar transform, as either one or both of the horizontal transform and the vertical transform, comprises, based on the MTS index indicating that the transform skip mode is not enabled for the coded block and indicating a second value different than the first value: identifying one of the DCT-2, the DST-7, the Hadamard transform and the Haar transform, as the horizontal transform; and identifying the identity transform as the vertical transform. identifying one of the DCT-2, the DST-7, the Hadamard transform and the Haar transform, as the horizontal transform; and identifying the identity transform as the vertical transform.