Index: /branches/HTM-14.1-update-dev1-LG/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1303)
@@ -2088,9 +2088,4 @@
   // check validity of input parameters
   xCheckParameter();
-  
-  // FJ: this should be removed as soon as Inter-SDC is fully implemented
-#if NH_3D && !NH_3D_SDC_INTER
-  m_interSdcFlag = false;
-#endif
 
   // compute actual CU depth with respect to config depth and max transform size
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1303)
@@ -134,6 +134,4 @@
 #if NH_3D_IC
   m_pbICFlag             = NULL;
-#endif
-#if H_3D_INTER_SDC
 #endif
 #if NH_3D_DBBP
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComPattern.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComPattern.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComPattern.h	(revision 1303)
@@ -84,5 +84,5 @@
   Bool              m_bICFlag;
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   Bool              m_bSDCMRSADFlag;
 #endif
@@ -102,5 +102,5 @@
   Void  setICFlag( Bool bICFlag ) { m_bICFlag = bICFlag; }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   Bool  getSDCMRSADFlag()         { return m_bSDCMRSADFlag; }
   Void  setSDCMRSADFlag( Bool bSDCMRSADFlag )    { m_bSDCMRSADFlag = bSDCMRSADFlag; }
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComRdCost.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComRdCost.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComRdCost.cpp	(revision 1303)
@@ -564,5 +564,5 @@
   cDtParam.bUseIC       = false;
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   cDtParam.bUseSDCMRSAD = false;
 #endif
@@ -605,5 +605,5 @@
   cDtParam.bUseIC       = false;
 #endif
-#if H_3D_INTER_SDC_FIX
+#if NH_3D_SDC_INTER
   cDtParam.bUseSDCMRSAD = false;
 #endif
@@ -776,5 +776,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -818,5 +818,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -863,5 +863,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -912,5 +912,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -968,5 +968,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -1016,5 +1016,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -1076,5 +1076,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -1149,5 +1149,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -1214,5 +1214,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -1318,5 +1318,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -1395,5 +1395,5 @@
 
 
-#if NH_3D_IC || H_3D_INTER_SDC
+#if NH_3D_IC || NH_3D_SDC_INTER
 UInt TComRdCost::xGetSADic( DistParam* pcDtParam )
 {
@@ -3340,5 +3340,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcDtParam->bUseSDCMRSAD )
   {
@@ -3410,5 +3410,5 @@
 }
 
-#if NH_3D_IC || H_3D_INTER_SDC
+#if NH_3D_IC || NH_3D_SDC_INTER
 UInt TComRdCost::xGetHADsic( DistParam* pcDtParam )
 {
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComRdCost.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComRdCost.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TComRdCost.h	(revision 1303)
@@ -94,5 +94,5 @@
   Bool  bUseIC;
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   Bool  bUseSDCMRSAD;
 #endif
@@ -129,5 +129,5 @@
     iStrideVir = 0;
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
     bUseSDCMRSAD = false;
 #endif
@@ -256,5 +256,5 @@
   static Distortion xGetSSE64         ( DistParam* pcDtParam );
   static Distortion xGetSSE16N        ( DistParam* pcDtParam );
-#if NH_3D_IC || H_3D_INTER_SDC
+#if NH_3D_IC || NH_3D_SDC_INTER
   static UInt xGetSADic         ( DistParam* pcDtParam );
   static UInt xGetSAD4ic        ( DistParam* pcDtParam );
@@ -283,5 +283,5 @@
 #endif
 
-#if NH_3D_IC || H_3D_INTER_SDC
+#if NH_3D_IC || NH_3D_SDC_INTER
   static UInt xGetSAD12ic       ( DistParam* pcDtParam );
   static UInt xGetSAD24ic       ( DistParam* pcDtParam );
@@ -294,5 +294,5 @@
 
 
-#if NH_3D_IC || H_3D_INTER_SDC
+#if NH_3D_IC || NH_3D_SDC_INTER
   static UInt xGetHADsic          ( DistParam* pcDtParam );
 #endif
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TypeDef.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibCommon/TypeDef.h	(revision 1303)
@@ -121,5 +121,5 @@
 #define NH_3D_DLT                         1   // Depth Lookup Table
 #define NH_3D_SDC_INTRA                   1   // Segment-wise DC Coding method for INTRA
-#define NH_3D_SDC_INTER                   0   // Segment-wise DC Coding method for INTER  
+#define NH_3D_SDC_INTER                   1   // Segment-wise DC Coding method for INTER  
 #define NH_3D_ENC_DEPTH                   1   // Encoder optimizations for depth, incl.
                                               // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 1303)
@@ -3374,5 +3374,5 @@
 }
 #endif
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 Void TDecCavlc::parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 1303)
@@ -123,8 +123,8 @@
   Void  parseICFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void  parseDeltaDC        ( TComDataCU* /*pcCU*/, UInt /*absPartIdx*/, UInt /*depth*/ ) { assert(0); };
 #endif
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void  parseSDCFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCu.cpp	(revision 1303)
@@ -656,5 +656,5 @@
     {
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
       if( m_ppcCU[uiDepth]->getSDCFlag( 0 ) )
       {
@@ -665,5 +665,5 @@
 #endif
       xReconInter( m_ppcCU[uiDepth], uiDepth );
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
       }
 #endif
@@ -836,5 +836,5 @@
 }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
 Void TDecCu::xReconInterSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -847,7 +847,8 @@
   Pel  *pResi;
   UInt uiPelX, uiPelY;
