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/TLibCommon/TComWeightPrediction.cpp

    r1399 r1502  
    290290    for ( Int yuv=0 ; yuv<numValidComponent ; yuv++ )
    291291    {
    292 #if SVC_EXTENSION
    293       const Int bitDepth            = pcSlice->getBitDepth(toChannelType(ComponentID(yuv)));
    294 #else
    295292      const Int bitDepth            = pcSlice->getSPS()->getBitDepth(toChannelType(ComponentID(yuv)));
    296 #endif
    297293      const Int offsetScalingFactor = bUseHighPrecisionPredictionWeighting ? 1 : (1 << (bitDepth-8));
    298294
     
    315311    for ( Int yuv=0 ; yuv<numValidComponent ; yuv++ )
    316312    {
    317 #if SVC_EXTENSION
    318       const Int bitDepth            = pcSlice->getBitDepth(toChannelType(ComponentID(yuv)));
    319 #else
    320313      const Int bitDepth            = pcSlice->getSPS()->getBitDepth(toChannelType(ComponentID(yuv)));
    321 #endif
    322314      const Int offsetScalingFactor = bUseHighPrecisionPredictionWeighting ? 1 : (1 << (bitDepth-8));
    323315
     
    351343  if( iRefIdx0 >= 0 && iRefIdx1 >= 0 )
    352344  {
    353 #if SVC_EXTENSION
    354     addWeightBi(pcYuvSrc0, pcYuvSrc1, pcCU->getSlice()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp0, pwp1, rpcYuvDst );
    355 #else
    356345    addWeightBi(pcYuvSrc0, pcYuvSrc1, pcCU->getSlice()->getSPS()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp0, pwp1, rpcYuvDst );
    357 #endif
    358346  }
    359347  else if ( iRefIdx0 >= 0 && iRefIdx1 <  0 )
    360348  {
    361 #if SVC_EXTENSION
    362     addWeightUni( pcYuvSrc0, pcCU->getSlice()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp0, rpcYuvDst );
    363 #else
    364349    addWeightUni( pcYuvSrc0, pcCU->getSlice()->getSPS()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp0, rpcYuvDst );
    365 #endif
    366350  }
    367351  else if ( iRefIdx0 <  0 && iRefIdx1 >= 0 )
    368352  {
    369 #if SVC_EXTENSION
    370     addWeightUni( pcYuvSrc1, pcCU->getSlice()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp1, rpcYuvDst );
    371 #else
    372353    addWeightUni( pcYuvSrc1, pcCU->getSlice()->getSPS()->getBitDepths(), uiPartIdx, iWidth, iHeight, pwp1, rpcYuvDst );
    373 #endif
    374354  }
    375355  else
     
    407387    getWpScaling(pcCU, -1, iRefIdx, pwpTmp, pwp);
    408388  }
    409 #if SVC_EXTENSION
    410   addWeightUni( pcYuvSrc, pcCU->getSlice()->getBitDepths(), uiPartAddr, iWidth, iHeight, pwp, pcYuvPred );
    411 #else
    412389  addWeightUni( pcYuvSrc, pcCU->getSlice()->getSPS()->getBitDepths(), uiPartAddr, iWidth, iHeight, pwp, pcYuvPred );
    413 #endif
    414 }
     390}
Note: See TracChangeset for help on using the changeset viewer.