Changeset 1006 in SHVCSoftware for branches/SHM-upgrade/source/Lib/TLibDecoder


Ignore:
Timestamp:
27 Jan 2015, 19:44:15 (10 years ago)
Author:
seregin
Message:

port implementation of JCTVC-R0235 - Processing of bitstreams without an available base layer (rev 1005)

Location:
branches/SHM-upgrade/source/Lib/TLibDecoder
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-upgrade/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r1002 r1006  
    15251525          for(Int kk = 0; kk < pcSlice->getVPS()->getNumLayersInIdList(layerSetIdxForOutputLayerSet); kk++)
    15261526          {
     1527#if R0235_SMALLEST_LAYER_ID
     1528            if( pcSlice->getVPS()->getNecessaryLayerFlag(ii, kk) && pcSlice->getLayerId() == pcSlice->getVPS()->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, kk) )
     1529#else
    15271530            if(pcSlice->getLayerId() == pcSlice->getVPS()->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, kk))
     1531#endif
    15281532            {
    15291533              chkAssert=1;
     
    32183222#endif
    32193223      {
    3220         READ_CODE( numBitsForPtlIdx, uiCode, "profile_level_tier_idx[i]" );
     3224        READ_CODE( numBitsForPtlIdx, uiCode, "profile_tier_level_idx[i]" );
    32213225        vps->setProfileLevelTierIdx(i, j, uiCode );
    32223226
     
    32283232        //If OpTid of the output operation point is equal to vps_max_sub_layer_minus1, the conformance is indicated by general_profile_idc being equal to 7 or general_profile_compatibility_flag[ 7 ] being equal to 1
    32293233        //The following assert may be updated / upgraded to take care of general_profile_compatibility_flag.
     3234#if R0235_SMALLEST_LAYER_ID
     3235        // The assertion below is not valid for independent non-base layers
     3236        if (vps->getNumAddLayerSets() == 0)
     3237        {
     3238#endif
    32303239        if (j > 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) != 0 && vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j - 1) != 0)
    32313240        {
     
    32343243                 vps->getPTL(vps->getProfileLevelTierIdx(i, j))->getGeneralPTL()->getProfileCompatibilityFlag(vps->getPTL(vps->getProfileLevelTierIdx(i, j - 1))->getGeneralPTL()->getProfileIdc())  );
    32353244        }
     3245#if R0235_SMALLEST_LAYER_ID
     3246        }
     3247#endif
    32363248#endif
    32373249      }
     
    32433255      numBits++;
    32443256    }
    3245     READ_CODE( numBits, uiCode, "profile_level_tier_idx[i]" );     vps->setProfileLevelTierIdx(i, uiCode);
     3257    READ_CODE( numBits, uiCode, "profile_tier_level_idx[i]" );     vps->setProfileLevelTierIdx(i, uiCode);
    32463258#endif
    32473259#if P0300_ALT_OUTPUT_LAYER_FLAG
  • branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.cpp

    r1000 r1006  
    9191#if SVC_EXTENSION
    9292  m_layerId = 0;
     93#if R0235_SMALLEST_LAYER_ID
     94  m_smallestLayerId = 0;
     95#endif
    9396#if AVC_BASE
    9497  m_pBLReconFile = NULL;
     
    838841#if OUTPUT_LAYER_SET_INDEX
    839842  // Following check should go wherever the VPS is activated
     843#if R0235_SMALLEST_LAYER_ID
     844  if (!m_apcSlicePilot->getVPS()->getBaseLayerAvailableFlag())
     845  {
     846    assert(nalu.m_layerId != 0);
     847    assert(m_apcSlicePilot->getVPS()->getNumAddLayerSets() > 0);
     848    if (getCommonDecoderParams()->getTargetOutputLayerSetIdx() >= 0)
     849    {
     850      UInt layerIdx = m_apcSlicePilot->getVPS()->getOutputLayerSetIdx(getCommonDecoderParams()->getTargetOutputLayerSetIdx());
     851      assert(layerIdx > m_apcSlicePilot->getVPS()->getVpsNumLayerSetsMinus1());
     852    }
     853  }
     854  if (m_apcSlicePilot->getVPS()->getNumAddLayerSets() == 0)
     855  {
     856    checkValueOfTargetOutputLayerSetIdx(m_apcSlicePilot->getVPS());
     857  }
     858#else
    840859  checkValueOfTargetOutputLayerSetIdx( m_apcSlicePilot->getVPS());
     860#endif
    841861#endif
    842862#if RESOLUTION_BASED_DPB
     
    969989#if NO_OUTPUT_OF_PRIOR_PICS
    970990#if NO_CLRAS_OUTPUT_FLAG
     991#if R0235_SMALLEST_LAYER_ID
     992  if (m_layerId == m_smallestLayerId && m_apcSlicePilot->getRapPicFlag())
     993#else
    971994  if (m_layerId == 0 && m_apcSlicePilot->getRapPicFlag() )
     995#endif
    972996  {
    973997    if (m_bFirstSliceInSequence)
     
    10011025  }
    10021026
     1027#if R0235_SMALLEST_LAYER_ID
     1028  m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag, m_smallestLayerId );
     1029#else
    10031030  m_apcSlicePilot->decodingRefreshMarking( m_cListPic, m_noClrasOutputFlag );
     1031#endif
    10041032#endif
    10051033
     
    24702498        cListPic->clear();
    24712499      }
     2500#endif
     2501#if R0235_SMALLEST_LAYER_ID
     2502      xDeriveSmallestLayerId(m_parameterSetManagerDecoder.getPrefetchedVPS(0));
    24722503#endif
    24732504      return false;
     
    31163147Void TDecTop::xCheckLayerReset()
    31173148{
     3149#if R0235_SMALLEST_LAYER_ID
     3150  if (m_apcSlicePilot->isIRAP() && m_layerId > m_smallestLayerId)
     3151#else
    31183152  if (m_apcSlicePilot->isIRAP() && m_layerId > 0)
     3153#endif
    31193154  {
    31203155    Bool layerResetFlag;
     
    32003235#endif
    32013236
     3237#if R0235_SMALLEST_LAYER_ID
     3238Void TDecTop::xDeriveSmallestLayerId(TComVPS* vps)
     3239{
     3240  UInt smallestLayerId;
     3241  UInt targetOlsIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx();
     3242  UInt targetDecLayerSetIdx = vps->getOutputLayerSetIdx(targetOlsIdx);
     3243  UInt lsIdx = targetDecLayerSetIdx;
     3244  UInt targetDecLayerIdList[MAX_LAYERS] = {0};
     3245
     3246  for (UInt i = 0, j = 0; i < vps->getNumLayersInIdList(lsIdx); i++)
     3247  {
     3248    if (vps->getNecessaryLayerFlag(targetOlsIdx, i))
     3249    {
     3250      targetDecLayerIdList[j++] = vps->getLayerSetLayerIdList(lsIdx, i);
     3251    }
     3252  }
     3253
     3254  if (targetDecLayerSetIdx <= vps->getVpsNumLayerSetsMinus1())
     3255  {
     3256    smallestLayerId = 0;
     3257  }
     3258  else if (vps->getNumLayersInIdList(targetDecLayerSetIdx) == 1)
     3259  {
     3260    smallestLayerId = 0;
     3261  }
     3262  else
     3263  {
     3264    smallestLayerId = targetDecLayerIdList[0];
     3265  }
     3266
     3267  for (UInt layer = 0; layer <= MAX_VPS_LAYER_ID_PLUS1 - 1; layer++)
     3268  {
     3269    m_ppcTDecTop[layer]->m_smallestLayerId = smallestLayerId;
     3270  }
     3271}
     3272#endif
     3273
    32023274#endif //SVC_EXTENSION
    32033275
  • branches/SHM-upgrade/source/Lib/TLibDecoder/TDecTop.h

    r979 r1006  
    133133  UInt                    m_numLayer;
    134134  TDecTop**               m_ppcTDecTop;
     135#if R0235_SMALLEST_LAYER_ID
     136  UInt                    m_smallestLayerId;
     137#endif
    135138#if P0297_VPS_POC_LSB_ALIGNED_FLAG
    136139  Bool                    m_pocResettingFlag;
     
    256259  Void      setLayerDec(TDecTop **p)    { m_ppcTDecTop = p; }
    257260  TDecTop*  getLayerDec(UInt layer)     { return m_ppcTDecTop[layer]; }
     261#if R0235_SMALLEST_LAYER_ID
     262  Void      xDeriveSmallestLayerId(TComVPS* vps);
     263#endif
    258264#if VPS_EXTN_DIRECT_REF_LAYERS
    259265  TDecTop*  getRefLayerDec(UInt refLayerIdc);
Note: See TracChangeset for help on using the changeset viewer.