-  UInt uiResiStride = m_ppcYuvResi[uiDepth]->getStride();
-
-  pResi = m_ppcYuvResi[uiDepth]->getLumaAddr( 0 );
+  UInt uiResiStride = m_ppcYuvResi[uiDepth]->getStride( COMPONENT_Y );
+  Int  bitDepthC = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA);
+
+  pResi = m_ppcYuvResi[uiDepth]->getAddr( COMPONENT_Y );
   for( uiPelY = 0; uiPelY < uiHeight; uiPelY++ )
   {
@@ -859,10 +860,10 @@
   }
 
-  m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ) );
+  m_ppcYuvReco[uiDepth]->addClip( m_ppcYuvReco[uiDepth], m_ppcYuvResi[uiDepth], 0, pcCU->getWidth( 0 ), pcCU->getSlice()->getSPS()->getBitDepths() );
 
   // clear UV
-  UInt  uiStrideC     = m_ppcYuvReco[uiDepth]->getCStride();
-  Pel   *pRecCb       = m_ppcYuvReco[uiDepth]->getCbAddr();
-  Pel   *pRecCr       = m_ppcYuvReco[uiDepth]->getCrAddr();
+  UInt  uiStrideC     = m_ppcYuvReco[uiDepth]->getStride( COMPONENT_Cb );
+  Pel   *pRecCb       = m_ppcYuvReco[uiDepth]->getAddr( COMPONENT_Cb );
+  Pel   *pRecCr       = m_ppcYuvReco[uiDepth]->getAddr( COMPONENT_Cr );
 
   for (Int y = 0; y < uiHeight/2; y++)
@@ -870,6 +871,6 @@
     for (Int x = 0; x < uiWidth/2; x++)
     {
-      pRecCb[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) );
-      pRecCr[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) );
+      pRecCb[x] = (Pel)( 1 << ( bitDepthC - 1 ) );
+      pRecCr[x] = (Pel)( 1 << ( bitDepthC - 1 ) );
     }
 
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCu.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCu.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecCu.h	(revision 1303)
@@ -130,5 +130,5 @@
   Void xReconIntraSDC           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   Void xReconInterSDC           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 1303)
@@ -298,6 +298,7 @@
   decodeDBBPFlag( pcCU, uiAbsPartIdx, uiDepth ); 
 #endif
-  //decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth );
-
+#if NH_3D_SDC_INTER
+  decodeSDCFlag ( pcCU, uiAbsPartIdx, uiDepth );
+#endif
 #if NH_3D_ARP
   decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
