Ignore:
Timestamp:
3 Jun 2013, 20:51:17 (12 years ago)
Author:
seregin
Message:

include reference layerId into resampling

Location:
branches/SHM-2.1-multilayers-dev/source/Lib/TLibCommon
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibCommon/TComPrediction.cpp

    r191 r255  
    774774#if SVC_UPSAMPLING
    775775#if SCALED_REF_LAYER_OFFSETS
    776 Void TComPrediction::upsampleBasePic( TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window)
    777 {
    778   m_cUsf.upsampleBasePic( pcUsPic, pcBasePic, pcTempPic, window);
     776Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window)
     777{
     778  m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic, window);
    779779}
    780780#else
    781 Void TComPrediction::upsampleBasePic( TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic)
    782 {
    783   m_cUsf.upsampleBasePic( pcUsPic, pcBasePic, pcTempPic);
     781Void TComPrediction::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic)
     782{
     783  m_cUsf.upsampleBasePic( refLayerIdc, pcUsPic, pcBasePic, pcTempPic);
    784784}
    785785#endif
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibCommon/TComPrediction.h

    r191 r255  
    123123#if SVC_UPSAMPLING
    124124#if SCALED_REF_LAYER_OFFSETS
    125   Void upsampleBasePic( TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
     125  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
    126126#else
    127   Void upsampleBasePic( TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic );
     127  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic );
    128128#endif
    129129#endif
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r237 r255  
    7474
    7575#if SCALED_REF_LAYER_OFFSETS
    76 Void TComUpsampleFilter::upsampleBasePic( TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window )
    77 #else
    78 Void TComUpsampleFilter::upsampleBasePic( TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic )
     76Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window )
     77#else
     78Void TComUpsampleFilter::upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic )
    7979#endif
    8080{
     
    127127  Pel* piDstV;
    128128
    129   if( widthEL == widthBL && heightEL == heightBL )
     129  Int scaleX = g_posScalingFactor[refLayerIdc][0];
     130  Int scaleY = g_posScalingFactor[refLayerIdc][1];
     131
     132  if( scaleX == 65536 && scaleY == 65536 ) // ratio 1x
    130133  {
    131134    piSrcY = piSrcBufY - scalEL.getWindowLeftOffset() - scalEL.getWindowTopOffset() * strideEL;
     
    196199    Int shiftYM4 = shiftY - 4;
    197200
    198     Int   scaleX     = ( ( widthBL << shiftX ) + ( widthEL >> 1 ) ) / widthEL;
    199     Int   scaleY     = ( ( heightBL << shiftY ) + ( heightEL >> 1 ) ) / heightEL;
    200 
    201201#if ILP_DECODED_PICTURE
    202202    widthEL   = pcUsPic->getWidth ();
     
    333333    shiftXM4 = shiftX - 4;
    334334    shiftYM4 = shiftY - 4;
    335 
    336     scaleX     = ( ( widthBL << shiftX ) + ( widthEL >> 1 ) ) / widthEL;
    337     scaleY     = ( ( heightBL << shiftY ) + ( heightEL >> 1 ) ) / heightEL;
    338335
    339336#if ILP_DECODED_PICTURE
  • branches/SHM-2.1-multilayers-dev/source/Lib/TLibCommon/TComUpsampleFilter.h

    r235 r255  
    4444
    4545#if SCALED_REF_LAYER_OFFSETS
    46   Void upsampleBasePic( TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
     46  Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic, const Window window );
    4747#else
    48  Void upsampleBasePic( TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic );
     48 Void upsampleBasePic( UInt refLayerIdc, TComPicYuv* pcUsPic, TComPicYuv* pcBasePic, TComPicYuv* pcTempPic );
    4949#endif
    5050};
Note: See TracChangeset for help on using the changeset viewer.