Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1179)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1180)
@@ -1943,8 +1943,4 @@
 TComVPS::TComVPS()
 : m_VPSId                     (  0)
-#if VPS_RESERVED_FLAGS
-, m_baseLayerInternalFlag     (true)
-, m_baseLayerAvailableFlag    (true)
-#endif
 , m_uiMaxTLayers              (  1)
 , m_uiMaxLayers               (  1)
@@ -1954,4 +1950,6 @@
 , m_hrdOpSetIdx               (NULL)
 , m_cprmsPresentFlag          (NULL)
+, m_baseLayerInternalFlag     (true)
+, m_baseLayerAvailableFlag    (true)
 , m_maxLayerId                (0)
 , m_numLayerSets              (0)
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1179)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1180)
@@ -564,8 +564,4 @@
 private:
   Int         m_VPSId;
-#if VPS_RESERVED_FLAGS
-  Bool        m_baseLayerInternalFlag;
-  Bool        m_baseLayerAvailableFlag;
-#endif
   UInt        m_uiMaxTLayers;
   UInt        m_uiMaxLayers;
@@ -593,4 +589,6 @@
 
 #if SVC_EXTENSION
+  Bool        m_baseLayerInternalFlag;
+  Bool        m_baseLayerAvailableFlag;
 #if MULTIPLE_PTL_SUPPORT
   TComPTL     m_pcPTLList[MAX_NUM_LAYER_IDS + 1];
@@ -766,11 +764,4 @@
   virtual ~TComVPS();
 
-#if VPS_RESERVED_FLAGS
-  Void        setBaseLayerInternalFlag(Bool x) { m_baseLayerInternalFlag = x; }
-  Bool        getBaseLayerInternalFlag()         { return m_baseLayerInternalFlag; }
-  Void        setBaseLayerAvailableFlag(Bool x) { m_baseLayerAvailableFlag = x; }
-  Bool        getBaseLayerAvailableFlag()         { return m_baseLayerAvailableFlag; }
-#endif
-
   Void    createHrdParamBuffer()
   {
@@ -779,4 +770,56 @@
     m_cprmsPresentFlag = new Bool   [ getNumHrdParameters() ];
   }
+
+  TComHRD* getHrdParameters   ( UInt i )             { return &m_hrdParameters[ i ]; }
+  UInt    getHrdOpSetIdx      ( UInt i )             { return m_hrdOpSetIdx[ i ]; }
+  Void    setHrdOpSetIdx      ( UInt val, UInt i )   { m_hrdOpSetIdx[ i ] = val;  }
+  Bool    getCprmsPresentFlag ( UInt i )             { return m_cprmsPresentFlag[ i ]; }
+  Void    setCprmsPresentFlag ( Bool val, UInt i )   { m_cprmsPresentFlag[ i ] = val;  }
+
+  Int     getVPSId       ()                   { return m_VPSId;          }
+  Void    setVPSId       (Int i)              { m_VPSId = i;             }
+
+  UInt    getMaxTLayers  ()                   { return m_uiMaxTLayers;   }
+  Void    setMaxTLayers  (UInt t)             { m_uiMaxTLayers = t; }
+
+  UInt    getMaxLayers   ()                   { return m_uiMaxLayers;   }
+  Void    setMaxLayers   (UInt l)             { m_uiMaxLayers = l; }
+
+  Bool    getTemporalNestingFlag   ()         { return m_bTemporalIdNestingFlag;   }
+  Void    setTemporalNestingFlag   (Bool t)   { m_bTemporalIdNestingFlag = t; }
+
+  Void    setNumReorderPics(UInt v, UInt tLayer)                { m_numReorderPics[tLayer] = v;    }
+  UInt    getNumReorderPics(UInt tLayer)                        { return m_numReorderPics[tLayer]; }
+
+  Void    setMaxDecPicBuffering(UInt v, UInt tLayer)            { assert(tLayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tLayer] = v;    }
+  UInt    getMaxDecPicBuffering(UInt tLayer)                    { return m_uiMaxDecPicBuffering[tLayer]; }
+
+  Void    setMaxLatencyIncrease(UInt v, UInt tLayer)            { m_uiMaxLatencyIncrease[tLayer] = v;    }
+  UInt    getMaxLatencyIncrease(UInt tLayer)                    { return m_uiMaxLatencyIncrease[tLayer]; }
+
+  UInt    getNumHrdParameters()                                 { return m_numHrdParameters; }
+  Void    setNumHrdParameters(UInt v)                           { m_numHrdParameters = v;    }
+  
+#if !SVC_EXTENSION
+  UInt    getMaxNuhReservedZeroLayerId()                        { return m_maxNuhReservedZeroLayerId; }
+  Void    setMaxNuhReservedZeroLayerId(UInt v)                  { m_maxNuhReservedZeroLayerId = v;    }
+
+  UInt    getMaxOpSets()                                        { return m_numOpSets; }
+  Void    setMaxOpSets(UInt v)                                  { m_numOpSets = v;    }
+#endif
+  Bool    getLayerIdIncludedFlag(UInt opsIdx, UInt id)          { return m_layerIdIncludedFlag[opsIdx][id]; }
+  Void    setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id)  { m_layerIdIncludedFlag[opsIdx][id] = v;    }
+
+#if !MULTIPLE_PTL_SUPPORT
+  TComPTL* getPTL() { return &m_pcPTL; }
+#endif
+
+  TimingInfo* getTimingInfo() { return &m_timingInfo; }
+
+#if SVC_EXTENSION
+  Void        setBaseLayerInternalFlag(Bool x)                  { m_baseLayerInternalFlag = x;     }
+  Bool        getBaseLayerInternalFlag()                        { return m_baseLayerInternalFlag;  }
+  Void        setBaseLayerAvailableFlag(Bool x)                 { m_baseLayerAvailableFlag = x;    }
+  Bool        getBaseLayerAvailableFlag()                       { return m_baseLayerAvailableFlag; }
 
 #if O0164_MULTI_LAYER_HRD
