Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 873)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 874)
@@ -1002,4 +1002,7 @@
   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 );
+#if VPS_AVC_BL_FLAG_REMOVAL
+  pcVPS->setNonHEVCBaseLayerFlag( (pcVPS->getBaseLayerAvailableFlag() && !pcVPS->getBaseLayerInternalFlag()) ? true : false);
+#endif
 #else
   READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
@@ -1178,5 +1181,7 @@
   UInt numScalabilityTypes = 0, i = 0, j = 0;
 
+#if !VPS_AVC_BL_FLAG_REMOVAL
   READ_FLAG( uiCode, "avc_base_layer_flag" ); vps->setAvcBaseLayerFlag(uiCode ? true : false);
+#endif
 
 #if !P0307_REMOVE_VPS_VUI_OFFSET
Index: branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 873)
+++ branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 874)
@@ -347,4 +347,5 @@
 #else
     m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1( getCommonDecoderParams()->getTargetOutputLayerSetIdx(), pcSlice->getLayerId(), pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded
+    //TODO: HENDRY -- Do the checking here.
 #endif
   }
@@ -742,5 +743,9 @@
 
     // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of sps_scaling_list_ref_layer_id shall be greater than 0
+#if VPS_AVC_BL_FLAG_REMOVAL
+    if( activeVPS->getNonHEVCBaseLayerFlag() )
+#else
     if( activeVPS->getAvcBaseLayerFlag() )
+#endif
     {
       assert( refLayerId > 0 );
@@ -771,5 +776,9 @@
 
     // When avc_base_layer_flag is equal to 1, it is a requirement of bitstream conformance that the value of sps_scaling_list_ref_layer_id shall be greater than 0
+#if VPS_AVC_BL_FLAG_REMOVAL
+    if( activeVPS->getNonHEVCBaseLayerFlag() )
+#else
     if( activeVPS->getAvcBaseLayerFlag() )
+#endif
     {
       assert( refLayerId > 0 );
@@ -797,5 +806,9 @@
 
 #if AVC_BASE
+#if VPS_AVC_BL_FLAG_REMOVAL
+  if( activeVPS->getNonHEVCBaseLayerFlag() )
+#else
   if( activeVPS->getAvcBaseLayerFlag() )
+#endif
   {
     TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin());
@@ -1059,4 +1072,7 @@
     m_isNoOutputPriorPics = false;
   }
+
+  //TODO: HENDRY -- Probably do the checking for max number of positive and negative pics here
+
 
   //For inference of PicOutputFlag
@@ -1580,5 +1596,9 @@
   {
 #if AVC_BASE
+#if VPS_AVC_BL_FLAG_REMOVAL
+    if( m_layerId == 1 && m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getNonHEVCBaseLayerFlag() )
+#else
     if( m_layerId == 1 && m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getAvcBaseLayerFlag() )
+#endif
     {
       TComPic* pBLPic = (*m_ppcTDecTop[0]->getListPic()->begin());
@@ -1941,5 +1961,9 @@
         UInt refLayerId = pcSlice->getVPS()->getRefLayerId(m_layerId, refLayerIdc);
 #if AVC_BASE
+#if VPS_AVC_BL_FLAG_REMOVAL
+        if( refLayerId == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getNonHEVCBaseLayerFlag() )
+#else
         if( refLayerId == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getAvcBaseLayerFlag() )
+#endif
         {          
           TComPic* pic = *m_ppcTDecTop[0]->getListPic()->begin();
@@ -2116,5 +2140,9 @@
         UInt refLayerIdc = pcSlice->getInterLayerPredLayerIdc(i);
 #if AVC_BASE
+#if VPS_AVC_BL_FLAG_REMOVAL
+        if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getNonHEVCBaseLayerFlag() )
+#else
         if( pcSlice->getVPS()->getRefLayerId( m_layerId, refLayerIdc ) == 0 && m_parameterSetManagerDecoder.getActiveVPS()->getAvcBaseLayerFlag() )
+#endif
         {
           pcSlice->setBaseColPic ( refLayerIdc, *m_ppcTDecTop[0]->getListPic()->begin() );
@@ -2437,5 +2465,9 @@
 #endif
 #if AVC_BASE
+#if VPS_AVC_BL_FLAG_REMOVAL
+      if( m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getNonHEVCBaseLayerFlag() )
+#else
       if( m_parameterSetManagerDecoder.getPrefetchedVPS(0)->getAvcBaseLayerFlag() )
+#endif
       {
         if( !m_ppcTDecTop[0]->getBLReconFile()->good() )
