Changeset 388 in SHVCSoftware for branches/SHM-3.1-dev/source


Ignore:
Timestamp:
9 Sep 2013, 20:18:50 (11 years ago)
Author:
interdigital
Message:

fixed a bug to set source and destination Y/U/V buffer when scale ratio is 1; added border extension and padding for ratio 1x SNR case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-3.1-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r372 r388  
    156156  if( scaleX == 65536 && scaleY == 65536 ) // ratio 1x
    157157  {
    158     piSrcY = piSrcBufY - scalEL.getWindowLeftOffset() - scalEL.getWindowTopOffset() * strideEL;
    159     piDstY = piDstBufY;
    160     for( i = 0; i < heightEL; i++ )
     158    piSrcY = piSrcBufY;
     159    piDstY = piDstBufY + scalEL.getWindowLeftOffset() + scalEL.getWindowTopOffset() * strideEL;
     160    for( i = 0; i < heightBL; i++ )
    161161    {
    162162      memcpy( piDstY, piSrcY, sizeof(Pel) * widthBL );
     
    174174    strideEL  = pcUsPic->getCStride();
    175175
    176     piSrcU = piSrcBufU - ( scalEL.getWindowLeftOffset() >> 1 ) - ( scalEL.getWindowTopOffset() >> 1 ) * strideEL;
    177     piSrcV = piSrcBufV - ( scalEL.getWindowLeftOffset() >> 1 ) - ( scalEL.getWindowTopOffset() >> 1 ) * strideEL;
    178 
    179     piDstU = piDstBufU;
    180     piDstV = piDstBufV;
    181 
    182     for( i = 0; i < heightEL; i++ )
     176    piSrcU = piSrcBufU;
     177    piSrcV = piSrcBufV;
     178
     179    piDstU = piDstBufU + ( scalEL.getWindowLeftOffset() >> 1 ) + ( scalEL.getWindowTopOffset() >> 1 ) * strideEL;
     180    piDstV = piDstBufV + ( scalEL.getWindowLeftOffset() >> 1 ) + ( scalEL.getWindowTopOffset() >> 1 ) * strideEL;
     181
     182    for( i = 0; i < heightBL; i++ )
    183183    {
    184184      memcpy( piDstU, piSrcU, sizeof(Pel) * widthBL );
     
    623623#endif
    624624    }
    625 
     625  }
    626626    pcUsPic->setBorderExtension(false);
    627627    pcUsPic->extendPicBorder   (); // extend the border.
     
    631631    pcTempPic->setBorderExtension(false);
    632632    pcBasePic->setBorderExtension(false);
    633   }
    634633}
    635634#endif //SVC_EXTENSION
Note: See TracChangeset for help on using the changeset viewer.