Index: /branches/SHM-3.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 321)
@@ -2187,6 +2187,4 @@
   printf("ENCODER_FAST_MODE: %d ", ENCODER_FAST_MODE);
   printf("REF_IDX_MFM: %d ", REF_IDX_MFM);
-#elif INTRA_BL
-  printf("INTRA_BL:%d ", INTRA_BL);
 #endif
 #else
Index: /branches/SHM-3.0-dev/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibCommon/ContextTables.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibCommon/ContextTables.h	(revision 321)
@@ -92,7 +92,4 @@
 #define NUM_SAO_MERGE_FLAG_CTX        1       ///< number of context models for SAO merge flags
 #define NUM_SAO_TYPE_IDX_CTX          1       ///< number of context models for SAO type index
-#if INTRA_BL
-#define NUM_INTRA_BL_PRED_CTX         3
-#endif
 
 #define NUM_TRANSFORMSKIP_FLAG_CTX    1       ///< number of context models for transform skipping 
@@ -330,13 +327,4 @@
 };
 
-#if INTRA_BL
-static const UChar 
-INIT_INTRA_BL_PRED_FLAG[3][NUM_INTRA_BL_PRED_CTX] = 
-{
-  { 185,  185,  201, }, 
-  { 197,  197,  185, }, 
-  { 197,  197,  185, }, 
-};
-#endif
 static const UChar
 INIT_TRANSFORMSKIP_FLAG[3][2*NUM_TRANSFORMSKIP_FLAG_CTX] = 
Index: /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 321)
@@ -1643,18 +1643,10 @@
   pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
   
-#if INTRA_BL
-  iLeftIntraDir  = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) && ( !pcTempCU->isIntraBL( uiTempPartIdx ) ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
-#else
   iLeftIntraDir  = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
-#endif
   
   // Get intra direction of above PU
   pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, true );
   
-#if INTRA_BL
-  iAboveIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) && ( !pcTempCU->isIntraBL( uiTempPartIdx ) ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
-#else
   iAboveIntraDir = pcTempCU ? ( pcTempCU->isIntra( uiTempPartIdx ) ? pcTempCU->getLumaIntraDir( uiTempPartIdx ) : DC_IDX ) : DC_IDX;
-#endif 
   
   uiPredNum = 3;
@@ -1798,9 +1790,5 @@
   UInt log2CbSize = g_aucConvertToBit[getWidth( absPartIdx )] + 2;
   PartSize  partSize  = getPartitionSize( absPartIdx );
-#if INTRA_BL
-  UInt quadtreeTUMaxDepth = isIntra( absPartIdx ) ? m_pcSlice->getSPS()->getQuadtreeTUMaxDepthIntra() : m_pcSlice->getSPS()->getQuadtreeTUMaxDepthInter(); 
-#else
   UInt quadtreeTUMaxDepth = getPredictionMode( absPartIdx ) == MODE_INTRA ? m_pcSlice->getSPS()->getQuadtreeTUMaxDepthIntra() : m_pcSlice->getSPS()->getQuadtreeTUMaxDepthInter(); 
-#endif
   Int intraSplitFlag = ( getPredictionMode( absPartIdx ) == MODE_INTRA && partSize == SIZE_NxN ) ? 1 : 0;
   Int interSplitFlag = ((quadtreeTUMaxDepth == 1) && (getPredictionMode( absPartIdx ) == MODE_INTER) && (partSize != SIZE_2Nx2N) );
@@ -1824,32 +1812,4 @@
   return log2MinTUSizeInCU;
 }
-
-#if INTRA_BL
-UInt TComDataCU::getCtxIntraBLFlag( UInt uiAbsPartIdx )
-{
-  TComDataCU* pcTempCU;
-  UInt        uiTempPartIdx;
-  UInt        uiCtx = 0;
-  
-  // Get BCBP of left PU
-#if DEPENDENT_SLICES
-  Bool bDepSliceRestriction = ( !m_pcSlice->getPPS()->getDependentSliceEnabledFlag());
-  pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, bDepSliceRestriction );
-#else
-  pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
-#endif  
-  uiCtx    = ( pcTempCU ) ? pcTempCU->isIntraBL( uiTempPartIdx ) : 0;
-  
-  // Get BCBP of above PU
-#if DEPENDENT_SLICES
-  pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx, true, bDepSliceRestriction );
-#else
-  pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx );
-#endif  
-  uiCtx   += ( pcTempCU ) ? pcTempCU->isIntraBL( uiTempPartIdx ) : 0;
-  
-  return uiCtx;
-}
-#endif
 
 #if REF_IDX_ME_ZEROMV
@@ -2554,10 +2514,5 @@
   TComDataCU* pcCULeft = 0;
   pcCULeft = getPULeft( uiLeftPartIdx, uiPartIdxLB );
-#if INTRA_BL
-  if( pcCULeft && pcCULeft->isIntraBL( uiLeftPartIdx ) )
-  {
-    pcCULeft = NULL;
-  }
-#endif
+
   Bool isAvailableA1 = pcCULeft &&
   pcCULeft->isDiffMER(xP -1, yP+nPSH-1, xP, yP) &&
@@ -2591,10 +2546,5 @@
   TComDataCU* pcCUAbove = 0;
   pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT );
-#if INTRA_BL
-  if( pcCUAbove && pcCUAbove->isIntraBL( uiAbovePartIdx ) )
-  {
-    pcCUAbove = NULL;
-  }
-#endif
+
   Bool isAvailableB1 = pcCUAbove &&
   pcCUAbove->isDiffMER(xP+nPSW-1, yP-1, xP, yP) &&
@@ -2628,10 +2578,5 @@
   TComDataCU* pcCUAboveRight = 0;
   pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT );
-#if INTRA_BL
-  if( pcCUAboveRight && pcCUAboveRight->isIntraBL( uiAboveRightPartIdx ) )
-  {
-    pcCUAboveRight = NULL;
-  }
-#endif
+
   Bool isAvailableB0 = pcCUAboveRight &&
   pcCUAboveRight->isDiffMER(xP+nPSW, yP-1, xP, yP) &&
@@ -2664,10 +2609,5 @@
   TComDataCU* pcCULeftBottom = 0;
   pcCULeftBottom = this->getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB );
-#if INTRA_BL
-  if( pcCULeftBottom && pcCULeftBottom->isIntraBL( uiLeftBottomPartIdx ) )
-  {
-    pcCULeftBottom = NULL;
-  }
-#endif
+
   Bool isAvailableA0 = pcCULeftBottom &&
   pcCULeftBottom->isDiffMER(xP-1, yP+nPSH, xP, yP) &&
@@ -2702,10 +2642,5 @@
     TComDataCU* pcCUAboveLeft = 0;
     pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr );
-#if INTRA_BL
-    if( pcCUAboveLeft && pcCUAboveLeft->isIntraBL( uiAboveLeftPartIdx ) )
-    {
-      pcCUAboveLeft = NULL;
-    }
-#endif
+
     Bool isAvailableB2 = pcCUAboveLeft &&
     pcCUAboveLeft->isDiffMER(xP-1, yP-1, xP, yP) &&
@@ -3010,18 +2945,10 @@
   UInt idx;
   tmpCU = getPUBelowLeft(idx, uiPartIdxLB);
-#if INTRA_BL
-  bAddedSmvp = (tmpCU != NULL) && (!tmpCU->isIntra(idx));
-#else
   bAddedSmvp = (tmpCU != NULL) && (tmpCU->getPredictionMode(idx) != MODE_INTRA);
-#endif
 
   if (!bAddedSmvp)
   {
     tmpCU = getPULeft(idx, uiPartIdxLB);
-#if INTRA_BL
-    bAddedSmvp = (tmpCU != NULL) && (!tmpCU->isIntra(idx));
-#else
     bAddedSmvp = (tmpCU != NULL) && (tmpCU->getPredictionMode(idx) != MODE_INTRA);
-#endif
   }
 
@@ -4019,41 +3946,4 @@
 }
 
-#if INTRA_BL
-Void TComDataCU::getBaseLumaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride )
-{
-  TComPicYuv* pcBaseRec = getSlice()->getFullPelBaseRec();
-  UInt uiStrideBase = pcBaseRec->getStride();
-  Pel* piBase = pcBaseRec->getLumaAddr( getAddr(), getZorderIdxInCU() + uiAbsPartIdx );
-  
-  for ( UInt y = 0; y < uiHeight; y ++ )
-  {
-    memcpy( piPred + y * uiStride, piBase + y * uiStrideBase, uiWidth * sizeof( Pel ) );
-  }
-}
-
-Void TComDataCU::getBaseChromaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, UInt uiChromaId )
-{
-  TComPicYuv* pcBaseRec = getSlice()->getFullPelBaseRec();
-
-  UInt uiStrideBase = pcBaseRec->getCStride();
-  Pel* piBase;
-  
-  if( uiChromaId == 0 )
-  {
-    piBase = pcBaseRec->getCbAddr( getAddr(), getZorderIdxInCU() + uiAbsPartIdx );
-  }
-  else
-  {
-    piBase = pcBaseRec->getCrAddr( getAddr(), getZorderIdxInCU() + uiAbsPartIdx );
-  }
-  
-  for ( UInt y = 0; y < uiHeight; y ++ )
-  {
-    memcpy( piPred + y * uiStride, piBase + y * uiStrideBase, uiWidth * sizeof( Pel ) );
-  }
-}
-
-#endif
-
 #if SVC_COL_BLK
 TComDataCU*  TComDataCU::getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase )
Index: /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.h	(revision 321)
@@ -489,14 +489,5 @@
   // -------------------------------------------------------------------------------------------------------------------
   
-#if INTRA_BL
-  Void          getBaseLumaBlk   ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride );
-  Void          getBaseChromaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride, UInt uiChromaId );
-#endif
-#if INTRA_BL
-  Bool          isIntraBL ( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_INTRA_BL; }
-  Bool          isIntra   ( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_INTRA || m_pePredMode[ uiPartIdx ] == MODE_INTRA_BL; }
-#else
   Bool          isIntra   ( UInt uiPartIdx )  { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; }
-#endif 
   Bool          isSkipped ( UInt uiPartIdx );                                                     ///< SKIP (no residual)
   Bool          isBipredRestriction( UInt puIdx );
@@ -525,8 +516,5 @@
   UInt&         getTotalBins            ()                            { return m_uiTotalBins;                                                                                                  }
 
