Index: branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.cpp	(revision 319)
@@ -4019,5 +4019,5 @@
 }
 
-#if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED 
+#if INTRA_BL
 Void TComDataCU::getBaseLumaBlk ( UInt uiWidth, UInt uiHeight, UInt uiAbsPartIdx, Pel* piPred, UInt uiStride )
 {
Index: branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.h	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibCommon/TComDataCU.h	(revision 319)
@@ -489,5 +489,5 @@
   // -------------------------------------------------------------------------------------------------------------------
   
-#if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED 
+#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 );
Index: branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.cpp	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibCommon/TComPrediction.cpp	(revision 319)
@@ -408,5 +408,5 @@
 }
 
-#if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
+#if INTRA_BL
 Void TComPrediction::getBaseBlk( TComDataCU* pcCU, TComYuv* pcYuvPred, Int iPartAddr, Int iWidth, Int iHeight )
 {
Index: branches/SHM-3.0-dev/source/Lib/TLibCommon/TComTrQuant.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibCommon/TComTrQuant.cpp	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibCommon/TComTrQuant.cpp	(revision 319)
@@ -1314,16 +1314,5 @@
     Int scalingListType = (pcCU->isIntra(uiAbsPartIdx) ? 0 : 3) + g_eTTable[(Int)eTxt];
     assert(scalingListType < 6);
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-    if(pcCU->isIntraBL(uiAbsPartIdx) && eTxt == TEXT_LUMA)
-    {
-      invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eTxt, DC_IDX, pResi, uiStride, rpcCoeff, uiWidth, uiHeight, scalingListType, pcCU->getTransformSkip(uiAbsPartIdx, eTxt) );
-    }
-    else
-    {
-      invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eTxt, REG_DCT, pResi, uiStride, rpcCoeff, uiWidth, uiHeight, scalingListType, pcCU->getTransformSkip(uiAbsPartIdx, eTxt) );
-    }
-#else
     invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), eTxt, REG_DCT, pResi, uiStride, rpcCoeff, uiWidth, uiHeight, scalingListType, pcCU->getTransformSkip(uiAbsPartIdx, eTxt) );
-#endif
   }
   else
@@ -1809,9 +1798,5 @@
   Int     ui16CtxCbf          = 0;
   Int     iBestLastIdxP1      = 0;
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-  if( (!pcCU->isIntra( uiAbsPartIdx ) || pcCU->isIntraBL( uiAbsPartIdx )) && eTType == TEXT_LUMA && pcCU->getTransformIdx( uiAbsPartIdx ) == 0 )
-#else
   if( !pcCU->isIntra( uiAbsPartIdx ) && eTType == TEXT_LUMA && pcCU->getTransformIdx( uiAbsPartIdx ) == 0 )