@@ -1092,5 +1093,5 @@
 }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx) )
   {
@@ -1103,5 +1104,5 @@
   if( pcCU->getSlice()->getIsDepth() )
   {
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
     if( pcCU->getSDCFlag( uiAbsPartIdx ) )
     {
@@ -1161,5 +1162,5 @@
 }
 
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 Void TDecEntropy::decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecEntropy.h	(revision 1303)
@@ -89,8 +89,8 @@
   virtual Void parseICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   virtual Void  parseDeltaDC      ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) = 0;
 #endif
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   virtual Void parseSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
 #endif
@@ -181,5 +181,5 @@
 #endif
 
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void decodeSDCFlag           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 1303)
@@ -111,11 +111,11 @@
 , m_cDmmModeSCModel                          ( 1,             1,                      NUM_DMM_MODE_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 , m_cDdcDataSCModel                          ( 1,             1,                      NUM_DDC_DATA_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
+, m_cSDCFlagSCModel                          ( 1,             1,                     NUM_SDC_FLAG_CTX                      , m_contextModels + m_numContextModels, m_numContextModels)
 #endif
 #if NH_3D_SDC_INTRA
 , m_cSDCResidualFlagSCModel                  ( 1,             1,                     SDC_NUM_RESIDUAL_FLAG_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cSDCResidualSCModel                      ( 1,             1,                     SDC_NUM_RESIDUAL_CTX                  , m_contextModels + m_numContextModels, m_numContextModels)
-, m_cSDCFlagSCModel                          ( 1,             1,                     NUM_SDC_FLAG_CTX                      , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cDdcFlagSCModel                          ( 1,             1,                     NUM_DDC_FLAG_CTX                      , m_contextModels + m_numContextModels, m_numContextModels)
 #endif
@@ -202,11 +202,11 @@
   m_cDmmModeSCModel.initBuffer                    ( sliceType, qp, (UChar*)INIT_DMM_MODE );
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   m_cDdcDataSCModel.initBuffer                    ( sliceType, qp, (UChar*)INIT_DDC_DATA );
+  m_cSDCFlagSCModel.initBuffer                    ( sliceType, qp, (UChar*)INIT_SDC_FLAG );
 #endif
 #if NH_3D_SDC_INTRA
   m_cSDCResidualFlagSCModel.initBuffer            ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
   m_cSDCResidualSCModel.initBuffer                ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL );
-  m_cSDCFlagSCModel.initBuffer                    ( sliceType, qp, (UChar*)INIT_SDC_FLAG );
   m_cDdcFlagSCModel.initBuffer                    ( sliceType, qp, (UChar*)INIT_DDC_FLAG );
 #endif
@@ -2319,8 +2319,8 @@
 #endif
 
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 Void TDecSbac::parseDeltaDC( TComDataCU* pcCU, UInt absPartIdx, UInt depth )
 {
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   if( !(pcCU->getSDCFlag( absPartIdx )) )
 #endif
@@ -2370,5 +2370,5 @@
 #endif
     }
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
     else
     {
@@ -2489,5 +2489,5 @@
 }
 #endif
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecSbac.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibDecoder/TDecSbac.h	(revision 1303)
@@ -107,5 +107,5 @@
   Void  xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam, const Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange );
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void  xReadExGolombLevelDdc( UInt& ruiSymbol );
   Void  xParseDeltaDC        ( Pel& rValDeltaDC, UInt uiNumSeg );
@@ -119,5 +119,5 @@
   Void  xParseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
 #endif
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void  parseSDCFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
@@ -136,5 +136,5 @@
   Void parseDIS          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void  parseDeltaDC      ( TComDataCU* pcCU, UInt absPartIdx, UInt depth );
 #endif
@@ -229,11 +229,11 @@
   ContextModel3DBuffer m_cDmmModeSCModel;
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   ContextModel3DBuffer m_cDdcDataSCModel;
+  ContextModel3DBuffer m_cSDCFlagSCModel;
 #endif
 #if NH_3D_SDC_INTRA  
   ContextModel3DBuffer m_cSDCResidualFlagSCModel;
   ContextModel3DBuffer m_cSDCResidualSCModel;
-  ContextModel3DBuffer m_cSDCFlagSCModel;
   ContextModel3DBuffer m_cDdcFlagSCModel;
 #endif
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 1303)
@@ -2831,5 +2831,5 @@
    assert(0);
  }
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 Void TEncCavlc::codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncCavlc.h	(revision 1303)
@@ -126,5 +126,5 @@
   Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
   Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx );
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void  codeDeltaDC      ( TComDataCU* /*pcCU*/, UInt /*absPartIdx*/ ) { assert(0); };
 #endif
