Ignore:
Timestamp:
26 Jan 2015, 17:11:15 (10 years ago)
Author:
nokia
Message:

Implementation of JCTVC-R0235 - Processing of bitstreams without an available base layer

File:
1 edited

Legend:

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

    r978 r1005  
    8484#if SVC_EXTENSION
    8585  m_layerId = 0;
     86#if R0235_SMALLEST_LAYER_ID
     87  m_smallestLayerId = 0;
     88#endif
    8689#if AVC_BASE
    8790  m_pBLReconFile = NULL;
     
    10111014#if OUTPUT_LAYER_SET_INDEX
    10121015  // Following check should go wherever the VPS is activated
    1013   checkValueOfTargetOutputLayerSetIdx( m_apcSlicePilot->getVPS());
     1016#if R0235_SMALLEST_LAYER_ID
     1017  if (!m_apcSlicePilot->getVPS()->getBaseLayerAvailableFlag())
     1018  {
     1019    assert(nalu.m_layerId != 0);
     1020    assert(m_apcSlicePilot->getVPS()->getNumAddLayerSets() > 0);
     1021    if (getCommonDecoderParams()->getTargetOutputLayerSetIdx() >= 0)
     1022    {
     1023      UInt layerIdx = m_apcSlicePilot->getVPS()->getOutputLayerSetIdx(getCommonDecoderParams()->getTargetOutputLayerSetIdx());
     1024      assert(layerIdx > m_apcSlicePilot->getVPS()->getVpsNumLayerSetsMinus1());
     1025    }
     1026  }
     1027  if (m_apcSlicePilot->getVPS()->getNumAddLayerSets() == 0)
     1028  {
     1029    checkValueOfTargetOutputLayerSetIdx(m_apcSlicePilot->getVPS());
     1030  }
     1031#else
     1032  checkValueOfTargetOutputLayerSetIdx(m_apcSlicePilot->getVPS());
     1033#endif
    10141034#endif
    10151035#if RESOLUTION_BASED_DPB
     
    11431163#if NO_OUTPUT_OF_PRIOR_PICS
    11441164#if NO_CLRAS_OUTPUT_FLAG
     1165#if R0235_SMALLEST_LAYER_ID
     1166  if (m_layerId == m_smallestLayerId && m_apcSlicePilot->getRapPicFlag())
     1167#else
    11451168  if (m_layerId == 0 && m_apcSlicePilot->getRapPicFlag() )
     1169#endif
    11461170  {
    11471171    if (m_bFirstSliceInSequence)
     
    11751199  }
    11761200
     1201#if R0235_SMALLEST_LAYER_ID
     1202  m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag, m_smallestLayerId );
     1203#else
    11771204  m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag );
     1205#endif
    11781206#endif
    11791207
     
    26402668        cListPic->clear();
    26412669      }
     2670#endif
     2671#if R0235_SMALLEST_LAYER_ID
     2672      xDeriveSmallestLayerId(m_parameterSetManagerDecoder.getPrefetchedVPS(0));
    26422673#endif
    26432674      return false;
     
    31263157Void TDecTop::xCheckLayerReset()
    31273158{
     3159#if R0235_SMALLEST_LAYER_ID
     3160  if (m_apcSlicePilot->isIRAP() && m_layerId > m_smallestLayerId)
     3161#else
    31283162  if (m_apcSlicePilot->isIRAP() && m_layerId > 0)
     3163#endif
    31293164  {
    31303165    Bool layerResetFlag;
     
    32103245#endif
    32113246
     3247#if R0235_SMALLEST_LAYER_ID
     3248Void TDecTop::xDeriveSmallestLayerId(TComVPS* vps)
     3249{
     3250  UInt smallestLayerId;
     3251  UInt targetOlsIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx();
     3252  UInt targetDecLayerSetIdx = vps->getOutputLayerSetIdx(targetOlsIdx);
     3253  UInt lsIdx = targetDecLayerSetIdx;
     3254  UInt targetDecLayerIdList[MAX_LAYERS] = {0};
     3255
     3256  for (UInt i = 0, j = 0; i < vps->getNumLayersInIdList(lsIdx); i++)
     3257  {
     3258    if (vps->getNecessaryLayerFlag(targetOlsIdx, i))
     3259    {
     3260      targetDecLayerIdList[j++] = vps->getLayerSetLayerIdList(lsIdx, i);
     3261    }
     3262  }
     3263
     3264  if (targetDecLayerSetIdx <= vps->getVpsNumLayerSetsMinus1())
     3265  {
     3266    smallestLayerId = 0;
     3267  }
     3268  else if (vps->getNumLayersInIdList(targetDecLayerSetIdx) == 1)
     3269  {
     3270    smallestLayerId = 0;
     3271  }
     3272  else
     3273  {
     3274    smallestLayerId = targetDecLayerIdList[0];
     3275  }
     3276
     3277  for (UInt layer = 0; layer <= MAX_VPS_LAYER_ID_PLUS1 - 1; layer++)
     3278  {
     3279    m_ppcTDecTop[layer]->m_smallestLayerId = smallestLayerId;
     3280  }
     3281}
     3282#endif
     3283
    32123284#endif //SVC_EXTENSION
    32133285
Note: See TracChangeset for help on using the changeset viewer.