-#if INTRA_BL
-  UInt          getCtxIntraBLFlag               ( UInt   uiAbsPartIdx                                 );
-#endif  
-
+#if REF_IDX_FRAMEWORK
 #if FAST_INTRA_SHVC
   Int           reduceSetOfIntraModes              (  UInt   uiAbsPartIdx, Int* uiIntraDirPred, Int &fullSetOfModes );
@@ -536,4 +524,5 @@
   Bool xCheckZeroMVILRMerge(UChar uhInterDir, TComMvField& cMvFieldL0, TComMvField& cMvFieldL1);
   Bool xCheckZeroMVILRMvdL1Zero(Int iRefList, Int iRefIdx, Int MvpIdx);
+#endif
 #endif
 
@@ -549,8 +538,10 @@
   UInt          getCoefScanIdx(UInt uiAbsPartIdx, UInt uiWidth, Bool bIsLuma, Bool bIsIntra);
 
+#if REF_IDX_FRAMEWORK
 #if SVC_COL_BLK 
   TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiCuAbsPartIdx, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase );
   TComDataCU*   getBaseColCU( UInt refLayerIdc, UInt uiPelX, UInt uiPelY, UInt &uiCUAddrBase, UInt &uiAbsPartIdxBase );
   Void          scaleBaseMV( UInt refLayerIdc, TComMvField& rcMvFieldEnhance, TComMvField& rcMvFieldBase );
+#endif
 #endif
 };
Index: /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.cpp	(revision 321)
@@ -408,13 +408,4 @@
 }
 
-#if INTRA_BL
-Void TComPrediction::getBaseBlk( TComDataCU* pcCU, TComYuv* pcYuvPred, Int iPartAddr, Int iWidth, Int iHeight )
-{
-  pcCU->getBaseLumaBlk( iWidth, iHeight, iPartAddr, pcYuvPred->getLumaAddr( iPartAddr ), pcYuvPred->getStride() );
-  pcCU->getBaseChromaBlk( iWidth >> 1, iHeight >> 1, iPartAddr, pcYuvPred->getCbAddr( iPartAddr ), pcYuvPred->getCStride(), 0 );
-  pcCU->getBaseChromaBlk( iWidth >> 1, iHeight >> 1, iPartAddr, pcYuvPred->getCrAddr( iPartAddr ), pcYuvPred->getCStride(), 1 );
-}
-#endif
-
 Void TComPrediction::motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList, Int iPartIdx )
 {
Index: /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.h	(revision 321)
@@ -101,8 +101,5 @@
   
   Void    initTempBuff();
-  
-#if INTRA_BL
-  Void getBaseBlk ( TComDataCU* pcCU, TComYuv* pcYuvPred, Int iPartAddr, Int iWidth, Int iHeight );
-#endif
+
   // inter
   Void motionCompensation         ( TComDataCU*  pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 );
@@ -121,4 +118,5 @@
   Int  getPredicBufHeight()       { return m_iYuvExtHeight; }
 
+#if REF_IDX_FRAMEWORK
 #if SVC_UPSAMPLING
 #if SCALED_REF_LAYER_OFFSETS
@@ -128,4 +126,5 @@
 #endif
 #endif
+#endif
 };
 
Index: /branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 321)
@@ -113,7 +113,4 @@
 #define M0457_IL_SAMPLE_PRED_ONLY_FLAG   0
 #endif
-
-#else
-#define INTRA_BL                         1      ///< inter-layer texture prediction
 #endif
 
@@ -458,7 +455,4 @@
   MODE_INTER,           ///< inter-prediction mode
   MODE_INTRA,           ///< intra-prediction mode
-#if INTRA_BL
-  MODE_INTRA_BL,        ///< inter-layer intra-prediction mode
-#endif
   MODE_NONE = 15
 };
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 321)
@@ -2215,12 +2215,4 @@
   return (cnt>0);
 }
-
-#if INTRA_BL
-Void TDecCavlc::parseIntraBLFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
-{
-  assert(0);
-}
-#endif
-
 //! \}
 
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 321)
@@ -118,8 +118,4 @@
   Void updateContextTables  ( SliceType /*eSliceType*/, Int /*iQp*/ ) { return; }
 
-#if INTRA_BL
-  Void parseIntraBLFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
-#endif
-
   Void xParsePredWeightTable ( TComSlice* pcSlice );
   Void  parseScalingList               ( TComScalingList* scalingList );
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.cpp	(revision 321)
@@ -334,13 +334,4 @@
     return;
   }
-#if INTRA_BL
-  m_pcEntropyDecoder->decodeIntraBLFlag( pcCU, uiAbsPartIdx, 0, uiDepth );
-  if ( pcCU->isIntraBL( uiAbsPartIdx ) )
-  {
-    pcCU->setSizeSubParts( g_uiMaxCUWidth>>uiDepth, g_uiMaxCUHeight>>uiDepth, uiAbsPartIdx, uiDepth ); 
-  }
-  else
-  {
-#endif
 
   m_pcEntropyDecoder->decodePredMode( pcCU, uiAbsPartIdx, uiDepth );
@@ -357,17 +348,10 @@
     }
   }
-#if INTRA_BL
+
+  UInt uiCurrWidth      = pcCU->getWidth ( uiAbsPartIdx );
+  UInt uiCurrHeight     = pcCU->getHeight( uiAbsPartIdx );
+  
   // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
   m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