@@ -136,5 +136,5 @@
 #endif
 
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
 #endif
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncCu.cpp	(revision 1303)
@@ -2094,5 +2094,5 @@
           }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
           TComDataCU *rpcTempCUPre = rpcTempCU;
 #endif
@@ -2100,5 +2100,5 @@
           xCheckDQP( rpcTempCU );
           xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth DEBUG_STRING_PASS_INTO(bestStr) DEBUG_STRING_PASS_INTO(tmpStr));
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
           if( rpcTempCU->getSlice()->getInterSdcFlag() && !uiNoResidual )
           {
@@ -2131,5 +2131,5 @@
 #endif
               rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
-              rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth );
+              rpcTempCU->setCbfSubParts( 1, COMPONENT_Y, 0, uhDepth );
 #if NH_3D_VSO //M2
               if( m_pcRdCost->getUseRenModel() )
@@ -2173,5 +2173,5 @@
           if( m_pcEncCfg->getUseFastDecisionForMerge() && !bestIsSkip )
           {
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
             if( rpcTempCU->getSlice()->getInterSdcFlag() )
             {
@@ -2182,5 +2182,5 @@
 #endif
             bestIsSkip = rpcBestCU->getQtRootCbf(0) == 0;
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
             }
 #endif
@@ -2377,5 +2377,5 @@
   DebugInterPredResiReco(sTest, *(m_ppcPredYuvTemp[uhDepth]), *(m_ppcResiYuvBest[uhDepth]), *(m_ppcRecoYuvTemp[uhDepth]), DebugStringGetPredModeMask(rpcTempCU->getPredictionMode(0)));
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
       TComDataCU *rpcTempCUPre = rpcTempCU;
 #endif
@@ -2383,5 +2383,5 @@
   xCheckDQP( rpcTempCU );
   xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth DEBUG_STRING_PASS_INTO(sDebug) DEBUG_STRING_PASS_INTO(sTest));
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
       if( rpcTempCU->getSlice()->getInterSdcFlag() && ePartSize == SIZE_2Nx2N)
       {
@@ -2416,5 +2416,5 @@
 #endif
           rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
-          rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth );
+          rpcTempCU->setCbfSubParts( 1, COMPONENT_Y, 0, uhDepth );
 #if NH_3D_VSO // M3
           if( m_pcRdCost->getUseRenModel() )
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 1303)
@@ -723,5 +723,5 @@
   }
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   if( pcCU->getSDCFlag( uiAbsPartIdx ) && !pcCU->isIntra( uiAbsPartIdx ) )
   {
@@ -734,5 +734,5 @@
   if( pcCU->getSlice()->getIsDepth() )
   {
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
     if( pcCU->getSDCFlag( uiAbsPartIdx ) )
     {
@@ -843,5 +843,5 @@
 }
 
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 Void TEncEntropy::encodeDeltaDC  ( TComDataCU* pcCU, UInt absPartIdx )
 {
@@ -849,5 +849,5 @@
 }
 #endif
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 Void TEncEntropy::encodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncEntropy.h	(revision 1303)
@@ -84,5 +84,5 @@
   virtual Void codeMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
   virtual Void codeMergeIndex    ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   virtual Void codeDeltaDC       ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
 #endif
@@ -93,5 +93,5 @@
   virtual Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
 #endif
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   virtual Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
 #endif
@@ -181,8 +181,8 @@
   Void encodeICFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void encodeDeltaDC      ( TComDataCU* pcCU, UInt absPartIdx );
 #endif
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void encodeSDCFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
 #endif
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 1303)
@@ -106,11 +106,11 @@
 , m_cDmmModeSCModel                    ( 1,             1,                      NUM_DMM_MODE_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 , m_cDdcDataSCModel                    ( 1,             1,                      NUM_DDC_DATA_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
+, m_cSDCFlagSCModel                    ( 1,             1,                       NUM_SDC_FLAG_CTX                    , m_contextModels + m_numContextModels, m_numContextModels)
 #endif
 #if NH_3D_SDC_INTRA
 , m_cSDCResidualFlagSCModel            ( 1,             1,                      SDC_NUM_RESIDUAL_FLAG_CTX            , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cSDCResidualSCModel                ( 1,             1,                      SDC_NUM_RESIDUAL_CTX                 , m_contextModels + m_numContextModels, m_numContextModels)
-, m_cSDCFlagSCModel                    ( 1,             1,                       NUM_SDC_FLAG_CTX                    , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cDdcFlagSCModel                    ( 1,             1,                      NUM_DDC_FLAG_CTX                     , m_contextModels + m_numContextModels, m_numContextModels)
 #endif                                                                                                          
@@ -187,11 +187,11 @@
   m_cDmmModeSCModel.initBuffer                    ( eSliceType, iQp, (UChar*)INIT_DMM_MODE );
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   m_cDdcDataSCModel.initBuffer                    ( eSliceType, iQp, (UChar*)INIT_DDC_DATA );
+  m_cSDCFlagSCModel.initBuffer                    ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
 #endif
 #if NH_3D_SDC_INTRA
   m_cSDCResidualFlagSCModel.initBuffer            ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
   m_cSDCResidualSCModel.initBuffer                ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
-  m_cSDCFlagSCModel.initBuffer                    ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
   m_cDdcFlagSCModel.initBuffer                    ( eSliceType, iQp, (UChar*)INIT_DDC_FLAG );
 #endif                                           
@@ -243,5 +243,5 @@
       curCost += m_cCUICFlagSCModel.calcCost                   ( curSliceType, qp, (UChar*)INIT_IC_FLAG );
 #endif                                                     
-#if NH_3D_SDC_INTRA
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
       curCost += m_cSDCFlagSCModel.calcCost                    ( curSliceType, qp, (UChar*)INIT_SDC_FLAG );
 #endif                                                     
@@ -280,5 +280,5 @@
       curCost += m_cDmmModeSCModel.calcCost                    ( curSliceType, qp, (UChar*)INIT_DMM_MODE );
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
       curCost += m_cDdcDataSCModel.calcCost                    ( curSliceType, qp, (UChar*)INIT_DDC_DATA );
 #endif
@@ -2459,8 +2459,8 @@
 }
 
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 Void TEncSbac::codeDeltaDC( TComDataCU* pcCU, UInt absPartIdx )
 {
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   if( !(pcCU->getSDCFlag( absPartIdx )) )
 #endif
@@ -2513,5 +2513,5 @@
 #endif
       }
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
       else
       {
@@ -2614,5 +2614,5 @@
 #endif
 
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
 Void TEncSbac::codeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSbac.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSbac.h	(revision 1303)
@@ -115,5 +115,5 @@
   Void  xWriteEpExGolomb     ( UInt uiSymbol, UInt uiCount );
   Void  xWriteCoefRemainExGolomb ( UInt symbol, UInt &rParam, const Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange );
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void  xWriteExGolombLevelDdc( UInt uiSymbol );
   Void  xCodeDeltaDC         ( Pel valDeltaDC, UInt uiNumSeg );
@@ -149,8 +149,8 @@
   Void codeICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx );
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void  codeDeltaDC      ( TComDataCU* pcCU, UInt absPartIdx );
 #endif
-#if NH_3D_SDC_INTRA || H_3D_INTER_SDC
+#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   Void codeSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx );
 #endif
@@ -252,11 +252,11 @@
   ContextModel3DBuffer m_cDmmModeSCModel;
 #endif
-#if NH_3D_DMM || NH_3D_SDC_INTRA
+#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
   ContextModel3DBuffer m_cDdcDataSCModel;
+  ContextModel3DBuffer m_cSDCFlagSCModel;
 #endif
 #if NH_3D_SDC_INTRA  
   ContextModel3DBuffer m_cSDCResidualFlagSCModel;
   ContextModel3DBuffer m_cSDCResidualSCModel;
-  ContextModel3DBuffer m_cSDCFlagSCModel;
   ContextModel3DBuffer m_cDdcFlagSCModel;
 #endif
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1303)
@@ -44,8 +44,4 @@
 #include <math.h>
 #include <limits>
-#if H_3D_INTER_SDC
-#include <memory.h>
-#endif
-
 
 //! \ingroup TLibEncoder
@@ -372,5 +368,5 @@
   m_cDistParam.bUseIC = pcPatternKey->getICFlag();
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag();
 #endif
@@ -883,5 +879,5 @@
     m_cDistParam.bUseIC = pcPatternKey->getICFlag();
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
     m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag();
 #endif
@@ -2907,5 +2903,5 @@
       distParam.bUseIC = false;
 #endif
-#if H_3D_INTER_SDC_FIX
+#if NH_3D_SDC_INTER
       distParam.bUseSDCMRSAD = false;
 #endif
@@ -3847,5 +3843,5 @@
   cDistParam.bUseIC = false;
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   cDistParam.bUseSDCMRSAD = false;
 #endif
@@ -5057,5 +5053,5 @@
   pcPatternKey->setICFlag( bICFlag );
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
    pcPatternKey->setSDCMRSADFlag( pcCU->getSlice()->getInterSdcFlag() );
 #endif
@@ -5246,5 +5242,5 @@
       m_cDistParam.bUseIC = pcPatternKey->getICFlag();
 #endif
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
       m_cDistParam.bUseSDCMRSAD = pcPatternKey->getSDCMRSADFlag();
 #endif
@@ -5964,5 +5960,5 @@
 }
 
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
 Void TEncSearch::encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, TComYuv* pcRec, Int uiOffest, const UInt uiDepth )
 {
@@ -5978,11 +5974,13 @@
 
   Pel *pPred, *pOrg;
-  UInt uiPredStride = pcPred->getStride();
-  UInt uiOrgStride  = pcOrg->getStride();
+  UInt uiPredStride = pcPred->getStride( COMPONENT_Y );
+  UInt uiOrgStride  = pcOrg->getStride( COMPONENT_Y );
   UInt uiPelX, uiPelY;
 
-  pPred = pcPred->getLumaAddr( 0 );
-  pOrg  = pcOrg->getLumaAddr( 0 );
+  pPred = pcPred->getAddr( COMPONENT_Y );
+  pOrg  = pcOrg->getAddr( COMPONENT_Y );
   Int pResDC = 0;
+  Int bitDepthY = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA);
+  Int bitDepthC = pcCU->getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_CHROMA);
 
   //calculate dc value for prediction and original signal, and calculate residual and reconstruction
