Changeset 979 in SHVCSoftware for branches


Ignore:
Timestamp:
13 Jan 2015, 17:32:39 (10 years ago)
Author:
seregin
Message:

port implementation of JCTVC-R0071 - IRAP and EOS cross-layer impacts (rev 978)

Location:
branches/SHM-upgrade/source
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.cpp

    r965 r979  
    888888  Int*    cfg_waveFrontSynchro[MAX_LAYERS];
    889889
     890#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     891  Int*    cfg_layerSwitchOffBegin[MAX_LAYERS];
     892  Int*    cfg_layerSwitchOffEnd[MAX_LAYERS];
     893#endif
     894
    890895#if MULTIPLE_PTL_SUPPORT
    891896  Bool    tmpIntraConstraintFlag;
     
    989994#if AUXILIARY_PICTURES
    990995    cfg_auxId[layer]                = &m_acLayerCfg[layer].m_auxId;
     996#endif
     997#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     998    cfg_layerSwitchOffBegin[layer] = &m_acLayerCfg[layer].m_layerSwitchOffBegin;
     999    cfg_layerSwitchOffEnd[layer]   = &m_acLayerCfg[layer].m_layerSwitchOffEnd;
    9911000#endif
    9921001#if MULTIPLE_PTL_SUPPORT
     
    17341743  ("AdaptiveResolutionChange",     m_adaptiveResolutionChange, 0, "Adaptive resolution change frame number. Should coincide with EL RAP picture. (0: disable)")
    17351744#endif
     1745#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     1746  ("LayerSwitchOffBegin%d", cfg_layerSwitchOffBegin, 0, MAX_LAYERS, "Switch layer %d off after given poc")
     1747  ("LayerSwitchOffEnd%d", cfg_layerSwitchOffEnd, 0, MAX_LAYERS, "Switch layer %d on at given poc")
     1748#endif
    17361749#if HIGHER_LAYER_IRAP_SKIP_FLAG
    17371750  ("SkipPictureAtArcSwitch",     m_skipPictureAtArcSwitch, false, "Code the higher layer picture in ARC up-switching as a skip picture. (0: disable)")
     
    19481961  m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat);
    19491962  m_chromaFormatIDC      = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat)));
     1963#endif
     1964
     1965#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     1966  for (Int layer = 0; layer < MAX_LAYERS; layer++)
     1967  {
     1968    if (m_acLayerCfg[layer].m_layerSwitchOffBegin < m_acLayerCfg[layer].m_layerSwitchOffEnd)
     1969    {
     1970      if (m_iGOPSize > 0 && (m_acLayerCfg[layer].m_layerSwitchOffBegin % m_iGOPSize) != 0)
     1971      {
     1972        printf("LayerSwitchOffBegin%d: Must be multiple of GOP size.\n", layer);
     1973        exit(EXIT_FAILURE);
     1974      }
     1975      if (m_acLayerCfg[layer].m_iIntraPeriod > 0 && (m_acLayerCfg[layer].m_layerSwitchOffEnd % m_acLayerCfg[layer].m_iIntraPeriod) != 0)
     1976      {
     1977        printf("LayerSwitchOffEnd%d: Must be IRAP picture.\n", layer);
     1978        exit(EXIT_FAILURE);
     1979      }
     1980    }
     1981  }
    19501982#endif
    19511983
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncLayerCfg.h

    r945 r979  
    154154#endif
    155155
     156#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     157  Int       m_layerSwitchOffBegin;
     158  Int       m_layerSwitchOffEnd;
     159#endif
     160
    156161#if MULTIPLE_PTL_SUPPORT
    157162  // profile/level
  • branches/SHM-upgrade/source/App/TAppEncoder/TAppEncTop.cpp

    r977 r979  
    806806    m_acTEncTop[layer].setAdaptiveResolutionChange               ( m_adaptiveResolutionChange );
    807807#endif
     808#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     809    m_acTEncTop[layer].setLayerSwitchOffBegin                    (m_acLayerCfg[layer].m_layerSwitchOffBegin);
     810    m_acTEncTop[layer].setLayerSwitchOffEnd                      (m_acLayerCfg[layer].m_layerSwitchOffEnd);
     811#endif
    808812#if AUXILIARY_PICTURES
    809813    m_acTEncTop[layer].setChromaFormatIDC                        ( m_acLayerCfg[layer].m_chromaFormatIDC );
  • branches/SHM-upgrade/source/Lib/TLibCommon/TypeDef.h

    r967 r979  
    173173#define VPS_EXTN_DIRECT_REF_LAYERS       1      ///< Include indication of direct dependency of layers in VPS extension
    174174#define M0040_ADAPTIVE_RESOLUTION_CHANGE 1
     175#define R0071_IRAP_EOS_CROSS_LAYER_IMPACTS 1
    175176
    176177#define VPS_VUI_TILES_NOT_IN_USE__FLAG   1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
  • branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.cpp

    r962 r979  
    105105  m_isLastNALWasEos = false;
    106106#endif
     107#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     108  m_lastPicHasEos = false;
     109#endif
    107110#if NO_CLRAS_OUTPUT_FLAG
    108111  m_noClrasOutputFlag          = false;
     
    972975      setNoClrasOutputFlag(true);
    973976    }
     977#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     978    else if( m_lastPicHasEos )
     979    {
     980      setNoClrasOutputFlag(true);
     981    }
     982#endif
    974983    else if ( m_apcSlicePilot->getBlaPicFlag() )
    975984    {
     
    16631672    }
    16641673#endif
     1674#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     1675    xCheckLayerReset();
     1676    xSetLayerInitializedFlag();
     1677#endif
    16651678    // Buffer initialize for prediction.
    16661679    m_cPrediction.initTempBuff(m_apcSlicePilot->getSPS()->getChromaFormatIdc());
     
    22462259#if P0297_VPS_POC_LSB_ALIGNED_FLAG
    22472260  setFirstPicInLayerDecodedFlag(true);
     2261#endif
     2262#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     2263  m_lastPicHasEos = false;
    22482264#endif
    22492265
     
    25262542#if Q0177_EOS_CHECKS
    25272543      assert( m_isLastNALWasEos == false );
     2544#if !R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
    25282545      //Check layer id of the nalu. if it is not 0, give a warning message and just return without doing anything.
    25292546      if (nalu.m_layerId > 0)
     
    25322549        return false;
    25332550      }
     2551#endif
    25342552      m_isLastNALWasEos = true;
     2553#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     2554      m_lastPicHasEos = true;
     2555#endif
    25352556#endif
    25362557      m_associatedIRAPType = NAL_UNIT_INVALID;
     
    30913112}
    30923113#endif
     3114
     3115#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     3116Void TDecTop::xCheckLayerReset()
     3117{
     3118  if (m_apcSlicePilot->isIRAP() && m_layerId > 0)
     3119  {
     3120    Bool layerResetFlag;
     3121    UInt dolLayerId;
     3122    if (m_lastPicHasEos)
     3123    {
     3124      layerResetFlag = true;
     3125      dolLayerId = m_layerId;
     3126    }
     3127    else if ((m_apcSlicePilot->isCRA() && m_apcSlicePilot->getHandleCraAsBlaFlag()) ||
     3128      (m_apcSlicePilot->isIDR() && m_apcSlicePilot->getCrossLayerBLAFlag()) || m_apcSlicePilot->isBLA())
     3129    {
     3130      layerResetFlag = true;
     3131      dolLayerId = m_layerId;
     3132    }
     3133    else
     3134    {
     3135      layerResetFlag = false;
     3136    }
     3137
     3138    if (layerResetFlag)
     3139    {
     3140      for (Int i = 0; i < m_apcSlicePilot->getVPS()->getNumPredictedLayers(dolLayerId); i++)
     3141      {
     3142        UInt iLayerId = m_apcSlicePilot->getVPS()->getPredictedLayerId(dolLayerId, i);
     3143        m_ppcTDecTop[iLayerId]->m_layerInitializedFlag = false;
     3144        m_ppcTDecTop[iLayerId]->m_firstPicInLayerDecodedFlag = false;
     3145      }
     3146
     3147      for (TComList<TComPic*>::iterator i = m_cListPic.begin(); i != m_cListPic.end(); i++)
     3148      {
     3149        if ((*i)->getPOC() != m_apcSlicePilot->getPOC())
     3150        {
     3151          (*i)->getSlice(0)->setReferenced(false);
     3152        }
     3153      }
     3154
     3155      for (UInt i = 0; i < m_apcSlicePilot->getVPS()->getNumPredictedLayers(dolLayerId); i++)
     3156      {
     3157        UInt predLId = m_apcSlicePilot->getVPS()->getPredictedLayerId(dolLayerId, i);
     3158        for (TComList<TComPic*>::iterator pic = m_ppcTDecTop[predLId]->getListPic()->begin(); pic != m_ppcTDecTop[predLId]->getListPic()->end(); pic++)
     3159        {
     3160          if ((*pic)->getSlice(0)->getPOC() != m_apcSlicePilot->getPOC())
     3161          {
     3162            (*pic)->getSlice(0)->setReferenced(false);
     3163          }
     3164        }
     3165      }
     3166    }
     3167  }
     3168}
     3169
     3170Void TDecTop::xSetLayerInitializedFlag()
     3171{
     3172  if (m_apcSlicePilot->isIRAP() && m_apcSlicePilot->getNoRaslOutputFlag())
     3173  {
     3174    if (m_layerId == 0)
     3175    {
     3176      m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true);
     3177    }
     3178    else if (!m_ppcTDecTop[m_layerId]->getLayerInitializedFlag() && m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId) == 0)
     3179    {
     3180      m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true);
     3181    }
     3182    else if (!m_ppcTDecTop[m_layerId]->getLayerInitializedFlag())
     3183    {
     3184      Bool refLayersInitialized = true;
     3185      for (UInt j = 0; j < m_apcSlicePilot->getVPS()->getNumDirectRefLayers(m_layerId); j++)
     3186      {
     3187        UInt refLayerId = m_apcSlicePilot->getVPS()->getRefLayerId(m_layerId, j);
     3188        if (!m_ppcTDecTop[refLayerId]->getLayerInitializedFlag())
     3189        {
     3190          refLayersInitialized = false;
     3191        }
     3192      }
     3193      if (refLayersInitialized)
     3194      {
     3195        m_ppcTDecTop[m_layerId]->setLayerInitializedFlag(true);
     3196      }
     3197    }
     3198  }
     3199}
     3200#endif
     3201
    30933202#endif //SVC_EXTENSION
    30943203
  • branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.h

    r962 r979  
    124124  Bool                    m_isLastNALWasEos;
    125125#endif
     126#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     127  Bool                    m_lastPicHasEos;
     128#endif
    126129  static UInt             m_prevPOC;        // POC of the previous slice
    127130  static UInt             m_uiPrevLayerId;  // LayerId of the previous slice
     
    356359  Void resetPocRestrictionCheckParameters();
    357360#endif
     361#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     362  Void xCheckLayerReset();
     363  Void xSetNoRaslOutputFlag();
     364  Void xSetLayerInitializedFlag();
     365#endif
    358366};// END CLASS DEFINITION TDecTop
    359367
  • branches/SHM-upgrade/source/Lib/TLibEncoder/TEncCfg.h

    r916 r979  
    372372#if M0040_ADAPTIVE_RESOLUTION_CHANGE
    373373  Int       m_adaptiveResolutionChange;
     374#endif
     375#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     376  int       m_layerSwitchOffBegin;
     377  int       m_layerSwitchOffEnd;
    374378#endif
    375379#if O0153_ALT_OUTPUT_LAYER_FLAG
     
    10481052  Int       getAdaptiveResolutionChange()      { return m_adaptiveResolutionChange; }
    10491053#endif
     1054#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     1055  Void      setLayerSwitchOffBegin(Int x)    { m_layerSwitchOffBegin = x;    }
     1056  Int       getLayerSwitchOffBegin()         { return m_layerSwitchOffBegin; }
     1057  Void      setLayerSwitchOffEnd(Int x)      { m_layerSwitchOffEnd = x;      }
     1058  Int       getLayerSwitchOffEnd()           { return m_layerSwitchOffEnd;   }
     1059#endif
    10501060#if HIGHER_LAYER_IRAP_SKIP_FLAG
    10511061  Void      setSkipPictureAtArcSwitch(Int x) { m_skipPictureAtArcSwitch = x;    }
  • branches/SHM-upgrade/source/Lib/TLibEncoder/TEncGOP.cpp

    r946 r979  
    122122  m_lastPocPeriodId = -1;
    123123#endif
     124#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     125  m_noRaslOutputFlag = false;
     126  m_prevPicHasEos    = false;
     127#endif
    124128#endif //SVC_EXTENSION
    125129  return;
     
    946950    }
    947951#endif
     952#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     953    if (pocCurr > m_pcEncTop->getLayerSwitchOffBegin() && pocCurr < m_pcEncTop->getLayerSwitchOffEnd())
     954    {
     955      continue;
     956    }
     957#endif
    948958
    949959    if( getNalUnitType(pocCurr, m_iLastIDR, isField) == NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType(pocCurr, m_iLastIDR, isField) == NAL_UNIT_CODED_SLICE_IDR_N_LP )
     
    11001110    }
    11011111#endif
     1112#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     1113    // Set the nal unit type
     1114    pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR, isField));
     1115#endif
    11021116#if NO_CLRAS_OUTPUT_FLAG
    11031117    if (m_layerId == 0 &&
     
    11131127        m_pcEncTop->setNoClrasOutputFlag(true);
    11141128      }
     1129#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     1130      else if (m_prevPicHasEos)
     1131      {
     1132        m_pcEncTop->setNoClrasOutputFlag(true);
     1133      }
     1134#endif
    11151135      else if (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_LP
    11161136            || pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_BLA_W_RADL
     
    11391159      }
    11401160    }
     1161#endif
     1162#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     1163    xCheckLayerReset(pcSlice);
     1164    xSetNoRaslOutputFlag(pcSlice);
     1165    xSetLayerInitializedFlag(pcSlice);
    11411166#endif
    11421167#if M0040_ADAPTIVE_RESOLUTION_CHANGE
     
    12521277    }
    12531278   
     1279#if !R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
    12541280    // Set the nal unit type
    12551281    pcSlice->setNalUnitType(getNalUnitType(pocCurr, m_iLastIDR, isField));
     1282#endif
    12561283#if SVC_EXTENSION
    12571284    if (m_layerId > 0)
     
    28532880      m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
    28542881
    2855       pcSlice->setNoRaslOutputFlag(false);
     2882#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
    28562883      if (pcSlice->isIRAP())
    28572884      {
    2858         if (pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_IDR_N_LP)
    2859         {
    2860           pcSlice->setNoRaslOutputFlag(true);
    2861         }
    28622885        //the inference for NoOutputPriorPicsFlag
    28632886        // KJS: This cannot happen at the encoder
    2864         if (!m_bFirst && pcSlice->isIRAP() && pcSlice->getNoRaslOutputFlag())
     2887        if (!m_bFirst && pcSlice->isIRAP() && m_noRaslOutputFlag)
    28652888        {
    28662889          if (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA)
     
    28702893        }
    28712894      }
     2895#else
     2896      pcSlice->setNoRaslOutputFlag(false);
     2897      if (pcSlice->isIRAP())
     2898      {
     2899        if (pcSlice->getNalUnitType() >= NAL_UNIT_CODED_SLICE_BLA_W_LP && pcSlice->getNalUnitType() <= NAL_UNIT_CODED_SLICE_IDR_N_LP)
     2900        {
     2901          pcSlice->setNoRaslOutputFlag(true);
     2902        }
     2903        //the inference for NoOutputPriorPicsFlag
     2904        // KJS: This cannot happen at the encoder
     2905        if (!m_bFirst && pcSlice->isIRAP() && pcSlice->getNoRaslOutputFlag())
     2906        {
     2907          if (pcSlice->getNalUnitType() == NAL_UNIT_CODED_SLICE_CRA)
     2908          {
     2909            pcSlice->setNoOutputPriorPicsFlag(true);
     2910          }
     2911        }
     2912      }
     2913#endif
    28722914
    28732915      tmpBitsBeforeWriting = m_pcEntropyCoder->getNumberOfWrittenBits();
     
    33623404      }
    33633405    }
     3406
     3407#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     3408    m_prevPicHasEos = false;
     3409    if (m_pcCfg->getLayerSwitchOffBegin() < m_pcCfg->getLayerSwitchOffEnd())
     3410    {
     3411      Int pocNext;
     3412      if (iGOPid == m_iGopSize - 1)
     3413      {
     3414        pocNext = iPOCLast - iNumPicRcvd + m_iGopSize + m_pcCfg->getGOPEntry(0).m_POC;
     3415      }
     3416      else
     3417      {
     3418        pocNext = iPOCLast - iNumPicRcvd + m_pcCfg->getGOPEntry(iGOPid + 1).m_POC;
     3419      }
     3420
     3421      if (pocNext > m_pcCfg->getLayerSwitchOffBegin() && pocCurr < m_pcCfg->getLayerSwitchOffEnd())
     3422      {
     3423        OutputNALUnit nalu(NAL_UNIT_EOS, pcSlice->getTLayer(), pcSlice->getLayerId());
     3424        m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);
     3425        accessUnit.push_back(new NALUnitEBSP(nalu));
     3426        m_prevPicHasEos = true;
     3427      }
     3428    }
     3429#endif
    33643430
    33653431    xResetNonNestedSEIPresentFlags();
     
    52055271}
    52065272#endif
     5273
     5274#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     5275Void TEncGOP::xCheckLayerReset(TComSlice *slice)
     5276{
     5277  Bool layerResetFlag;
     5278  Int dolLayerId;
     5279
     5280  if (slice->isIRAP() && slice->getLayerId() > 0)
     5281  {
     5282    if (m_prevPicHasEos)
     5283    {
     5284      layerResetFlag = true;
     5285      dolLayerId = slice->getLayerId();
     5286    }
     5287    else if ((slice->isCRA() && slice->getHandleCraAsBlaFlag()) || (slice->isIDR() && slice->getCrossLayerBLAFlag()) || slice->isBLA())
     5288    {
     5289      layerResetFlag = true;
     5290      dolLayerId = slice->getLayerId();
     5291    }
     5292    else
     5293    {
     5294      layerResetFlag = false;
     5295    }
     5296
     5297    if (layerResetFlag)
     5298    {
     5299      for (Int i = 0; i < slice->getVPS()->getNumPredictedLayers(dolLayerId); i++)
     5300      {
     5301        Int iLayerId = slice->getVPS()->getPredictedLayerId(dolLayerId, i);
     5302        m_ppcTEncTop[iLayerId]->setLayerInitializedFlag(false);
     5303        m_ppcTEncTop[iLayerId]->setFirstPicInLayerDecodedFlag(false);
     5304      }
     5305
     5306      // Each picture that is in the DPB and has nuh_layer_id equal to dolLayerId is marked as "unused for reference".
     5307      for (TComList<TComPic*>::iterator pic = m_ppcTEncTop[dolLayerId]->getListPic()->begin(); pic != m_ppcTEncTop[dolLayerId]->getListPic()->end(); pic++)
     5308      {
     5309        if ((*pic)->getSlice(0)->getPOC() != slice->getPOC())
     5310        {
     5311          (*pic)->getSlice(0)->setReferenced(false);
     5312        }
     5313      }
     5314
     5315      // Each picture that is in DPB and has nuh_layer_id equal to any value of IdPredictedLayer[dolLayerId][i]
     5316      // for the values of i in range of 0 to NumPredictedLayers[dolLayerId] - 1, inclusive, is marked as "unused for reference"
     5317      for (UInt i = 0; i < slice->getVPS()->getNumPredictedLayers(dolLayerId); i++)
     5318      {
     5319        UInt predLId = slice->getVPS()->getPredictedLayerId(dolLayerId, i);
     5320        for (TComList<TComPic*>::iterator pic = m_ppcTEncTop[predLId]->getListPic()->begin(); pic != m_ppcTEncTop[predLId]->getListPic()->end(); pic++)
     5321        {
     5322          if ((*pic)->getSlice(0)->getPOC() != slice->getPOC())
     5323          {
     5324            (*pic)->getSlice(0)->setReferenced(false);
     5325          }
     5326        }
     5327      }
     5328    }
     5329  }
     5330}
     5331
     5332Void TEncGOP::xSetNoRaslOutputFlag(TComSlice *slice)
     5333{
     5334  if (slice->isIRAP())
     5335  {
     5336    m_noRaslOutputFlag = slice->getHandleCraAsBlaFlag();  // default value
     5337    if (slice->isIDR() || slice->isBLA() || m_bFirst || m_prevPicHasEos)
     5338    {
     5339      m_noRaslOutputFlag = true;
     5340    }
     5341    else if (!m_ppcTEncTop[m_layerId]->getLayerInitializedFlag())
     5342    {
     5343      Bool refLayersInitialized = true;
     5344      for (UInt j = 0; j < slice->getVPS()->getNumDirectRefLayers(m_layerId); j++)
     5345      {
     5346        UInt refLayerId = slice->getVPS()->getRefLayerId(m_layerId, j);
     5347        if (!m_ppcTEncTop[refLayerId]->getLayerInitializedFlag())
     5348        {
     5349          refLayersInitialized = false;
     5350        }
     5351      }
     5352      if (refLayersInitialized)
     5353      {
     5354        m_noRaslOutputFlag = true;
     5355      }
     5356    }
     5357  }
     5358}
     5359
     5360Void TEncGOP::xSetLayerInitializedFlag(TComSlice *slice)
     5361{
     5362  if (slice->isIRAP() && m_noRaslOutputFlag)
     5363  {
     5364    if (m_layerId == 0)
     5365    {
     5366      m_ppcTEncTop[m_layerId]->setLayerInitializedFlag(true);
     5367    }
     5368    else if (!m_ppcTEncTop[m_layerId]->getLayerInitializedFlag() && slice->getVPS()->getNumDirectRefLayers(m_layerId) == 0)
     5369    {
     5370      m_ppcTEncTop[m_layerId]->setLayerInitializedFlag(true);
     5371    }
     5372    else if (!m_ppcTEncTop[m_layerId]->getLayerInitializedFlag())
     5373    {
     5374      Bool refLayersInitialized = true;
     5375      for (UInt j = 0; j < slice->getVPS()->getNumDirectRefLayers(m_layerId); j++)
     5376      {
     5377        UInt refLayerId = slice->getVPS()->getRefLayerId(m_layerId, j);
     5378        if (!m_ppcTEncTop[refLayerId]->getLayerInitializedFlag())
     5379        {
     5380          refLayersInitialized = false;
     5381        }
     5382      }
     5383      if (refLayersInitialized)
     5384      {
     5385        m_ppcTEncTop[m_layerId]->setLayerInitializedFlag(true);
     5386      }
     5387    }
     5388  }
     5389}
     5390#endif // R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     5391
    52075392#endif //SVC_EXTENSION
    52085393
  • branches/SHM-upgrade/source/Lib/TLibEncoder/TEncGOP.h

    r916 r979  
    153153  Int   m_lastPocPeriodId;
    154154#endif
     155#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     156  Bool  m_noRaslOutputFlag;
     157  Bool  m_prevPicHasEos;
     158#endif
    155159#endif
    156160 
     
    280284  Void free_mem2DintWithPad(Int **array2D, Int iPadY, Int iPadX);
    281285#endif
     286#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     287  Void xCheckLayerReset(TComSlice *slice);
     288  Void xSetNoRaslOutputFlag(TComSlice *slice);
     289  Void xSetLayerInitializedFlag(TComSlice *slice);
     290#endif
    282291#endif //SVC_EXTENSION
    283292};// END CLASS DEFINITION TEncGOP
  • branches/SHM-upgrade/source/Lib/TLibEncoder/TEncTop.h

    r916 r979  
    163163  Int                     m_currPocMsb;
    164164#endif
     165#if R0071_IRAP_EOS_CROSS_LAYER_IMPACTS
     166  Bool                    m_prevPicHasEos;
     167#endif
    165168#endif //SVC_EXTENSION
    166169protected:
Note: See TracChangeset for help on using the changeset viewer.