-  }
-#endif
-
-  UInt uiCurrWidth      = pcCU->getWidth ( uiAbsPartIdx );
-  UInt uiCurrHeight     = pcCU->getHeight( uiAbsPartIdx );
-  
-#if !INTRA_BL
-  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
-  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
-#endif
 
   // Coefficient decoding
@@ -440,9 +424,4 @@
       xReconIntraQT( m_ppcCU[uiDepth], uiDepth );
       break;
-#if INTRA_BL
-    case MODE_INTRA_BL:
-      xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
-      break;
-#endif
     default:
       assert(0);
@@ -512,11 +491,4 @@
   
   //===== get prediction signal =====
-#if INTRA_BL
-  if(pcCU->isIntraBL ( uiAbsPartIdx ) )
-  {
-    pcCU->getBaseLumaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride );
-  }
-  else
-#endif
   m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
   
@@ -603,18 +575,9 @@
   
   //===== get prediction signal =====
-#if INTRA_BL
-  if(pcCU->isIntraBL ( uiAbsPartIdx ) )
-  {
-    pcCU->getBaseChromaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride, uiChromaId );
-  }
-  else
-#endif
-  {
-    if( uiChromaPredMode == DM_CHROMA_IDX )
-    {
-      uiChromaPredMode = pcCU->getLumaIntraDir( 0 );
-    }
-    m_pcPrediction->predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );  
-  }
+  if( uiChromaPredMode == DM_CHROMA_IDX )
+  {
+    uiChromaPredMode = pcCU->getLumaIntraDir( 0 );
+  }
+  m_pcPrediction->predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );  
 
   //===== inverse transform =====
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.h	(revision 321)
@@ -77,8 +77,4 @@
 #endif
   
-#if INTRA_BL
-  TComPicYuv*         m_pcPicYuvRecBase;       ///< reconstructed base layer
-#endif 
-  
 public:
   TDecCu();
@@ -106,7 +102,4 @@
 #if SVC_EXTENSION
   TDecTop*   getLayerDec        ( UInt LayerId )  { return m_ppcTDecTop[LayerId]; }
-#if INTRA_BL
-  Void  setBaseRecPic           ( TComPicYuv* p ) { m_pcPicYuvRecBase = p; }
-#endif 
 #endif
 protected:
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 321)
@@ -58,11 +58,4 @@
 }
 
-#if INTRA_BL
-Void TDecEntropy::decodeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
-{
-  m_pcEntropyDecoderIf->parseIntraBLFlag( pcCU, uiAbsPartIdx, uiPartIdx, uiDepth );
-}
-#endif
-
 /** decode merge flag
  * \param pcSubCU
@@ -111,10 +104,4 @@
 Void TDecEntropy::decodePredInfo    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU )
 {
-#if INTRA_BL
-  if( pcCU->isIntraBL( uiAbsPartIdx ) )                                 // Do nothing for Intra BL mode.
-  {
-    return;
-  }
-#endif
   if( pcCU->isIntra( uiAbsPartIdx ) )                                 // If it is Intra mode, encode intra prediction mode.
   {
@@ -450,9 +437,5 @@
     
     pcCU->setCbfSubParts ( 0, TEXT_LUMA, uiAbsPartIdx, uiDepth );
-#if INTRA_BL
-    if( ( !pcCU->isIntra(uiAbsPartIdx) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
-#else
     if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
-#endif 
     {
       pcCU->setCbfSubParts( 1 << uiTrDepth, TEXT_LUMA, uiAbsPartIdx, uiDepth );
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecEntropy.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecEntropy.h	(revision 321)
@@ -107,8 +107,4 @@
   virtual Void parseTransformSkipFlags ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt width, UInt height, UInt uiDepth, TextType eTType) = 0;
 
-#if INTRA_BL
-  virtual Void parseIntraBLFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) = 0;
-#endif
-
   virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0;
   
@@ -170,8 +166,4 @@
   Void updateContextTables    ( SliceType eSliceType, Int iQp ) { m_pcEntropyDecoderIf->updateContextTables( eSliceType, iQp ); }
   
-#if INTRA_BL
-  Void decodeIntraBLFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
-#endif
-  
 private:
   Void xDecodeTransform        ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP );
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 321)
@@ -77,7 +77,4 @@
 , m_cTransformSkipSCModel     ( 1,             2,               NUM_TRANSFORMSKIP_FLAG_CTX    , m_contextModels + m_numContextModels, m_numContextModels)
 , m_CUTransquantBypassFlagSCModel( 1,          1,               NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX, m_contextModels + m_numContextModels, m_numContextModels)
-#if INTRA_BL
-, m_cIntraBLPredFlagSCModel   (1,              1,               NUM_INTRA_BL_PRED_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
-#endif
 {
   assert( m_numContextModels <= MAX_NUM_CTX_MOD );
@@ -138,7 +135,4 @@
 
   m_cCUTransSubdivFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
-#if INTRA_BL
-  m_cIntraBLPredFlagSCModel.initBuffer ( sliceType, qp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
-#endif
   m_cTransformSkipSCModel.initBuffer     ( sliceType, qp, (UChar*)INIT_TRANSFORMSKIP_FLAG );
   m_CUTransquantBypassFlagSCModel.initBuffer( sliceType, qp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG );
@@ -186,7 +180,4 @@
   m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
   m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
-#if INTRA_BL
-  m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
-#endif
   m_cTransformSkipSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG );
   m_CUTransquantBypassFlagSCModel.initBuffer( eSliceType, iQp, (UChar*)INIT_CU_TRANSQUANT_BYPASS_FLAG );
@@ -438,32 +429,4 @@
 }
 
-#if INTRA_BL
-Void TDecSbac::parseIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth )
-{
-  if( pcCU->getLayerId() == 0 )
-  {
-    return;
-  }
-
-  UInt uiSymbol = 0;
-
-  UInt uiCtxIntraBL = pcCU->getCtxIntraBLFlag( uiAbsPartIdx ) ;
-  m_pcTDecBinIf->decodeBin( uiSymbol, m_cIntraBLPredFlagSCModel.get( 0, 0, uiCtxIntraBL )); 
-  DTRACE_CABAC_VL( g_nSymbolCounter++ );
-  DTRACE_CABAC_T( "\tIntrBLFlag" );
-  DTRACE_CABAC_T( "\tuiSymbol: ");
-  DTRACE_CABAC_V( uiSymbol );
-  DTRACE_CABAC_T( "\n");
-
-  if ( uiSymbol )
-  {
-    pcCU->setPartSizeSubParts( SIZE_2Nx2N, uiAbsPartIdx, uiDepth );
-    pcCU->setPredModeSubParts( MODE_INTRA_BL, uiAbsPartIdx, uiDepth );
-    pcCU->setTrIdxSubParts( 0, uiAbsPartIdx, uiDepth );
-    pcCU->setLumaIntraDirSubParts ( DC_IDX, uiAbsPartIdx, uiDepth );   
-  }
-}
-#endif
-
 /** parse merge flag
  * \param pcCU
@@ -555,11 +518,5 @@
   UInt uiSymbol, uiMode = 0;
   PartSize eMode;
-  
-#if INTRA_BL
-  if ( pcCU->isIntraBL( uiAbsPartIdx ) )
-  {
-    assert( 0 );
-  }
-#endif
+
   if ( pcCU->isIntra( uiAbsPartIdx ) )
   {
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecSbac.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecSbac.h	(revision 321)
@@ -135,7 +135,4 @@
   Void  parseScalingList ( TComScalingList* /*scalingList*/ ) {}
 