@@ -6005,7 +6003,7 @@
 
   Pel *pRec;
-  UInt uiRecStride  = pcRec->getStride();
-  pPred = pcPred->getLumaAddr( 0 );
-  pRec  = pcRec->getLumaAddr( 0 );
+  UInt uiRecStride  = pcRec->getStride( COMPONENT_Y );
+  pPred = pcPred->getAddr( COMPONENT_Y );
+  pRec  = pcRec->getAddr( COMPONENT_Y );
 
   for( uiPelY = 0; uiPelY < uiHeight; uiPelY++ )
@@ -6013,5 +6011,5 @@
     for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )
     {
-      pRec[ uiPelX ] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, pPred[uiPelX] + pcCU->getSDCSegmentDCOffset(0, 0) );
+      pRec[ uiPelX ] = Clip3( 0, (1 << bitDepthY) - 1, pPred[uiPelX] + pcCU->getSDCSegmentDCOffset(0, 0) );
     }
     pPred     += uiPredStride;
@@ -6020,7 +6018,7 @@
 
   // clear UV
-  UInt  uiStrideC     = pcRec->getCStride();
-  Pel   *pRecCb       = pcRec->getCbAddr();
-  Pel   *pRecCr       = pcRec->getCrAddr();
+  UInt  uiStrideC     = pcRec->getStride( COMPONENT_Cb );
+  Pel   *pRecCb       = pcRec->getAddr( COMPONENT_Cb );
+  Pel   *pRecCr       = pcRec->getAddr( COMPONENT_Cr );
 
   for (Int y=0; y < uiHeight/2; y++)
