Ignore:
Timestamp:
11 Dec 2015, 00:05:48 (8 years ago)
Author:
seregin
Message:

infer parameters in SPS after activation, fixing chroma scaling for non 4:2:0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibEncoder/WeightPredAnalysis.cpp

    r1411 r1502  
    432432      {
    433433        const ComponentID compID        = ComponentID(comp);
    434 #if SVC_EXTENSION
    435         const Int         bitDepth      = slice->getBitDepth(toChannelType(compID));
    436 #else
    437434        const Int         bitDepth      = slice->getSPS()->getBitDepth(toChannelType(compID));
    438 #endif
    439435        const Int         range         = bUseHighPrecisionWeighting ? (1<<bitDepth)/2 : 128;
    440436        const Int         realLog2Denom = log2Denom + (bUseHighPrecisionWeighting ? RExt__PREDICTION_WEIGHTING_ANALYSIS_DC_PRECISION : (bitDepth - 8));
     
    453449          refAC = ( refAC * currWeightACDCParam[comp].numSamples ) / refWeightACDCParam[comp].numSamples;
    454450
    455           const Int bitDepthLuma = slice->getBitDepth(CHANNEL_TYPE_LUMA);
    456           const Int refBitDepthLuma  = slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->getBitDepth(CHANNEL_TYPE_LUMA);
     451          const Int bitDepthLuma = slice->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA);
     452          const Int refBitDepthLuma  = slice->getRefPic(eRefPicList, refIdxTemp)->getSlice(0)->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA);
    457453          const Int delta = bitDepthLuma - refBitDepthLuma;
    458454
     
    557553        const Int          width      = pPic->getWidth(compID);
    558554        const Int          height     = pPic->getHeight(compID);
    559 #if SVC_EXTENSION
    560         const Int          bitDepth   = slice->getBitDepth(toChannelType(compID));
    561 #else
    562555        const Int          bitDepth   = slice->getSPS()->getBitDepth(toChannelType(compID));
    563 #endif
    564556              WPScalingParam &wp      = m_wp[refList][refIdxTemp][compID];
    565557              Int          weight     = wp.iWeight;
     
    679671        const Int          width     = pPic->getWidth(compID);
    680672        const Int          height    = pPic->getHeight(compID);
    681 #if SVC_EXTENSION
    682         const Int          bitDepth   = slice->getBitDepth(toChannelType(compID));
    683 #else
    684673        const Int          bitDepth   = slice->getSPS()->getBitDepth(toChannelType(compID));
    685 #endif
    686674
    687675        // calculate SAD costs with/without wp for luma
Note: See TracChangeset for help on using the changeset viewer.