Ignore:
Timestamp:
10 Mar 2014, 22:19:42 (11 years ago)
Author:
qualcomm
Message:

Include support for NoOutputOfPriorPicsFlag (Macro: NO_OUTPUT_OF_PRIOR_PICS)

Modify flushing of pictures based on NoOutputOfPriorPicsFlag

From: Adarsh K. Ramasubramonian <aramasub@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-5.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r620 r625  
    803803  TComPic*&   pcPic         = m_pcPic;
    804804#if SVC_EXTENSION
     805#if !NO_OUTPUT_OF_PRIOR_PICS
    805806#if NO_CLRAS_OUTPUT_FLAG
    806807  Bool bFirstSliceInSeq;
     808#endif
    807809#endif
    808810  m_apcSlicePilot->setVPS( m_parameterSetManagerDecoder.getPrefetchedVPS(0) );
     
    858860  m_apcSlicePilot->setAssociatedIRAPType(m_associatedIRAPType);
    859861
     862#if NO_OUTPUT_OF_PRIOR_PICS
     863  // Infer the value of NoOutputOfPriorPicsFlag
     864  if( m_apcSlicePilot->getRapPicFlag() )
     865  {
     866    if ( m_apcSlicePilot->getBlaPicFlag() || m_apcSlicePilot->getIdrPicFlag()  ||
     867        (m_apcSlicePilot->getCraPicFlag() && m_bFirstSliceInSequence) ||
     868        (m_apcSlicePilot->getCraPicFlag() && m_apcSlicePilot->getHandleCraAsBlaFlag()))
     869    {
     870      m_apcSlicePilot->setNoRaslOutputFlag( true );
     871    }
     872    else
     873    {
     874      m_apcSlicePilot->setNoRaslOutputFlag( false );
     875    }
     876  }
     877#endif
     878
    860879  // Skip pictures due to random access
    861880  if (isRandomAccessSkipPicture(iSkipFrame, iPOCLastDisplay))
     
    879898#if SVC_EXTENSION
    880899  bNewPOC = (m_apcSlicePilot->getPOC()!= m_prevPOC);
     900
     901#if NO_OUTPUT_OF_PRIOR_PICS
     902#if NO_CLRAS_OUTPUT_FLAG
     903  if (m_layerId == 0 && m_apcSlicePilot->getRapPicFlag() )
     904  {
     905    if (m_bFirstSliceInSequence)
     906    {
     907      setNoClrasOutputFlag(true);
     908    }
     909    else if ( m_apcSlicePilot->getBlaPicFlag() )
     910    {
     911      setNoClrasOutputFlag(true);
     912    }
     913#if O0149_CROSS_LAYER_BLA_FLAG
     914    else if (m_apcSlicePilot->getIdrPicFlag() && m_apcSlicePilot->getCrossLayerBLAFlag())
     915    {
     916      setNoClrasOutputFlag(true);
     917    }
     918#endif
     919    else
     920    {
     921      setNoClrasOutputFlag(false);
     922    }     
     923  }
     924  else
     925  {
     926    setNoClrasOutputFlag(false);
     927  }
     928
     929  m_apcSlicePilot->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, m_cListPic, getNoClrasOutputFlag());
     930#endif
     931
     932  // Derive the value of NoOutputOfPriorPicsFlag
     933  if( bNewPOC || m_layerId!=m_uiPrevLayerId )   // i.e. new coded picture
     934  {
     935    if( m_apcSlicePilot->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA && m_apcSlicePilot->getNoRaslOutputFlag() )
     936    {
     937      this->setNoOutputOfPriorPicsFlags( true );
     938    }
     939    else if( m_apcSlicePilot->getRapPicFlag() && m_apcSlicePilot->getNoRaslOutputFlag() )
     940    {
     941      this->setNoOutputOfPriorPicsFlags( m_apcSlicePilot->getNoOutputOfPriorPicsFlag() );
     942    }
     943    else
     944    {
     945      if( this->m_ppcTDecTop[0]->getNoClrasOutputFlag() )
     946      {
     947        this->setNoOutputOfPriorPicsFlags( true );
     948      }
     949    }
     950  }
     951#endif
     952
    881953#if ALIGNED_BUMPING
    882954  if (bNewPOC || m_layerId!=m_uiPrevLayerId)
     
    9381010#endif
    9391011  }
     1012#if !NO_OUTPUT_OF_PRIOR_PICS
    9401013#if NO_CLRAS_OUTPUT_FLAG
    9411014  bFirstSliceInSeq = m_bFirstSliceInSequence;
     1015#endif
    9421016#endif
    9431017  m_bFirstSliceInSequence = false;
     
    11021176#endif
    11031177
     1178#if !NO_OUTPUT_OF_PRIOR_PICS
    11041179#if NO_CLRAS_OUTPUT_FLAG
    11051180    if (m_layerId == 0 &&
     
    11461221    m_apcSlicePilot->decodingRefreshMarking(m_pocCRA, m_bRefreshPending, m_cListPic, getNoClrasOutputFlag());
    11471222#endif
    1148 
     1223#else
     1224    if ( m_layerId == 0 && m_apcSlicePilot->getRapPicFlag() && getNoClrasOutputFlag() )
     1225    {
     1226      for (UInt i = 0; i < m_apcSlicePilot->getVPS()->getMaxLayers(); i++)
     1227      {
     1228        m_ppcTDecTop[i]->setLayerInitializedFlag(false);
     1229        m_ppcTDecTop[i]->setFirstPicInLayerDecodedFlag(false);
     1230      }
     1231    }
     1232#endif
    11491233    // Buffer initialize for prediction.
    11501234    m_cPrediction.initTempBuff();
Note: See TracChangeset for help on using the changeset viewer.