-#if INTRA_BL
-  Void parseIntraBLFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
-#endif
 private:
   UInt m_uiLastDQpNonZero;
@@ -174,7 +171,4 @@
   ContextModel3DBuffer m_cTransformSkipSCModel;
   ContextModel3DBuffer m_CUTransquantBypassFlagSCModel;
-#if INTRA_BL
-  ContextModel3DBuffer m_cIntraBLPredFlagSCModel;
-#endif
 };
 
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecSlice.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 321)
@@ -197,7 +197,5 @@
   UInt uiTileLCUX;
   Int iNumSubstreamsPerTile = 1; // if independent.
-#if INTRA_BL
-  m_pcCuDecoder->setBaseRecPic( rpcPic->getLayerId() > 0 ? rpcPic->getFullPelBaseRec(rpcPic->getLayerId()-1) : NULL);
-#endif
+
   Bool depSliceSegmentsEnabled = rpcPic->getSlice(rpcPic->getCurrSliceIdx())->getPPS()->getDependentSliceSegmentsEnabledFlag();
   uiTileStartLCU = rpcPic->getPicSym()->getTComTile(rpcPic->getPicSym()->getTileIdxMap(iStartCUAddr))->getFirstCUAddr();
Index: /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecTop.cpp	(revision 321)
@@ -812,10 +812,4 @@
 #if REF_IDX_FRAMEWORK
     if (m_layerId == 0)
-#elif INTRA_BL
-    if( m_layerId > 0 )
-    {
-      pcSlice->setRefPicList( m_cListPic );
-    }
-    else
 #endif
 #if FIX1071
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 321)
@@ -1726,11 +1726,3 @@
   return true;
 }
-
-#if INTRA_BL
-Void TEncCavlc::codeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
-{
-  assert(0);
-}
-
-#endif
 //! \}
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCavlc.h	(revision 321)
@@ -112,7 +112,4 @@
   Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
   Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
-#if INTRA_BL
-  Void codeIntraBLFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx );
-#endif
  
   Void codeInterModeFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiEncMode );
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.cpp	(revision 321)
@@ -763,11 +763,4 @@
           }
         }
-#if INTRA_BL
-      if(m_pcPicYuvRecBase)
-      {
-        xCheckRDCostIntraBL( rpcBestCU, rpcTempCU );
-        rpcTempCU->initEstData( uiDepth, iQP );
-      }
-#endif
 #if (ENCODER_FAST_MODE)
       if(pcPic->getLayerId() > 0)
@@ -1215,9 +1208,4 @@
     return;
   }
-#if INTRA_BL
-  m_pcEntropyCoder->encodeIntraBLFlag( pcCU, uiAbsPartIdx );
-  if ( !pcCU->isIntraBL( uiAbsPartIdx ) )
-  {
-#endif
   m_pcEntropyCoder->encodePredMode( pcCU, uiAbsPartIdx );
   
@@ -1238,7 +1226,4 @@
   // prediction Info ( Intra : direction mode, Inter : Mv, reference idx )
   m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx );
-#if INTRA_BL
-  }
-#endif
   
   // Encode Coefficients
@@ -1568,7 +1553,5 @@
   
   m_pcEntropyCoder->resetBits();
-#if INTRA_BL
-  m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0,       true );
-#endif
+
   if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
   {
@@ -1624,7 +1607,5 @@
 
   m_pcEntropyCoder->resetBits();
-#if INTRA_BL
-  m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0,       true );
-#endif
+
   if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
   {
@@ -1879,42 +1860,4 @@
 #endif
 
-#if INTRA_BL
-Void TEncCu::xCheckRDCostIntraBL( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU )
-{
-  UInt uiDepth = rpcTempCU->getDepth( 0 );
-  rpcTempCU->setSkipFlagSubParts( false, 0, uiDepth ); 
-  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );
-  rpcTempCU->setPredModeSubParts( MODE_INTRA_BL, 0, uiDepth );  
-  rpcTempCU->setCUTransquantBypassSubParts( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uiDepth );
-
-  m_pcPredSearch->setBaseRecPic( m_pcPicYuvRecBase ); 
-  m_pcPredSearch->estIntraBLPredQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth] );
-
-  m_pcEntropyCoder->resetBits();
-  m_pcEntropyCoder->encodeIntraBLFlag ( rpcTempCU, 0,       true );
-  m_pcEntropyCoder->encodeSkipFlag( rpcTempCU, 0,       true );
-  if ( rpcTempCU->getSlice()->getPPS()->getTransquantBypassEnableFlag())
-  {
-    m_pcEntropyCoder->encodeCUTransquantBypassFlag( rpcTempCU, 0,          true );
-  }
-
-  // Encode Coefficients
-  Bool bCodeDQP = getdQPFlag();
-  m_pcEntropyCoder->encodeCoeff( rpcTempCU, 0, uiDepth, rpcTempCU->getWidth (0), rpcTempCU->getHeight(0), bCodeDQP );
-  setdQPFlag( bCodeDQP );
-  
-  if( m_bUseSBACRD ) m_pcRDGoOnSbacCoder->store(m_pppcRDSbacCoder[uiDepth][CI_TEMP_BEST]);
-  
-  rpcTempCU->getTotalBits() = m_pcEntropyCoder->getNumberOfWrittenBits();
-  if(m_pcEncCfg->getUseSBACRD())
-  {
-    rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
-  }
-  rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
-  
-  xCheckDQP( rpcTempCU );
-  xCheckBestMode(rpcBestCU, rpcTempCU, uiDepth);
-}
-#endif
 #if (ENCODER_FAST_MODE)
 Void TEncCu::xCheckRDCostILRUni(TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU, UInt refLayerId)
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.h	(revision 321)
@@ -84,7 +84,4 @@
   //  Access channel
   TEncCfg*                m_pcEncCfg;
-#if INTRA_BL
-  TComPicYuv*             m_pcPicYuvRecBase;       ///< reconstructed base layer
-#endif 
   TEncSearch*             m_pcPredSearch;
   TComTrQuant*            m_pcTrQuant;
@@ -134,7 +131,5 @@
   Int   updateLCUDataISlice ( TComDataCU* pcCU, Int LCUIdx, Int width, Int height );
 #endif
-#if INTRA_BL 
-  Void  setBaseRecPic       ( TComPicYuv* p ) { m_pcPicYuvRecBase = p; }   
-#endif
+
 protected:
   Void  finishCU            ( TComDataCU*  pcCU, UInt uiAbsPartIdx,           UInt uiDepth        );
@@ -157,7 +152,4 @@
 #endif
   Void  xCheckRDCostIntra   ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize  );
-#if INTRA_BL
-  Void  xCheckRDCostIntraBL ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU  );
-#endif
 #if ENCODER_FAST_MODE
   Void  xCheckRDCostILRUni  ( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, UInt refLayerId);
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 321)
@@ -166,11 +166,4 @@
   }
 
-#if INTRA_BL
-  if( pcCU->isIntraBL( uiAbsPartIdx ) )
-  {
-    return;
-  }
-#endif
-
   m_pcEntropyCoderIf->codePredMode( pcCU, uiAbsPartIdx );
 }
@@ -251,10 +244,6 @@
     }
   }
