Index: /branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h	(revision 1045)
+++ /branches/SHM-dev/source/Lib/TLibCommon/CommonDef.h	(revision 1046)
@@ -317,5 +317,5 @@
   CommonDecoderParams():
 #if FIX_CONF_MODE
-    m_targetLayerId(MAX_VPS_LAYER_ID_PLUS1)
+    m_targetLayerId(MAX_VPS_LAYER_IDX_PLUS1)
 #else
     m_targetLayerId(0)
Index: /branches/SHM-dev/source/Lib/TLibCommon/SEI.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/SEI.h	(revision 1045)
+++ /branches/SHM-dev/source/Lib/TLibCommon/SEI.h	(revision 1046)
@@ -919,5 +919,5 @@
   UInt m_seiBspCombScheddx[MAX_VPS_LAYER_SETS_PLUS1][16][16];
   UInt m_vpsMaxLayers;
-  Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
+  Bool m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
 
   TComHRD *hrd;
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1045)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1046)
@@ -2125,8 +2125,8 @@
 #endif
   m_maxTidRefPresentFlag = true;
-  for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++)
+  for( Int i = 0; i < MAX_VPS_LAYER_IDX_PLUS1 - 1; i++)
   {
 #if O0225_MAX_TID_FOR_REF_LAYERS
-    for( Int j = 0; j < MAX_VPS_LAYER_ID_PLUS1; j++)
+    for( Int j = 0; j < MAX_VPS_LAYER_IDX_PLUS1; j++)
     {
       m_maxTidIlRefPicsPlus1[i][j] = m_uiMaxTLayers + 1;
@@ -3528,5 +3528,5 @@
       Int layerNum = 0;
       Int lsIdx = m_vpsNumLayerSetsMinus1 + 1 + i;
-      for (Int layerId = 0; layerId < MAX_VPS_LAYER_ID_PLUS1; layerId++)
+      for (Int layerId = 0; layerId < MAX_VPS_LAYER_IDX_PLUS1; layerId++)
       {
         m_layerIdIncludedFlag[lsIdx][layerId] = false;
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1045)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1046)
@@ -636,9 +636,9 @@
   std::vector<Int>                      m_numLayerInIdList;;
 #else
-  Int         m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_ID_PLUS1];
+  Int         m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_IDX_PLUS1];
   Int         m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS];
 #endif
 #else
-  Int         m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
+  Int         m_layerSetLayerIdList[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
   Int         m_numLayerInIdList[MAX_VPS_LAYER_SETS_PLUS1];
 #endif
@@ -653,7 +653,7 @@
 #if Q0078_ADD_LAYER_SETS
   UInt        m_vpsNumLayerSetsMinus1;
-  Bool        m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_ID_PLUS1];
-#else
-  Bool        m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
+  Bool        m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1 + MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_IDX_PLUS1];
+#else
+  Bool        m_layerIdIncludedFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
 #endif
 
@@ -671,10 +671,10 @@
   UInt       m_dimensionIdLen[MAX_VPS_NUM_SCALABILITY_TYPES];
   Bool       m_nuhLayerIdPresentFlag;
-  UInt       m_layerIdInNuh[MAX_VPS_LAYER_ID_PLUS1];            // Maps layer ID in the VPS with layer_id_in_nuh
-  UInt       m_dimensionId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_NUM_SCALABILITY_TYPES];
+  UInt       m_layerIdInNuh[MAX_VPS_LAYER_IDX_PLUS1];            // Maps layer ID in the VPS with layer_id_in_nuh
+  UInt       m_dimensionId[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_NUM_SCALABILITY_TYPES];
 
   // Below are derived variables
   UInt       m_numScalabilityTypes;
-  UInt       m_layerIdxInVps[MAX_VPS_LAYER_ID_PLUS1];            // Maps layer_id_in_nuh with the layer ID in the VPS
+  UInt       m_layerIdxInVps[MAX_VPS_LAYER_IDX_PLUS1];            // Maps layer_id_in_nuh with the layer ID in the VPS
 #endif
 #if BITRATE_PICRATE_SIGNALLING
@@ -703,14 +703,14 @@
 #if Q0078_ADD_LAYER_SETS
   UInt       m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS];
-  Bool       m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_ID_PLUS1];
+  Bool       m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1 + 2*MAX_NUM_ADD_LAYER_SETS][MAX_VPS_LAYER_IDX_PLUS1];
 #else
   UInt       m_outputLayerSetIdx[MAX_VPS_LAYER_SETS_PLUS1];
