Changeset 978 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder


Ignore:
Timestamp:
13 Jan 2015, 14:56:46 (11 years ago)
Author:
nokia
Message:

Implementation of JCTVC-R0071 - IRAP and EOS cross-layer impacts

Location:
branches/SHM-dev/source/Lib/TLibDecoder
Files:
2 edited

Legend:

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

    r953 r978  
    100100  m_isLastNALWasEos = false;
    101101#endif
     102#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     103  m_lastPicHasEos = false;
     104#endif
    102105#if NO_CLRAS_OUTPUT_FLAG
    103106  m_noClrasOutputFlag          = false;
     
    11461149      setNoClrasOutputFlag(true);
    11471150    }
     1151#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     1152    else if (m_lastPicHasEos)
     1153    {
     1154      setNoClrasOutputFlag(true);
     1155    }
     1156#endif
    11481157    else if ( m_apcSlicePilot->getBlaPicFlag() )
    11491158    {
     
    18331842    }
    18341843#endif
     1844#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     1845    xCheckLayerReset();
     1846    xSetLayerInitializedFlag();
     1847#endif
    18351848    // Buffer initialize for prediction.
    18361849    m_cPrediction.initTempBuff();
     
    24262439#if P0297_VPS_POC_LSB_ALIGNED_FLAG
    24272440  setFirstPicInLayerDecodedFlag(true);
     2441#endif
     2442#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     2443  m_lastPicHasEos = false;
    24282444#endif
    24292445
     
    26902706#if Q0177_EOS_CHECKS
    26912707      assert( m_isLastNALWasEos == false );
     2708#if !R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
    26922709      //Check layer id of the nalu. if it is not 0, give a warning message and just return without doing anything.
    26932710      if (nalu.m_layerId > 0)
     
    26962713        return false;
    26972714      }
     2715#endif
    26982716      m_isLastNALWasEos = true;
     2717#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     2718      m_lastPicHasEos = true;
     2719#endif
    26992720#endif
    27002721      m_associatedIRAPType = NAL_UNIT_INVALID;
     
    31013122}
    31023123#endif
     3124
     3125#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     3126Void TDecTop::xCheckLayerReset()
     3127{
     3128  if (m_apcSlicePilot->isIRAP() && m_layerId > 0)
     3129  {
     3130    Bool layerResetFlag;
     3131    UInt dolLayerId;
     3132    if (m_lastPicHasEos)
     3133    {
     3134      layerResetFlag = true;
     3135      dolLayerId = m_layerId;
     3136    }
     3137    else if ((m_apcSlicePilot->isCRA() && m_apcSlicePilot->getHandleCraAsBlaFlag()) ||
     3138      (m_apcSlicePilot->isIDR() && m_apcSlicePilot->getCrossLayerBLAFlag()) || m_apcSlicePilot->isBLA())
     3139    {
     3140      layerResetFlag = true;
     3141      dolLayerId = m_layerId;
     3142    }
     3143    else
     3144    {
     3145      layerResetFlag = false;
     3146    }
     3147
     3148    if (layerResetFlag)
     3149    {
     3150      for (Int i = 0; i < m_apcSlicePilot->getVPS()->getNumPredictedLayers(dolLayerId); i++)
     3151      {
     3152        UInt iLayerId = m_apcSlicePilot->getVPS()->getPredictedLayerId(dolLayerId, i);
     3153        m_ppcTDecTop[iLayerId]->m_layerInitializedFlag = false;
     3154        m_ppcTDecTop[iLayerId]->m_firstPicInLayerDecodedFlag = false;
     3155      }
     3156
     3157      for (TComList<TComPic*>::iterator i = m_cListPic.begin(); i != m_cListPic.end(); i++)
     3158      {
     3159        if ((*i)->getPOC() != m_apcSlicePilot->getPOC())
     3160        {
     3161          (*i)->getSlice(0)->setReferenced(false);
     3162        }
     3163      }
     3164
     3165      for (UInt i = 0; i < m_apcSlicePilot->getVPS()->getNumPredictedLayers(dolLayerId); i++)
     3166      {
     3167        UInt predLId = m_apcSlicePilot->getVPS()->getPredictedLayerId(dolLayerId, i);
     3168        for (TComList<TComPic*>::iterator pic = m_ppcTDecTop[predLId]->getListPic()->begin(); pic != m_ppcTDecTop[predLId]->getListPic()->end(); pic++)
     3169        {
     3170          if ((*pic)->getSlice(0)->getPOC() != m_apcSlicePilot->getPOC())
     3171          {
     3172            (*pic)->getSlice(0)->setReferenced(false);
     3173          }
     3174        }
     3175      }
     3176    }
     3177  }
     3178}
     3179
     3180Void TDecTop::xSetLayerInitializedFlag()
     3181{
     3182  if (m_apcSlicePilot->isIRAP() && m_apcSlicePilot->getNoRaslOutputFlag())
     3183  {
     3184    if (m_layerId == 0)
     3185    {
     3186      m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true);
     3187    }
     3188    else if (!m_ppcTDecTop[m_layerId]->getLayerInitializedFlag() && m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId) == 0)
     3189    {
     3190      m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true);
     3191    }
     3192    else if (!m_ppcTDecTop[m_layerId]->getLayerInitializedFlag())
     3193    {
     3194      Bool refLayersInitialized = true;
     3195      for (UInt j = 0; j < m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId); j++)
     3196      {
     3197        UInt refLayerId = m_apcSlicePilot->getVPS()->getRefLayerId(m_layerId, j);
     3198        if (!m_ppcTDecTop[refLayerId]->getLayerInitializedFlag())
     3199        {
     3200          refLayersInitialized = false;
     3201        }
     3202      }
     3203      if (refLayersInitialized)
     3204      {
     3205        m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true);
     3206      }
     3207    }
     3208  }
     3209}
     3210#endif
     3211
    31033212#endif //SVC_EXTENSION
    31043213
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h

    r953 r978  
    120120  Bool                    m_isLastNALWasEos;
    121121#endif
     122#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     123  Bool                    m_lastPicHasEos;
     124#endif
    122125#if SVC_EXTENSION
    123126  static UInt             m_prevPOC;        // POC of the previous slice
     
    350353  Void setConfModeFlag(Bool x) { m_confModeFlag = x; }
    351354#endif
     355#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     356  Void xCheckLayerReset();
     357  Void xSetNoRaslOutputFlag();
     358  Void xSetLayerInitializedFlag();
     359#endif
    352360};// END CLASS DEFINITION TDecTop
    353361
Note: See TracChangeset for help on using the changeset viewer.