-#if INTRA_BL
-    if( pcCU->isIntra(uiAbsPartIdx) && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
-#else
   
   if( pcCU->getPredictionMode(uiAbsPartIdx) == MODE_INTRA && pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && uiDepth == pcCU->getDepth(uiAbsPartIdx) )
-#endif
   {
     assert( uiSubdiv );
@@ -342,9 +331,5 @@
     }
     
-#if INTRA_BL
-    if( ( !pcCU->isIntra( uiAbsPartIdx ) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
-#else
     if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
-#endif
     {
       assert( pcCU->getCbf( uiAbsPartIdx, TEXT_LUMA, 0 ) );
@@ -427,7 +412,4 @@
 Void TEncEntropy::encodePredInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
-#if INTRA_BL
-  assert ( !pcCU->isIntraBL( uiAbsPartIdx ) );
-#endif
   if( bRD )
   {
@@ -751,18 +733,3 @@
 }
 
-#if INTRA_BL
-Void TEncEntropy::encodeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
-{
-  if( pcCU->getLayerId() == 0 )
-  {
-    return;
-  }
-
-  if( bRD )
-  {
-    uiAbsPartIdx = 0;
-  }
-  m_pcEntropyCoderIf->codeIntraBLFlag( pcCU, uiAbsPartIdx );
-}
-#endif
 //! \}
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.h	(revision 321)
@@ -85,8 +85,5 @@
   virtual Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
   virtual Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
-  
-#if INTRA_BL
-  virtual Void codeIntraBLFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
-#endif
+
   virtual Void codePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
   virtual Void codePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
@@ -164,7 +161,4 @@
   Void encodeMergeFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
   Void encodeMergeIndex   ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
-#if INTRA_BL
-  Void encodeIntraBLFlag  ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
-#endif
   Void encodePredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
   Void encodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 321)
@@ -83,7 +83,4 @@
 , m_cTransformSkipSCModel     ( 1,             2,               NUM_TRANSFORMSKIP_FLAG_CTX    , m_contextModels + m_numContextModels, m_numContextModels)
 , m_CUTransquantBypassFlagSCModel( 1,          1,               NUM_CU_TRANSQUANT_BYPASS_FLAG_CTX, m_contextModels + m_numContextModels, m_numContextModels)
-#if INTRA_BL
-, m_cIntraBLPredFlagSCModel   (1,              1,               NUM_INTRA_BL_PRED_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
-#endif
 {
   assert( m_numContextModels <= MAX_NUM_CTX_MOD );
@@ -134,7 +131,4 @@
   m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
   m_cSaoMergeSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_FLAG );
-#if INTRA_BL
-  m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
-#endif
   m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
   m_cTransformSkipSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG );
@@ -169,7 +163,4 @@
       curCost  = m_cCUSplitFlagSCModel.calcCost       ( curSliceType, qp, (UChar*)INIT_SPLIT_FLAG );
       curCost += m_cCUSkipFlagSCModel.calcCost        ( curSliceType, qp, (UChar*)INIT_SKIP_FLAG );
-#if INTRA_BL
-      curCost += m_cIntraBLPredFlagSCModel.calcCost   ( curSliceType, qp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
-#endif
       curCost += m_cCUMergeFlagExtSCModel.calcCost    ( curSliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT);
       curCost += m_cCUMergeIdxExtSCModel.calcCost     ( curSliceType, qp, (UChar*)INIT_MERGE_IDX_EXT);
@@ -243,7 +234,4 @@
   m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
   m_cSaoMergeSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SAO_MERGE_FLAG );
-#if INTRA_BL
-  m_cIntraBLPredFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_INTRA_BL_PRED_FLAG );
-#endif
   m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
   m_cTransformSkipSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_TRANSFORMSKIP_FLAG );
@@ -428,7 +416,5 @@
 {
   PartSize eSize         = pcCU->getPartitionSize( uiAbsPartIdx );
-#if INTRA_BL
-  assert( !pcCU->isIntraBL( uiAbsPartIdx ) );
-#endif
+
   if ( pcCU->isIntra( uiAbsPartIdx ) )
   {
@@ -1600,23 +1586,3 @@
 }
 
-#if INTRA_BL
-/** code intra_bl flag
- * \param pcCU
- * \param uiAbsPartIdx 
- * \returns Void
- */
-Void TEncSbac::codeIntraBLFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
-{
-  // get context function is here
-  UInt uiSymbol = pcCU->isIntraBL( uiAbsPartIdx ) ? 1 : 0;
-
-  UInt uiCtxIntraBL = pcCU->getCtxIntraBLFlag( uiAbsPartIdx ) ;
-  m_pcBinIf->encodeBin(uiSymbol, m_cIntraBLPredFlagSCModel.get( 0, 0, uiCtxIntraBL )); 
-
-  DTRACE_CABAC_VL( g_nSymbolCounter++ );
-  DTRACE_CABAC_T( "\tuiSymbol: ");
-  DTRACE_CABAC_V( uiSymbol );
-  DTRACE_CABAC_T( "\n");
-}
-#endif
 //! \}
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSbac.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSbac.h	(revision 321)
@@ -132,8 +132,5 @@
   Void codeSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void codeMVPIdx        ( TComDataCU* pcCU, UInt uiAbsPartIdx, RefPicList eRefList );
-  
-#if INTRA_BL
-  Void codeIntraBLFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
-#endif
+
   Void codePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void codePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
@@ -206,7 +203,4 @@
   ContextModel3DBuffer m_cTransformSkipSCModel;
   ContextModel3DBuffer m_CUTransquantBypassFlagSCModel;
-#if INTRA_BL
-  ContextModel3DBuffer m_cIntraBLPredFlagSCModel;
-#endif
 };
 
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 321)
@@ -906,11 +906,5 @@
         m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
       }
-#if INTRA_BL
-      m_pcEntropyCoder->encodeIntraBLFlag ( pcCU, 0, true );
-      if( pcCU->isIntraBL( 0 ) )
-      {
-        return;
-      }
-#endif      
+    
       m_pcEntropyCoder  ->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
 
@@ -950,10 +944,5 @@
     }
   }
