Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1239)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1243)
@@ -657,8 +657,4 @@
     memset( m_apSegmentDCOffset[0],     0,                m_uiNumPartition * sizeof( *m_apSegmentDCOffset[0] ) );
     memset( m_apSegmentDCOffset[1],     0,                m_uiNumPartition * sizeof( *m_apSegmentDCOffset[1] ) );
-#if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
-    m_apDmmPredictor[0] = 0;
-    m_apDmmPredictor[1] = 0;
-#endif
 #endif
 #if H_3D_DBBP
@@ -815,8 +811,4 @@
       m_apSegmentDCOffset[0][ui] = 0;
       m_apSegmentDCOffset[1][ui] = 0;
-#if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
-      m_apDmmPredictor[0] = 0;
-      m_apDmmPredictor[1] = 0;
-#endif
 #endif
 #if H_3D_DBBP
@@ -921,8 +913,4 @@
   memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition   );
   memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition   );
-#if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
-  m_apDmmPredictor[0] = 0;
-  m_apDmmPredictor[1] = 0;
-#endif
 #endif
 #if H_3D_DBBP
@@ -2391,5 +2379,4 @@
 Bool TComDataCU::getSDCAvailable( UInt uiAbsPartIdx )
 {
-#if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC
   if( getSlice()->getIsDepth() && isIntra(uiAbsPartIdx) && getPartitionSize(uiAbsPartIdx) == SIZE_2Nx2N )
   {
@@ -2401,30 +2388,4 @@
   }
   return false;
-#else
-  // check general CU information
-  if( !getSlice()->getIsDepth() || !isIntra(uiAbsPartIdx) || getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N )
-  {
-    return false;
-  }
-
-  if( isDmmMode( getLumaIntraDir( uiAbsPartIdx ) ) )
-  {
-    return true;
-  }
-  
-  if( getLumaIntraDir( uiAbsPartIdx ) < NUM_INTRA_MODE )
-  {
-    return true;
-  }
-
-  return false;
-  // check prediction mode
-  UInt uiLumaPredMode = getLumaIntraDir( uiAbsPartIdx );  
-  if( uiLumaPredMode == PLANAR_IDX || ( getDmmType( uiLumaPredMode ) == DMM1_IDX  ) )
-    return true;
-  
-  // else
-  return false;
-#endif
 }
 #endif
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.h	(revision 1239)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.h	(revision 1243)
@@ -189,7 +189,4 @@
   Bool*         m_pbSDCFlag;
   Pel*          m_apSegmentDCOffset[2];
-#if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
-  Pel           m_apDmmPredictor[2];
-#endif
 #endif
 #if H_3D_DBBP
@@ -573,8 +570,4 @@
   Pel           getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; }
   Void          setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; }
-#if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
-  Void          setDmmPredictor ( Pel pOffset, UInt uiSeg) { m_apDmmPredictor[uiSeg] = pOffset; }
-  Pel           getDmmPredictor ( UInt uiSeg) { return m_apDmmPredictor[uiSeg]; }
-#endif
 #endif
   
@@ -745,11 +738,4 @@
 
   UInt          getCoefScanIdx(const UInt uiAbsPartIdx, const UInt uiWidth, const UInt uiHeight, const ComponentID compID) const ;
-
-#if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
-#if NH_3D_DMM
-  Bool         isDMM1UpscaleMode       ( UInt uiWidth ){ Bool bDMM1UpsampleModeFlag = true; UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ bDMM1UpsampleModeFlag = false; } return bDMM1UpsampleModeFlag; };
-  UInt         getDMM1BasePatternWidth ( UInt uiWidth ){ UInt uiBaseWidth = 16; if( uiBaseWidth >= uiWidth ){ uiBaseWidth =  uiWidth; } return uiBaseWidth; }
-#endif
-#endif
 };
 
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1239)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1243)
@@ -568,10 +568,5 @@
   Pel* pDst = piPred;
   assignBiSegDCs( pDst, uiStride, biSegPattern, patternStride, segDC1, segDC2 );
-#if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
-#if NH_3D_SDC_INTRA
-  pcCU->setDmmPredictor(segDC1, 0);
-  pcCU->setDmmPredictor(segDC2, 1);
-#endif
-#endif
+  
   delete[] biSegPattern;
 }