-  Bool       m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
+  Bool       m_outputLayerFlag[MAX_VPS_LAYER_SETS_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
 #endif
 #endif
 #if VPS_EXTN_DIRECT_REF_LAYERS
-  Bool       m_directDependencyFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
-  UInt       m_numDirectRefLayers[MAX_VPS_LAYER_ID_PLUS1];
-  UInt       m_refLayerId[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
+  Bool       m_directDependencyFlag[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
+  UInt       m_numDirectRefLayers[MAX_VPS_LAYER_IDX_PLUS1];
+  UInt       m_refLayerId[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
   UInt       m_directDepTypeLen;
 #if O0096_DEFAULT_DEPENDENCY_TYPE
@@ -718,5 +718,5 @@
   UInt       m_defaultDirectDependencyType;
 #endif
-  UInt       m_directDependencyType[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
+  UInt       m_directDependencyType[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
 #endif
   UInt       m_numProfileTierLevel;
@@ -741,5 +741,5 @@
   Bool       m_maxOneActiveRefLayerFlag;
 #if O0062_POC_LSB_NOT_PRESENT_FLAG
-  Bool       m_pocLsbNotPresentFlag[MAX_VPS_LAYER_ID_PLUS1];
+  Bool       m_pocLsbNotPresentFlag[MAX_VPS_LAYER_IDX_PLUS1];
 #endif
 #if O0223_PICTURE_TYPES_ALIGN_FLAG
@@ -751,7 +751,7 @@
 #endif
 #if O0225_MAX_TID_FOR_REF_LAYERS
-  UInt       m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1][MAX_VPS_LAYER_ID_PLUS1];
-#else
-  UInt       m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1];
+  UInt       m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_IDX_PLUS1 - 1][MAX_VPS_LAYER_IDX_PLUS1];
+#else
+  UInt       m_maxTidIlRefPicsPlus1[MAX_VPS_LAYER_IDX_PLUS1 - 1];
 #endif
   Bool       m_maxTidRefPresentFlag;
@@ -768,22 +768,22 @@
 #if VPS_VUI_TILES_NOT_IN_USE__FLAG
   Bool       m_tilesNotInUseFlag;
-  Bool       m_tilesInUseFlag[MAX_VPS_LAYER_ID_PLUS1];
-  Bool       m_loopFilterNotAcrossTilesFlag[MAX_VPS_LAYER_ID_PLUS1];
+  Bool       m_tilesInUseFlag[MAX_VPS_LAYER_IDX_PLUS1];
+  Bool       m_loopFilterNotAcrossTilesFlag[MAX_VPS_LAYER_IDX_PLUS1];
 #endif 
-  Bool       m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
+  Bool       m_tileBoundariesAlignedFlag[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
 #if VPS_VUI_WPP_NOT_IN_USE__FLAG
   Bool       m_wppNotInUseFlag;
-  Bool       m_wppInUseFlag[MAX_VPS_LAYER_ID_PLUS1];
+  Bool       m_wppInUseFlag[MAX_VPS_LAYER_IDX_PLUS1];
 #endif 
 #if N0160_VUI_EXT_ILP_REF    
   Bool       m_ilpRestrictedRefLayersFlag;
-  Int        m_minSpatialSegmentOffsetPlus1[MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
-  Bool       m_ctuBasedOffsetEnabledFlag   [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
-  Int        m_minHorizontalCtuOffsetPlus1 [MAX_VPS_LAYER_ID_PLUS1][MAX_VPS_LAYER_ID_PLUS1];
+  Int        m_minSpatialSegmentOffsetPlus1[MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
+  Bool       m_ctuBasedOffsetEnabledFlag   [MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
+  Int        m_minHorizontalCtuOffsetPlus1 [MAX_VPS_LAYER_IDX_PLUS1][MAX_VPS_LAYER_IDX_PLUS1];
 #endif 
 #if VPS_VUI_VIDEO_SIGNAL
   Bool       m_vidSigPresentVpsFlag;
   Int        m_vpsVidSigInfo;
-  Int        m_vpsVidSigIdx[MAX_VPS_LAYER_ID_PLUS1];
+  Int        m_vpsVidSigIdx[MAX_VPS_LAYER_IDX_PLUS1];
   Int        m_vpsVidFormat[16];
   Bool       m_vpsFullRangeFlag[16];
@@ -2409,7 +2409,7 @@
   Bool        m_interLayerPredEnabledFlag;
   Int         m_activeNumILRRefIdx;        //< Active inter-layer reference pictures
-  Int         m_interLayerPredLayerIdc  [MAX_VPS_LAYER_ID_PLUS1];
+  Int         m_interLayerPredLayerIdc  [MAX_VPS_LAYER_IDX_PLUS1];
 #if P0312_VERT_PHASE_ADJ
-  Bool        m_vertPhasePositionFlag[MAX_VPS_LAYER_ID_PLUS1];
+  Bool        m_vertPhasePositionFlag[MAX_VPS_LAYER_IDX_PLUS1];
 #endif
 #if POC_RESET_FLAG
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1045)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1046)
@@ -410,5 +410,5 @@
 #define MAX_VPS_LAYER_SETS_PLUS1                       1024
 #define MAX_VPS_OUTPUT_LAYER_SETS_PLUS1                1024
-#define MAX_VPS_LAYER_ID_PLUS1                   MAX_LAYERS
+#define MAX_VPS_LAYER_IDX_PLUS1                   MAX_LAYERS
 #else
 #define MAX_VPS_NUM_HRD_PARAMETERS                        1