@@ -6028,6 +6026,6 @@
     for (Int x=0; x < uiWidth/2; x++)
     {
-      pRecCb[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) );
-      pRecCr[x] = (Pel)( 1 << ( g_bitDepthC - 1 ) );
+      pRecCb[x] = (Pel)( 1 << ( bitDepthC - 1 ) );
+      pRecCr[x] = (Pel)( 1 << ( bitDepthC - 1 ) );
     }
 
@@ -6038,8 +6036,8 @@
   Dist ruiDist;
   Double rdCost;
-#if H_3D_VSO // M13
+#if NH_3D_VSO // M13
   if ( m_pcRdCost->getUseVSO() )
   {
-    ruiDist = m_pcRdCost->getDistPartVSO( pcCU, 0, pcRec->getLumaAddr(), pcRec->getStride(),  pcOrg->getLumaAddr(), pcOrg->getStride(),  uiWidth,      uiHeight     , false );
+    ruiDist = m_pcRdCost->getDistPartVSO( pcCU, 0, bitDepthY, pcRec->getAddr( COMPONENT_Y ), pcRec->getStride( COMPONENT_Y ),  pcOrg->getAddr( COMPONENT_Y ), pcOrg->getStride( COMPONENT_Y ),  uiWidth,      uiHeight     , false );
   }
   else    
