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/TComTrQuant.cpp

    r1335 r1502  
    114114  *this = QpParam(cu.getQP( 0 ),
    115115                  toChannelType(compID),
    116 #if SVC_EXTENSION
    117                   cu.getSlice()->getQpBDOffset(toChannelType(compID)),
    118 #else
    119116                  cu.getSlice()->getSPS()->getQpBDOffset(toChannelType(compID)),
    120 #endif
    121117                  chromaQpOffset,
    122118                  cu.getPic()->getChromaFormat());
     
    11431139  TComDataCU* pcCU          = rTu.getCU();
    11441140  const UInt uiAbsPartIdx   = rTu.GetAbsPartIdxTU();
    1145 #if SVC_EXTENSION
    1146   const Int channelBitDepth = pcCU->getSlice()->getBitDepth(toChannelType(compID));
    1147 #else
    11481141  const Int channelBitDepth = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID));
    1149 #endif
    11501142
    11511143  TCoeff* piCoef    = pSrc;
     
    13451337  const Int                  channelBitDepth    = pcCU->getSlice()->getSPS()->getStreamBitDepth(toChannelType(compID));
    13461338#else
    1347 #if SVC_EXTENSION
    1348   const Int                  channelBitDepth    = pcCU->getSlice()->getBitDepth(toChannelType(compID));
    1349 #else
    13501339  const Int                  channelBitDepth    = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID));
    1351 #endif
    13521340#endif
    13531341
     
    15291517      else
    15301518      {
    1531 #if SVC_EXTENSION
    1532         const Int channelBitDepth=pcCU->getSlice()->getBitDepth(toChannelType(compID));
    1533 #else
    15341519        const Int channelBitDepth=pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID));
    1535 #endif
    15361520        xT( channelBitDepth, rTu.useDST(compID), pcResidual, uiStride, m_plTempCoeff, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID)) );
    15371521      }
     
    16671651      const Int channelBitDepth = pcCU->getSlice()->getSPS()->getStreamBitDepth(toChannelType(compID));
    16681652#else
    1669 #if SVC_EXTENSION
    1670       const Int channelBitDepth = pcCU->getSlice()->getBitDepth(toChannelType(compID));
    1671 #else
    16721653      const Int channelBitDepth = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID));
    1673 #endif
    16741654#endif
    16751655      xIT( channelBitDepth, rTu.useDST(compID), m_plTempCoeff, pcResidual, uiStride, uiWidth, uiHeight, pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID)) );
     
    20452025  const Int height          = rect.height;
    20462026  const Int maxLog2TrDynamicRange = rTu.getCU()->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(component));
    2047 #if SVC_EXTENSION
    2048   const Int channelBitDepth = rTu.getCU()->getSlice()->getBitDepth(toChannelType(component));
    2049 #else
    20502027  const Int channelBitDepth = rTu.getCU()->getSlice()->getSPS()->getBitDepth(toChannelType(component));
    2051 #endif
    20522028
    20532029  Int iTransformShift = getTransformShift(channelBitDepth, rTu.GetEquivalentLog2TrSize(component), maxLog2TrDynamicRange);
     
    21012077  const Int channelBitDepth = rTu.getCU()->getSlice()->getSPS()->getStreamBitDepth(toChannelType(component));
    21022078#else
    2103 #if SVC_EXTENSION
    2104   const Int channelBitDepth = rTu.getCU()->getSlice()->getBitDepth(toChannelType(component));
    2105 #else
    21062079  const Int channelBitDepth = rTu.getCU()->getSlice()->getSPS()->getBitDepth(toChannelType(component));
    2107 #endif
    21082080#endif
    21092081
     
    21752147  const Bool             extendedPrecision = pcCU->getSlice()->getSPS()->getSpsRangeExtension().getExtendedPrecisionProcessingFlag();
    21762148  const Int              maxLog2TrDynamicRange = pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID));
    2177 #if SVC_EXTENSION
    2178   const Int              channelBitDepth = rTu.getCU()->getSlice()->getBitDepth(channelType);
    2179 #else
    21802149  const Int              channelBitDepth = rTu.getCU()->getSlice()->getSPS()->getBitDepth(channelType);
    2181 #endif
    21822150
    21832151  /* for 422 chroma blocks, the effective scaling applied during transformation is not a power of 2, hence it cannot be
     
    33643332  const UInt           uiHeight                       = rect.height;
    33653333  const Int            maxLog2TrDynamicRange          = pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(toChannelType(compID));
    3366 #if SVC_EXTENSION
    3367   const Int            channelBitDepth                = pcCU->getSlice()->getBitDepth(toChannelType(compID));
    3368 #else
    33693334  const Int            channelBitDepth                = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID));
    3370 #endif
    33713335  const Int            iTransformShift                = getTransformShift(channelBitDepth, rTu.GetEquivalentLog2TrSize(compID), maxLog2TrDynamicRange);
    33723336  const Int            scalingListType                = getScalingListType(pcCU->getPredictionMode(uiAbsPartIdx), compID);
     
    34313395  const Int            channelBitDepth    = pcCU->getSlice()->getSPS()->getStreamBitDepth(toChannelType(compID));
    34323396#else
    3433 #if SVC_EXTENSION
    3434   const Int            channelBitDepth    = pcCU->getSlice()->getBitDepth(toChannelType(compID));
    3435 #else
    34363397  const Int            channelBitDepth    = pcCU->getSlice()->getSPS()->getBitDepth(toChannelType(compID));
    3437 #endif
    34383398#endif
    34393399  const Int            iTransformShift    = getTransformShift(channelBitDepth, rTu.GetEquivalentLog2TrSize(compID), maxLog2TrDynamicRange);
Note: See TracChangeset for help on using the changeset viewer.