-#endif
   {
     ui16CtxCbf   = 0;
Index: branches/SHM-3.0-dev/source/Lib/TLibCommon/TComYuv.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibCommon/TComYuv.cpp	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibCommon/TComYuv.cpp	(revision 319)
@@ -184,57 +184,4 @@
 }
 
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-Void TComYuv::copyFromPicLuma  ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiZorderIdxInCU, UInt uiAbsZorderIdx, UInt uiWidth, UInt uiHeight )
-{
-  Int  y;
-
-  Pel* pDst     = getLumaAddr(uiAbsZorderIdx);
-  Pel* pSrc     = pcPicYuvSrc->getLumaAddr ( iCuAddr, uiZorderIdxInCU + uiAbsZorderIdx );
-
-  UInt  iDstStride  = getStride();
-  UInt  iSrcStride  = pcPicYuvSrc->getStride();
-  for ( y = uiHeight; y != 0; y-- )
-  {
-    ::memcpy( pDst, pSrc, sizeof(Pel)*uiWidth);
-    pDst += iDstStride;
-    pSrc += iSrcStride;
-  }
-}
-
-Void TComYuv::copyFromPicChroma( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiZorderIdxInCU, UInt uiAbsZorderIdx, UInt uiCWidth, UInt uiCHeight, UInt uiChromaId  )
-{
-  Int  y;
-
-  if (!uiChromaId)
-  {
-    Pel* pDstU      = getCbAddr(uiAbsZorderIdx); 
-    Pel* pSrcU      = pcPicYuvSrc->getCbAddr( iCuAddr, uiZorderIdxInCU + uiAbsZorderIdx );
-
-    UInt  iDstStride = getCStride();
-    UInt  iSrcStride = pcPicYuvSrc->getCStride();
-    for ( y = uiCHeight; y != 0; y-- )
-    {
-      ::memcpy( pDstU, pSrcU, sizeof(Pel)*(uiCWidth) );
-      pSrcU += iSrcStride;
-      pDstU += iDstStride;
-    }
-  }
-  else
-  {
-    Pel* pDstV      = getCrAddr(uiAbsZorderIdx);
-    Pel* pSrcV      = pcPicYuvSrc->getCrAddr( iCuAddr, uiZorderIdxInCU + uiAbsZorderIdx );
-
-    UInt  iDstStride = getCStride();
-    UInt  iSrcStride = pcPicYuvSrc->getCStride();
-    for ( y = uiCHeight; y != 0; y-- )
-    {
-      ::memcpy( pDstV, pSrcV, sizeof(Pel)*(uiCWidth) );
-      pSrcV += iSrcStride;
-      pDstV += iDstStride;
-    }
-  }
-}
-#endif
-
 Void TComYuv::copyToPartYuv( TComYuv* pcYuvDst, UInt uiDstPartIdx )
 {
Index: branches/SHM-3.0-dev/source/Lib/TLibCommon/TComYuv.h
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibCommon/TComYuv.h	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibCommon/TComYuv.h	(revision 319)
@@ -115,8 +115,4 @@
   Void    copyFromPicLuma      ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiAbsZorderIdx );
   Void    copyFromPicChroma    ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiAbsZorderIdx );
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-  Void    copyFromPicLuma  ( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiZorderIdxInCU, UInt uiAbsZorderIdx, UInt uiWidth, UInt uiHeight );
-  Void    copyFromPicChroma( TComPicYuv* pcPicYuvSrc, UInt iCuAddr, UInt uiZorderIdxInCU, UInt uiAbsZorderIdx, UInt uiCWidth, UInt uiCHeight, UInt uiChromaId  );
-#endif
   
   //  Copy Small YUV buffer to the part of other Big YUV buffer
Index: branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibCommon/TypeDef.h	(revision 319)
@@ -119,5 +119,4 @@
 #if INTRA_BL
 #define INTRA_BL_DST4x4                  1      ///< L0067/L0204: DST4x4 for Intra BL
-#define NO_RESIDUAL_FLAG_FOR_BLPRED      1      ///< L0437: Root cbf for Intra_BL
 
 #endif
