Changeset 908 in SHVCSoftware for branches/SHM-dev/source/Lib


Ignore:
Timestamp:
17 Oct 2014, 14:27:44 (11 years ago)
Author:
nokia
Message:

Fix layer sets layer id list initialization.

Location:
branches/SHM-dev/source/Lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp

    r904 r908  
    26702670  // For layer 0
    26712671  m_numLayerInIdList.push_back(1);
     2672#if FIX_LAYER_ID_INIT
     2673  m_layerSetLayerIdList.resize(m_vpsNumLayerSetsMinus1 + 1);
     2674#else
    26722675  m_layerSetLayerIdList.resize(m_numLayerSets);
     2676#endif
    26732677  m_layerSetLayerIdList[0].push_back(0);
    26742678 
    26752679  // For other layers
     2680#if FIX_LAYER_ID_INIT
     2681  for (Int i = 1; i <= m_vpsNumLayerSetsMinus1; i++)
     2682#else
    26762683  for( Int i = 1; i < m_numLayerSets; i++ )
     2684#endif
    26772685  {
    26782686    for( Int m = 0; m <= m_maxLayerId; m++)
     
    28532861}
    28542862
     2863#if FIX_LAYER_ID_INIT
     2864void TComVPS::deriveLayerIdListVariablesForAddLayerSets()
     2865{
     2866  m_layerSetLayerIdList.resize(m_vpsNumLayerSetsMinus1 + 1 + m_numAddLayerSets);
     2867
     2868  for (UInt i = 0; i < m_numAddLayerSets; i++)
     2869  {
     2870    Int layerNum = 0;
     2871    Int lsIdx = m_vpsNumLayerSetsMinus1 + 1 + i;
     2872    for (Int treeIdx = 1; treeIdx < m_numIndependentLayers; treeIdx++)
     2873    {
     2874      for (Int layerCnt = 0; layerCnt < m_highestLayerIdxPlus1[i][treeIdx]; layerCnt++)
     2875      {
     2876        m_layerSetLayerIdList[lsIdx].push_back(m_treePartitionLayerIdList[treeIdx][layerCnt]);
     2877        layerNum++;
     2878      }
     2879    }
     2880    m_numLayerInIdList.push_back(layerNum);
     2881  }
     2882}
     2883#else
    28552884void TComVPS::setLayerIdIncludedFlagsForAddLayerSets()
    28562885{
     
    28782907  }
    28792908}
     2909#endif
    28802910
    28812911#endif
  • branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h

    r904 r908  
    989989#endif
    990990#if Q0078_ADD_LAYER_SETS
     991#if FIX_LAYER_ID_INIT
     992  void    deriveLayerIdListVariablesForAddLayerSets();
     993#else
    991994  void    setLayerIdIncludedFlagsForAddLayerSets();
     995#endif
    992996  UInt    getVpsNumLayerSetsMinus1()                                             { return m_vpsNumLayerSetsMinus1; }
    993997  Void    setVpsNumLayerSetsMinus1(UInt x)                                       { m_vpsNumLayerSetsMinus1 = x; }
  • branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h

    r903 r908  
    186186
    187187#define DERIVE_LAYER_ID_LIST_VARIABLES   1      ///< Derived variables based on the variables in VPS - for use in syntax table parsing
     188#define FIX_LAYER_ID_INIT                1
    188189
    189190#define AVC_BASE                         1      ///< YUV BL reading for AVC base SVC
  • branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r903 r908  
    15261526    }
    15271527    vps->setNumLayerSets(vps->getNumLayerSets() + vps->getNumAddLayerSets());
     1528#if FIX_LAYER_ID_INIT
     1529    vps->deriveLayerIdListVariablesForAddLayerSets();
     1530#else
    15281531    vps->setLayerIdIncludedFlagsForAddLayerSets();
     1532#endif
    15291533  }
    15301534#endif
  • branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r903 r908  
    588588{
    589589#if R0042_PROFILE_INDICATION
     590#if FIX_LAYER_ID_INIT
     591  Bool bMultiLayerExtSpsFlag = (pcSPS->getLayerId() != 0 && pcSPS->getNumDirectRefLayers() != 0);
     592#else
    590593  Bool bMultiLayerExtSpsFlag = (pcSPS->getNumDirectRefLayers() != 0 ) ;
     594#endif
    591595#endif
    592596#if ENC_DEC_TRACE 
     
    10031007    }
    10041008  }
     1009#if !FIX_LAYER_ID_INIT  // It was still called because NECESSARY_FLAG does not exist and is by default "false"
    10051010#if !NECESSARY_FLAG   // Already called once in TAppEncTop.cpp
    10061011#if DERIVE_LAYER_ID_LIST_VARIABLES
    10071012  pcVPS->deriveLayerIdListVariables();
     1013#endif
    10081014#endif
    10091015#endif
Note: See TracChangeset for help on using the changeset viewer.