Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/ContextTables.h	(revision 1219)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/ContextTables.h	(revision 1221)
@@ -177,8 +177,8 @@
 #define NUM_DMM_MODE_CTX              1       ///< number of context models for DMM modes
 #endif
-#if NH_3D_DMM || NH_3D_SDC
+#if NH_3D_DMM || NH_3D_INTRA_SDC
 #define NUM_DDC_DATA_CTX              1       ///< number of context models for deltaDC data (DMM or SDC)
 #endif
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
 #define SDC_NUM_RESIDUAL_FLAG_CTX     1
 #define SDC_NUM_RESIDUAL_CTX          1
@@ -577,5 +577,5 @@
 };
 #endif
-#if NH_3D_DMM || NH_3D_SDC
+#if NH_3D_DMM || NH_3D_INTRA_SDC
 static const UChar
 INIT_DDC_DATA[3][NUM_DDC_DATA_CTX] = 
@@ -586,5 +586,5 @@
 };
 #endif
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
 static const UChar
 INIT_SDC_RESIDUAL_FLAG[3][SDC_NUM_RESIDUAL_FLAG_CTX] =
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComCodingStatistics.h
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComCodingStatistics.h	(revision 1219)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComCodingStatistics.h	(revision 1221)
@@ -93,5 +93,5 @@
   STATS__CABAC_BITS__ALIGNED_ESCAPE_BITS,
 
-#if NH_3D_DMM || H_3D_DIM_SDC || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_INTRA_SDC || H_3D_INTER_SDC
   STATS__CABAC_BITS__DELTADC_SIGN_EP,
   STATS__CABAC_BITS__DELTADC_PREFIX,
@@ -154,5 +154,5 @@
     "CABAC_BITS__ALIGNED_SIGN_BIT",
     "CABAC_BITS__ALIGNED_ESCAPE_BITS"
-#if NH_3D_DMM || H_3D_DIM_SDC || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_INTRA_SDC || H_3D_INTER_SDC
    ,"STATS__CABAC_BITS__DELTADC_SIGN_EP"
    ,"STATS__CABAC_BITS__DELTADC_PREFIX"
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 1219)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1221)
@@ -112,5 +112,5 @@
   m_dmm1WedgeTabIdx = NULL;
 #endif
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
   m_pbSDCFlag             = NULL;
   m_apSegmentDCOffset[0]  = NULL;
@@ -258,5 +258,5 @@
     m_dmm1WedgeTabIdx    = (UInt*)xMalloc(UInt, uiNumPartition);
 #endif
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
     m_pbSDCFlag             = (Bool*)xMalloc(Bool, uiNumPartition);
     m_apSegmentDCOffset[0]  = (Pel*)xMalloc(Pel, uiNumPartition);
@@ -473,5 +473,5 @@
     if ( m_dmm1WedgeTabIdx    ) { xFree( m_dmm1WedgeTabIdx );  m_dmm1WedgeTabIdx = NULL;  }
 #endif
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
     if ( m_pbSDCFlag            ) { xFree(m_pbSDCFlag);             m_pbSDCFlag             = NULL; }
     if ( m_apSegmentDCOffset[0] ) { xFree(m_apSegmentDCOffset[0]);  m_apSegmentDCOffset[0]  = NULL; }
@@ -614,6 +614,6 @@
     m_pbSPIVMPFlag[ui] = pcFrom->m_pbSPIVMPFlag[ui];
 #endif
-#if H_3D_DIM_SDC
-    m_pbSDCFlag[ui] = pcFrom->m_pbSDCFlag[ui];
+#if NH_3D_INTRA_SDC
+  memset( m_pbSDCFlag, false, m_uiNumPartition * sizeof( *m_pbSDCFlag ) );
 #endif
 #if H_3D_DBBP
@@ -653,8 +653,8 @@
   memset( m_dmm1WedgeTabIdx,    0,                        m_uiNumPartition * sizeof( *m_dmm1WedgeTabIdx   ) );
 #endif
