Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1175)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp	(revision 1176)
@@ -2023,14 +2023,11 @@
     }
   }
-#if VPS_VUI_TILES_NOT_IN_USE__FLAG
+
   m_tilesNotInUseFlag = true;
+  m_wppNotInUseFlag = true;
   ::memset(m_tilesInUseFlag,  0, sizeof(m_tilesInUseFlag));
   ::memset(m_loopFilterNotAcrossTilesFlag,  0, sizeof(m_loopFilterNotAcrossTilesFlag));
-#endif
   ::memset(m_tileBoundariesAlignedFlag,  0, sizeof(m_tileBoundariesAlignedFlag));
-#if VPS_VUI_WPP_NOT_IN_USE__FLAG
-  m_wppNotInUseFlag = true;
   ::memset(m_wppInUseFlag,  0, sizeof(m_wppInUseFlag));
-#endif
 
   m_ilpRestrictedRefLayersFlag = false;
@@ -3151,21 +3148,19 @@
 }
 #endif
-#if VPS_VUI_TILES_NOT_IN_USE__FLAG
+
 Void TComVPS::setTilesNotInUseFlag(Bool x)
 {
   m_tilesNotInUseFlag = x;
-  if (m_tilesNotInUseFlag)
-  {
-    for (int i = 0; i < getMaxLayers(); i++)
+
+  if( m_tilesNotInUseFlag )
+  {
+    for( Int i = 0; i < getMaxLayers(); i++ )
     {
       m_tilesInUseFlag[i] = m_loopFilterNotAcrossTilesFlag[i] = m_tilesNotInUseFlag;
     }
-  }
-
-  if (m_tilesNotInUseFlag)
-  {
-    for (int i = 1; i < getMaxLayers(); i++)
-    {
-      for(int j = 0; j < getNumDirectRefLayers(getLayerIdInNuh(i)); j++)
+  
+    for( Int i = 1; i < getMaxLayers(); i++ )
+    {
+      for( Int j = 0; j < getNumDirectRefLayers(getLayerIdInNuh(i)); j++)
       {
         setTileBoundariesAlignedFlag(i, j, m_tilesNotInUseFlag);
@@ -3174,13 +3169,12 @@
   }
 }
-#endif
-
-#if VPS_VUI_WPP_NOT_IN_USE__FLAG
+
 Void TComVPS::setWppNotInUseFlag(Bool x)
 {
   m_wppNotInUseFlag = x;
-  if (m_wppNotInUseFlag)
-  {
-    for (int i = 0; i < getMaxLayers(); i++)
+
+  if( m_wppNotInUseFlag )
+  {
+    for( Int i = 0; i < getMaxLayers(); i++ )
     {
       m_wppInUseFlag[i] = m_wppNotInUseFlag;
@@ -3188,5 +3182,4 @@
   }
 }
-#endif
 
 Void TComVPS::setRefLayersFlags(Int currLayerId)
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1175)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h	(revision 1176)
@@ -658,14 +658,10 @@
   Bool       m_singleLayerForNonIrapFlag;
   Bool       m_higherLayerIrapSkipFlag;
-#if VPS_VUI_TILES_NOT_IN_USE__FLAG
   Bool       m_tilesNotInUseFlag;
   Bool       m_tilesInUseFlag[MAX_VPS_LAYER_IDX_PLUS1];
   Bool       m_loopFilterNotAcrossTilesFlag[MAX_VPS_LAYER_IDX_PLUS1];
-#endif 
   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_IDX_PLUS1];
-#endif
 
   Bool       m_ilpRestrictedRefLayersFlag;
@@ -1018,20 +1014,17 @@
   Bool   getHigherLayerIrapSkipFlag()                                           { return m_higherLayerIrapSkipFlag;              }
   Void   setHigherLayerIrapSkipFlag(Bool x)                                     { m_higherLayerIrapSkipFlag = x;                 }
-#if VPS_VUI_TILES_NOT_IN_USE__FLAG  
-  Bool   getTilesNotInUseFlag()         { return m_tilesNotInUseFlag; }
+
+  Bool   getTilesNotInUseFlag()                                                  { return m_tilesNotInUseFlag; }
   Void   setTilesNotInUseFlag(Bool x); 
-  Bool   getTilesInUseFlag(Int currLayerId)    { return m_tilesInUseFlag[currLayerId]; }
-  Void   setTilesInUseFlag(Int currLayerId, Bool x)    { m_tilesInUseFlag[currLayerId] = x; } 
-  Bool   getLoopFilterNotAcrossTilesFlag(Int currLayerId)    { return m_loopFilterNotAcrossTilesFlag[currLayerId]; }
-  Void   setLoopFilterNotAcrossTilesFlag(Int currLayerId, Bool x)    { m_loopFilterNotAcrossTilesFlag[currLayerId] = x; } 
-#endif 
+  Bool   getTilesInUseFlag(Int currLayerId)                                      { return m_tilesInUseFlag[currLayerId]; }
+  Void   setTilesInUseFlag(Int currLayerId, Bool x)                              { m_tilesInUseFlag[currLayerId] = x; } 
+  Bool   getLoopFilterNotAcrossTilesFlag(Int currLayerId)                        { return m_loopFilterNotAcrossTilesFlag[currLayerId]; }
+  Void   setLoopFilterNotAcrossTilesFlag(Int currLayerId, Bool x)                { m_loopFilterNotAcrossTilesFlag[currLayerId] = x; } 
   Bool   getTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId)           { return m_tileBoundariesAlignedFlag[currLayerId][refLayerId]; }
   Void   setTileBoundariesAlignedFlag(Int currLayerId, Int refLayerId, Bool x)   { m_tileBoundariesAlignedFlag[currLayerId][refLayerId] = x; } 
-#if VPS_VUI_WPP_NOT_IN_USE__FLAG  
-  Bool   getWppNotInUseFlag()         { return m_wppNotInUseFlag; }
+  Bool   getWppNotInUseFlag()                                                    { return m_wppNotInUseFlag; }
   Void   setWppNotInUseFlag(Bool x); 
-  Bool   getWppInUseFlag(Int currLayerId)    { return m_wppInUseFlag[currLayerId]; }
-  Void   setWppInUseFlag(Int currLayerId, Bool x)    { m_wppInUseFlag[currLayerId] = x; } 
-#endif 
+  Bool   getWppInUseFlag(Int currLayerId)                                        { return m_wppInUseFlag[currLayerId]; }
+  Void   setWppInUseFlag(Int currLayerId, Bool x)                                { m_wppInUseFlag[currLayerId] = x; } 
 
   Bool   getIlpRestrictedRefLayersFlag  ( )                                            { return m_ilpRestrictedRefLayersFlag;}
Index: /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1175)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h	(revision 1176)
@@ -107,7 +107,4 @@
 #define P0297_VPS_POC_LSB_ALIGNED_FLAG   1      ///< JCTVC-P0297: vps_poc_lsb_aligned_flag for cross-layer POC anchor picture derivation
 
-#define VPS_VUI_TILES_NOT_IN_USE__FLAG   1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
-#define VPS_VUI_WPP_NOT_IN_USE__FLAG     1      ///< JCTVC-O0226: VPS VUI flag to indicate tile not in use
-
 #define AVC_BASE                         1      ///< YUV BL reading for AVC base SVC
 
Index: /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1175)
+++ /branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1176)
@@ -3476,13 +3476,13 @@
   }
 
