Changeset 160 in SHVCSoftware for branches


Ignore:
Timestamp:
8 May 2013, 04:00:23 (12 years ago)
Author:
qualcomm
Message:

Layer ID list-related derived variables in VPS (MACRO: DERIVE_LAYER_ID_LIST_VARIABLES)

Derive variables layerSetLayerIdList and numLayerInIdList (variables derived L1003_v34). Useful for parsing syntax elements in the VPS.

From: Adarsh K. Ramasubramonian <aramasub@…>

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

Legend:

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

    r154 r160  
    16491649  ::memset(m_refLayerId,           0, sizeof(m_refLayerId          ));
    16501650#endif
     1651#if DERIVE_LAYER_ID_LIST_VARIABLES
     1652  ::memset(m_layerSetLayerIdList,  0, sizeof(m_layerSetLayerIdList));
     1653  ::memset(m_numLayerInIdList,     0, sizeof(m_numLayerInIdList   ));
     1654#endif
    16511655}
    16521656
     
    16571661  if( m_cprmsPresentFlag != NULL )     delete[] m_cprmsPresentFlag;
    16581662}
    1659 
     1663#if DERIVE_LAYER_ID_LIST_VARIABLES
     1664Void TComVPS::deriveLayerIdListVariables()
     1665{
     1666  // For layer 0
     1667  setNumLayersInIdList(0, 1);
     1668  setLayerSetLayerIdList(0, 0, 0);
     1669
     1670  // For other layers
     1671  Int i, m, n;
     1672  for( i = 1; i <= getNumLayerSets() - 1; i++ )
     1673  {
     1674    n = 0;
     1675    for( m = 0; m <= this->getMaxLayerId(); m++)
     1676    {
     1677      if(this->getLayerIdIncludedFlag(i, m))
     1678      {
     1679        setLayerSetLayerIdList(i, n, m);
     1680        n++;
     1681      }
     1682    }
     1683    setNumLayersInIdList(i, n);
     1684  }
     1685}
     1686#endif
    16601687// ------------------------------------------------------------------------------------------------
    16611688// Sequence parameter set (SPS)
  • branches/SHM-2.0-dev/source/Lib/TLibCommon/TComSlice.h

    r134 r160  
    504504  Bool        m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1];
    505505#endif
    506 
     506#if DERIVE_LAYER_ID_LIST_VARIABLES
     507  Int         m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
     508  Int         m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1];
     509#endif
    507510  TComPTL     m_pcPTL;
    508511#if SIGNAL_BITRATE_PICRATE_IN_VPS
     
    604607  Bool    getLayerIdIncludedFlag(UInt opsIdx, UInt id)          { return m_layerIdIncludedFlag[opsIdx][id]; }
    605608  Void    setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id)  { m_layerIdIncludedFlag[opsIdx][id] = v;    }
    606 
     609#if DERIVE_LAYER_ID_LIST_VARIABLES
     610  Int     getLayerSetLayerIdList(Int set, Int layerId)          { return m_layerSetLayerIdList[set][layerId]; }
     611  Void    setLayerSetLayerIdList(Int set, Int layerId, Int x)   { m_layerSetLayerIdList[set][layerId] = x   ; }
     612
     613  Int     getNumLayersInIdList(Int set)                          { return m_numLayerInIdList[set]; }
     614  Void    setNumLayersInIdList(Int set, Int x)                   { m_numLayerInIdList[set] = x   ; }
     615
     616  Void    deriveLayerIdListVariables();
     617#endif
    607618  TComPTL* getPTL() { return &m_pcPTL; }
    608619#if SIGNAL_BITRATE_PICRATE_IN_VPS
  • branches/SHM-2.0-dev/source/Lib/TLibCommon/TypeDef.h

    r157 r160  
    5757#define VPS_MOVE_DIR_DEPENDENCY_FLAG     1      ///< Move the syntax element direct_dependency_flag to follow the syntax element dimension_id
    5858#endif
     59
     60#define DERIVE_LAYER_ID_LIST_VARIABLES   1      ///< Derived variables based on the variables in VPS - for use in syntax table parsing
    5961
    6062#define SVC_COL_BLK                      1      ///< get co-located block
  • branches/SHM-2.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r157 r160  
    788788    }
    789789  }
     790#if DERIVE_LAYER_ID_LIST_VARIABLES
     791  pcVPS->deriveLayerIdListVariables();
     792#endif
    790793#if L0043_TIMING_INFO
    791794  TimingInfo *timingInfo = pcVPS->getTimingInfo();
  • branches/SHM-2.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r159 r160  
    622622    }
    623623  }
     624#if DERIVE_LAYER_ID_LIST_VARIABLES
     625  pcVPS->deriveLayerIdListVariables();
     626#endif
    624627#if L0043_TIMING_INFO
    625628  TimingInfo *timingInfo = pcVPS->getTimingInfo();
Note: See TracChangeset for help on using the changeset viewer.