@@ -2388,5 +2383,4 @@
 #endif
 
-#if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC
 #if NH_3D_SDC_INTRA
 Void TComPrediction::predConstantSDC( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& predDC )
@@ -2398,73 +2392,5 @@
   predDC = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2;
 }
-#endif
-#else // PM: should be obsolete after cleanup
-#if NH_3D_SDC_INTRA
-Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride
-                                         ,UInt uiIntraMode
-                                         ,Bool orgDC
-                                        )
-{
-  Int iSumDepth[2];
-  memset(iSumDepth, 0, sizeof(Int)*2);
-  Int iSumPix[2];
-  memset(iSumPix, 0, sizeof(Int)*2);
-
-  for( Int i = 0; i < uiNumSegments; i++ )
-  {
-    rpSegMeans[i] = 0;  
-  }
-
-  if ( !orgDC )
-  {
-    Pel* pLeftTop = pOrig;
-    Pel* pRightTop = pOrig + (uiSize-1);
-    Pel* pLeftBottom = (pOrig+ (uiStride*(uiSize-1)));
-    Pel* pRightBottom = (pOrig+ (uiStride*(uiSize-1)) + (uiSize-1));
-
-    rpSegMeans[0] = (*pLeftTop + *pRightTop + *pLeftBottom + *pRightBottom + 2)>>2;
-    return;
-  }
-
-  Int subSamplePix;
-  if ( uiSize == 64 || uiSize == 32 )
-  {
-    subSamplePix = 2;
-  }
-  else
-  {
-    subSamplePix = 1;
-  }
-
-  for (Int y=0; y<uiSize; y+=subSamplePix)
-  {
-    for (Int x=0; x<uiSize; x+=subSamplePix)
-    {
-      UChar ucSegment = pMask?(UChar)pMask[x]:0;
-      assert( ucSegment < uiNumSegments );
-      
-      iSumDepth[ucSegment] += pOrig[x];
-      iSumPix[ucSegment]   += 1;
-    }
-    
-    pOrig  += uiStride*subSamplePix;
-    pMask  += uiMaskStride*subSamplePix;
-  }
-  
-  // compute mean for each segment
-  for( UChar ucSeg = 0; ucSeg < uiNumSegments; ucSeg++ )
-  {
-    if( iSumPix[ucSeg] > 0 )
-    {
-      rpSegMeans[ucSeg] = iSumDepth[ucSeg] / iSumPix[ucSeg];
-    }
-    else
-    {
-      rpSegMeans[ucSeg] = 0;  // this happens for zero-segments
-    }
-  }
-}
 #endif // NH_3D_SDC_INTRA
-#endif
 
 #if NH_3D_DMM
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.h
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.h	(revision 1239)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.h	(revision 1243)
@@ -170,12 +170,6 @@
   Void assignBiSegDCs             ( Pel* ptrDst, UInt dstStride, Bool* biSegPattern, Int patternStride, Pel valDC1, Pel valDC2 );
 #endif
-#if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC
 #if NH_3D_SDC_INTRA
   Void predConstantSDC            ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& predDC );
-#endif
-#else // PM: should be obsolete after cleanup
-#if NH_3D_SDC_INTRA
-  Void analyzeSegmentsSDC         ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride, UInt uiIntraMode, Bool orgDC=false );
-#endif
 #endif
   
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TypeDef.h	(revision 1239)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TypeDef.h	(revision 1243)
@@ -79,6 +79,4 @@
                                               // H_3D_FAST_DEPTH_INTRA
 #endif
-
-#define TEMP_SDC_CLEANUP                  1   // PM: consider these cleanups for DMM and SDC
 
 #if H_3D
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1239)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1243)
@@ -500,5 +500,4 @@
   //
   TComDLT* pcDLT = pcPPS->getDLT();
-  //Ed.(GT): PPSs are copied in HM16.4. This would cause that the only the DLT pointer is copied. Therefore, a deep copy of the DLT needs to be implemented. Another option would be to use a vectors for the DLT arrays in TComDLT.
 
   READ_FLAG(uiCode, "dlt_present_flag");
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1239)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1243)
@@ -1186,5 +1186,4 @@
 Void TDecCu::xReconIntraSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
