Index: /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 878)
+++ /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 879)
@@ -2472,11 +2472,7 @@
   if( bL == bT )
   {
-#if SCU_HS_DEPTH_DC_PRED_G0143
     const Int  iTRR = ( patternStride * 2 - 1  ) - srcStride; 
     const Int  iLBB = ( patternStride * 2 - 1  ) * srcStride - 1;
     refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : (abs(ptrSrc[iTRR] - ptrSrc[-(Int)srcStride]) > abs(ptrSrc[iLBB] - ptrSrc[ -1]) ? ptrSrc[iTRR] : ptrSrc[iLBB]);
-#else
-    refDC1 = bL ? ( ptrSrc[iTR] + ptrSrc[iLB] )>>1 : 1<<( g_bitDepthY - 1 );
-#endif
     refDC2 =      ( ptrSrc[ -1] + ptrSrc[-(Int)srcStride] )>>1;
   }
Index: /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 878)
+++ /branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 879)
@@ -185,4 +185,8 @@
                                               // Unify intra SDC and inter SDC
                                               // QC_GENERIC_SDC_G0122 Generalize SDC to all depth intra modes
+                                              // SCU_HS_DEPTH_DC_PRED_G0143
+                                              // HS_TSINGHUA_SDC_SPLIT_G0111
+                                              // QC_PKU_SDC_SPLIT_G0123 Intra SDC Split
+
 
 
@@ -195,4 +199,9 @@
                                               // QC_SPIVMP_MPI_G0119 Sub-PU level MPI merge candidate
                                               // Simplification on Sub-PU level temporal interview motion prediction
+
+
+#define H_3D_DBBP                         1   // DBBP: Depth-based Block Partitioning and Merging
+
+
 #define H_3D_FCO                          0   // Flexible coding order for 3D
 
@@ -276,4 +285,11 @@
 
 
+///// ***** DEPTH BASED BLOCK PARTITIONING *********
+#if H_3D_DBBP
+#define DBBP_INVALID_SHORT                (-4)
+#define RWTH_DBBP_PACK_MODE               SIZE_2NxN
+#endif
+
+
 ///// ***** FCO *********
 #if H_3D_FCO
@@ -305,19 +321,4 @@
 #endif
 
-#define H_3D_DBBP                         1   // DBBP: Depth-based Block Partitioning and Merging
-
-#if H_3D_DBBP
-#define DBBP_INVALID_SHORT                (-4)
-#define RWTH_DBBP_PACK_MODE               SIZE_2NxN
-#endif
-
-#if H_3D_DIM
-#define QC_PKU_SDC_SPLIT_G0123            1   // Intra SDC Split
-#if QC_PKU_SDC_SPLIT_G0123
-#define HS_TSINGHUA_SDC_SPLIT_G0111       1
-#endif
-#define SCU_HS_DEPTH_DC_PRED_G0143        1
-
-#endif
 
 
Index: /branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 878)
+++ /branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 879)
@@ -1117,14 +1117,6 @@
   UInt uiWidth        = pcCU->getWidth  ( 0 );
   UInt uiHeight       = pcCU->getHeight ( 0 );
-#if QC_PKU_SDC_SPLIT_G0123
-#if HS_TSINGHUA_SDC_SPLIT_G0111
   TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
-#else
-  TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
-#endif
-#endif
-#if QC_PKU_SDC_SPLIT_G0123
   UInt numParts = 1;
-  UInt i = 0;
   UInt sdcDepth    = 0;
   TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
@@ -1143,5 +1135,4 @@
   UInt    uiLumaPredMode = 0;  
 
-#if HS_TSINGHUA_SDC_SPLIT_G0111
   if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1)
   {
@@ -1150,14 +1141,6 @@
     uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
   }