@@ -6047,15 +6045,11 @@
 #endif
     {
-      ruiDist = m_pcRdCost->getDistPart( g_bitDepthY, pcRec->getLumaAddr( 0 ), uiRecStride, pcOrg->getLumaAddr( 0 ), uiOrgStride, uiWidth, uiHeight );
-    }
-#if H_3D_VSO
-  }
-#endif
-
-#if NH_3D_SDC_INTRA
+      ruiDist = m_pcRdCost->getDistPart( bitDepthY, pcRec->getAddr( COMPONENT_Y ), uiRecStride, pcOrg->getAddr( COMPONENT_Y ), uiOrgStride, uiWidth, uiHeight, COMPONENT_Y );
+    }
+#if NH_3D_VSO
+  }
+#endif
+
   Bool bNonSkip = false;
-#else
-  Bool bNonSkip = true;
-#endif
   bNonSkip |= ( pcCU->getSDCSegmentDCOffset( 0, 0 ) != 0 ) ? 1 : 0;
   if( !bNonSkip )
@@ -6069,10 +6063,9 @@
     //----- determine rate and r-d cost -----
     UInt uiBits = 0;
-    TComYuv *pDummy = NULL;
     m_pcRDGoOnSbacCoder->load( m_pppcRDSbacCoder[pcCU->getDepth(0)][CI_CURR_BEST] );
 
-    xAddSymbolBitsInter( pcCU, 0, 0, uiBits, pDummy, NULL, pDummy );
-
-#if H_3D_VSO //M 14
+    xAddSymbolBitsInter( pcCU, uiBits );
+
+#if NH_3D_VSO //M 14
     if ( m_pcRdCost->getUseLambdaScaleVSO() )    
     {
@@ -6092,10 +6085,10 @@
   }
 
-#if H_3D_VSO // necessary? // M15
+#if NH_3D_VSO // necessary? // M15
   // set Model
   if( !m_pcRdCost->getUseEstimatedVSD() && m_pcRdCost->getUseRenModel() )
   {
-    Pel*  piSrc       = pcRec->getLumaAddr();
-    UInt  uiSrcStride = pcRec->getStride();
+    Pel*  piSrc       = pcRec->getAddr( COMPONENT_Y );
+    UInt  uiSrcStride = pcRec->getStride( COMPONENT_Y );
     m_pcRdCost->setRenModelData( pcCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
   }
Index: /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSearch.h	(revision 1302)
+++ /branches/HTM-14.1-update-dev1-LG/source/Lib/TLibEncoder/TEncSearch.h	(revision 1303)
@@ -230,12 +230,12 @@
                                   Bool        bSkipResidual
                                   DEBUG_STRING_FN_DECLARE(sDebug) );
-#if H_3D_INTER_SDC
+#if NH_3D_SDC_INTER
   Void encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU,
-    TComYuv* pcOrg, 
-    TComYuv* pcPred, 
-    TComYuv* pcResi, 
-    TComYuv* pcRec, 
-    Int      uiOffset,
-    const UInt uiDepth );
+                                     TComYuv* pcOrg, 
+                                     TComYuv* pcPred, 
+                                     TComYuv* pcResi, 
+                                     TComYuv* pcRec, 
+                                     Int      uiOffset,
+                                     const UInt uiDepth );
 #endif
 
