/** Rescale coefficent for Scoeff prediction for luminance */ void ScoeffSRescale8x8(RESIDU *CurrResidu, const short W8x8inter [6][64]) { int i8x8; for ( i8x8 = 0 ; i8x8 < 4 ; i8x8++ ) { /* each 4x4 sub-block of block */ int index = i8x8 << 6; rescale_8x8_residual(CurrResidu -> Qp, &CurrResidu -> LumaLevel [index], &CurrResidu -> LumaLevel [index], W8x8inter); } }
/** This function permits to decode all intra8x8 luminance blocks in a MB. @param image Table of current frame. @param LumaLevel Contains the AC luma level of a 4x4 decoded macroblock. @param PicWidthInPix Width in pixels of the current frame. @param residu Structure which contains all the residu data of the current macroblock. @param W8x8_inter is the scaling matrix. */ void DecodeResidual8x8 ( unsigned char *Y, RESIDU *CurrResidu, const short PicWidthInPix, const short W8x8 [6][64]) { short i; for ( i = 0 ; i < 4 ; i++ ) { int Locx = LOCX(i << 2); int Locy = LOCY(i << 2); // Update the prediction if (CurrResidu -> Cbp & 1 << i) { rescale_8x8_residual(CurrResidu -> Qp, &CurrResidu -> LumaLevel [i << 6], &CurrResidu -> LumaLevel [i << 6], W8x8); ict_8x8(&CurrResidu -> LumaLevel [i << 6], &Y[Locx + Locy * PicWidthInPix], PicWidthInPix); } } }