Changeset 333 in SHVCSoftware for branches/SHM-3.0-dev/source/Lib


Ignore:
Timestamp:
8 Aug 2013, 21:17:45 (11 years ago)
Author:
qualcomm
Message:

N0214: "dynamic range control of intermediate buffer in re-sampling process", from cjianle@…

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

    r327 r333  
    204204#endif
    205205
     206#if  N0214_INTERMEDIATE_BUFFER_16BITS
     207    Int shift1 = g_bitDepthY - 8;
     208#endif
     209
    206210    //========== horizontal upsampling ===========
    207211    for( i = 0; i < widthEL; i++ )
     
    222226      for( j = 0; j < heightBL ; j++ )
    223227      {
     228#if  N0214_INTERMEDIATE_BUFFER_16BITS
     229        *piDstY = sumLumaHor(piSrcY, coeff) >> shift1;
     230#else
    224231        *piDstY = sumLumaHor(piSrcY, coeff);
     232#endif
    225233        piSrcY += strideBL;
    226234        piDstY += strideEL;
     
    234242    pcTempPic->setHeight(heightEL);
    235243
     244#if  N0214_INTERMEDIATE_BUFFER_16BITS
     245    Int nShift = US_FILTER_PREC*2 - shift1;
     246#else
    236247    const Int nShift = US_FILTER_PREC*2;
     248#endif
    237249    Int iOffset = 1 << (nShift - 1);
    238250
     
    372384#endif
    373385
     386#if  N0214_INTERMEDIATE_BUFFER_16BITS
     387    shift1 = g_bitDepthC - 8;
     388#endif
     389
    374390    //========== horizontal upsampling ===========
    375391    for( i = 0; i < widthEL; i++ )
     
    392408      for( j = 0; j < heightBL ; j++ )
    393409      {
     410#if  N0214_INTERMEDIATE_BUFFER_16BITS
     411        *piDstU = sumChromaHor(piSrcU, coeff) >> shift1;
     412        *piDstV = sumChromaHor(piSrcV, coeff) >> shift1;
     413#else
    394414        *piDstU = sumChromaHor(piSrcU, coeff);
    395415        *piDstV = sumChromaHor(piSrcV, coeff);
     416#endif
    396417
    397418        piSrcU += strideBL;
     
    407428    pcTempPic->extendPicBorder   (); // extend the border.
    408429    pcTempPic->setHeight(heightEL << 1);
     430
     431#if  N0214_INTERMEDIATE_BUFFER_16BITS
     432    nShift = US_FILTER_PREC*2 - shift1;
     433    iOffset = 1 << (nShift - 1);
     434#endif
    409435
    410436#if SCALED_REF_LAYER_OFFSETS
  • branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h

    r332 r333  
    8181#define SVC_UPSAMPLING                   1      ///< upsampling filters
    8282#define ROUNDING_OFFSET                  1      ///< JCTVC-N0111: upsampling rounding offset using scalling factors
     83#define N0214_INTERMEDIATE_BUFFER_16BITS 1      ///< N0214 support base layer input more than 8 bits
     84
    8385
    8486#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.