Index: /branches/SHM-3.0-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 327)
+++ /branches/SHM-3.0-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 328)
@@ -884,4 +884,7 @@
   }
 #endif
+#if ILP_SSH_SIG
+    vps->setIlpSshSignalingEnabledFlag(true);
+#endif
 #if VPS_EXTN_PROFILE_INFO
   vps->getPTLForExtnPtr()->resize(vps->getNumLayerSets());
Index: /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 327)
+++ /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComSlice.h	(revision 328)
@@ -456,4 +456,7 @@
   UInt       m_layerIdInVps[MAX_VPS_LAYER_ID_PLUS1];            // Maps layer_id_in_nuh with the layer ID in the VPS
 #endif
+#if ILP_SSH_SIG
+  Bool       m_ilpSshSignalingEnabledFlag;
+#endif
 #if VPS_EXTN_PROFILE_INFO
   // Profile-tier-level signalling related
@@ -588,4 +591,8 @@
   UInt   getLayerIdInVps(Int id)                                { return m_layerIdInVps[id];       }
   Void   setLayerIdInVps(Int id, UInt x)                        { m_layerIdInVps[id] = x;          }
+#endif
+#if ILP_SSH_SIG
+    Bool   getIlpSshSignalingEnabledFlag()                      { return m_ilpSshSignalingEnabledFlag;}
+    Void   setIlpSshSignalingEnabledFlag(Bool x)                { m_ilpSshSignalingEnabledFlag = x;}
 #endif
 #if VPS_EXTN_PROFILE_INFO
Index: /branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 327)
+++ /branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 328)
@@ -51,4 +51,8 @@
 #define SCALED_REF_LAYER_OFFSET_FLAG     0      ///< M0309: Signal scaled reference layer offsets in SPS
 #define SCALED_REF_LAYER_OFFSETS         1      ///< M0309: Signal scaled reference layer offsets in SPS
+
+#define ILP_SSH_SIG                      1      ///< JCTVC-N0195 proposal 2
+#define SPL_FLG_CHK                      1      ///< JCTVC-N0195 proposal 5
+#define ILP_NUM_REF_CHK                  1      ///< JCTVC-N0195 proposal 1
 
 #define VPS_RENAME                       1      ///< Rename variables max_layer_id and num_layer_sets_minus1 in VPS
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 327)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 328)
@@ -957,4 +957,7 @@
   }
 #endif
+#if ILP_SSH_SIG
+    READ_FLAG( uiCode, "all_ref_layers_active_flag" ); vps->setIlpSshSignalingEnabledFlag(uiCode ? true : false);
+#endif
 #if VPS_EXTN_PROFILE_INFO
   // Profile-tier-level signalling
@@ -1382,5 +1385,9 @@
 #if JCTVC_M0458_INTERLAYER_RPS_SIG
     rpcSlice->setActiveNumILRRefIdx(0);
+#if ILP_SSH_SIG
+    if((sps->getLayerId() > 0) && rpcSlice->getVPS()->getIlpSshSignalingEnabledFlag() && (rpcSlice->getNumILRRefIdx() > 0) )
+#else
     if((sps->getLayerId() > 0)  &&  (rpcSlice->getNumILRRefIdx() > 0) )
+#endif
     {
       READ_FLAG(uiCode,"inter_layer_pred_enabled_flag");
@@ -1404,4 +1411,15 @@
             rpcSlice->setActiveNumILRRefIdx(1);
           }
+#if ILP_NUM_REF_CHK
+          if( rpcSlice->getActiveNumILRRefIdx() == rpcSlice->getNumILRRefIdx() )
+          {
+            for( Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ )
+            {
+              rpcSlice->setInterLayerPredLayerIdc(i,i);
+            }
+          }
+          else
+          {
+#endif
           for(Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ )
           {
@@ -1409,4 +1427,7 @@
             rpcSlice->setInterLayerPredLayerIdc(uiCode,i);
           }
+#if ILP_NUM_REF_CHK
+          }
+#endif
         }
         else
@@ -1417,4 +1438,15 @@
       }
     }
+#if ILP_SSH_SIG
+    else if( rpcSlice->getVPS()->getIlpSshSignalingEnabledFlag() == false )
+    {
+      rpcSlice->setInterLayerPredEnabledFlag(true);
+      rpcSlice->setActiveNumILRRefIdx(rpcSlice->getNumILRRefIdx());
+      for( Int i = 0; i < rpcSlice->getActiveNumILRRefIdx(); i++ )
+      {
+        rpcSlice->setInterLayerPredLayerIdc(i,i);
+      }
+    }
+#endif
 #if M0457_IL_SAMPLE_PRED_ONLY_FLAG
     rpcSlice->setInterLayerSamplePredOnlyFlag( false );
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 327)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 328)
@@ -708,4 +708,16 @@
   }
 
+#if SPL_FLG_CHK
+  if(vps->getSplittingFlag())
+  {
+    UInt splDimSum=0;
+    for(j = 0; j < vps->getNumScalabilityTypes(); j++)
+    {
+      splDimSum+=(vps->getDimensionIdLen(j));
+    }
+    assert(splDimSum<=6);
+  }
+#endif
+
   WRITE_FLAG( vps->getNuhLayerIdPresentFlag(),         "vps_nuh_layer_id_present_flag" );
   for(i = 1; i < vps->getMaxLayers(); i++)
@@ -741,4 +753,7 @@
     WRITE_CODE(vps->getMaxSublayerForIlpPlus1(i), 3, "max_sublayer_for_ilp_plus1[i]" );
   }
+#endif
+#if ILP_SSH_SIG
+    WRITE_FLAG( vps->getIlpSshSignalingEnabledFlag(), "all_ref_layers_active_flag" );
 #endif
 #if VPS_EXTN_PROFILE_INFO
@@ -1052,6 +1067,10 @@
     }
 
-#if JCTVC_M0458_INTERLAYER_RPS_SIG    
-    if((pcSlice->getSPS()->getLayerId() > 0)  &&  (pcSlice->getNumILRRefIdx() > 0) ) 
+#if JCTVC_M0458_INTERLAYER_RPS_SIG
+#if ILP_SSH_SIG
+    if((pcSlice->getSPS()->getLayerId() > 0) && pcSlice->getVPS()->getIlpSshSignalingEnabledFlag() && (pcSlice->getNumILRRefIdx() > 0) )
+#else
+    if((pcSlice->getSPS()->getLayerId() > 0)  &&  (pcSlice->getNumILRRefIdx() > 0) )
+#endif
     {
       WRITE_FLAG(pcSlice->getInterLayerPredEnabledFlag(),"inter_layer_pred_enabled_flag");
@@ -1069,8 +1088,15 @@
             WRITE_CODE(pcSlice->getActiveNumILRRefIdx() - 1, numBits,"num_inter_layer_ref_pics_minus1");
           }       
+#if ILP_NUM_REF_CHK
+          if( pcSlice->getNumILRRefIdx() != pcSlice->getActiveNumILRRefIdx() )
+          {
+#endif
           for(Int i = 0; i < pcSlice->getActiveNumILRRefIdx(); i++ )
           {
             WRITE_CODE(pcSlice->getInterLayerPredLayerIdc(i),numBits,"inter_layer_pred_layer_idc[i]");   
           }
+#if ILP_NUM_REF_CHK
+          }
+#endif
         }
       }
