Index: branches/SHM-3.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/SHM-3.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 336)
+++ branches/SHM-3.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 337)
@@ -888,4 +888,21 @@
   }
 #endif
+#if N0120_MAX_TID_REF_PRESENT_FLAG
+  vps->setMaxTidIlRefPicsPlus1PresentFlag(true);
+  if (vps->getMaxTidIlRefPicsPlus1PresentFlag())
+  {
+    for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++)
+    {
+      vps->setMaxSublayerForIlpPlus1(i, vps->getMaxTLayers()+1);
+    }
+  }
+  else
+  {
+    for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++)
+    {
+      vps->setMaxSublayerForIlpPlus1(i, 7);
+    }
+  }
+#endif 
 #if ILP_SSH_SIG
     vps->setIlpSshSignalingEnabledFlag(true);
Index: branches/SHM-3.0-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 336)
+++ branches/SHM-3.0-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 337)
@@ -1662,4 +1662,7 @@
 #endif
 #if JCTVC_M0203_INTERLAYER_PRED_IDC
+#if N0120_MAX_TID_REF_PRESENT_FLAG
+  m_maxTidIlRefPicsPlus1PresentFlag = true;
+#endif 
   for( Int i = 0; i < MAX_VPS_LAYER_ID_PLUS1 - 1; i++)
   {
Index: branches/SHM-3.0-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 336)
+++ branches/SHM-3.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 337)
@@ -494,4 +494,7 @@
   UInt       m_maxSublayerForIlpPlus1[MAX_VPS_LAYER_ID_PLUS1 - 1];
 #endif
+#if N0120_MAX_TID_REF_PRESENT_FLAG
+  Bool       m_maxTidIlRefPicsPlus1PresentFlag;
+#endif 
 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
   Bool       m_singleLayerForNonIrapFlag;
@@ -660,4 +663,8 @@
   Void   setMaxSublayerForIlpPlus1(Int layerId, UInt maxSublayer)   { m_maxSublayerForIlpPlus1[layerId] = maxSublayer;            }
 #endif
+#if N0120_MAX_TID_REF_PRESENT_FLAG
+  Bool   getMaxTidIlRefPicsPlus1PresentFlag()                   { return m_maxTidIlRefPicsPlus1PresentFlag ;}
+  Void   setMaxTidIlRefPicsPlus1PresentFlag(Bool x)             { m_maxTidIlRefPicsPlus1PresentFlag = x;}
+#endif 
 #if M0040_ADAPTIVE_RESOLUTION_CHANGE
   Bool   getSingleLayerForNonIrapFlag()                             { return m_singleLayerForNonIrapFlag; }
Index: branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 336)
+++ branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 337)
@@ -112,4 +112,5 @@
 #if JCTVC_M0203_INTERLAYER_PRED_IDC
 #define ILR_RESTR                        1     ///< JCTVC-M0209 Inter-layer RPS and RPL
+#define N0120_MAX_TID_REF_PRESENT_FLAG   1      ///< JCTVC-N0120 max_tid_ref_pics_plus1_present_flag
 #endif
 #if REF_IDX_MFM
Index: branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 336)
+++ branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 337)
@@ -951,4 +951,22 @@
 #endif
 #if JCTVC_M0203_INTERLAYER_PRED_IDC
+#if N0120_MAX_TID_REF_PRESENT_FLAG
+  READ_FLAG( uiCode, "max_tid_il_ref_pics_plus1_present_flag"); vps->setMaxTidIlRefPicsPlus1PresentFlag(uiCode ? true : false);
+  if (vps->getMaxTidIlRefPicsPlus1PresentFlag())
+  {
+    for(i = 0; i < vps->getMaxLayers() - 1; i++)
+    {
+      READ_CODE( 3, uiCode, "max_sublayer_for_ilp_plus1[i]" ); vps->setMaxSublayerForIlpPlus1(i, uiCode);
+      assert( uiCode <= vps->getMaxTLayers() );
+    }
+  }
+  else 
+  {
+    for(i = 0; i < vps->getMaxLayers() - 1; i++)
+    {
+      vps->setMaxSublayerForIlpPlus1(i, 7);
+    }
+  }
+#else
   for(i = 0; i < vps->getMaxLayers() - 1; i++)
   {
@@ -956,4 +974,5 @@
     assert( uiCode <= vps->getMaxTLayers() );
   }
+#endif
 #endif
 #if ILP_SSH_SIG
Index: branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 336)
+++ branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 337)
@@ -749,8 +749,19 @@
 #endif
 #if JCTVC_M0203_INTERLAYER_PRED_IDC
+#if N0120_MAX_TID_REF_PRESENT_FLAG
+   WRITE_FLAG( vps->getMaxTidIlRefPicsPlus1PresentFlag(), "max_tid_il_ref_pics_plus1_present_flag");
+   if (vps->getMaxTidIlRefPicsPlus1PresentFlag())
+   {
+     for( i = 0; i < vps->getMaxLayers() - 1; i++)
+     {
+       WRITE_CODE(vps->getMaxSublayerForIlpPlus1(i), 3, "max_sublayer_for_ilp_plus1[i]" );
+     }
+   }
+#else
   for( i = 0; i < vps->getMaxLayers() - 1; i++)
   {
     WRITE_CODE(vps->getMaxSublayerForIlpPlus1(i), 3, "max_sublayer_for_ilp_plus1[i]" );
   }
+#endif
 #endif
 #if ILP_SSH_SIG
