Changeset 1202 in SHVCSoftware


Ignore:
Timestamp:
8 Jul 2015, 20:33:34 (9 years ago)
Author:
seregin
Message:

macro cleanup: O0194_JOINT_US_BITSHIFT

Location:
branches/SHM-dev/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp

    r1201 r1202  
    45324532  printf("ENCODER_FAST_MODE: %d ", ENCODER_FAST_MODE);
    45334533  printf("REF_IDX_MFM: %d ", REF_IDX_MFM);
    4534   printf("O0194_JOINT_US_BITSHIFT: %d ", O0194_JOINT_US_BITSHIFT);
    45354534#else
    45364535  printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 );
  • branches/SHM-dev/source/Lib/TLibCommon/TComUpsampleFilter.cpp

    r1147 r1202  
    5858  Int i, j;
    5959
    60 #if O0194_JOINT_US_BITSHIFT
    6160  UInt currLayerId = currSlice->getLayerId();
    6261  UInt refLayerId  = currSlice->getVPS()->getRefLayerId( currLayerId, refLayerIdc );
    63 #endif
    6462
    6563  const Window &scalEL = currSlice->getPPS()->getScaledRefLayerWindowForLayer(refLayerId);
     
    117115    piDstY = piDstBufY + scalEL.getWindowLeftOffset() + scalEL.getWindowTopOffset() * strideEL;
    118116
    119 #if O0194_JOINT_US_BITSHIFT
    120117    Int shift = g_bitDepthLayer[CHANNEL_TYPE_LUMA][currLayerId] - g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId];
     118
    121119#if Q0048_CGS_3D_ASYMLUT
    122120    if( currSlice->getPPS()->getCGSFlag() )
     
    126124    assert( shift >= 0 );
    127125#endif
    128 #endif
    129126
    130127    for( i = 0; i < heightBL; i++ )
    131128    {
    132 #if O0194_JOINT_US_BITSHIFT
    133129      for( j = 0; j < widthBL; j++ )
    134130      {
    135131        piDstY[j] = piSrcY[j] << shift;
    136132      }
    137 #else
    138       memcpy( piDstY, piSrcY, sizeof(Pel) * widthBL );
    139 #endif
     133
    140134      piSrcY += strideBL;
    141135      piDstY += strideEL;
     
    157151    piDstV = piDstBufV + ( scalEL.getWindowLeftOffset() >> 1 ) + ( scalEL.getWindowTopOffset() >> 1 ) * strideEL;
    158152
    159 #if O0194_JOINT_US_BITSHIFT
    160153    shift = g_bitDepthLayer[CHANNEL_TYPE_CHROMA][currLayerId] - g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId];
     154
    161155#if Q0048_CGS_3D_ASYMLUT
    162156    if( currSlice->getPPS()->getCGSFlag() )
     
    165159    }
    166160#endif
    167 #endif
    168161
    169162    for( i = 0; i < heightBL; i++ )
    170163    {
    171 #if O0194_JOINT_US_BITSHIFT
    172164      for( j = 0; j < widthBL; j++ )
    173165      {
     
    175167        piDstV[j] = piSrcV[j] << shift;
    176168      }
    177 #else
    178       memcpy( piDstU, piSrcU, sizeof(Pel) * widthBL );
    179       memcpy( piDstV, piSrcV, sizeof(Pel) * widthBL );
    180 #endif
     169
    181170      piSrcU += strideBL;
    182171      piSrcV += strideBL;
     
    229218    Int rlClipB = heightBL - 1 + (NTAPS_US_LUMA>>1);
    230219
    231 #if O0194_JOINT_US_BITSHIFT
    232220    // g_bitDepthY was set to EL bit-depth, but shift1 should be calculated using BL bit-depth
    233221    Int shift1 = g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId] - 8;
     222
    234223#if Q0048_CGS_3D_ASYMLUT
    235224    if( currSlice->getPPS()->getCGSFlag() )
     
    237226      shift1 = currSlice->getPPS()->getCGSOutputBitDepthY() - 8;
    238227    }
    239 #endif
    240 #else
    241     Int shift1 = g_bitDepthY - 8;
    242228#endif
    243229
     
    269255    pcTempPic->setHeight(heightEL);
    270256
    271 #if O0194_JOINT_US_BITSHIFT
    272257    Int nShift = 20 - g_bitDepthLayer[CHANNEL_TYPE_LUMA][currLayerId];
    273 #else
    274     Int nShift = US_FILTER_PREC*2 - shift1;
    275 #endif
     258
    276259    Int iOffset = 1 << (nShift - 1);
    277260
     
    337320    heightBL  = min<Int>( pcBasePic->getHeight(COMPONENT_Y) >> 1, heightEL );
    338321
    339 #if O0194_JOINT_US_BITSHIFT
    340322    // g_bitDepthC was set to EL bit-depth, but shift1 should be calculated using BL bit-depth
    341323    shift1 = g_bitDepthLayer[CHANNEL_TYPE_CHROMA][refLayerId] - 8;
     324
    342325#if Q0048_CGS_3D_ASYMLUT
    343326    if( currSlice->getPPS()->getCGSFlag() )
     
    345328      shift1 = currSlice->getPPS()->getCGSOutputBitDepthC() - 8;
    346329    }
    347 #endif
    348 #else
    349     shift1 = g_bitDepthC - 8;
    350330#endif
    351331
     
    383363    pcTempPic->setHeight(heightEL << 1);
    384364
    385 #if O0194_JOINT_US_BITSHIFT
    386365    nShift = 20 - g_bitDepthLayer[CHANNEL_TYPE_CHROMA][currLayerId];
    387 #else
    388     nShift = US_FILTER_PREC*2 - shift1;
    389 #endif
     366
    390367    iOffset = 1 << (nShift - 1);
    391368
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1201 r1202  
    5858#define O0164_MULTI_LAYER_HRD            1      ///< JCTVC-O0164: Multi-layer HRD operation
    5959
    60 #define O0194_JOINT_US_BITSHIFT          1      ///< JCTVC-O0194: Joint Upsampling and bit-shift
    6160#define Q0048_CGS_3D_ASYMLUT             1      ///< JCTVC-Q0048: Colour gamut scalability with look-up table
    6261#if Q0048_CGS_3D_ASYMLUT
  • branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp

    r1201 r1202  
    271271        {
    272272          refAC = ( refAC * currWeightACDCParam[comp].iSamples ) /refWeightACDCParam[comp].iSamples;
    273 #if O0194_JOINT_US_BITSHIFT
     273
     274          // jonint upsampling bitshift
    274275          refAC <<= (g_bitDepthLayer[CHANNEL_TYPE_LUMA][currLayerId] - g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId]);
    275276          refDC <<= (g_bitDepthLayer[CHANNEL_TYPE_LUMA][currLayerId] - g_bitDepthLayer[CHANNEL_TYPE_LUMA][refLayerId]);
    276 #endif
    277277        }
    278278#else
Note: See TracChangeset for help on using the changeset viewer.