A method of encoding video data, the method comprising: applying spatial prediction or motion compensation to an original video block within a video frame to generate a prediction video block of a prediction block size based on a prediction mode, wherein the prediction block size is one of 4x4, 4x8, 8x4, 8x8, 8x16, 16x8, 16x16, 16x32, 32x16 and 32x32; subtracting the prediction video block from the original video block within the video frame to form a residual block; selecting a transform having a transform size to apply to the residual block, wherein the transform size is one of 4x4, 8x8, 8x16, 16x8, 16x16, 16x32, 32x16 and 32x32, and the transform size is either equal to the prediction block size or smaller than the prediction block size and square; generating header data indicative of the selected transform, the header data comprising a first syntax element having a value, and a second syntax element, the second syntax element being indicative of a prediction block size of the prediction video block, wherein if the prediction block size is 8x8 or smaller, the first syntax element is zero or one bit in length and is generated to indicate the transform size without reference to the second syntax element, and wherein if the prediction block is larger than 8x8, the first syntax element is one or two bits in length and is generated to indicate the transform size in combination with the second syntax element, wherein the first syntax element is set to a first value to indicate that the transform size is equal to the prediction block size; applying the selected transform to the residual block to generate residual transform coefficients; and generating a video signal based on the header data and the residual transform coefficients. applying spatial prediction or motion compensation to an original video block within a video frame to generate a prediction video block of a prediction block size based on a prediction mode, wherein the prediction block size is one of 4x4, 4x8, 8x4, 8x8, 8x16, 16x8, 16x16, 16x32, 32x16 and 32x32; subtracting the prediction video block from the original video block within the video frame to form a residual block; selecting a transform having a transform size to apply to the residual block, wherein the transform size is one of 4x4, 8x8, 8x16, 16x8, 16x16, 16x32, 32x16 and 32x32, and the transform size is either equal to the prediction block size or smaller than the prediction block size and square; generating header data indicative of the selected transform, the header data comprising a first syntax element having a value, and a second syntax element, the second syntax element being indicative of a prediction block size of the prediction video block, wherein if the prediction block size is 8x8 or smaller, the first syntax element is zero or one bit in length and is generated to indicate the transform size without reference to the second syntax element, and wherein if the prediction block is larger than 8x8, the first syntax element is one or two bits in length and is generated to indicate the transform size in combination with the second syntax element, wherein the first syntax element is set to a first value to indicate that the transform size is equal to the prediction block size; applying the selected transform to the residual block to generate residual transform coefficients; and generating a video signal based on the header data and the residual transform coefficients.