-#if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC
   TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
   TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
@@ -1324,136 +1323,4 @@
   }
 #endif
-#else
-  UInt uiWidth        = pcCU->getWidth  ( 0 );
-  UInt uiHeight       = pcCU->getHeight ( 0 );
-  TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
-  UInt numParts = 1;
-  UInt sdcDepth    = 0;
-  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
-  TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
-  TComYuv* pcResiYuv  = m_ppcYuvResi[uiDepth];
-
-  UInt    uiStride = 0;
-  Pel*    piReco;
-  Pel*    piPred;
-  Pel*    piResi;
-
-  UInt    uiZOrder;        
-  Pel*    piRecIPred;      
-  UInt    uiRecIPredStride;
-
-  UInt    uiLumaPredMode = 0;  
-
-  if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1)
-  {
-    numParts = uiWidth * uiWidth >> (2 * pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
-    sdcDepth = g_aucConvertToBit[uiWidth] + 2 - pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize();
-    uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
-  }
-
-  for ( Int i = 0; i < numParts; i++ )
-  {
-    uiStride    = pcRecoYuv->getStride  ();
-    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
-    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
-    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
-
-    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
-    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
-    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
-
-    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
-
-    AOF( uiWidth == uiHeight );
-
-    //===== 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( isDmmMode( 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 )
-    {
-      for( UInt uiY = 0; uiY < uiHeight; uiY++ )
-      {
-        for( UInt uiX = 0; uiX < uiWidth; uiX++ )
-        {
-          piReco        [ uiX ] = ClipY( piPred[ uiX ] );
-          piRecIPred    [ uiX ] = piReco[ uiX ];
-        }
-        piPred     += uiStride;
-        piReco     += uiStride;
-        piRecIPred += uiRecIPredStride;
-      }
-    }
-    uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 );
-    dmm4Segmentation->destroy(); delete dmm4Segmentation;
-  }
-  uiAbsPartIdx = 0;
-  
-  if ( numParts > 1 )
-  {
-    uiWidth = pcCU->getWidth( 0 );
-    uiHeight = pcCU->getHeight( 0 );
-  }
-  piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
-  piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
-  piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
-  uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
-  piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
-  uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
-  // number of segments depends on prediction mode
-  UInt uiNumSegments = 1;
-  Bool* pbMask = NULL;
-  UInt uiMaskStride = 0;
-  
-  if( getDmmType( uiLumaPredMode ) == DMM1_IDX )
-  {
-    Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
-
-    WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode(uiWidth) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] :  &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
-    TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
-
-    uiNumSegments = 2;
-
-    pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern(uiWidth) : pcWedgelet->getPattern();
-    uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
-  }
-  if( getDmmType( uiLumaPredMode ) == DMM4_IDX )
-  {
-    uiNumSegments = 2;
-    pbMask  = dmm4SegmentationOrg->getPattern();
-    uiMaskStride = dmm4SegmentationOrg->getStride();
-  }
-  // get DC prediction for each segment
-  Pel apDCPredValues[2];
-  if ( getDmmType( uiLumaPredMode ) == DMM1_IDX || getDmmType( uiLumaPredMode ) == DMM4_IDX )
-  {
-    apDCPredValues[0] = pcCU->getDmmPredictor( 0 );
-    apDCPredValues[1] = pcCU->getDmmPredictor( 1 );
-  }
-  else
-  {
-    m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode);
-  }
-#endif
   
   // reconstruct residual based on mask + DC residuals
@@ -1515,9 +1382,5 @@
   }
 #if NH_3D_DMM
-#if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC
   if( pbMask ) { delete[] pbMask; }