-#if VPS_VUI_TILES_NOT_IN_USE__FLAG
-  UInt layerIdx;
   READ_FLAG( uiCode, "tiles_not_in_use_flag" ); vps->setTilesNotInUseFlag(uiCode == 1);
-  if (!uiCode)
+
+  if( !uiCode )
   {
     for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ )
     {
       READ_FLAG( uiCode, "tiles_in_use_flag[ i ]" ); vps->setTilesInUseFlag(i, (uiCode == 1));
-      if (uiCode)
+
+      if( uiCode )
       {
         READ_FLAG( uiCode, "loop_filter_not_across_tiles_flag[ i ]" ); vps->setLoopFilterNotAcrossTilesFlag(i, (uiCode == 1));
@@ -3493,33 +3493,27 @@
       }
     }
-#endif
-
-      for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ )
-    {
-      for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
-      {
-#if VPS_VUI_TILES_NOT_IN_USE__FLAG
-        layerIdx = vps->getLayerIdxInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));
-        if (vps->getTilesInUseFlag(i) && vps->getTilesInUseFlag(layerIdx)) {
+
+    for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ )
+    {
+      for( j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++ )
+      {
+        UInt layerIdx = vps->getLayerIdxInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));
+
+        if( vps->getTilesInUseFlag(i) && vps->getTilesInUseFlag(layerIdx) )
+        {
           READ_FLAG( uiCode, "tile_boundaries_aligned_flag[i][j]" ); vps->setTileBoundariesAlignedFlag(i,j,(uiCode == 1));
         }