-#else
-  if (uiWidth == 64)
-  {
-    numParts = 4;
-    sdcDepth = 1;
-    uiWidth = uiHeight = 32;
-  }
-#endif
-
-  for ( i = 0; i < numParts; i++ )
+
+  for ( Int i = 0; i < numParts; i++ )
   {
     uiStride    = pcRecoYuv->getStride  ();
@@ -1165,5 +1148,5 @@
     piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
     piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
-  
+
     uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
     piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
@@ -1173,66 +1156,29 @@
 
     AOF( uiWidth == uiHeight );
-#else
-  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
-  TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
-  TComYuv* pcResiYuv  = m_ppcYuvResi[uiDepth];
-  
-  UInt    uiStride    = pcRecoYuv->getStride  ();
-  Pel*    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
-  Pel*    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
-  Pel*    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
-  
-  UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
-  Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
-  UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
-  
-  UInt    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
-  
-  AOF( uiWidth == uiHeight );
-  AOF( uiAbsPartIdx == 0 );
-  AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
-  AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
-#endif
-  
-  //===== init availability pattern =====
-  Bool  bAboveAvail = false;
-  Bool  bLeftAvail  = false;
-#if QC_PKU_SDC_SPLIT_G0123
-  pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
-  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
-#else
-  pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
-  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
-#endif
-#if !QC_PKU_SDC_SPLIT_G0123
-  TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
-#endif
-#if HS_TSINGHUA_SDC_SPLIT_G0111
-  TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
-#endif
-  //===== get prediction signal =====
-#if H_3D_DIM
-  if( isDimMode( uiLumaPredMode ) )
-  {
-    m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight 
-      , false, dmm4Segmentation
-      );
-#if HS_TSINGHUA_SDC_SPLIT_G0111
-    Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
-    Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
-    for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 
-    { 
-      dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
-    }
-#endif
-  }
-  else
-  {
-#endif
-    m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
-#if H_3D_DIM
-  }
-#endif
-#if QC_PKU_SDC_SPLIT_G0123 
+
+    //===== init availability pattern =====
+    Bool  bAboveAvail = false;
+    Bool  bLeftAvail  = false;
+
+    pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
+    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
+
+    TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
+    //===== get prediction signal =====
+    if( isDimMode( uiLumaPredMode ) )
+    {
+      m_pcPrediction->predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, false, dmm4Segmentation  );
+      Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
+      Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
+      for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 
+      { 
+        dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
+      }
+    }
+    else
+    {
+      m_pcPrediction->predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
+    }
+
     if ( numParts > 1 )
     {
@@ -1250,7 +1196,5 @@
     }
     uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 );
-#if HS_TSINGHUA_SDC_SPLIT_G0111
     dmm4Segmentation->destroy(); delete dmm4Segmentation;
-#endif
   }
   uiAbsPartIdx = 0;
@@ -1267,5 +1211,4 @@
   piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
   uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
-#endif
   // number of segments depends on prediction mode
   UInt uiNumSegments = 1;
@@ -1287,11 +1230,6 @@
   {
     uiNumSegments = 2;
-#if HS_TSINGHUA_SDC_SPLIT_G0111
     pbMask  = dmm4SegmentationOrg->getPattern();
     uiMaskStride = dmm4SegmentationOrg->getStride();
-#else
-    pbMask  = dmm4Segmentation->getPattern();
-    uiMaskStride = dmm4Segmentation->getStride();
-#endif
   }
   // get DC prediction for each segment
@@ -1356,9 +1294,5 @@
     pRecCr += uiStrideC;
   }
-#if HS_TSINGHUA_SDC_SPLIT_G0111
   dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
-#else
-  dmm4Segmentation->destroy(); delete dmm4Segmentation;
-#endif
 }
 #endif
Index: /branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 878)
+++ /branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 879)
@@ -1861,20 +1861,11 @@
 
 #if H_3D_DIM_SDC
-Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, 
-  Bool bZeroResidual, Int iSDCDeltaResi
-  )
+Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi  )
 {
   UInt    uiLumaPredMode    = pcCU     ->getLumaIntraDir( uiAbsPartIdx );
   UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
   UInt    uiHeight          = pcCU     ->getHeight  ( 0 );
-#if QC_PKU_SDC_SPLIT_G0123
-#if HS_TSINGHUA_SDC_SPLIT_G0111
   TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
-#else
-#endif
-#endif
-#if QC_PKU_SDC_SPLIT_G0123
   UInt numParts = 1;
-  UInt i = 0;
   UInt sdcDepth = 0;
   UInt uiStride;         
@@ -1887,5 +1878,4 @@
   UInt uiRecIPredStride; 
 
-#if HS_TSINGHUA_SDC_SPLIT_G0111
   if ( ( uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) > 1 )
   {
@@ -1894,14 +1884,6 @@
     uiWidth = uiHeight = ( 1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() );
   }
-#else
-  if (uiWidth == 64)
-  {
-    numParts = 4;
-    sdcDepth = 1;
-    uiWidth = uiHeight = 32;
-  }
-#endif
-
-  for ( i = 0; i < numParts; i++ )
+
+  for ( Int i = 0; i < numParts; i++ )
   {
     uiStride          = pcOrgYuv ->getStride  ();
@@ -1915,73 +1897,40 @@
 
     AOF( uiWidth == uiHeight );
-#else
-  UInt    uiStride          = pcOrgYuv ->getStride  ();
-  Pel*    piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
-  Pel*    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
-  Pel*    piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
-  
-  UInt    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
-  Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
-  UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
-  
-  AOF( uiWidth == uiHeight );
-  AOF( uiAbsPartIdx == 0 );
-  AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
-  AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
-#endif
-  
-  //===== init availability pattern =====
-  Bool  bAboveAvail = false;
-  Bool  bLeftAvail  = false;
-#if QC_PKU_SDC_SPLIT_G0123
-  pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
-  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
-#else
-  pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
-  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
-  
-#endif
-#if !QC_PKU_SDC_SPLIT_G0123
-  TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
-#endif
-#if HS_TSINGHUA_SDC_SPLIT_G0111
-  TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
-#endif
-  //===== get prediction signal =====
-#if H_3D_DIM
-  if( isDimMode( uiLumaPredMode ) )
-  {
-#if HS_TSINGHUA_SDC_SPLIT_G0111  
-    UInt dimType   = getDimType  ( uiLumaPredMode );
-    UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
-    if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX )
-    {
-      if (g_aucConvertToBit[uiWidth] == 2)  // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
-        patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
-      else 
-        patternID = patternID >> 1;  // Other cases
-      pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID);
-    }
-#endif
-    predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true 
-      , dmm4Segmentation
-      );
-#if HS_TSINGHUA_SDC_SPLIT_G0111
-    Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
-    Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
-    for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 
-    { 
-      dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
-    }
-#endif
-  }
-  else
-  {
-#endif
-    predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
-#if H_3D_DIM
-  }
-#endif
-#if QC_PKU_SDC_SPLIT_G0123
+
+    //===== init availability pattern =====
+    Bool  bAboveAvail = false;
+    Bool  bLeftAvail  = false;
+    pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
+    pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
+    TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
+    //===== get prediction signal =====
+    if( isDimMode( uiLumaPredMode ) )
+    {
+      UInt dimType   = getDimType  ( uiLumaPredMode );
+      UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
+      if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX )
+      {
+        if (g_aucConvertToBit[uiWidth] == 2) // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
+        {                                    
+          patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
+        }
+        else
+        {
+          patternID = patternID >> 1;  // Other cases
+        }
+        pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID);
+      }
+      predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true , dmm4Segmentation    );
+      Bool* dmm4PatternSplit = dmm4Segmentation->getPattern();
+      Bool* dmm4PatternOrg = dmm4SegmentationOrg->getPattern();
+      for( UInt k = 0; k < (uiWidth*uiHeight); k++ ) 
+      { 
+        dmm4PatternOrg[k+(uiAbsPartIdx<<4)] = dmm4PatternSplit[k];
+      }
+    }
+    else
+    {
+      predIntraLumaAng( pcCU->getPattern(), uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, bAboveAvail, bLeftAvail );
+    }
     if ( numParts > 1 )
     {
@@ -1998,7 +1947,5 @@
     }
     uiAbsPartIdx += ( ( uiWidth * uiWidth ) >> 4 );
-#if HS_TSINGHUA_SDC_SPLIT_G0111
     dmm4Segmentation->destroy(); delete dmm4Segmentation;
-#endif
   }
   uiAbsPartIdx = 0;
@@ -2007,5 +1954,5 @@
   piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
   piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
-  
+
   uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
   piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
@@ -2017,17 +1964,16 @@
     uiHeight = pcCU->getHeight( 0 );
   }