-#else
-  dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
-#endif
 #endif
 }
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1239)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1243)
@@ -372,16 +372,4 @@
 Void  TEncCavlc::codePps3dExtension        ( const TComPPS* pcPPS )
 {
-  // Assuming that all PPS indirectly refer to the same VPS via different SPS
-  // There is no parsing dependency in decoding DLT in PPS. 
-  // The VPS information passed to decodePPS() is used to arrange the decoded DLT tables to their corresponding layers. 
-  // This is equivalent to the process of 
-  //   Step 1) decoding DLT tables based on the number of depth layers, and
-  //   Step 2) mapping DLT tables to the depth layers
-  // as described in the 3D-HEVC WD.
-
-  // GT: Please remove dependency from VPS in the encoding as well as in the parsing function, e.g. using the equivalent process.
-  // GT: Moreover this function should only carry out the coding of the DLT and NO rate based decisions.
-  // GT: Please add a function e.g. xSetDLT in e.g. TEncSlice to find the best DLT syntax representation and do ONLY the coding of the DLT here !!
-
 #if NH_3D_DLT
   WRITE_FLAG( pcPPS->getDLT()->getDltPresentFlag() ? 1 : 0, "dlt_present_flag" );
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1239)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1243)
@@ -1971,5 +1971,4 @@
 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi  )
 {
-#if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC
   UInt uiWidth        = pcCU->getWidth ( 0 );
   UInt uiHeight       = pcCU->getHeight( 0 );
@@ -2110,147 +2109,4 @@
   }
 #endif
-#else
-  UInt    uiLumaPredMode    = pcCU     ->getLumaIntraDir( uiAbsPartIdx );
-  UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
-  UInt    uiHeight          = pcCU     ->getHeight  ( 0 );
-  TComWedgelet* dmm4SegmentationOrg = new TComWedgelet( uiWidth, uiHeight );
-  UInt numParts = 1;
-  UInt sdcDepth = 0;
-  UInt uiStride;         
-  Pel* piOrg;          
-  Pel* piPred;          
-  Pel* piReco;        
-
-  UInt uiZOrder;         
-  Pel* piRecIPred;       
-  UInt uiRecIPredStride; 
-
-  if ( ( uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) > 1 )
-  {
-    numParts = uiWidth * uiWidth >> ( 2 * pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() );
-    sdcDepth = g_aucConvertToBit[uiWidth] + 2 - pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize();
-    uiWidth = uiHeight = ( 1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() );
-  }
-
-  for ( Int i = 0; i < numParts; i++ )
-  {
-    uiStride          = pcOrgYuv ->getStride  ();
-    piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
-    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
-    piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
-
-    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
-    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
-    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
-
-    AOF( uiWidth == uiHeight );
-
-    //===== 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( isDmmMode( uiLumaPredMode ) )
-    {
-      UInt dimType   = getDmmType  ( uiLumaPredMode );
-      UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
-      UInt uiBaseWidth = pcCU->isDMM1UpscaleMode(uiWidth) ? pcCU->getDMM1BasePatternWidth(uiWidth) : uiWidth;
-      if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiBaseWidth]].size() && dimType == DMM1_IDX )
-      {
-        if (g_aucConvertToBit[uiBaseWidth] == 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 )
-    {
-      for( UInt uiY = 0; uiY < uiHeight; uiY++ )
-      {
-        for( UInt uiX = 0; uiX < uiWidth; uiX++ )
-        {
-          piPred        [ uiX ] = ClipY( piPred[ uiX ] );
-          piRecIPred    [ uiX ] = piPred[ uiX ];
-        }
-        piPred     += uiStride;
-        piRecIPred += uiRecIPredStride;
-      }
-    }
-    uiAbsPartIdx += ( ( uiWidth * uiWidth ) >> 4 );
-    dmm4Segmentation->destroy(); delete dmm4Segmentation;
-  }
-  uiAbsPartIdx = 0;
-  uiStride          = pcOrgYuv ->getStride  ();
-  piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
-  piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
-  piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
-
-  uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
-  piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
-  uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
-
-  if (numParts > 1)
-  {
-    uiWidth = pcCU->getWidth( 0 );
-    uiHeight = pcCU->getHeight( 0 );
-  }
-  // number of segments depends on prediction mode
-  UInt uiNumSegments = 1;
-  Bool* pbMask = NULL;
-  UInt uiMaskStride = 0;
-
-  if( getDmmType( uiLumaPredMode ) == DMM1_IDX )
-  {
-    Int uiTabIdx = pcCU->getDmmWedgeTabIdx(DMM1_IDX, uiAbsPartIdx);
-
-    WedgeList* pacWedgeList  = pcCU->isDMM1UpscaleMode( uiWidth ) ? &g_dmmWedgeLists[(g_aucConvertToBit[pcCU->getDMM1BasePatternWidth(uiWidth)])] : &g_dmmWedgeLists[(g_aucConvertToBit[uiWidth])];
-    TComWedgelet* pcWedgelet = &(pacWedgeList->at( uiTabIdx ));
-
-    uiNumSegments = 2;
-    pbMask       = pcCU->isDMM1UpscaleMode( uiWidth ) ? pcWedgelet->getScaledPattern( uiWidth ) : pcWedgelet->getPattern();
-    uiMaskStride = pcCU->isDMM1UpscaleMode( uiWidth ) ? uiWidth : pcWedgelet->getStride();
-  }
-  if( getDmmType( uiLumaPredMode ) == DMM4_IDX )
-  {
-    uiNumSegments = 2;
-    pbMask       = dmm4SegmentationOrg->getPattern();
-    uiMaskStride = dmm4SegmentationOrg->getStride();
-  }
-
-  // get DC prediction for each segment
-  Pel apDCPredValues[2];
-  if ( getDmmType( uiLumaPredMode ) == DMM1_IDX || getDmmType( uiLumaPredMode ) == DMM4_IDX )
-  {
-    apDCPredValues[0] = pcCU->getDmmPredictor( 0 );
-    apDCPredValues[1] = pcCU->getDmmPredictor( 1 );
-  }
-  else
-  {
-    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 );
-#endif
 
   for( UInt uiSegment = 0; uiSegment < uiNumSegments; uiSegment++ )