-#if H_3D_DIM_SDC
-    memset( m_pbSDCFlag             + firstElement,     0,                numElements * sizeof( *m_pbSDCFlag            ) );
-    memset( m_apSegmentDCOffset[0]  + firstElement,     0,                numElements * sizeof( *m_apSegmentDCOffset[0] ) );
-    memset( m_apSegmentDCOffset[1]  + firstElement,     0,                numElements * sizeof( *m_apSegmentDCOffset[1] ) );
+#if NH_3D_INTRA_SDC
+    memset( m_pbSDCFlag,     false,                m_uiNumPartition * sizeof( *m_pbSDCFlag ) );
+    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;
@@ -811,5 +811,5 @@
     m_dmm1WedgeTabIdx    [ui] = 0;
 #endif
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
       m_pbSDCFlag           [ui] = false;
       m_apSegmentDCOffset[0][ui] = 0;
@@ -917,5 +917,5 @@
   memset( m_dmm1WedgeTabIdx,    0, sizeof(UInt) * m_uiNumPartition );
 #endif
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
   memset( m_pbSDCFlag,            0, sizeof(Bool) * m_uiNumPartition  );
   memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition   );
@@ -974,8 +974,8 @@
   m_dmm1WedgeTabIdx    [ui] = pcCU->m_dmm1WedgeTabIdx  [uiPartOffset+ui];
 #endif
-#if H_3D_DIM_SDC
-      m_pbSDCFlag           [ui] = pcCU->m_pbSDCFlag            [ uiPartOffset + ui ];
-      m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0] [ uiPartOffset + ui ];
-      m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1] [ uiPartOffset + ui ];
+#if NH_3D_INTRA_SDC
+    m_pbSDCFlag           [ui] = pcCU->m_pbSDCFlag            [ uiPartOffset + ui ];
+    m_apSegmentDCOffset[0][ui] = pcCU->m_apSegmentDCOffset[0] [ uiPartOffset + ui ];
+    m_apSegmentDCOffset[1][ui] = pcCU->m_apSegmentDCOffset[1] [ uiPartOffset + ui ];
 #endif
 #if H_3D_DBBP
@@ -1092,5 +1092,5 @@
   m_dmm1WedgeTabIdx    = pcCU->getDmm1WedgeTabIdx()  + uiPart;
 #endif
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
   m_pbSDCFlag               = pcCU->getSDCFlag()              + uiPart;
   m_apSegmentDCOffset[0]    = pcCU->getSDCSegmentDCOffset(0)  + uiPart;
@@ -1294,6 +1294,6 @@
   memcpy( m_dmm1WedgeTabIdx    + uiOffset, pcCU->getDmm1WedgeTabIdx(),         sizeof(UInt) * uiNumPartition );
 #endif
-#if H_3D_DIM_SDC
-  memcpy( m_pbSDCFlag             + uiOffset, pcCU->getSDCFlag(),             iSizeInBool  );
+#if NH_3D_INTRA_SDC
+  memcpy( m_pbSDCFlag             + uiOffset, pcCU->getSDCFlag(), sizeof( *m_pbSDCFlag ) * uiNumPartition  );
   memcpy( m_apSegmentDCOffset[0]  + uiOffset, pcCU->getSDCSegmentDCOffset(0), sizeof( Pel ) * uiNumPartition);
   memcpy( m_apSegmentDCOffset[1]  + uiOffset, pcCU->getSDCSegmentDCOffset(1), sizeof( Pel ) * uiNumPartition);
@@ -1417,8 +1417,8 @@
   memcpy( pCtu->getDmm1WedgeTabIdx()           + m_absZIdxInCtu, m_dmm1WedgeTabIdx,  sizeof(UInt) * m_uiNumPartition );
 #endif
