Changeset 1285 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder
- Timestamp:
- 17 Jul 2015, 00:55:34 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibDecoder
- Files:
-
- 3 edited
-
TDecSbac.cpp (modified) (6 diffs)
-
TDecSbac.h (modified) (1 diff)
-
TDecTop.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.cpp
r1262 r1285 299 299 */ 300 300 #if RExt__DECODER_DEBUG_BIT_STATISTICS 301 Void TDecSbac::xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const ChannelType channelType, const class TComCodingStatisticsClassType &whichStat )301 Void TDecSbac::xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange, const class TComCodingStatisticsClassType &whichStat ) 302 302 #else 303 Void TDecSbac::xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const ChannelType channelType )303 Void TDecSbac::xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange ) 304 304 #endif 305 305 { … … 309 309 if (useLimitedPrefixLength) 310 310 { 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; 312 312 313 313 do … … 337 337 else if (useLimitedPrefixLength) 338 338 { 339 const UInt maximumPrefixLength = (32 - (COEF_REMAIN_BIN_REDUCTION + g_maxTrDynamicRange[channelType]));339 const UInt maximumPrefixLength = (32 - (COEF_REMAIN_BIN_REDUCTION + maxLog2TrDynamicRange)); 340 340 341 341 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; 343 343 344 344 m_pcTDecBinIf->decodeBinsEP(codeWord, (suffixLength + rParam) RExt__DECODER_DEBUG_BIT_STATISTICS_PASS_OPT_ARG(whichStat)); … … 1283 1283 1284 1284 const Bool alignCABACBeforeBypass = pcCU->getSlice()->getSPS()->getAlignCABACBeforeBypass(); 1285 const Int maxLog2TrDynamicRange = pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(channelType); 1285 1286 1286 1287 #if RExt__DECODER_DEBUG_BIT_STATISTICS … … 1546 1547 { 1547 1548 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) ); 1549 1550 1550 1551 absCoeff[ idx ] = uiLevel + baseLevel; … … 1772 1773 for(Int i=0; i< 4; i++) 1773 1774 { 1774 #if SVC_EXTENSION1775 parseSaoMaxUvlc(uiSymbol, saoMaxOffsetQVal[compIdx] ); //sao_offset_abs1776 #else1777 1775 #if O0043_BEST_EFFORT_DECODING 1778 1776 Int saoMaxOffsetQVal = (1<<(min(bitDepthOrig, MAX_SAO_TRUNCATED_BITDEPTH)-5))-1; 1779 1777 parseSaoMaxUvlc(uiSymbol, saoMaxOffsetQVal); //sao_offset_abs 1778 #else 1779 #if SVC_EXTENSION 1780 parseSaoMaxUvlc(uiSymbol, saoMaxOffsetQVal[compIdx] ); //sao_offset_abs 1780 1781 #else 1781 1782 parseSaoMaxUvlc(uiSymbol, g_saoMaxOffsetQVal[compIdx] ); //sao_offset_abs -
branches/SHM-dev/source/Lib/TLibDecoder/TDecSbac.h
r1259 r1285 106 106 Void xReadUnaryMaxSymbol ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset, UInt uiMaxSymbol, const class TComCodingStatisticsClassType &whichStat ); 107 107 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 ); 109 109 #else 110 110 Void xReadUnarySymbol ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset ); 111 111 Void xReadUnaryMaxSymbol ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset, UInt uiMaxSymbol ); 112 112 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 ); 114 114 #endif 115 115 private: -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1282 r1285 583 583 #else 584 584 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 587 586 } 588 587 g_uiMaxCUWidth = sps->getMaxCUWidth(); … … 1799 1798 else 1800 1799 { 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); 1803 1807 #else 1804 m_cTrQuant.setFlatScalingList(pcSlice->getSPS()->getChromaFormatIdc() );1808 m_cTrQuant.setFlatScalingList(pcSlice->getSPS()->getChromaFormatIdc(), maxLog2TrDynamicRange); 1805 1809 #endif 1806 1810 m_cTrQuant.setUseScalingList(false);
Note: See TracChangeset for help on using the changeset viewer.