@@ -804,52 +847,4 @@
   }
 #endif
-
-  TComHRD* getHrdParameters   ( UInt i )             { return &m_hrdParameters[ i ]; }
-  UInt    getHrdOpSetIdx      ( UInt i )             { return m_hrdOpSetIdx[ i ]; }
-  Void    setHrdOpSetIdx      ( UInt val, UInt i )   { m_hrdOpSetIdx[ i ] = val;  }
-  Bool    getCprmsPresentFlag ( UInt i )             { return m_cprmsPresentFlag[ i ]; }
-  Void    setCprmsPresentFlag ( Bool val, UInt i )   { m_cprmsPresentFlag[ i ] = val;  }
-
-  Int     getVPSId       ()                   { return m_VPSId;          }
-  Void    setVPSId       (Int i)              { m_VPSId = i;             }
-
-  UInt    getMaxTLayers  ()                   { return m_uiMaxTLayers;   }
-  Void    setMaxTLayers  (UInt t)             { m_uiMaxTLayers = t; }
-
-  UInt    getMaxLayers   ()                   { return m_uiMaxLayers;   }
-  Void    setMaxLayers   (UInt l)             { m_uiMaxLayers = l; }
-
-  Bool    getTemporalNestingFlag   ()         { return m_bTemporalIdNestingFlag;   }
-  Void    setTemporalNestingFlag   (Bool t)   { m_bTemporalIdNestingFlag = t; }
-
-  Void    setNumReorderPics(UInt v, UInt tLayer)                { m_numReorderPics[tLayer] = v;    }
-  UInt    getNumReorderPics(UInt tLayer)                        { return m_numReorderPics[tLayer]; }
-
-  Void    setMaxDecPicBuffering(UInt v, UInt tLayer)            { assert(tLayer < MAX_TLAYER); m_uiMaxDecPicBuffering[tLayer] = v;    }
-  UInt    getMaxDecPicBuffering(UInt tLayer)                    { return m_uiMaxDecPicBuffering[tLayer]; }
-
-  Void    setMaxLatencyIncrease(UInt v, UInt tLayer)            { m_uiMaxLatencyIncrease[tLayer] = v;    }
-  UInt    getMaxLatencyIncrease(UInt tLayer)                    { return m_uiMaxLatencyIncrease[tLayer]; }
-
-  UInt    getNumHrdParameters()                                 { return m_numHrdParameters; }
-  Void    setNumHrdParameters(UInt v)                           { m_numHrdParameters = v;    }
-  
-#if !SVC_EXTENSION
-  UInt    getMaxNuhReservedZeroLayerId()                        { return m_maxNuhReservedZeroLayerId; }
-  Void    setMaxNuhReservedZeroLayerId(UInt v)                  { m_maxNuhReservedZeroLayerId = v;    }
-
-  UInt    getMaxOpSets()                                        { return m_numOpSets; }
-  Void    setMaxOpSets(UInt v)                                  { m_numOpSets = v;    }
-#endif
-  Bool    getLayerIdIncludedFlag(UInt opsIdx, UInt id)          { return m_layerIdIncludedFlag[opsIdx][id]; }
-  Void    setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id)  { m_layerIdIncludedFlag[opsIdx][id] = v;    }
-
-#if !MULTIPLE_PTL_SUPPORT
-  TComPTL* getPTL() { return &m_pcPTL; }
-#endif
-
-  TimingInfo* getTimingInfo() { return &m_timingInfo; }
-
-#if SVC_EXTENSION
 #if MULTIPLE_PTL_SUPPORT
   TComPTL* getPTL() { return &m_pcPTLList[0]; }
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1179)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1180)
@@ -48,5 +48,4 @@
 #define INFERENCE_POC_MSB_VAL_PRESENT    1      ///< JCTVC-Q0146 -- poc_msb_val_present_flag shall be equal to 0 when slice_header_extension_length is (inferred to be ) equal to 0
 #define NON_REF_NAL_TYPE_DISCARDABLE     1      ///< JCTVC-P0041 -- If discardable picture is a non-IRAP, it must be a non-referenced sub-layer picture