-#if H_3D_DIM_SDC
-  memcpy( rpcCU->getSDCFlag()             + m_uiAbsIdxInLCU, m_pbSDCFlag,      iSizeInBool  );
-  memcpy( rpcCU->getSDCSegmentDCOffset(0) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition);
-  memcpy( rpcCU->getSDCSegmentDCOffset(1) + m_uiAbsIdxInLCU, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition);
+#if NH_3D_INTRA_SDC
+  memcpy( pCtu->getSDCFlag()             + m_absZIdxInCtu, m_pbSDCFlag, sizeof(Bool) * m_uiNumPartition );
+  memcpy( pCtu->getSDCSegmentDCOffset(0) + m_absZIdxInCtu, m_apSegmentDCOffset[0], sizeof( Pel ) * m_uiNumPartition);
+  memcpy( pCtu->getSDCSegmentDCOffset(1) + m_absZIdxInCtu, m_apSegmentDCOffset[1], sizeof( Pel ) * m_uiNumPartition);
 #endif
 #if H_3D_DBBP
@@ -1478,9 +1478,4 @@
 #if H_3D_SPIVMP
   memcpy( rpcCU->getSPIVMPFlag()        + uiPartOffset, m_pbSPIVMPFlag,        sizeof(Bool) * uiQNumPart );
-#endif
-#if H_3D_DIM_SDC
-  memcpy( rpcCU->getSDCFlag()             + uiPartOffset, m_pbSDCFlag,      iSizeInBool  );
-  memcpy( rpcCU->getSDCSegmentDCOffset(0) + uiPartOffset, m_apSegmentDCOffset[0], sizeof( Pel ) * uiQNumPart);
-  memcpy( rpcCU->getSDCSegmentDCOffset(1) + uiPartOffset, m_apSegmentDCOffset[1], sizeof( Pel ) * uiQNumPart);
 #endif
 #if H_3D_DBBP
@@ -2136,12 +2131,4 @@
 #endif
 
-#if H_3D_DIM_SDC
-UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx )
-{
-  return 0;
-}
-
-#endif
-
 
 UInt TComDataCU::getCtxInterDir( UInt uiAbsPartIdx )
@@ -2395,9 +2382,9 @@
 }
 
-#if H_3D_DIM_SDC
-Void TComDataCU::setSDCFlagSubParts ( Bool bSDCFlag, UInt uiAbsPartIdx, UInt uiDepth )
+#if NH_3D_INTRA_SDC
+Void TComDataCU::setSDCFlagSubParts ( Bool bSDCFlag, UInt absPartIdx, UInt depth )
 {
   assert( sizeof( *m_pbSDCFlag) == 1 );
-  memset( m_pbSDCFlag + uiAbsPartIdx, bSDCFlag, m_pcPic->getNumPartInCU() >> ( 2 * uiDepth ) );
+  memset( m_pbSDCFlag + absPartIdx, bSDCFlag, m_pcPic->getNumPartitionsInCtu() >> ( 2 * depth ) );
 }
 
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 1219)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComDataCU.h	(revision 1221)
@@ -186,5 +186,5 @@
   UInt*         m_dmm1WedgeTabIdx;
 #endif
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
   Bool*         m_pbSDCFlag;
   Pel*          m_apSegmentDCOffset[2];
