Index: /trunk/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- /trunk/source/App/TAppDecoder/TAppDecTop.cpp	(revision 5)
+++ /trunk/source/App/TAppDecoder/TAppDecTop.cpp	(revision 6)
@@ -168,5 +168,4 @@
     streampos location = bitstreamFile.tellg();
     AnnexBStats stats = AnnexBStats();
-    bool bPreviousPictureDecoded = false;
 
     vector<uint8_t> nalUnit;
@@ -212,5 +211,4 @@
           bytestream.reset();
         }
-        bPreviousPictureDecoded = true; 
       }
     }
Index: /trunk/source/Lib/TLibCommon/CommonDef.h
===================================================================
--- /trunk/source/Lib/TLibCommon/CommonDef.h	(revision 5)
+++ /trunk/source/Lib/TLibCommon/CommonDef.h	(revision 6)
@@ -56,5 +56,5 @@
 // ====================================================================================================================
 
-#define NV_VERSION        "0.1"                 ///< Current software version
+#define NV_VERSION        "0.1.1"                 ///< Current software version
 
 // ====================================================================================================================
Index: /trunk/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComPic.cpp	(revision 5)
+++ /trunk/source/Lib/TLibCommon/TComPic.cpp	(revision 6)
@@ -68,4 +68,7 @@
 , m_bSpatialEnhLayer( false )
 , m_pcFullPelBaseRec( NULL )
+#if REF_IDX_ME_AROUND_ZEROMV
+, m_bIsILR                                (false)
+#endif
 #endif
 {
Index: /trunk/source/Lib/TLibCommon/TComPic.h
===================================================================
--- /trunk/source/Lib/TLibCommon/TComPic.h	(revision 5)
+++ /trunk/source/Lib/TLibCommon/TComPic.h	(revision 6)
@@ -61,7 +61,4 @@
 #if SVC_EXTENSION
   UInt                  m_layerId;              //  Layer ID
-#endif
-#if REF_IDX_ME_AROUND_ZEROMV
-  Bool                  m_bIsILR;                 //  Is ILR picture
 #endif
   Bool                  m_bUsedByCurr;            //  Used by current picture
@@ -91,4 +88,7 @@
   Bool                  m_bSpatialEnhLayer;       // whether current layer is a spatial enhancement layer,
   TComPicYuv*           m_pcFullPelBaseRec;    // upsampled base layer recontruction for difference domain inter prediction
+#if REF_IDX_ME_AROUND_ZEROMV
+  Bool                  m_bIsILR;                 //  Is ILR picture
+#endif
 #endif
 
Index: /trunk/source/Lib/TLibCommon/TComUpsampleFilter.cpp
===================================================================
--- /trunk/source/Lib/TLibCommon/TComUpsampleFilter.cpp	(revision 5)
+++ /trunk/source/Lib/TLibCommon/TComUpsampleFilter.cpp	(revision 6)
@@ -3,5 +3,5 @@
 #include "TypeDef.h"
 
-#if SVC_EXTENSION
+#if SVC_UPSAMPLING
 // ====================================================================================================================
 // Tables:
Index: /trunk/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 5)
+++ /trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 6)
@@ -159,5 +159,9 @@
         m_cIlpPic[j] = new  TComPic;
         //m_cIlpPic[j]->createWithOutYuv(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, &m_cSPS, true);
+#if SVC_UPSAMPLING
         m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, pcSPS, true);
+#else
+        m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true);
+#endif
         for (Int i=0; i<m_cIlpPic[j]->getPicSym()->getNumberOfCUsInFrame(); i++)
         {
Index: /trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 5)
+++ /trunk/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 6)
@@ -237,4 +237,11 @@
   }
 
+#if INTRA_BL
+  if( pcCU->isIntraBL( uiAbsPartIdx ) )
+  {
+    return;
+  }
+#endif
+
   m_pcEntropyCoderIf->codePredMode( pcCU, uiAbsPartIdx );
 }
Index: /trunk/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 5)
+++ /trunk/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 6)
@@ -894,11 +894,4 @@
                             Bool         bChroma )
 {
-#if INTRA_BL
-  if ( pcCU->isIntraBL( 0 ))
-  {
-    return;
-  }
-#endif
-
   if( bLuma )
   {
@@ -917,6 +910,9 @@
 #if INTRA_BL
       m_pcEntropyCoder->encodeIntraBLFlag ( pcCU, 0, true );
-#endif
-      
+      if( pcCU->isIntraBL( 0 ) )
+      {
+        return;
+      }
+#endif      
       m_pcEntropyCoder  ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
 
@@ -956,4 +952,10 @@
     }
   }
+#if INTRA_BL
+  if( pcCU->isIntraBL( 0 ) )
+  {
+    return;
+  }
+#endif
   if( bChroma )
   {
@@ -6153,4 +6155,11 @@
     }
     m_pcEntropyCoder->encodeSkipFlag ( pcCU, 0, true );
+#if INTRA_BL
+    if(m_pcEncCfg->getLayerId())
+    {
+      m_pcEntropyCoder->encodeIntraBLFlag(pcCU, 0, true);
+      assert( pcCU->isIntraBL( 0 ) == false );
+    }
+#endif
     m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
     m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
Index: /trunk/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- /trunk/source/Lib/TLibEncoder/TEncTop.cpp	(revision 5)
+++ /trunk/source/Lib/TLibEncoder/TEncTop.cpp	(revision 6)
@@ -389,5 +389,9 @@
         m_cIlpPic[j] = new  TComPic;
         //m_cIlpPic[j]->createWithOutYuv(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, &m_cSPS, true);
+#if SVC_UPSAMPLING
         m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, &m_cSPS, true);
+#else
+        m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, true);
+#endif
 #if REF_IDX_ME_AROUND_ZEROMV
         m_cIlpPic[j]->setIsILR(true);
