Index: branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 288)
+++ branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 289)
@@ -75,4 +75,7 @@
 , m_iDepth                        ( 0 )
 , m_bRefenced                     ( false )
+#if SH_DISCARDABLE_FLAG
+, m_bDiscardableFlag              ( false )
+#endif
 , m_pcSPS                         ( NULL )
 , m_pcPPS                         ( NULL )
Index: branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h	(revision 288)
+++ branches/SHM-2.1-dev/source/Lib/TLibCommon/TComSlice.h	(revision 289)
@@ -1469,4 +1469,8 @@
   Bool        m_bRefenced;
   
+#if SH_DISCARDABLE_FLAG
+  Bool        m_bDiscardableFlag;
+#endif
+
   // access channel
   TComVPS*    m_pcVPS;
@@ -1628,4 +1632,9 @@
    Bool     isRADL() {  return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RADL_R); }
    Bool     isRASL()   {   return (m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_N || m_eNalUnitType == NAL_UNIT_CODED_SLICE_RASL_R); }
+#endif
+
+#if SH_DISCARDABLE_FLAG
+  Bool      getDiscardableFlag  ()                              { return m_bDiscardableFlag; }
+  Void      setDiscardableFlag  (Bool b)                        { m_bDiscardableFlag = b; }
 #endif
 
Index: branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 288)
+++ branches/SHM-2.1-dev/source/Lib/TLibCommon/TypeDef.h	(revision 289)
@@ -60,5 +60,8 @@
 #define VPS_PROFILE_OUTPUT_LAYERS        1      ///< M0268: Signal profile information and output layer information as in Sec. 3 of M0268v2
 #define SPS_SUB_LAYER_INFO               1      ///< M0268: Do not signal sps_max_sub_layers_minus1 and sps_temporal_id_nesting_flag for nuh_layer_id greater than 0
-#endif
+#define VPS_SPLIT_FLAG                   1      ///< M0163: Do not signal dimension_id and the last dimension_id_len_minus1, when splitting_flag is equal to 1. 
+#endif
+
+#define SH_DISCARDABLE_FLAG              1      ///< M0152: Use one reserved flag in the slice header for discardable flag
 
 #define DERIVE_LAYER_ID_LIST_VARIABLES   1      ///< Derived variables based on the variables in VPS - for use in syntax table parsing
Index: branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 288)
+++ branches/SHM-2.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 289)
@@ -920,8 +920,25 @@
   vps->setNumScalabilityTypes(numScalabilityTypes);
 
+#if VPS_SPLIT_FLAG
+  for(j = 0; j < numScalabilityTypes - vps->getSplittingFlag(); j++)
+#else
   for(j = 0; j < numScalabilityTypes; j++)
+#endif
   {
     READ_CODE( 3, uiCode, "dimension_id_len_minus1[j]" ); vps->setDimensionIdLen(j, uiCode + 1);
   }
+#if VPS_SPLIT_FLAG
+  if(vps->getSplittingFlag())
+  {
+    UInt numBits = 0;
+    for(j = 0; j < numScalabilityTypes - 1; j++)
+    {
+      numBits += vps->getDimensionIdLen(j);
+    }
+    assert( numBits < 6 );
+    vps->setDimensionIdLen(numScalabilityTypes-1, 6 - numBits);
+    numBits = 6;
+  }
+#else
   if(vps->getSplittingFlag())
   {
@@ -933,4 +950,5 @@
     assert( numBits <= 6 );
   }
+#endif
 
   READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); vps->setNuhLayerIdPresentFlag(uiCode ? true : false);
@@ -950,4 +968,7 @@
     vps->setLayerIdInVps(vps->getLayerIdInNuh(i), i);
 
+#if VPS_SPLIT_FLAG
+    if(!vps->getSplittingFlag())
+#endif
     for(j = 0; j < numScalabilityTypes; j++)
     {
@@ -1193,8 +1214,20 @@
   if(!rpcSlice->getDependentSliceSegmentFlag())
   {
+
+#if SH_DISCARDABLE_FLAG
+    if(rpcSlice->getPPS()->getNumExtraSliceHeaderBits()>0)
+    {
+      READ_FLAG(uiCode, "discardable_flag"); // ignored
+    }
+    for (Int i = 1; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
+    {
+      READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
+    }
+#else
     for (Int i = 0; i < rpcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     {
       READ_FLAG(uiCode, "slice_reserved_undetermined_flag[]"); // ignored
     }
+#endif
 
     READ_UVLC (    uiCode, "slice_type" );            rpcSlice->setSliceType((SliceType)uiCode);
Index: branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 288)
+++ branches/SHM-2.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 289)
@@ -726,5 +726,9 @@
   }
 
+#if VPS_SPLIT_FLAG
+  for(j = 0; j < vps->getNumScalabilityTypes() - vps->getSplittingFlag(); j++)
+#else
   for(j = 0; j < vps->getNumScalabilityTypes(); j++)
+#endif
   {
     WRITE_CODE( vps->getDimensionIdLen(j) - 1, 3,      "dimension_id_len_minus1[j]" );
@@ -738,4 +742,7 @@
       WRITE_CODE( vps->getLayerIdInNuh(i),     6,      "layer_id_in_nuh[i]" );
     }
+#if VPS_SPLIT_FLAG
+    if(!vps->getSplittingFlag())
+#endif
     for(j = 0; j < vps->getNumScalabilityTypes(); j++)
     {
@@ -904,9 +911,23 @@
   if ( !pcSlice->getDependentSliceSegmentFlag() )
   {
-    for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
+
+#if SH_DISCARDABLE_FLAG
+    if (pcSlice->getPPS()->getNumExtraSliceHeaderBits()>0)
+    {
+      assert(!!"discardable_flag");
+      WRITE_FLAG(pcSlice->getDiscardableFlag(), "discardable_flag");
+    }
+    for (Int i = 1; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
     {
       assert(!!"slice_reserved_undetermined_flag[]");
       WRITE_FLAG(0, "slice_reserved_undetermined_flag[]");
     }
+#else
+    for (Int i = 0; i < pcSlice->getPPS()->getNumExtraSliceHeaderBits(); i++)
+    {
+      assert(!!"slice_reserved_undetermined_flag[]");
+      WRITE_FLAG(0, "slice_reserved_undetermined_flag[]");
+    }
+#endif
 
     WRITE_UVLC( pcSlice->getSliceType(),       "slice_type" );