@@ -563,5 +563,5 @@
   Void  setDmm1WedgeTabIdxSubParts    ( UInt tabIdx, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
   Bool*         getSDCFlag          ()                        { return m_pbSDCFlag;               }
   Bool          getSDCFlag          ( UInt uiIdx )            { return m_pbSDCFlag[uiIdx];        }
@@ -577,5 +577,4 @@
   Pel           getDmmPredictor ( UInt uiSeg) { return m_apDmmPredictor[uiSeg]; }
 #endif
-  UInt          getCtxSDCFlag          ( UInt   uiAbsPartIdx );
 #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 1219)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.cpp	(revision 1221)
@@ -535,5 +535,5 @@
   assert( iWidth == iHeight  );
   assert( iWidth >= DMM_MIN_SIZE && iWidth <= DMM_MAX_SIZE );
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
   assert( !pcCU->getSDCFlag( uiAbsPartIdx ) );
 #endif
@@ -569,5 +569,5 @@
   assignBiSegDCs( pDst, uiStride, biSegPattern, patternStride, segDC1, segDC2 );
 #if !TEMP_SDC_CLEANUP // PM: should be obsolete after cleanup
-#if H_3D_DIM_SDC  
+#if NH_3D_INTRA_SDC
   pcCU->setDmmPredictor(segDC1, 0);
   pcCU->setDmmPredictor(segDC2, 1);
@@ -2389,5 +2389,5 @@
 
 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC
-#if NH_3D_SDC
+#if NH_3D_INTRA_SDC
 Void TComPrediction::predConstantSDC( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& predDC )
 {
@@ -2400,5 +2400,5 @@
 #endif
 #else // PM: should be obsolete after cleanup
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
 Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride
                                          ,UInt uiIntraMode
@@ -2465,5 +2465,5 @@
   }
 }
-#endif // H_3D_DIM_SDC
+#endif // NH_3D_INTRA_SDC
 #endif
 
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 1219)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComPrediction.h	(revision 1221)
@@ -171,9 +171,9 @@
 #endif
 #if TEMP_SDC_CLEANUP // PM: consider this cleanup for SDC
-#if NH_3D_SDC
+#if NH_3D_INTRA_SDC
   Void predConstantSDC            ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& predDC );
 #endif
 #else // PM: should be obsolete after cleanup
-#if H_3D_DIM_SDC
+#if NH_3D_INTRA_SDC
   Void analyzeSegmentsSDC         ( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride, UInt uiIntraMode, Bool orgDC=false );
 #endif
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComRom.cpp
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComRom.cpp	(revision 1219)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComRom.cpp	(revision 1221)
@@ -543,9 +543,9 @@
 UInt64 g_nSymbolCounter = 0;
 #if H_MV_ENC_DEC_TRAC
-Bool g_traceCU = false; 
+Bool g_traceCU = true;
 Bool g_tracePU = false; 
 Bool g_traceTU = false; 
-Bool g_disableNumbering = false; 
-Bool g_disableHLSTrace = false; 
+Bool g_disableNumbering = true;
+Bool g_disableHLSTrace = true;
 UInt64 g_stopAtCounter       = 937234; 
 Bool g_traceCopyBack         = false; 
Index: branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComRom.h
===================================================================
--- branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComRom.h	(revision 1219)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TComRom.h	(revision 1221)
@@ -157,5 +157,5 @@
 // Change later
 #ifndef ENC_DEC_TRACE
-#define ENC_DEC_TRACE 0
+#define ENC_DEC_TRACE 1
 #endif
 #endif
@@ -176,4 +176,5 @@
 #define DTRACE_CABAC_R( x,y ) if ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) fprintf( g_hTrace, x,    y );
 #define DTRACE_CABAC_N        if ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) fprintf( g_hTrace, "\n"    );
+
 #if H_MV_ENC_DEC_TRAC
  extern Bool   g_traceCU; 
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 1219)
+++ branches/HTM-14.1-update-dev1-RWTH/source/Lib/TLibCommon/TypeDef.h	(revision 1221)
@@ -70,6 +70,6 @@
 #define NH_3D_VSO                         1
 #define NH_3D_DMM                         1   // Depth modeling modes
-#define NH_3D_SDC                         1   // Segment-wise DC coding for intra and inter
-#define NH_3D_DLT                         1   // Depth Lookup Table
+#define NH_3D_DLT                         0   // Depth Lookup Table
+#define NH_3D_INTRA_SDC                   1   // Segment-wise DC Coding method for INTRA
 #define NH_3D_ENC_DEPTH                   1   // Encoder optimizations for depth, incl.
                                               // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
