lies to all macroblocks in SP slices in which sp_for_switch_flag is equal to 0, except those with macroblock prediction mode equal to Intra_4x4 or Intra_16x16. It does not apply to SI slices. 8.6.1.1 Luma transform coefficient decoding process Inputs to this process are Inter prediction luma samples for the current macroblock pred from clause 8.4 and the prediction residual transform coefficient levels, LumaLevel4x4, and the index of the 4x4 luma block luma4x4BlkIdx. The position of the upper-left sample of the 4x4 luma block with index luma4x4BlkIdx inside the current macroblock is derived by invoking the inverse 4x4 luma block scanning process in clause 6.4.3 with luma4x4BlkIdx as the input and the output being assigned to (x,y). Let the variable p be a 4x4 array of prediction samples with element Pij being derived as: =pred,[x+j,++i] with i,j=0..3 = (8-414) The variable p is transformed producing transform coefficients CP according to: (8-415) The inverse scanning process for 4x4 transform coefficients and scaling lists as specified in clause 8.5.6 is invoked with LumaLevel4x4[ luma4x4BlkIdx ] as the input and the two-dimensional array c1 with elements Cii as the output. The prediction residual transform coefficients C are scaled using quantisation parameter QPy, and added to the transform coefficients of the prediction block CP with i, j = 0..3 as follows: LevelScale4x4( QPy 6, i, j)*Aij)<<(QPy/6))>>10) (8-416) where LevelScale4x4( m,i, is specified in Equation 8-313, and where Aij is specified as: for (i,j)E{(0,0),(0,2),(2,0),(2,2)}, (8-417) 20 otherwise; The function LevelScale2( m,i,j), used in the formulas below, is specified as LevelScale2(m,i FREE Wm2 for otherwise; (i,j)e {(0,0), (0,2), (2,0), (2,2)}, (i,j)e {(1,1), (1,3), (3,1), (3,3)}, (8-418) Rec. ITU-T H.264 (01/2012) where the first and second subscripts of W are row and column indices, respectively, of the matrix specified as 13107 11916 10082 (8-419) The resulting sum, cs, is quantised with a quantisation parameter QSy and with i, j = 0..3 as fo