Changeset 1201 in SHVCSoftware


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

macro cleanup: O0194_WEIGHTED_PREDICTION_CGS

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

Legend:

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

    r1200 r1201  
    11291129  ("CrossLayerIrapAlignFlag",                        m_crossLayerIrapAlignFlag,                          true, "align IRAP across layers" ) 
    11301130  ("CrossLayerAlignedIdrOnlyFlag",                   m_crossLayerAlignedIdrOnlyFlag,                     true, "only idr for IRAP across layers" ) 
    1131 #if O0194_WEIGHTED_PREDICTION_CGS
    11321131  ("InterLayerWeightedPred",                          m_useInterLayerWeightedPred,                       false, "enable IL WP parameters estimation at encoder" ) 
    1133 #endif
    11341132#if AVC_BASE
    11351133  ("NonHEVCBase,-nonhevc",                            m_nonHEVCBaseLayerFlag,                                0, "BL is available but not internal")
     
    43444342  printf("Cross layer IRAP alignment        : %d\n", m_crossLayerIrapAlignFlag );
    43454343  printf("IDR only for IRAP                 : %d\n", m_crossLayerAlignedIdrOnlyFlag );
    4346 #if O0194_WEIGHTED_PREDICTION_CGS
    43474344  printf("InterLayerWeightedPred            : %d\n", m_useInterLayerWeightedPred );
    4348 #endif
    43494345  printf("\n");
    43504346  for(UInt layer=0; layer<m_numLayers; layer++)
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h

    r1200 r1201  
    510510  Bool      m_crossLayerAlignedIdrOnlyFlag;
    511511  Bool      m_crossLayerBLAFlag;
    512 #if O0194_WEIGHTED_PREDICTION_CGS
    513512  Bool      m_useInterLayerWeightedPred;
    514 #endif
    515513#if Q0048_CGS_3D_ASYMLUT
    516514  Int       m_nCGSFlag;
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r1200 r1201  
    228228    g_bitDepthLayer[CHANNEL_TYPE_CHROMA][m_acLayerCfg[layer].m_layerId] = g_bitDepth[CHANNEL_TYPE_CHROMA];
    229229
    230 #if O0194_WEIGHTED_PREDICTION_CGS
    231230    m_acTEncTop[layer].setInterLayerWeightedPredFlag                      ( m_useInterLayerWeightedPred );
    232 #endif
    233231   
    234232    Int layerPTLIdx = m_acLayerCfg[layer].m_layerPTLIdx;
     
    503501    m_acTEncTop[layer].setUseFastIntraScalable                             ( m_useFastIntraScalable );
    504502#endif
    505 #if O0194_WEIGHTED_PREDICTION_CGS
     503
    506504    if( layer != 0 && m_useInterLayerWeightedPred )
    507505    {
     
    510508      m_acTEncTop[layer].setWPBiPred                                        ( true   );
    511509    }
    512 #endif
     510
    513511    //====== Parallel Merge Estimation ========
    514512    m_acTEncTop[layer].setLog2ParallelMergeLevelMinus2                      ( m_log2ParallelMergeLevel - 2 );
  • branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h

    r1200 r1201  
    142142#if SVC_EXTENSION
    143143extern Int  g_bitDepthLayer[MAX_NUM_CHANNEL_TYPE][MAX_LAYERS];
    144 #endif
    145 #if O0194_WEIGHTED_PREDICTION_CGS
    146144extern void* g_refWeightACDCParam; //type:wpACDCParam
    147145#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComRdCost.cpp

    r1029 r1201  
    340340Void TComRdCost::setDistParam( TComPattern* pcPatternKey, Pel* piRefY, Int iRefStride, Int iStep, DistParam& rcDistParam, Bool bHADME )
    341341{
    342 #if O0194_WEIGHTED_PREDICTION_CGS
    343   // Bug fix: The correct bit depth has not been used for weighted cost calculation
     342#if SVC_EXTENSION
     343  // Set bit depth for weighted cost calculation
    344344  rcDistParam.bitDepth = g_bitDepth[CHANNEL_TYPE_LUMA];
    345345#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComRom.cpp

    r1200 r1201  
    679679#endif
    680680Int  g_bitDepthLayer[MAX_NUM_CHANNEL_TYPE][MAX_LAYERS];
    681 #if O0194_WEIGHTED_PREDICTION_CGS
    682681void * g_refWeightACDCParam; // type=wpACDCParam
    683 #endif
    684682Int g_mvScalingFactor  [MAX_LAYERS][2] = {{0,0}, {0,0}};
    685683Int g_posScalingFactor [MAX_LAYERS][2] = {{0,0}, {0,0}};
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r1199 r1201  
    18851885  Int64 iAC;
    18861886  Int64 iDC;
    1887 #if O0194_WEIGHTED_PREDICTION_CGS
     1887#if SVC_EXTENSION
    18881888  Int iSamples;
    18891889#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r1200 r1201  
    7070#define R0179_ENC_OPT_3DLUT_SIZE         0      ///< JCTVC-R0179: RD decision based LUT size selection
    7171#endif
    72 #define O0194_WEIGHTED_PREDICTION_CGS    1      ///< JCTVC-O0194: Weighted prediction for colour gamut scalability
    7372#define POC_RESET_IDC                    1      ///< JCTVC-P0041: Include poc_reset_idc and related derivation
    7473#if POC_RESET_IDC
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r1199 r1201  
    22532253    {
    22542254      pcPic->getPicYuvOrg()->copyToPic( pcPic->getPicYuvRec() );
    2255 #if O0194_WEIGHTED_PREDICTION_CGS
     2255
    22562256      // Calculate for the base layer to be used in EL as Inter layer reference
    22572257      if( m_pcEncTop->getInterLayerWeightedPredFlag() )
     
    22592259        m_pcSliceEncoder->estimateILWpParam( pcSlice );
    22602260      }
    2261 #endif
     2261
    22622262      return;
    22632263    }
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp

    r1057 r1201  
    39433943
    39443944  // prediction pattern
    3945 #if O0194_WEIGHTED_PREDICTION_CGS
    3946   // Bug Fix (It did not check WP for BSlices)
     3945#if SVC_EXTENSION
     3946  // Check WP for B-slices
    39473947  if ( pcCU->getSlice()->getPPS()->getUseWP())
    39483948#else
     
    39573957  }
    39583958
    3959 #if O0194_WEIGHTED_PREDICTION_CGS
    3960   if ( pcCU->getSlice()->getPPS()->getUseWP())
    3961   ///< Bug Fix (It did not check WP for BSlices)
     3959#if SVC_EXTENSION
     3960  // Check WP for B-slices
     3961  if( pcCU->getSlice()->getPPS()->getUseWP())
    39623962#else
    39633963  if ( pcCU->getSlice()->getPPS()->getUseWP() && pcCU->getSlice()->getSliceType()==P_SLICE )
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.cpp

    r1128 r1201  
    771771    xCalcACDCParamSlice(pcSlice);
    772772  }
    773 #if O0194_WEIGHTED_PREDICTION_CGS
     773#if SVC_EXTENSION
    774774  else if( m_ppcTEncTop[pcSlice->getLayerIdx()]->getInterLayerWeightedPredFlag() )
    775775  {
     
    13481348}
    13491349#endif
    1350 #if O0194_WEIGHTED_PREDICTION_CGS
     1350
    13511351Void TEncSlice::estimateILWpParam( TComSlice* pcSlice )
    13521352{
     
    13571357  g_refWeightACDCParam = (void *) temp_weightACDCParam;
    13581358}
    1359 #endif
    13601359#endif //SVC_EXTENSION
    13611360//! \}
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncSlice.h

    r1029 r1201  
    122122  Void    initEncSlice        ( TComPic*  pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd,
    123123                                Int iGOPid,   TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS, TComVPS *vps, Bool isField );
    124 #if O0194_WEIGHTED_PREDICTION_CGS
    125124  Void    estimateILWpParam   ( TComSlice* pcSlice );
    126 #endif
    127125#else
    128126  Void    initEncSlice        ( TComPic*  pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd,
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.h

    r1199 r1201  
    144144  Bool                    m_noOutputOfPriorPicsFlags;
    145145#endif
    146 #if O0194_WEIGHTED_PREDICTION_CGS
    147146  Bool                    m_interLayerWeightedPredFlag;
    148 #endif
    149147  Int                     m_numAddLayerSets;
    150148  Bool                    m_pocDecrementedInDPBFlag;
     
    241239  Bool      getMFMEnabledFlag()                               { return m_bMFMEnabledFlag; }   
    242240#endif
    243 #if O0194_WEIGHTED_PREDICTION_CGS
    244241  Void      setInterLayerWeightedPredFlag(Bool flag)          { m_interLayerWeightedPredFlag = flag; }
    245242  Bool      getInterLayerWeightedPredFlag()                   { return m_interLayerWeightedPredFlag; }
    246 #endif
     243
    247244  Void      encode    ( TComPicYuv* pcPicYuvOrg, const InputColourSpaceConversion snrCSC, TComList<TComPicYuv*>& rcListPicYuvRecOut, std::list<AccessUnit>& accessUnitsOut, Int iPicIdInGOP );
    248245  Void      encodePrep( TComPicYuv* pcPicYuvOrg, TComPicYuv* pcPicYuvTrueOrg );
  • branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp

    r1029 r1201  
    111111
    112112    const Int fixedBitShift = (slice->getSPS()->getUseHighPrecisionPredictionWeighting())?RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION:0;
    113 #if O0194_WEIGHTED_PREDICTION_CGS
    114     weightACDCParam[compID].iSamples = iSample;
    115 #endif
    116113    weightACDCParam[compID].iDC = (((iOrgDC<<fixedBitShift)+(iSample>>1)) / iSample);
    117114    weightACDCParam[compID].iAC = iOrgAC;
     115#if SVC_EXTENSION
     116    weightACDCParam[compID].iSamples = iSample;
     117#endif
    118118  }
    119119
     
    242242      slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->getWpAcDcParam(refWeightACDCParam);
    243243
    244 #if O0194_WEIGHTED_PREDICTION_CGS
     244#if SVC_EXTENSION
    245245      UInt currLayerId = slice->getLayerId();
    246246      UInt refLayerId  = slice->getRefPic(eRefPicList, refIdxTemp)->getLayerId();
     
    264264        const Int64 currAC = currWeightACDCParam[comp].iAC;
    265265        // reference frame
    266 #if O0194_WEIGHTED_PREDICTION_CGS
     266#if SVC_EXTENSION
    267267        Int64 refDC  = refWeightACDCParam[comp].iDC;
    268268        Int64 refAC  = refWeightACDCParam[comp].iAC;
     
    282282
    283283        // calculating iWeight and iOffset params
    284 #if O0194_WEIGHTED_PREDICTION_CGS
     284#if SVC_EXTENSION
    285285        Double dWeight = (refAC==0) ? (Double)1.0 : Clip3( -16.0, 15.0, ((Double)currAC / (Double)refAC) );
    286286        Int weight     = (Int)( 0.5 + dWeight * (Double)(1<<log2Denom) );
     
    319319          return false;
    320320
    321 #if O0194_WEIGHTED_PREDICTION_CGS
     321#if SVC_EXTENSION
    322322        // make sure the reference frames other than ILR are not using weighted prediction
    323323        else
Note: See TracChangeset for help on using the changeset viewer.