Changeset 1402 in 3DVCSoftware for branches/HTM-16.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
- Timestamp:
- 26 May 2016, 15:03:18 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-16.1-dev/source/Lib/TLibEncoder/TEncTop.cpp
r1401 r1402 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.