Index: branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 873)
+++ branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 874)
@@ -931,6 +931,7 @@
 #if VPS_EXTN_MASK_AND_DIM_INFO
   UInt i = 0, j = 0;
-
+#if !VPS_AVC_BL_FLAG_REMOVAL
   WRITE_FLAG( vps->getAvcBaseLayerFlag(),              "avc_base_layer_flag" );
+#endif
 #if !P0307_REMOVE_VPS_VUI_OFFSET
 #if O0109_MOVE_VPS_VUI_FLAG
Index: branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 873)
+++ branches/SHM-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 874)
@@ -993,5 +993,9 @@
       // inferring of the scaling list can be moved to the config file
       UInt refLayerId = 0;
+#if VPS_AVC_BL_FLAG_REMOVAL
+      if( m_layerId > 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
+#else
       if( m_layerId > 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
+#endif
       {
         m_pcEncTop->getSPS()->setInferScalingListFlag( true );
@@ -1023,5 +1027,9 @@
       // inferring of the scaling list can be moved to the config file
       UInt refLayerId = 0;
+#if VPS_AVC_BL_FLAG_REMOVAL
+      if( m_layerId > 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
+#else
       if( m_layerId > 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() && m_pcEncTop->getVPS()->getRecursiveRefLayerFlag( m_layerId, refLayerId ) )
+#endif
       {
         m_pcEncTop->getSPS()->setInferScalingListFlag( true );
@@ -2110,5 +2118,9 @@
     startCUAddrSliceSegmentIdx++;
 #if AVC_BASE
+#if VPS_AVC_BL_FLAG_REMOVAL
+    if( m_layerId == 0 && m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() )
+#else
     if( m_layerId == 0 && m_pcEncTop->getVPS()->getAvcBaseLayerFlag() )
+#endif
     {
       pcPic->getPicYuvOrg()->copyToPic( pcPic->getPicYuvRec() );
@@ -2223,5 +2235,9 @@
       OutputNALUnit nalu( NAL_UNIT_VPS, 0, 0 ); // The value of nuh_layer_id of VPS NAL unit shall be equal to 0.
 #if AVC_BASE
+#if VPS_AVC_BL_FLAG_REMOVAL
+      if( ( m_layerId == 1 && m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() ) || ( m_layerId == 0 && !m_pcEncTop->getVPS()->getNonHEVCBaseLayerFlag() ) )
+#else
       if( ( m_layerId == 1 && m_pcEncTop->getVPS()->getAvcBaseLayerFlag() ) || ( m_layerId == 0 && !m_pcEncTop->getVPS()->getAvcBaseLayerFlag() ) )
+#endif
 #else
       if( m_layerId == 0 )