-#endif
   // number of segments depends on prediction mode
   UInt uiNumSegments = 1;
   Bool* pbMask = NULL;
   UInt uiMaskStride = 0;
-    
+
   if( getDimType( uiLumaPredMode ) == DMM1_IDX )
   {
     Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
-    
+
     WedgeList* pacWedgeList = &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
     TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
-    
+
     uiNumSegments = 2;
     pbMask = pcWedgelet->getPattern();
@@ -2037,21 +1983,16 @@
   {
     uiNumSegments = 2;
-#if HS_TSINGHUA_SDC_SPLIT_G0111
-    pbMask  = dmm4SegmentationOrg->getPattern();
+    pbMask       = dmm4SegmentationOrg->getPattern();
     uiMaskStride = dmm4SegmentationOrg->getStride();
-#else
-    pbMask  = dmm4Segmentation->getPattern();
-    uiMaskStride = dmm4Segmentation->getStride();
-#endif
-  }
-  
+  }
+
   // get DC prediction for each segment
   Pel apDCPredValues[2];
   analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode );
-  
+
   // get original DC for each segment
   Pel apDCOrigValues[2];
   analyzeSegmentsSDC(piOrg, uiStride, uiWidth, apDCOrigValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode, true );
-  
+
   for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ )
   {
@@ -2076,5 +2017,5 @@
     pcCU->setSDCSegmentDCOffset(pResidualIdx, uiSegment, uiAbsPartIdx);
   }
-  
+
   // reconstruct residual based on mask + DC residuals
   Pel apDCResiValues[2];
@@ -2091,5 +2032,5 @@
 #endif
   }
-  
+
   //===== reconstruction =====
   Bool* pMask     = pbMask;
@@ -2097,5 +2038,5 @@
   Pel* pReco      = piReco;
   Pel* pRecIPred  = piRecIPred;
-  
+
   for( UInt uiY = 0; uiY < uiHeight; uiY++ )
   {
@@ -2106,5 +2047,5 @@
 
       Pel pResiDC = apDCResiValues[ucSegment];
-      
+
       pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResiDC );
       pRecIPred[ uiX ] = pReco[ uiX ];
@@ -2115,10 +2056,10 @@
     pMask     += uiMaskStride;
   }
-  
+
   // clear UV
   UInt  uiStrideC     = pcPredYuv->getCStride();
   Pel   *pRecCb       = pcPredYuv->getCbAddr();
   Pel   *pRecCr       = pcPredYuv->getCrAddr();
-  
+
   for (Int y=0; y<uiHeight/2; y++)
   {
@@ -2128,9 +2069,9 @@
       pRecCr[x] = 128;
     }
-    
+
     pRecCb += uiStrideC;
     pRecCr += uiStrideC;
   }
-  
+
   //===== determine distortion =====
 #if H_3D_VSO
@@ -2140,10 +2081,9 @@
 #endif
     ruiDist = m_pcRdCost->getDistPart(g_bitDepthY, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );
-  
+
   //===== determine rate and r-d cost =====
   m_pcEntropyCoder->resetBits();
-  
+
   // encode reduced intra header
-#if H_3D_DIM_SDC
   if( !pcCU->getSlice()->isIntra() )
   {
@@ -2158,16 +2098,11 @@
   m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth( 0 ), true );
   m_pcEntropyCoder->encodeSDCFlag( pcCU, 0, true );
-#else
-  m_pcEntropyCoder->encodePredMode( pcCU, 0, true );
-#endif
-  
+
   // encode pred direction + DC residual data
   m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
-#if H_3D_DIM_SDC
   Bool bDummy = false;
   m_pcEntropyCoder->encodeCoeff( pcCU, 0, pcCU->getDepth( 0 ), uiWidth, uiHeight, bDummy );
-#endif
   UInt uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
-  
+
 #if H_3D_VSO
   if ( m_pcRdCost->getUseLambdaScaleVSO())
@@ -2176,9 +2111,5 @@
 #endif
     dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist );
-#if HS_TSINGHUA_SDC_SPLIT_G0111
   dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
-#else
-  dmm4Segmentation->destroy(); delete dmm4Segmentation;
-#endif
 }
 #endif
