Index: trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- trunk/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 2)
+++ 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 2)
+++ 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 2)
+++ 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);
