Changeset 908 in SHVCSoftware for branches


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

Fix layer sets layer id list initialization.

Location:
branches/SHM-dev/source
Files:
7 edited

Legend:

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

    r877 r908  
    17801780#if OUTPUT_LAYER_SETS_CONFIG
    17811781    // Simplifying the code in the #else section
     1782#if FIX_LAYER_ID_INIT
     1783    assert( scanStringToArray( cfg_highestLayerIdx[addLayerSet], m_numHighestLayerIdx[addLayerSet], "HighestLayerIdx", m_highestLayerIdx[addLayerSet] ) );
     1784#else
    17821785    assert( scanStringToArray( cfg_layerSetLayerIdList[addLayerSet], m_numLayerInIdList[addLayerSet], "NumLayerInIdList",  m_highestLayerIdx[addLayerSet] ) );
     1786#endif
    17831787#else
    17841788    if (m_numHighestLayerIdx[addLayerSet] > 0)
  • branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp

    r903 r908  
    14581458  }
    14591459#endif
     1460#if FIX_LAYER_ID_INIT
     1461  // The Layer ID List variables should be derived here.
     1462#if DERIVE_LAYER_ID_LIST_VARIABLES
     1463  vps->deriveLayerIdListVariables();
     1464#endif
     1465#endif
    14601466#if Q0078_ADD_LAYER_SETS
    14611467  vps->setPredictedLayerIds();
    14621468  vps->setTreePartitionLayerIdList();
     1469#if FIX_LAYER_ID_INIT
     1470  vps->deriveLayerIdListVariablesForAddLayerSets();
     1471#else
    14631472  vps->setLayerIdIncludedFlagsForAddLayerSets();
     1473#endif
    14641474#endif
    14651475#endif
     
    15191529#endif
    15201530 #if VPS_DPB_SIZE_TABLE
     1531#if !FIX_LAYER_ID_INIT  // must be derived earlier to not delete additional layer sets
    15211532  // The Layer ID List variables can be derived here. 
    15221533#if DERIVE_LAYER_ID_LIST_VARIABLES
    15231534  vps->deriveLayerIdListVariables();
     1535#endif
    15241536#endif
    15251537#if RESOLUTION_BASED_DPB
  • 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.