Ignore:
Timestamp:
26 May 2016, 15:03:18 (8 years ago)
Author:
tech
Message:

Initial merge of HM-16.9.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-16.1-dev/source/Lib/TLibEncoder/TEncTop.cpp

    r1401 r1402  
    144144      g_uiMaxCUWidth, g_uiMaxCUHeight, m_RCKeepHierarchicalBit, m_RCUseLCUSeparateModel, m_GOPList, getLayerId() );
    145145#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 );
    148148#endif
    149149  }
     
    951951  }
    952952
     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
    953966  Bool rateCnt = ( bitRate > 0 );
    954967  hrd->setNalHrdParametersPresentFlag( rateCnt );
     
    11351148  m_cPPS.setQpOffset(COMPONENT_Cb, m_chromaCbQpOffset );
    11361149  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
    11371168
    11381169  m_cPPS.setEntropyCodingSyncEnabledFlag( m_entropyCodingSyncEnabledFlag );
Note: See TracChangeset for help on using the changeset viewer.