-#else
-        READ_FLAG( uiCode, "tile_boundaries_aligned_flag[i][j]" ); vps->setTileBoundariesAlignedFlag(i,j,(uiCode == 1));
-#endif
-      }
-    }
-#if VPS_VUI_TILES_NOT_IN_USE__FLAG
-  }
-#endif
-#if VPS_VUI_WPP_NOT_IN_USE__FLAG
+      }
+    }
+  }
+
   READ_FLAG( uiCode, "wpp_not_in_use_flag" ); vps->setWppNotInUseFlag(uiCode == 1);
-  if (!uiCode)
-  {
-      for (i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++)
+  if( !uiCode )
+  {
+    for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ )
     {
       READ_FLAG( uiCode, "wpp_in_use_flag[ i ]" ); vps->setWppInUseFlag(i, (uiCode == 1));
     }
   }
-#endif
 
   READ_FLAG(uiCode, "single_layer_for_non_irap_flag" ); vps->setSingleLayerForNonIrapFlag(uiCode == 1 ? true : false);
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1175)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1176)
@@ -2436,18 +2436,17 @@
   }
 
-#if VPS_VUI_TILES_NOT_IN_USE__FLAG
-  UInt layerIdx;
   WRITE_FLAG( vps->getTilesNotInUseFlag() ? 1 : 0 , "tiles_not_in_use_flag" );
-  if (!vps->getTilesNotInUseFlag())
+
+  if( !vps->getTilesNotInUseFlag() )
   {
     for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ )
     {
       WRITE_FLAG( vps->getTilesInUseFlag(i) ? 1 : 0 , "tiles_in_use_flag[ i ]" );
-      if (vps->getTilesInUseFlag(i))
+
+      if( vps->getTilesInUseFlag(i) )
       {
         WRITE_FLAG( vps->getLoopFilterNotAcrossTilesFlag(i) ? 1 : 0 , "loop_filter_not_across_tiles_flag[ i ]" );
       }
     }
-#endif
 
     for( i = vps->getBaseLayerInternalFlag() ? 1 : 2; i < vps->getMaxLayers(); i++ )
@@ -2455,20 +2454,17 @@
       for(j = 0; j < vps->getNumDirectRefLayers(vps->getLayerIdInNuh(i)); j++)
       {
-#if VPS_VUI_TILES_NOT_IN_USE__FLAG
-        layerIdx = vps->getLayerIdxInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));
-        if (vps->getTilesInUseFlag(i) && vps->getTilesInUseFlag(layerIdx)) {
+        UInt layerIdx = vps->getLayerIdxInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));
+
+        if( vps->getTilesInUseFlag(i) && vps->getTilesInUseFlag(layerIdx) )
+        {
           WRITE_FLAG( vps->getTileBoundariesAlignedFlag(i,j) ? 1 : 0 , "tile_boundaries_aligned_flag[i][j]" );
         }
-#else
-        WRITE_FLAG( vps->getTileBoundariesAlignedFlag(i,j) ? 1 : 0 , "tile_boundaries_aligned_flag[i][j]" );
-#endif
       }
     }  
-#if VPS_VUI_TILES_NOT_IN_USE__FLAG
-  }
-#endif
-#if VPS_VUI_WPP_NOT_IN_USE__FLAG
+  }
+
   WRITE_FLAG( vps->getWppNotInUseFlag() ? 1 : 0 , "wpp_not_in_use_flag" );
-  if (!vps->getWppNotInUseFlag())
+
+  if( !vps->getWppNotInUseFlag() )
   {
     for( i = vps->getBaseLayerInternalFlag() ? 0 : 1; i < vps->getMaxLayers(); i++ )
@@ -2477,5 +2473,4 @@
     }
   }
-#endif
 
   WRITE_FLAG(vps->getSingleLayerForNonIrapFlag(), "single_layer_for_non_irap_flag" );