Index: branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.cpp	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.cpp	(revision 319)
@@ -442,9 +442,5 @@
 #if INTRA_BL
     case MODE_INTRA_BL:
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-      xReconIntraBL( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
-#else
       xReconIntraQT( m_ppcCU[uiDepth], uiAbsPartIdx, uiDepth );
-#endif
       break;
 #endif
@@ -516,5 +512,5 @@
   
   //===== get prediction signal =====
-#if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
+#if INTRA_BL
   if(pcCU->isIntraBL ( uiAbsPartIdx ) )
   {
@@ -607,5 +603,5 @@
   
   //===== get prediction signal =====
-#if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
+#if INTRA_BL
   if(pcCU->isIntraBL ( uiAbsPartIdx ) )
   {
@@ -930,27 +926,3 @@
 
 }
-
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-Void
-TDecCu::xReconIntraBL( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
-{
-  m_ppcYuvReco[uiDepth]->copyFromPicLuma  ( pcCU->getSlice()->getFullPelBaseRec(m_layerId - 1),  pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, pcCU->getWidth(0), pcCU->getHeight(0));
-  m_ppcYuvReco[uiDepth]->copyFromPicChroma( pcCU->getSlice()->getFullPelBaseRec(m_layerId - 1),  pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, (pcCU->getWidth(0)>>1), (pcCU->getHeight(0)>>1), 0);
-  m_ppcYuvReco[uiDepth]->copyFromPicChroma( pcCU->getSlice()->getFullPelBaseRec(m_layerId - 1),  pcCU->getAddr(), pcCU->getZorderIdxInCU(), 0, (pcCU->getWidth(0)>>1), (pcCU->getHeight(0)>>1), 1);
-
-  // inter recon
-  xDecodeInterTexture( pcCU, 0, uiDepth );
-
-  // clip for only non-zero cbp case
-  if  ( ( pcCU->getCbf( 0, TEXT_LUMA ) ) || ( pcCU->getCbf( 0, TEXT_CHROMA_U ) ) || ( pcCU->getCbf(0, TEXT_CHROMA_V ) ) )
-  {
-    m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) );
-  }
-  else
-  {
-    m_ppcYuvReco[uiDepth]->copyPartToPartYuv( m_ppcYuvReco[uiDepth],0, pcCU->getWidth( 0 ),pcCU->getHeight( 0 ));
-  }
-}
-#endif
-
 //! \}
Index: branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.h
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.h	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecCu.h	(revision 319)
@@ -122,7 +122,4 @@
   Void  xIntraRecLumaBlk        ( TComDataCU* pcCU, UInt uiTrDepth, UInt uiAbsPartIdx, TComYuv* pcRecoYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv );
   Void  xIntraRecChromaBlk      ( TComDataCU* pcCU, UInt uiTrDepth, UInt uiAbsPartIdx, TComYuv* pcRecoYuv, TComYuv* pcPredYuv, TComYuv* pcResiYuv, UInt uiChromaId );
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-  Void  xReconIntraBL           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-#endif
   
   Void  xReconPCM               ( TComDataCU* pcCU, UInt uiDepth );
Index: branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 319)
@@ -451,9 +451,5 @@
     pcCU->setCbfSubParts ( 0, TEXT_LUMA, uiAbsPartIdx, uiDepth );
 #if INTRA_BL
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-    if( ( !pcCU->isIntra(uiAbsPartIdx) || pcCU->isIntraBL(uiAbsPartIdx)) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
-#else
     if( ( !pcCU->isIntra(uiAbsPartIdx) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
-#endif
 #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 ) )
@@ -556,9 +552,5 @@
   UInt uiChromaOffset = uiLumaOffset>>2;
   
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-  if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) )
-#else
   if( pcCU->isIntra(uiAbsPartIdx) )
-#endif
   {
   }
Index: branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.cpp	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.cpp	(revision 319)
@@ -1889,15 +1889,4 @@
 
   m_pcPredSearch->setBaseRecPic( m_pcPicYuvRecBase ); 
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-  rpcTempCU->setDepthSubParts( uiDepth, 0 );
-  //   rpcTempCU->setLumaIntraDirSubParts( DC_IDX, 0, uiDepth );
-  //   rpcTempCU->setChromIntraDirSubParts( DC_IDX, 0, uiDepth );
-  m_ppcPredYuvTemp[uiDepth]->copyFromPicLuma  ( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1),  rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, rpcTempCU->getWidth(0), rpcTempCU->getHeight(0));
-  m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1),  rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 0);
-  m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1),  rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 1);
-  m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcResiYuvBest[uiDepth], m_ppcRecoYuvTemp[uiDepth], false );
-  rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
-#else
-
   m_pcPredSearch->estIntraBLPredQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth] );
 
@@ -1923,5 +1912,4 @@
   }
   rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
-#endif
   
   xCheckDQP( rpcTempCU );
Index: branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 319)
@@ -343,9 +343,5 @@
     
 #if INTRA_BL
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-    if( ( !pcCU->isIntra( uiAbsPartIdx ) || pcCU->isIntraBL(uiAbsPartIdx)) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
-#else
     if( ( !pcCU->isIntra( uiAbsPartIdx ) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )
-#endif
 #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 ) )
@@ -607,9 +603,5 @@
   UInt uiChromaOffset = uiLumaOffset>>2;
     
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-  if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) )
-#else
   if( pcCU->isIntra(uiAbsPartIdx) )