-#if INTRA_BL
-  if( pcCU->isIntraBL( 0 ) )
-  {
-    return;
-  }
-#endif
+
   if( bChroma )
   {
@@ -1055,11 +1044,4 @@
     pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
     //===== get prediction signal =====
-#if INTRA_BL
-    if(pcCU->isIntraBL ( uiAbsPartIdx ) )
-    {
-      pcCU->getBaseLumaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride );
-    }
-    else
-#endif
     predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
     // save prediction 
@@ -1247,14 +1229,6 @@
 
     //===== get prediction signal =====
-#if INTRA_BL
-  if(pcCU->isIntraBL ( uiAbsPartIdx ) )
-  {
-    pcCU->getBaseChromaBlk( uiWidth, uiHeight, uiAbsPartIdx, piPred, uiStride, uiChromaId );
-  }
-  else
-#endif
-    {
-      predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
-    }
+    predIntraChromaAng( pPatChroma, uiChromaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
+
     // save prediction 
     if( default0Save1Load2 == 1 )
@@ -5576,9 +5550,5 @@
 
   {
-#if INTRA_BL
-    assert( !pcCU->isIntra(uiAbsPartIdx) );
-#else
     assert( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA );
-#endif
     if( bSubdivAndCbf )
     {
@@ -5814,11 +5784,4 @@
     }
     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 );
@@ -6242,58 +6205,3 @@
 #endif
 
-#if INTRA_BL
-Void 
-TEncSearch::estIntraBLPredQT( TComDataCU* pcCU, 
-                           TComYuv*    pcOrgYuv, 
-                           TComYuv*    pcPredYuv, 
-                           TComYuv*    pcResiYuv,
-                           TComYuv*    pcRecoYuv )
-{
-  UInt    uiDepth        = pcCU->getDepth(0);
-  UInt    uiOverallDistY = 0;
-  UInt    uiOverallDistC = 0;
-  
-  //===== set QP and clear Cbf =====
-  if ( pcCU->getSlice()->getPPS()->getUseDQP() == true)
-  {
-    pcCU->setQPSubParts( pcCU->getQP(0), 0, uiDepth );
-  }
-  else
-  {
-    pcCU->setQPSubParts( pcCU->getSlice()->getSliceQp(), 0, uiDepth );
-  }
-  
-  //===== init pattern for luma prediction =====
-  Bool bAboveAvail = false;
-  Bool bLeftAvail  = false;
-  pcCU->getPattern()->initPattern   ( pcCU, 0, 0 );
-  pcCU->getPattern()->initAdiPattern( pcCU, 0, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
-  
-  pcCU->setLumaIntraDirSubParts ( DC_IDX, 0, uiDepth );
-  
-  // set context models
-  if( m_bUseSBACRD )
-  {
-    m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );
-  }
-  
-  // determine residual for partition
-  Double dPUCost   = 0.0;
-  xRecurIntraCodingQT( pcCU, 0, 0, false, pcOrgYuv, pcPredYuv, pcResiYuv, uiOverallDistY, uiOverallDistC, false, dPUCost );
-  xSetIntraResultQT( pcCU, 0, 0, false, pcRecoYuv );
-  
-  //=== update PU data ====
-  pcCU->copyToPic( uiDepth, 0, 0 );
-   
-  //===== reset context models =====
-  if(m_bUseSBACRD)
-  {
-    m_pcRDGoOnSbacCoder->load(m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST]);
-  }
-
-  //===== set distortion (rate and r-d costs are determined later) =====
-  pcCU->getTotalDistortion() = uiOverallDistY + uiOverallDistC;
-}
-
-#endif
 //! \}
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.h	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.h	(revision 321)
@@ -99,7 +99,4 @@
 #if SVC_EXTENSION
   TEncTop**       m_ppcTEncTop;
-#if INTRA_BL
-  TComPicYuv*     m_pcPicYuvRecBase;       ///< reconstructed base layer
-#endif
 #endif
   
@@ -192,14 +189,4 @@
                                   TComYuv*    pcRecoYuv,
                                   UInt        uiPreCalcDistC );
-  
-#if INTRA_BL
-  Void setBaseRecPic            ( TComPicYuv* pcPicYuvRecBase ) { m_pcPicYuvRecBase = pcPicYuvRecBase; }  
-  TComPicYuv* getBaseRecPic     ()                              { return m_pcPicYuvRecBase; }
-  Void  estIntraBLPredQT        ( TComDataCU* pcCU, 
-                                  TComYuv*    pcOrgYuv, 
-                                  TComYuv*    pcPredYuv, 
-                                  TComYuv*    pcResiYuv, 
-                                  TComYuv*    pcRecoYuv );
-#endif
   
   /// encoder estimation - inter prediction (non-skip)
Index: /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 320)
+++ /branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 321)
@@ -980,8 +980,4 @@
   UInt uiTileLCUX     = 0;
 
-#if INTRA_BL
-  m_pcCuEncoder->setBaseRecPic( rpcPic->getLayerId() > 0 ? rpcPic->getFullPelBaseRec(rpcPic->getLayerId()-1) : NULL);
-#endif
-
   Bool depSliceSegmentsEnabled = pcSlice->getPPS()->getDependentSliceSegmentsEnabledFlag();
   uiCUAddr = rpcPic->getPicSym()->getCUOrderMap( uiStartCUAddr /rpcPic->getNumPartInCU());
