Changeset 1285 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
17 Jul 2015, 00:55:34 (10 years ago)
Author:
seregin
Message:

port rev 4320 (g_maxTrDynamicRange)

Location:
branches/SHM-dev/source/Lib/TLibDecoder
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp

    r1262 r1285  
    299299 */
    300300#if RExt__DECODER_DEBUG_BIT_STATISTICS
    301 Void TDecSbac::xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const ChannelType channelType, const class TComCodingStatisticsClassType &whichStat )
     301Void TDecSbac::xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange, const class TComCodingStatisticsClassType &whichStat )
    302302#else
    303 Void TDecSbac::xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const ChannelType channelType )
     303Void TDecSbac::xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange )
    304304#endif
    305305{
     
    309309  if (useLimitedPrefixLength)
    310310  {
    311     const UInt longestPossiblePrefix = (32 - (COEF_REMAIN_BIN_REDUCTION + g_maxTrDynamicRange[channelType])) + COEF_REMAIN_BIN_REDUCTION;
     311    const UInt longestPossiblePrefix = (32 - (COEF_REMAIN_BIN_REDUCTION + maxLog2TrDynamicRange)) + COEF_REMAIN_BIN_REDUCTION;
    312312
    313313    do
     
    337337  else if (useLimitedPrefixLength)
    338338  {
    339     const UInt maximumPrefixLength = (32 - (COEF_REMAIN_BIN_REDUCTION + g_maxTrDynamicRange[channelType]));
     339    const UInt maximumPrefixLength = (32 - (COEF_REMAIN_BIN_REDUCTION + maxLog2TrDynamicRange));
    340340
    341341    const UInt prefixLength = prefix - COEF_REMAIN_BIN_REDUCTION;
    342     const UInt suffixLength = (prefixLength == maximumPrefixLength) ? (g_maxTrDynamicRange[channelType] - rParam) : prefixLength;
     342    const UInt suffixLength = (prefixLength == maximumPrefixLength) ? (maxLog2TrDynamicRange - rParam) : prefixLength;
    343343
    344344    m_pcTDecBinIf->decodeBinsEP(codeWord, (suffixLength + rParam) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(whichStat));
     
    12831283
    12841284  const Bool         alignCABACBeforeBypass = pcCU->getSlice()->getSPS()->getAlignCABACBeforeBypass();
     1285  const Int          maxLog2TrDynamicRange  = pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(channelType);
    12851286
    12861287#if RExt__DECODER_DEBUG_BIT_STATISTICS
     
    15461547          {
    15471548            UInt uiLevel;
    1548             xReadCoefRemainExGolomb( uiLevel, uiGoRiceParam, extendedPrecision, channelType RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype_escs) );
     1549            xReadCoefRemainExGolomb( uiLevel, uiGoRiceParam, extendedPrecision, maxLog2TrDynamicRange RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(ctype_escs) );
    15491550
    15501551            absCoeff[ idx ] = uiLevel + baseLevel;
     
    17721773        for(Int i=0; i< 4; i++)
    17731774        {
    1774 #if SVC_EXTENSION
    1775           parseSaoMaxUvlc(uiSymbol,  saoMaxOffsetQVal[compIdx] ); //sao_offset_abs
    1776 #else
    17771775#if O0043_BEST_EFFORT_DECODING
    17781776          Int saoMaxOffsetQVal = (1<<(min(bitDepthOrig, MAX_SAO_TRUNCATED_BITDEPTH)-5))-1;
    17791777          parseSaoMaxUvlc(uiSymbol, saoMaxOffsetQVal); //sao_offset_abs
     1778#else
     1779#if SVC_EXTENSION
     1780          parseSaoMaxUvlc(uiSymbol,  saoMaxOffsetQVal[compIdx] ); //sao_offset_abs
    17801781#else
    17811782          parseSaoMaxUvlc(uiSymbol,  g_saoMaxOffsetQVal[compIdx] ); //sao_offset_abs
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.h

    r1259 r1285  
    106106  Void  xReadUnaryMaxSymbol ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset, UInt uiMaxSymbol, const class TComCodingStatisticsClassType &whichStat );
    107107  Void  xReadEpExGolomb     ( UInt& ruiSymbol, UInt uiCount, const class TComCodingStatisticsClassType &whichStat );
    108   Void  xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const ChannelType channelType, const class TComCodingStatisticsClassType &whichStat );
     108  Void  xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange, const class TComCodingStatisticsClassType &whichStat );
    109109#else
    110110  Void  xReadUnarySymbol    ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset );
    111111  Void  xReadUnaryMaxSymbol ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset, UInt uiMaxSymbol );
    112112  Void  xReadEpExGolomb     ( UInt& ruiSymbol, UInt uiCount );
    113   Void  xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const ChannelType channelType );
     113  Void  xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange );
    114114#endif
    115115private:
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r1282 r1285  
    583583#else
    584584      g_bitDepth[channel] = sps->getBitDepth(ChannelType(channel));
    585 #endif
    586       g_maxTrDynamicRange[channel] = (sps->getUseExtendedPrecision()) ? std::max<Int>(15, (g_bitDepth[channel] + 6)) : 15;
     585#endif     
    587586    }
    588587    g_uiMaxCUWidth  = sps->getMaxCUWidth();
     
    17991798  else
    18001799  {
    1801 #if SVC_EXTENSION
    1802     m_cTrQuant.setFlatScalingList(pcSlice->getChromaFormatIdc());
     1800    const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE] =
     1801    {
     1802        pcSlice->getSPS()->getMaxLog2TrDynamicRange(CHANNEL_TYPE_LUMA),
     1803        pcSlice->getSPS()->getMaxLog2TrDynamicRange(CHANNEL_TYPE_CHROMA)
     1804    };
     1805#if SVC_EXTENSION
     1806    m_cTrQuant.setFlatScalingList(pcSlice->getChromaFormatIdc(), maxLog2TrDynamicRange);
    18031807#else
    1804     m_cTrQuant.setFlatScalingList(pcSlice->getSPS()->getChromaFormatIdc());
     1808    m_cTrQuant.setFlatScalingList(pcSlice->getSPS()->getChromaFormatIdc(), maxLog2TrDynamicRange);
    18051809#endif
    18061810    m_cTrQuant.setUseScalingList(false);
Note: See TracChangeset for help on using the changeset viewer.