-#endif
   {
     DTRACE_CABAC_VL( g_nSymbolCounter++ )
Index: branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 318)
+++ branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 319)
@@ -1055,5 +1055,5 @@
     pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
     //===== get prediction signal =====
-#if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
+#if INTRA_BL
     if(pcCU->isIntraBL ( uiAbsPartIdx ) )
     {
@@ -1247,5 +1247,5 @@
 
     //===== get prediction signal =====
-#if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED
+#if INTRA_BL
   if(pcCU->isIntraBL ( uiAbsPartIdx ) )
   {
@@ -4567,9 +4567,5 @@
 Void TEncSearch::encodeResAndCalcRdInterCU( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* pcYuvPred, TComYuv*& rpcYuvResi, TComYuv*& rpcYuvResiBest, TComYuv*& rpcYuvRec, Bool bSkipRes )
 {
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-  if ( pcCU->isIntra(0) && !pcCU->isIntraBL(0))
-#else
   if ( pcCU->isIntra(0) )
-#endif
   {
     return;
@@ -4682,18 +4678,4 @@
       pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) );
     }
-#if NO_RESIDUAL_FLAG_FOR_BLPRED 
-    else if(pcCU->getLayerId() > 0 && pcCU->isIntraBL(0) && uiZeroDistortion == uiDistortion) // all zeros
-    {
-      const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (pcCU->getDepth(0) << 1);
-      ::memset( pcCU->getTransformIdx()      , 0, uiQPartNum * sizeof(UChar) );
-      ::memset( pcCU->getCbf( TEXT_LUMA )    , 0, uiQPartNum * sizeof(UChar) );
-      ::memset( pcCU->getCbf( TEXT_CHROMA_U ), 0, uiQPartNum * sizeof(UChar) );
-      ::memset( pcCU->getCbf( TEXT_CHROMA_V ), 0, uiQPartNum * sizeof(UChar) );
-      ::memset( pcCU->getCoeffY()            , 0, uiWidth * uiHeight * sizeof( TCoeff )      );
-      ::memset( pcCU->getCoeffCb()           , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 );
-      ::memset( pcCU->getCoeffCr()           , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 );
-      pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) );
-    }
-#endif
     else
     {
@@ -4994,17 +4976,5 @@
       Int scalingListType = 3 + g_eTTable[(Int)TEXT_LUMA];
       assert(scalingListType < 6);     
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-      if(pcCU->isIntraBL(uiAbsPartIdx) )
-      {
-        m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only
-      }
-      else
-      {
-        m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only
-      }
-#else
       m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only
-#endif
-      
       const UInt uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
       pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight );
@@ -5275,16 +5245,5 @@
         assert(scalingListType < 6);     
 
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-        if(pcCU->isIntraBL(uiAbsPartIdx) )
-        {
-          m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
-        }
-        else
-        {
-          m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
-        }
-#else
         m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),  pcCoeffCurrY, trWidth, trHeight, scalingListType, true );
-#endif
 
         uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),
@@ -5618,9 +5577,5 @@
   {
 #if INTRA_BL
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-    assert( !pcCU->isIntra(uiAbsPartIdx) || pcCU->isIntraBL(uiAbsPartIdx));
-#else
     assert( !pcCU->isIntra(uiAbsPartIdx) );
-#endif
 #else
     assert( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA );
@@ -5863,19 +5818,11 @@
     {
       m_pcEntropyCoder->encodeIntraBLFlag(pcCU, 0, true);
-#if !NO_RESIDUAL_FLAG_FOR_BLPRED
       assert( pcCU->isIntraBL( 0 ) == false );
-#endif
-    }
-#endif
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-    if( !pcCU->isIntraBL(0))
-    {
+    }
 #endif
     m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
     m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true );
     m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
-#if NO_RESIDUAL_FLAG_FOR_BLPRED
-    }
-#endif
+
     Bool bDummy = false;
     m_pcEntropyCoder->encodeCoeff   ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0), bDummy );
