Changeset 259 in 3DVCSoftware for branches/HTM-5.1-dev3-Mediatek


Ignore:
Timestamp:
6 Feb 2013, 04:53:53 (11 years ago)
Author:
mediatek-htm
Message:

Fix some bugs related to JCT3V-C0129

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-5.1-dev3-Mediatek/source/Lib/TLibCommon/TComResidualGenerator.cpp

    r249 r259  
    668668  Int           iCWeight3   = ( iDisparity_y & 7 );
    669669  Int           iCWeight2   = 8 - iCWeight3;
    670   Int           iCRefPosY0  = Max( 0, Min( iCMaxPosY, Int( uiYPos )     + ( iDisparity_y >> 3 )) );
     670  Int           iCRefPosY0  = Max( 0, Min( iCMaxPosY, Int( uiYPos >> 1 )     + ( iDisparity_y >> 3 )) );
    671671  Int           iCRefPosY1  = Max( 0, Min( iCMaxPosY, iCRefPosY0 + 1 ));
    672672#endif
     
    701701      Temp1 =( iCWeight0 * pSrcSamplesU0[iXPic0] + iCWeight1 * pSrcSamplesU0[iXPic1] + 4 ) >> 3;
    702702      Temp2 =( iCWeight0 * pSrcSamplesU1[iXPic0] + iCWeight1 * pSrcSamplesU1[iXPic1] + 4 ) >> 3;
    703       pDesSamplesU[iX]  = ( iCWeight2 * Temp1 + iCWeight3 * Temp2 + 2 ) >> 2;
     703      pDesSamplesU[iX]  = ( iCWeight2 * Temp1 + iCWeight3 * Temp2 + 4 ) >> 3;
    704704      Temp1 =( iCWeight0 * pSrcSamplesV0[iXPic0] + iCWeight1 * pSrcSamplesV0[iXPic1] + 4 ) >> 3;
    705705      Temp2 =( iCWeight0 * pSrcSamplesV1[iXPic0] + iCWeight1 * pSrcSamplesV1[iXPic1] + 4 ) >> 3;
    706       pDesSamplesV[iX]  = ( iCWeight2 * Temp1 + iCWeight3 * Temp2 + 2 ) >> 2;
     706      pDesSamplesV[iX]  = ( iCWeight2 * Temp1 + iCWeight3 * Temp2 + 4 ) >> 3;
    707707#else
    708708      pDesSamplesU[iX]  = ( iCWeight0 * pSrcSamplesU[iXPic0] + iCWeight1 * pSrcSamplesU[iXPic1] + 4 ) >> 3;
Note: See TracChangeset for help on using the changeset viewer.