Changeset 327 in SHVCSoftware for branches/SHM-3.0-dev


Ignore:
Timestamp:
6 Aug 2013, 17:47:35 (11 years ago)
Author:
seregin
Message:

upsampling rounding offset using scalling factors (JCTVC-N0111)

Location:
branches/SHM-3.0-dev/source/Lib/TLibCommon
Files:
2 edited

Legend:

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

    r322 r327  
    176176    Int   phaseY = 0;
    177177
     178#if ROUNDING_OFFSET
     179    Int   addX = ( ( phaseX * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) );
     180    Int   addY = ( ( phaseY * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) );
     181#else
    178182    Int   addX       = ( ( ( widthBL * phaseX ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) );
    179183    Int   addY       = ( ( ( heightBL * phaseY ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) );
     184#endif
    180185
    181186    Int   deltaX     = 4 * phaseX;
     
    340345    phaseY = 1;
    341346
     347#if ROUNDING_OFFSET
     348    addX       = ( ( phaseX * scaleX + 2 ) >> 2 ) + ( 1 << ( shiftX - 5 ) );
     349    addY       = ( ( phaseY * scaleY + 2 ) >> 2 ) + ( 1 << ( shiftY - 5 ) );
     350#else
    342351    addX       = ( ( ( widthBL * phaseX ) << ( shiftX - 2 ) ) + ( widthEL >> 1 ) ) / widthEL + ( 1 << ( shiftX - 5 ) );
    343352    addY       = ( ( ( heightBL * phaseY ) << ( shiftY - 2 ) ) + ( heightEL >> 1 ) ) / heightEL+ ( 1 << ( shiftY - 5 ) );
     353#endif
    344354
    345355    deltaX     = 4 * phaseX;
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h

    r326 r327  
    7474#define SVC_COL_BLK                      1      ///< get co-located block
    7575#define SVC_UPSAMPLING                   1      ///< upsampling filters
     76#define ROUNDING_OFFSET                  1      ///< JCTVC-N0111: upsampling rounding offset using scalling factors
    7677
    7778#define SIMPLIFIED_MV_POS_SCALING        1      ///< M0133/M0449: inter-layer MV scaling and pixel mapping position calculation
Note: See TracChangeset for help on using the changeset viewer.