-#define VPS_RESERVED_FLAGS               1      ///< vps_base_layer_internal_flag and vps_base_layer_available_flag
 #define VPS_VUI_OFFSET                   1      ///< N0085: Signal VPS VUI offset in the VPS extension 
 #define POC_RESET_RESTRICTIONS           1      ///< Restrictions on semantics of POC reset-related syntax elements, including one item from R0223
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1179)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1180)
@@ -1000,15 +1000,13 @@
 
   READ_CODE( 4,  uiCode,  "vps_video_parameter_set_id" );         pcVPS->setVPSId( uiCode );
-#if VPS_RESERVED_FLAGS
+#if SVC_EXTENSION
   READ_FLAG( uiCode, "vps_base_layer_internal_flag");             pcVPS->setBaseLayerInternalFlag( uiCode ? true : false );
   READ_FLAG( uiCode, "vps_base_layer_available_flag");            pcVPS->setBaseLayerAvailableFlag( uiCode ? true : false );
   pcVPS->setNonHEVCBaseLayerFlag( (pcVPS->getBaseLayerAvailableFlag() && !pcVPS->getBaseLayerInternalFlag()) ? true : false);
-#else
-  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
-#endif
-#if SVC_EXTENSION
+
   READ_CODE( 6,  uiCode,  "vps_max_layers_minus1" );              pcVPS->setMaxLayers( min( 62u, uiCode) + 1 );
   assert( pcVPS->getBaseLayerInternalFlag() || pcVPS->getMaxLayers() > 1 );
 #else
+  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
   READ_CODE( 6,  uiCode,  "vps_reserved_zero_6bits" );            assert(uiCode == 0);
 #endif
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1179)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1180)
@@ -782,14 +782,11 @@
 {
   WRITE_CODE( pcVPS->getVPSId(),                    4,        "vps_video_parameter_set_id" );
-#if VPS_RESERVED_FLAGS
+#if SVC_EXTENSION
   WRITE_FLAG( pcVPS->getBaseLayerInternalFlag(),              "vps_base_layer_internal_flag");
   WRITE_FLAG( pcVPS->getBaseLayerAvailableFlag(),             "vps_base_layer_available_flag");
-#else
-  WRITE_CODE( 3,                                    2,        "vps_reserved_three_2bits" );
-#endif
-#if SVC_EXTENSION
   WRITE_CODE( pcVPS->getMaxLayers() - 1,            6,        "vps_max_layers_minus1" );
   assert( pcVPS->getBaseLayerInternalFlag() || pcVPS->getMaxLayers() > 1 );
 #else
+  WRITE_CODE( 3,                                    2,        "vps_reserved_three_2bits" );
   WRITE_CODE( 0,                                    6,        "vps_reserved_zero_6bits" );
 #endif
