Ticket #73: O0092_0094_DEPENDENCY_CONSTRAINT.patch

File O0092_0094_DEPENDENCY_CONSTRAINT.patch, 2.5 KB (added by eeehey, 9 years ago)
  • TEncGOP.cpp

     
    959959    }
    960960
    961961#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    962     if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && ((m_layerId == 1 && pocCurr < m_pcEncTop->getAdaptiveResolutionChange()) ||
     962    if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && ((m_layerId > 0 && pocCurr < m_pcEncTop->getAdaptiveResolutionChange()) ||
    963963                                                          (m_layerId == 0 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())) )
    964964    {
    965965      continue;
     
    11811181    xSetLayerInitializedFlag(pcSlice);
    11821182#endif
    11831183#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    1184     if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && m_layerId == 1 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())
     1184    if (m_pcEncTop->getAdaptiveResolutionChange() > 0 && m_layerId > 0 && pocCurr > m_pcEncTop->getAdaptiveResolutionChange())
    11851185    {
    11861186      pcSlice->setActiveNumILRRefIdx(0);
    11871187      pcSlice->setInterLayerPredEnabledFlag(false);
     
    23702370      OutputNALUnit nalu( NAL_UNIT_VPS, 0, 0 ); // The value of nuh_layer_id of VPS NAL unit shall be equal to 0.
    23712371#if AVC_BASE
    23722372#if VPS_AVC_BL_FLAG_REMOVAL
    2373       if( ( m_layerId == 1 && m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() ) || ( m_layerId == 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() ) )
     2373      if( ( m_layerId > 0 && m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() ) || ( m_layerId == 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() ) )
    23742374#else
    2375       if( ( m_layerId == 1 && m_pcEncTop->getVPS()->getAvcBaseLayerFlag() ) || ( m_layerId == 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() ) )
     2375      if( ( m_layerId > 0 && m_pcEncTop->getVPS()->getAvcBaseLayerFlag() ) || ( m_layerId == 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() ) )
    23762376#endif
    23772377#else
    23782378      if( m_layerId == 0 )
     
    24582458#endif
    24592459      m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
    24602460#if O0092_0094_DEPENDENCY_CONSTRAINT
    2461       assert( pcSlice->getPPS()->getPPSId() == 0 || pcSlice->getPPS()->getPPSId() == m_layerId || m_pcEncTop->getVPS()->getRecursiveRefLayerFlag(m_layerId, pcSlice->getPPS()->getPPSId()) );
     2461      assert( pcSlice->getPPS()->getLayerId() == 0 || pcSlice->getPPS()->getLayerId() == m_layerId || m_pcEncTop->getVPS()->getRecursiveRefLayerFlag(m_layerId, pcSlice->getPPS()->getLayerId()) );
    24622462#endif
    24632463#if Q0048_CGS_3D_ASYMLUT
    24642464      m_pcEntropyCoder->encodePPS(pcSlice->getPPS(), &m_Enc3DAsymLUTPPS);