level4x4 LumaLevel8x8 = level8x8 if( ChromaArrayType ==1 | ChromaArrayTy ===2){ NumC8x8=4/(SubWidthC* SubHeightC ) for(iCbCr=0;iCbCr<2;iCbCr++) = if( ( CodedBlockPatternChroma & 3 ) && startIdx == 0) /* chroma DC residual present */ residual_block(ChromaDCLevel[i iCbCr ], 0, 4 * NumC8x8 - 1, 4 *NumC8x8 ) for(i=0;i<4*NumC8x8;i++) ChromaDCLevel[iCbCr][i] for( (iCbCr=0;iCbCr<2;iCbCr++) = for(i8x8=0;i8x8<NumC8x8;i8x8++) for( i4x4=0;i4x4<4;i4x4++) if( CodedBlockPatternChroma & 2) /* chroma AC residual present */ residual_block(ChromaACLevel[ iCbCr ][ i8x8*4+i4x4 ], Max(0, startIdx - 1), endIdx - 1,15) for(i=0;i<15;i++) ChromaACLevel[iCbCr ][ i8x8*4+i4x4 [[]]=0 } else if( ChromaArrayType e===) residual_luma(i16x16DClevel, i16x16AClevel, level4x4, level8x8, startIdx, endIdx ) CbIntral6x16DCLevel = i16x16DClevel CbIntral6x16ACLevel = i16x16AClevel CbLevel4x4=level4x4 CbLevel8x8=level8x residual_luma( i16x16DClevel, i16x16AClevel, level4x4, level8x8, startIdx,endIdx CrIntral6x16DCLevel = i16x16DClevel CrIntral6x16ACLevel = i16x16AClevel CrLevel4x4=level4x4 CrLevel8x8=level8x8 Rec. ITU-T H.264 (01/2012) 7.3.5.3.1 Residual luma syntax residual_luma(i16x16DClevel,i16x16AClevel,level4x4, level8x8, Descriptor startIdx, endIdx ) { if( startIdx == 0 && MbPartPredMode(mb_type,0) = = Intra_16x16) residual_block(i16x16DClevel,0, 15, 16) for( (i8x8=0; i8x8<4;i8x8++) if( !transform_size_8x8_flag II !entropy_coding_mode_flag) for(i4x4=0;i4x4<4;i4x4++){ if( CodedBlockPatternLuma & (1 << i8x8 if( MbPartPredMode(mb_type,0)=I tra_16x16 al_block(i16x16AClevel[i8x8*4+i4x4] Max(0,startIdx-1),endldx-1,15) - residual_block(level4x4[i8x8*4+i4x4], startIdx,endIdx, 16) else if( MbPartPredMode(mb_type,0)== = Intra_16x16) for(i=0;i<15;itt) i16x16AClevel[i8x8*4+i4x4]i] =0 r(i=0;i<16;i++) level4x4[i8x8*4+i4x4]i]= 0 if( lentropy_coding_mode_flag && transform_size_8x8_flag) for( =0;i<16;i++) devel8x8[i8x8][4*i+i4x4]=level4x4[i8x8*4+i4x4][i = else if( CodedBlockPatternLuma &(1<<i8x8 ) ) residual_block(level8x8[i8x8],4*startIdx,4*endIdx + 3, 64 for( (i=0