Changeset 1405 in 3DVCSoftware for trunk/source/Lib/TLibEncoder/TEncTop.cpp
- Timestamp:
- 27 May 2016, 17:32:40 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncTop.cpp
r1396 r1405 4 4 * granted under this license. 5 5 * 6 * Copyright (c) 2010-201 5, ITU/ISO/IEC6 * Copyright (c) 2010-2016, ITU/ISO/IEC 7 7 * All rights reserved. 8 8 * … … 144 144 g_uiMaxCUWidth, g_uiMaxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList, getLayerId() ); 145 145 #else 146 m_cRateCtrl.init( m_framesToBeEncoded, m_RCTargetBitrate, m_iFrameRate, m_iGOPSize, m_iSourceWidth, m_iSourceHeight,147 m_maxCUWidth, m_maxCUHeight,m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList );146 m_cRateCtrl.init( m_framesToBeEncoded, m_RCTargetBitrate, (Int)( (Double)m_iFrameRate/m_temporalSubsampleRatio + 0.5), m_iGOPSize, m_iSourceWidth, m_iSourceHeight, 147 m_maxCUWidth, m_maxCUHeight,m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList ); 148 148 #endif 149 149 } … … 951 951 } 952 952 953 if (getTemporalSubsampleRatio()>1) 954 { 955 UInt temporalSubsampleRatio = getTemporalSubsampleRatio(); 956 if ( Double(timingInfo->getNumUnitsInTick()) * temporalSubsampleRatio > std::numeric_limits<UInt>::max() ) 957 { 958 timingInfo->setTimeScale( timingInfo->getTimeScale() / temporalSubsampleRatio ); 959 } 960 else 961 { 962 timingInfo->setNumUnitsInTick( timingInfo->getNumUnitsInTick() * temporalSubsampleRatio ); 963 } 964 } 965 953 966 Bool rateCnt = ( bitRate > 0 ); 954 967 hrd->setNalHrdParametersPresentFlag( rateCnt ); … … 1135 1148 m_cPPS.setQpOffset(COMPONENT_Cb, m_chromaCbQpOffset ); 1136 1149 m_cPPS.setQpOffset(COMPONENT_Cr, m_chromaCrQpOffset ); 1150 #if W0038_CQP_ADJ 1151 Bool bChromaDeltaQPEnabled = false; 1152 { 1153 bChromaDeltaQPEnabled = ( m_sliceChromaQpOffsetIntraOrPeriodic[0] || m_sliceChromaQpOffsetIntraOrPeriodic[1] ); 1154 if( !bChromaDeltaQPEnabled ) 1155 { 1156 for( Int i=0; i<m_iGOPSize; i++ ) 1157 { 1158 if( m_GOPList[i].m_CbQPoffset || m_GOPList[i].m_CrQPoffset ) 1159 { 1160 bChromaDeltaQPEnabled = true; 1161 break; 1162 } 1163 } 1164 } 1165 } 1166 m_cPPS.setSliceChromaQpFlag(bChromaDeltaQPEnabled); 1167 #endif 1137 1168 1138 1169 m_cPPS.setEntropyCodingSyncEnabledFlag( m_entropyCodingSyncEnabledFlag );
Note: See TracChangeset for help on using the changeset viewer.