Changeset 1285 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibEncoder
- Timestamp:
- 17 Jul 2015, 00:55:34 (10 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.cpp
r1260 r1285 340 340 * \param channelType plane type (luma/chroma) 341 341 */ 342 Void TEncSbac::xWriteCoefRemainExGolomb ( UInt symbol, UInt &rParam, const Bool useLimitedPrefixLength, const ChannelType channelType )342 Void TEncSbac::xWriteCoefRemainExGolomb ( UInt symbol, UInt &rParam, const Bool useLimitedPrefixLength, const ChannelType channelType, const Int maxLog2TrDynamicRange ) 343 343 { 344 344 Int codeNumber = (Int)symbol; … … 353 353 else if (useLimitedPrefixLength) 354 354 { 355 const UInt maximumPrefixLength = (32 - (COEF_REMAIN_BIN_REDUCTION + g_maxTrDynamicRange[channelType]));355 const UInt maximumPrefixLength = (32 - (COEF_REMAIN_BIN_REDUCTION + maxLog2TrDynamicRange)); 356 356 357 357 UInt prefixLength = 0; … … 362 362 { 363 363 prefixLength = maximumPrefixLength; 364 suffixLength = g_maxTrDynamicRange[channelType]- rParam;364 suffixLength = maxLog2TrDynamicRange - rParam; 365 365 } 366 366 else … … 1254 1254 1255 1255 const Bool alignCABACBeforeBypass = pcCU->getSlice()->getSPS()->getAlignCABACBeforeBypass(); 1256 const Int maxLog2TrDynamicRange = pcCU->getSlice()->getSPS()->getMaxLog2TrDynamicRange(channelType); 1256 1257 1257 1258 Bool beValid; … … 1504 1505 const UInt escapeCodeValue = absCoeff[idx] - baseLevel; 1505 1506 1506 xWriteCoefRemainExGolomb( escapeCodeValue, uiGoRiceParam, extendedPrecision, channelType );1507 xWriteCoefRemainExGolomb( escapeCodeValue, uiGoRiceParam, extendedPrecision, channelType, maxLog2TrDynamicRange ); 1507 1508 1508 1509 if (absCoeff[idx] > (3 << uiGoRiceParam)) -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSbac.h
r1259 r1285 128 128 Void xWriteUnaryMaxSymbol ( UInt uiSymbol, ContextModel* pcSCModel, Int iOffset, UInt uiMaxSymbol ); 129 129 Void xWriteEpExGolomb ( UInt uiSymbol, UInt uiCount ); 130 Void xWriteCoefRemainExGolomb ( UInt symbol, UInt &rParam, const Bool useLimitedPrefixLength, const ChannelType channelType );130 Void xWriteCoefRemainExGolomb ( UInt symbol, UInt &rParam, const Bool useLimitedPrefixLength, const ChannelType channelType, const Int maxLog2TrDynamicRange ); 131 131 132 132 Void xCopyFrom ( const TEncSbac* pSrc ); -
branches/SHM-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1284 r1285 275 275 // Initialise scaling lists 276 276 // The encoder will only use the SPS scaling lists. The PPS will never be marked present. 277 277 const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE] = 278 { 279 m_cSPS.getMaxLog2TrDynamicRange(CHANNEL_TYPE_LUMA), 280 m_cSPS.getMaxLog2TrDynamicRange(CHANNEL_TYPE_CHROMA) 281 }; 278 282 if(getUseScalingListId() == SCALING_LIST_OFF) 279 283 { 280 284 #if SVC_EXTENSION 281 getTrQuant()->setFlatScalingList(m_cVPS.getChromaFormatIdc(&m_cSPS, m_layerId) );285 getTrQuant()->setFlatScalingList(m_cVPS.getChromaFormatIdc(&m_cSPS, m_layerId), maxLog2TrDynamicRange); 282 286 #else 283 getTrQuant()->setFlatScalingList(m_cSPS.getChromaFormatIdc() );287 getTrQuant()->setFlatScalingList(m_cSPS.getChromaFormatIdc(), maxLog2TrDynamicRange); 284 288 #endif 285 289 getTrQuant()->setUseScalingList(false); … … 301 305 302 306 // infer the scaling list from the reference layer 303 getTrQuant()->setScalingList( &m_ppcTEncTop[m_cVPS.getLayerIdxInVps(refLayerId)]->getSPS()->getScalingList(), m_cSPS.getChromaFormatIdc() );307 getTrQuant()->setScalingList( &m_ppcTEncTop[m_cVPS.getLayerIdxInVps(refLayerId)]->getSPS()->getScalingList(), m_cSPS.getChromaFormatIdc(), maxLog2TrDynamicRange ); 304 308 } 305 309 else … … 309 313 m_cSPS.setScalingListPresentFlag(false); 310 314 m_cPPS.setScalingListPresentFlag(false); 311 getTrQuant()->setScalingList(&(m_cSPS.getScalingList()), m_cSPS.getChromaFormatIdc()); 315 316 getTrQuant()->setScalingList(&(m_cSPS.getScalingList()), m_cSPS.getChromaFormatIdc(), maxLog2TrDynamicRange); 312 317 #if SVC_EXTENSION 313 318 } … … 329 334 330 335 // infer the scaling list from the reference layer 331 getTrQuant()->setScalingList( &m_ppcTEncTop[m_cVPS.getLayerIdxInVps(refLayerId)]->getSPS()->getScalingList(), m_cSPS.getChromaFormatIdc() );336 getTrQuant()->setScalingList( &m_ppcTEncTop[m_cVPS.getLayerIdxInVps(refLayerId)]->getSPS()->getScalingList(), m_cSPS.getChromaFormatIdc(), maxLog2TrDynamicRange ); 332 337 } 333 338 else … … 344 349 m_cSPS.setScalingListPresentFlag(m_cSPS.getScalingList().checkDefaultScalingList()); 345 350 m_cPPS.setScalingListPresentFlag(false); 346 getTrQuant()->setScalingList(&(m_cSPS.getScalingList()), m_cSPS.getChromaFormatIdc() );351 getTrQuant()->setScalingList(&(m_cSPS.getScalingList()), m_cSPS.getChromaFormatIdc(), maxLog2TrDynamicRange); 347 352 #if SVC_EXTENSION 348 353 }
Note: See TracChangeset for help on using the changeset viewer.