@@ -2337,8 +2193,6 @@
   }
 
-#if TEMP_SDC_CLEANUP // PM: consider this cleanup for DMM and SDC
 #if NH_3D_DMM
   if( pbMask ) { delete[] pbMask; }
-#endif
 #endif
 
@@ -2392,7 +2246,4 @@
 #endif
     dRDCost = m_pcRdCost->calcRdCost( uiBits, ruiDist );
-#if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
-  dmm4SegmentationOrg->destroy(); delete dmm4SegmentationOrg;
-#endif
 }
 #endif
@@ -3142,11 +2993,13 @@
 #endif
 
-#if NH_3D_DMM
+#if NH_3D_DMM || NH_3D_ENC_DEPTH
     const TComRectangle &puRect=tuRecurseWithPU.getRect(COMPONENT_Y);
     const UInt uiAbsPartIdx=tuRecurseWithPU.GetAbsPartIdxTU();
     
     Pel* piOrg         = pcOrgYuv ->getAddr( COMPONENT_Y, uiAbsPartIdx );
+    UInt uiStride      = pcPredYuv->getStride( COMPONENT_Y );
+#endif
+#if NH_3D_DMM
     Pel* piPred        = pcPredYuv->getAddr( COMPONENT_Y, uiAbsPartIdx );
-    UInt uiStride      = pcPredYuv->getStride( COMPONENT_Y );
     if( m_pcEncCfg->getIsDepth() )
     {
@@ -3623,5 +3476,5 @@
     if( !tuRecurseWithPU.IsLastSection() )
     {
-      //const TComRectangle &puRect=tuRecurseWithPU.getRect(COMPONENT_Y);
+      const TComRectangle &puRect=tuRecurseWithPU.getRect(COMPONENT_Y);
       const UInt  uiCompWidth   = puRect.width;
       const UInt  uiCompHeight  = puRect.height;
@@ -7780,5 +7633,4 @@
 
 #endif
-#if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC
 #if NH_3D_SDC_INTRA
 Void TEncSearch::xCalcConstantSDC( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& valDC )
@@ -7804,4 +7656,3 @@
 }
 #endif
-#endif
 //! \}
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncSearch.h	(revision 1239)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibEncoder/TEncSearch.h	(revision 1243)
@@ -358,9 +358,5 @@
 #if NH_3D_SDC_INTRA
   Void xIntraCodingSDC            ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi    );
-#endif
-#if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC
-#if NH_3D_SDC_INTRA
   Void xCalcConstantSDC           ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& valDC );
-#endif
 #endif
 
