Index: /branches/HTM-6.2-dev0/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 433)
@@ -133,8 +133,23 @@
 
 #if RWTH_SDC_DLT_B0036
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+#define DEPTH_MODE_NUM_FLAG_CTX          8
+#define DMM_DELTA_NUM_FLAG_CTX           1
+#else
 #define SDC_NUM_FLAG_CTX                 3
+#endif
 #define SDC_NUM_RESIDUAL_FLAG_CTX        1
+#if !RWTH_SDC_CTX_SIMPL_D0032
 #define SDC_NUM_SIGN_FLAG_CTX            1
+#endif
+#if LGE_CONCATENATE_D0141
+#define SDC_NUM_RESIDUAL_CTX             1
+#else
+#if RWTH_SDC_CTX_SIMPL_D0032
+#define SDC_NUM_RESIDUAL_CTX             8
+#else
 #define SDC_NUM_RESIDUAL_CTX             10
+#endif
+#endif
 
 #define SDC_NUM_PRED_MODE_CTX            5
@@ -555,4 +570,18 @@
 
 #if RWTH_SDC_DLT_B0036
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+static const UChar INIT_DEPTHMODE_FLAG[3][DEPTH_MODE_NUM_FLAG_CTX]=
+{
+  {0,  0,  64,   0, CNU,   0, CNU, 0},
+  {0, 64,   0, CNU,   0, CNU,   0, 0},
+  {64, 0, CNU,   0, CNU,   0,   0, 0}
+};
+static const UChar INIT_DMMDELTA_FLAG[3][DMM_DELTA_NUM_FLAG_CTX]=
+{
+  {0},
+  {0},
+  {64}
+};
+#else
 static const Short INIT_SDC_FLAG[3][SDC_NUM_FLAG_CTX][2] =
 {
@@ -567,5 +596,65 @@
   }
 };
-
+#endif
+
+#if RWTH_SDC_CTX_SIMPL_D0032
+static const UChar INIT_SDC_RESIDUAL_FLAG[3][SDC_NUM_RESIDUAL_FLAG_CTX] =
+{
+  {
+    CNU
+    
+  },
+  {
+    CNU
+  },
+  {
+    CNU
+  }
+};
+    
+#if LGE_CONCATENATE_D0141
+static const UChar INIT_SDC_RESIDUAL[3][SDC_NUM_RESIDUAL_CTX] =
+{
+    {
+         155
+    },
+    {
+         155
+    },
+    {
+        155
+    }
+};
+#else
+static const UChar INIT_SDC_RESIDUAL[3][SDC_NUM_RESIDUAL_CTX] =
+{
+  {
+    CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
+  },
+  {
+    CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
+  },
+  {
+    CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
+  }
+};
+#endif
+
+static const UChar INIT_SDC_PRED_MODE[3][3*SDC_NUM_PRED_MODE_CTX] =
+{
+  {
+    CNU,    CNU
+    ,CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
+  },
+  {
+    CNU,    CNU
+    ,CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
+  },
+  {
+    CNU,    CNU
+    ,CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU, CNU
+  }
+};
+#else
 static const Short INIT_SDC_RESIDUAL_FLAG[3][3*SDC_NUM_RESIDUAL_FLAG_CTX][2] =
 {
@@ -645,4 +734,5 @@
 };
 #endif
+#endif
 
 //! \}
Index: /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 433)
@@ -3196,4 +3196,5 @@
 }
 
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 UInt TComDataCU::getCtxSDCFlag( UInt uiAbsPartIdx )
 {
@@ -3212,4 +3213,5 @@
   return uiCtx;
 }
+#endif
 
 Bool TComDataCU::getSDCAvailable( UInt uiAbsPartIdx )
Index: /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 433)
@@ -886,5 +886,7 @@
   Void          setSDCFlagSubParts  ( Bool bSDCFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth );
   
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   UInt          getCtxSDCFlag              ( UInt uiAbsPartIdx );
+#endif
   
   Bool          getSDCAvailable             ( UInt uiAbsPartIdx );
Index: /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 433)
@@ -50,4 +50,9 @@
 #endif
 
+#if HHI_DELTADC_DLT_D0035
+#define GetDepthValue2Idx(val)     (pcCU->getSlice()->getSPS()->depthValue2idx(val))
+#define GetIdx2DepthValue(val)     (pcCU->getSlice()->getSPS()->idx2DepthValue(val))
+#endif
+
 #if MERL_General_Fix
 #if MERL_VSP_C0152
@@ -555,4 +560,8 @@
   // Do prediction
   {
+#if QC_DC_PREDICTOR_D0183
+    Int iMean0, iMean1;
+    getPredDCs( pbRegion, iWidth, pSrc+srcStride+1, srcStride, iMean0, iMean1 );
+#else
     //UInt uiSum0 = 0, uiSum1 = 0;
     Int iSum0 = 0, iSum1 = 0;
@@ -593,4 +602,5 @@
     iMean0 = iSum0 / iCount0; // TODO : integer op.
     iMean1 = iSum1 / iCount1;
+#endif
 #if LGE_EDGE_INTRA_DELTA_DC
     if( bDelta ) 
@@ -3163,4 +3173,32 @@
 }
 
+#if QC_DC_PREDICTOR_D0183
+Void TComPrediction::getPredDCs( Bool* pbPattern, Int iStride, Int* piMask, Int iMaskStride, Int& riPredDC1, Int& riPredDC2 )
+{
+  Int  iDC1, iDC2;
+  const Int  iTR = (   iStride - 1        ) - iMaskStride;
+  const Int  iTM = ( ( iStride - 1 ) >> 1 ) - iMaskStride;
+  const Int  iLB = (   iStride - 1        ) * iMaskStride - 1;
+  const Int  iLM = ( ( iStride - 1 ) >> 1 ) * iMaskStride - 1;
+  const UInt uiBitDepth = g_uiBitDepth + g_uiBitIncrement;
+
+  Bool bL = ( pbPattern[0] != pbPattern[(iStride-1)*iStride] );
+  Bool bT = ( pbPattern[0] != pbPattern[(iStride-1)]         );
+
+  if( bL == bT )
+  {
+    iDC1 = bL ? ( piMask[iTR] + piMask[iLB] )>>1 : 1<<( uiBitDepth - 1 );
+    iDC2 =      ( piMask[ -1] + piMask[-iMaskStride] )>>1;
+  }
+  else
+  {
+    iDC1 = bL ? piMask[iLB] : piMask[iTR];
+    iDC2 = bL ? piMask[iTM] : piMask[iLM];
+  }
+
+  riPredDC1 = pbPattern[0] ? iDC1 : iDC2;
+  riPredDC2 = pbPattern[0] ? iDC2 : iDC1;
+}
+#else
 Void TComPrediction::getWedgePredDCs( TComWedgelet* pcWedgelet, Int* piMask, Int iMaskStride, Int& riPredDC1, Int& riPredDC2, Bool bAbove, Bool bLeft )
 {
@@ -3240,4 +3278,5 @@
   }
 }
+#endif
 
 Void TComPrediction::calcWedgeDCs( TComWedgelet* pcWedgelet, Pel* piOrig, UInt uiStride, Int& riDC1, Int& riDC2 )
@@ -3607,9 +3646,23 @@
   Int iMaskStride = ( iWidth<<1 ) + 1;
   piMask += iMaskStride+1;
+#if QC_DC_PREDICTOR_D0183
+  getPredDCs( pcWedgelet->getPattern(), pcWedgelet->getStride(), piMask, iMaskStride, iPredDC1, iPredDC2 );
+#else
   getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
+#endif
 
   // assign wedge pred DCs to prediction
-  if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip ( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
-  else         { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride,        iPredDC1,                   iPredDC2           ); }
+  if( bDelta ) 
+  { 
+#if HHI_DELTADC_DLT_D0035
+    assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, GetIdx2DepthValue( GetDepthValue2Idx(iPredDC1) + iDeltaDC1 ), GetIdx2DepthValue( GetDepthValue2Idx(iPredDC2) + iDeltaDC2 ) ); 
+#else
+    assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); 
+#endif
+  }
+  else 
+  { 
+    assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, iPredDC1, iPredDC2 ); 
+  }
 }
 
@@ -3626,9 +3679,23 @@
   Int iMaskStride = ( iWidth<<1 ) + 1;
   piMask += iMaskStride+1;
+#if QC_DC_PREDICTOR_D0183
+  getPredDCs( pcContourWedge->getPattern(), pcContourWedge->getStride(), piMask, iMaskStride, iPredDC1, iPredDC2 );
+#else
   getWedgePredDCs( pcContourWedge, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
+#endif
 
   // assign wedge pred DCs to prediction
-  if( bDelta ) { assignWedgeDCs2Pred( pcContourWedge, piPred, uiStride, Clip ( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
-  else         { assignWedgeDCs2Pred( pcContourWedge, piPred, uiStride,        iPredDC1,                   iPredDC2           ); }
+  if( bDelta ) 
+  { 
+#if HHI_DELTADC_DLT_D0035
+    assignWedgeDCs2Pred( pcContourWedge, piPred, uiStride, GetIdx2DepthValue( GetDepthValue2Idx(iPredDC1) + iDeltaDC1 ), GetIdx2DepthValue( GetDepthValue2Idx(iPredDC2) + iDeltaDC2 ) ); 
+#else
+    assignWedgeDCs2Pred( pcContourWedge, piPred, uiStride, Clip( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); 
+#endif
+  }
+  else 
+  { 
+    assignWedgeDCs2Pred( pcContourWedge, piPred, uiStride, iPredDC1, iPredDC2 ); 
+  }
 
   pcContourWedge->destroy();
@@ -3801,9 +3868,23 @@
   Int iMaskStride = ( iWidth<<1 ) + 1;
   piMask += iMaskStride+1;
+#if QC_DC_PREDICTOR_D0183
+  getPredDCs( pcWedgelet->getPattern(), pcWedgelet->getStride(), piMask, iMaskStride, iPredDC1, iPredDC2 );
+#else
   getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
+#endif
 
   // assign wedge pred DCs to prediction
-  if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
-  else         { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, iPredDC1,           iPredDC2           ); }
+  if( bDelta ) 
+  { 
+#if HHI_DELTADC_DLT_D0035
+    assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, GetIdx2DepthValue( GetDepthValue2Idx(iPredDC1) + iDeltaDC1 ), GetIdx2DepthValue( GetDepthValue2Idx(iPredDC2) + iDeltaDC2 ) ); 
+#else
+    assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); 
+#endif
+  }
+  else 
+  { 
+    assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, iPredDC1, iPredDC2 ); 
+  }
 }
 
@@ -3836,9 +3917,23 @@
   Int iMaskStride = ( iWidth<<1 ) + 1;
   piMask += iMaskStride+1;
+#if QC_DC_PREDICTOR_D0183
+  getPredDCs( pcWedgelet->getPattern(), pcWedgelet->getStride(), piMask, iMaskStride, iPredDC1, iPredDC2 );
+#else
   getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAbove, bLeft );
+#endif
 
   // assign wedge pred DCs to prediction
-  if( bDelta ) { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); }
-  else         { assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride,       iPredDC1,                   iPredDC2             ); }
+  if( bDelta ) 
+  { 
+#if HHI_DELTADC_DLT_D0035
+    assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, GetIdx2DepthValue( GetDepthValue2Idx(iPredDC1) + iDeltaDC1 ), GetIdx2DepthValue( GetDepthValue2Idx(iPredDC2) + iDeltaDC2 ) ); 
+#else
+    assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, Clip( iPredDC1+iDeltaDC1 ), Clip( iPredDC2+iDeltaDC2 ) ); 
+#endif
+  }
+  else 
+  { 
+    assignWedgeDCs2Pred( pcWedgelet, piPred, uiStride, iPredDC1, iPredDC2 ); 
+  }
 }
 
Index: /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComPrediction.h
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComPrediction.h	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComPrediction.h	(revision 433)
@@ -249,6 +249,6 @@
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
   Void  predIntraLumaDMM        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight, Bool bAbove, Bool bLeft, Bool bEncoder );
-
   Void  getWedgePredDCs         ( TComWedgelet* pcWedgelet, Int* piMask, Int iMaskStride, Int& riPredDC1, Int& riPredDC2, Bool bAbove, Bool bLeft );
+#endif
   Void  calcWedgeDCs            ( TComWedgelet* pcWedgelet, Pel* piOrig, UInt uiStride, Int& riDC1, Int& riDC2 );
   Void  assignWedgeDCs2Pred     ( TComWedgelet* pcWedgelet, Pel* piPred,  UInt uiStride, Int   iDC1, Int   iDC2 );
Index: /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComWedgelet.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComWedgelet.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TComWedgelet.cpp	(revision 433)
@@ -783,6 +783,11 @@
   Int deltax = x1 - x0;
   Int deltay = abs(y1 - y0);
+#if FIX_WEDGE_NOFLOAT_D0036
+  Int error = 0;
+  Int deltaerr = (deltay<<1);
+#else
   double error = 0.0;
   double deltaerr = (double)deltay / (double)deltax;
+#endif
 
   Int ystep;
@@ -797,8 +802,16 @@
 
     error += deltaerr;
+#if FIX_WEDGE_NOFLOAT_D0036
+    if( error >= deltax )
+#else
     if( error >= 0.5)
+#endif    
     {
       y += ystep;
+#if FIX_WEDGE_NOFLOAT_D0036
+      error = error - (deltax<<1);
+#else
       error = error - 1.0;
+#endif    
     }
   }
Index: /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 433)
@@ -59,7 +59,10 @@
                                               // HHI_DMM_DELTADC_Q1_C0034   JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values
                                               // FIX_DMM_CTX_INIT_C0034 JCT3V-C0034 fix for wrong init type of DMM contexts (UChar instead of Short)
+#define FIX_WEDGE_NOFLOAT_D0036           1   // JCT3V-D0036: Fix for aligning SW and spec (Wedgelet segmentation line generation without float) 
 
 #define LGE_EDGE_INTRA_A0070              1   // JCT3V-A0070
 #define LGE_DMM3_SIMP_C0044               1
+
+#define QC_DC_PREDICTOR_D0183             1   // JCT3V-D0183: Simplified DC predictor for depth intra modes
 
 ///// ***** SDC *********
@@ -67,5 +70,14 @@
                                               // SAIT_SDC_C0096 JCT3V-C0096: Improved Simple Depth Coding(removal of DMM2 among four SDC modes(DC, Planar, DMM1 and DMM2))
                                               // FIX_SDC_ENC_C0143, JCT3V-C0143 fix for unnecessary encoder checks in case of SDC
-
+#if RWTH_SDC_DLT_B0036
+#define HHI_DELTADC_DLT_D0035             1   // JCT3V-D0035: DLT for DMM deltaDC coding
+#define INTEL_SDC64_D0193                 1   // JCT3V-D0193: SDC binary clean up (use a 1 bit binary code to signal sdc_pred_mode when CU size is 64x64)
+#define RWTH_SDC_CTX_SIMPL_D0032          1   // JCT3V-D0032: CABAC Context Reduction for Simplified Depth Coding
+#define LGE_CONCATENATE_D0141                 1 // JCT3V-D0141: concatenate binarization for residual index coding
+#endif
+#define FIX_SDC_ENC_RD_WVSO_D0163         1   // JCT3V-D0163: fix for SDC encoder rd-cost (VSO -> WVSO)
+
+#define PKU_QC_DEPTH_INTRA_UNI_D0195      1   // JCT3V-D0195: unified syntax table for depth intra coding tools
+#define MTK_SAMPLE_BASED_SDC_D0110        1   // JCT3V-D0110: sample based SDC
 ///// ***** TMVP/AMVP *********
 #define TMVP_DEPTH_SWITCH                 1   // JCT3V-B0092 additional encoder option only 
Index: /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 433)
@@ -2479,4 +2479,5 @@
 #endif
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 Void TDecCavlc::parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -2487,4 +2488,5 @@
   assert(0);
 }
+#endif
 Void TDecCavlc::parseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart )
 {
Index: /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.h	(revision 433)
@@ -174,6 +174,8 @@
   Void parseDFSvlc         ( Int&  riVal,  const Char *pSymbolName  );
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   Void parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void parseSDCPredMode    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#endif
   Void parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
 #endif
Index: /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 433)
@@ -1164,9 +1164,14 @@
       UChar ucSegment = pMask?(UChar)pMask[uiX]:0;
       assert( ucSegment < uiNumSegments );
+#if MTK_SAMPLE_BASED_SDC_D0110      
+      Pel pResiDC = apDCResiValues[ucSegment];
       
+      pReco    [ uiX ] = Clip( pPred[ uiX ] + pResiDC );
+#else
       Pel pPredVal= apDCPredValues[ucSegment];
       Pel pResiDC = apDCResiValues[ucSegment];
       
       pReco    [ uiX ] = Clip( pPredVal + pResiDC );
+#endif
       pRecIPred[ uiX ] = pReco[ uiX ];
     }
Index: /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 433)
@@ -130,4 +130,5 @@
   m_pcEntropyDecoderIf->parsePredMode( pcCU, uiAbsPartIdx, uiDepth );
   
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if RWTH_SDC_DLT_B0036
   // if B-Slice, code SDC flag later
@@ -138,8 +139,10 @@
   }
 #endif
+#endif
 }
 
 Void TDecEntropy::decodePartSize( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if RWTH_SDC_DLT_B0036
   if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx)  )
@@ -150,7 +153,9 @@
   }
 #endif
+#endif
   
   m_pcEntropyDecoderIf->parsePartSize( pcCU, uiAbsPartIdx, uiDepth );
   
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if RWTH_SDC_DLT_B0036
   if( pcCU->getSlice()->isInterB() && pcCU->getSlice()->getSPS()->isDepth() && pcCU->isIntra(uiAbsPartIdx) )
@@ -167,8 +172,10 @@
   }
 #endif
+#endif
 }
 
 Void TDecEntropy::decodePredInfo    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU )
 {
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if RWTH_SDC_DLT_B0036
   if( pcCU->getSDCFlag(uiAbsPartIdx) )
@@ -177,4 +184,5 @@
     return;
   }
+#endif
 #endif
   
@@ -191,4 +199,7 @@
       decodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*2, uiDepth+1 );
       decodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*3, uiDepth+1 );
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+      if(!pcCU->getSDCFlag(uiAbsPartIdx))
+#endif
       decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth );
     }
@@ -196,4 +207,7 @@
     {
       decodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx, uiDepth );
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+      if(!pcCU->getSDCFlag(uiAbsPartIdx))
+#endif
       decodeIntraDirModeChroma( pcCU, uiAbsPartIdx, uiDepth );
     }
@@ -852,6 +866,6 @@
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
-    
     decodeSDCResidualData(pcCU, uiAbsPartIdx, uiDepth);
+#endif
     return;
   }
@@ -910,4 +924,5 @@
 
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 Void TDecEntropy::decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -924,5 +939,4 @@
   m_pcEntropyDecoderIf->parseSDCFlag(pcCU, uiAbsPartIdx, uiDepth );
 }
-
 Void TDecEntropy::decodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
Index: /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecEntropy.h
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecEntropy.h	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecEntropy.h	(revision 433)
@@ -140,6 +140,8 @@
   
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   virtual Void parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
   virtual Void parseSDCPredMode     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
+#endif
   virtual Void parseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart ) = 0;
 #endif
@@ -240,6 +242,8 @@
   
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   Void decodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void decodeSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#endif
   Void decodeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
 #endif
Index: /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 433)
@@ -37,9 +37,4 @@
 
 #include "TDecSbac.h"
-
-#if RWTH_SDC_DLT_B0036
-#define GetNumDepthValues()     (pcCU->getSlice()->getSPS()->getNumDepthValues())
-#define GetBitsPerDepthValue()  (pcCU->getSlice()->getSPS()->getBitsPerDepthValue())
-#endif
 
 //! \ingroup TLibDecoder
@@ -103,6 +98,8 @@
 #endif
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 , m_cDmmFlagSCModel           ( 1,             1,               NUM_DMM_FLAG_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cDmmModeSCModel           ( 1,             1,               NUM_DMM_MODE_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
 , m_cDmmDataSCModel           ( 1,             1,               NUM_DMM_DATA_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
 #endif
@@ -114,9 +111,20 @@
 #endif
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 , m_cSDCFlagSCModel             ( 1,             1,                 SDC_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
+#else
+, m_cDepthModeModel             ( 1,             1,                 DEPTH_MODE_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
+, m_cDmmDeltaFlagModel             ( 1,             1,                 DMM_DELTA_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
+#if RWTH_SDC_CTX_SIMPL_D0032
+, 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_cSDCPredModeSCModel             ( 1,             3,                 SDC_NUM_PRED_MODE_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
+#else
 , m_cSDCResidualFlagSCModel     ( 1,             2,  SDC_NUM_RESIDUAL_FLAG_CTX  , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cSDCResidualSignFlagSCModel ( 1,             2,  SDC_NUM_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cSDCResidualSCModel         ( 1,             2,  SDC_NUM_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cSDCPredModeSCModel             ( 1,             3,                 SDC_NUM_PRED_MODE_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
 #endif
 {
@@ -216,13 +224,22 @@
   m_uiLastDQpNonZero  = 0;
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   m_cDmmFlagSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_DMM_FLAG );
   m_cDmmModeSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_DMM_MODE );
+#endif
   m_cDmmDataSCModel.initBuffer           ( sliceType, qp, (UChar*)INIT_DMM_DATA );
 #endif
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   m_cSDCFlagSCModel.initBuffer              ( sliceType, qp, (UChar*)INIT_SDC_FLAG );
+#else
+  m_cDepthModeModel.initBuffer              ( sliceType, qp, (UChar*)INIT_DEPTHMODE_FLAG );
+  m_cDmmDeltaFlagModel.initBuffer           ( sliceType, qp, (UChar*)INIT_DMMDELTA_FLAG );
+#endif
   m_cSDCResidualFlagSCModel.initBuffer      ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
   m_cSDCResidualSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_SDC_RESIDUAL );
+#if !RWTH_SDC_CTX_SIMPL_D0032
   m_cSDCResidualSignFlagSCModel.initBuffer  ( sliceType, qp, (UChar*)INIT_SDC_SIGN_FLAG );
+#endif
   m_cSDCPredModeSCModel.initBuffer              ( sliceType, qp, (UChar*)INIT_SDC_PRED_MODE );
 #endif
@@ -303,13 +320,22 @@
   m_cCUTransSubdivFlagSCModel.initBuffer ( eSliceType, iQp, (UChar*)INIT_TRANS_SUBDIV_FLAG );
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   m_cDmmFlagSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_FLAG );
   m_cDmmModeSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_MODE );
+#endif
   m_cDmmDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_DATA );
 #endif
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
+#else
+  m_cDepthModeModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_DEPTHMODE_FLAG );
+  m_cDmmDeltaFlagModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMMDELTA_FLAG );
+#endif
   m_cSDCResidualFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
   m_cSDCResidualSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
+#if !RWTH_SDC_CTX_SIMPL_D0032
   m_cSDCResidualSignFlagSCModel.initBuffer  ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG );
+#endif
   m_cSDCPredModeSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE );
 #endif
@@ -894,9 +920,110 @@
 }
   
+  UInt uiSymbol;
+  if (bDmmFlag)
+  {
+    if (bDmmFlag)
+    {
+      m_pcTDecBinIf->decodeBin( uiSymbol , m_cDmmDeltaFlagModel.get(0, 0, 0) );
+      uiDir += uiSymbol;
+    }
+    if (uiSymbol)
+    {
+      UInt uiDC;
+      Int iDC = 0,iDC1 = 0,iDC2 = 0;
+      for ( Int i = 0; i  <2; i++ )
+      {
+        xReadExGolombLevel( uiDC, m_cDmmDataSCModel.get(0, 0, 1) );
+        iDC = uiDC;
+        if ( uiDC )
+        {
+          UInt uiSign;
+          m_pcTDecBinIf->decodeBinEP( uiSign );
+          if ( uiSign )
+          {
+            iDC = -iDC;
+          }
+        }
+        if ( i == 0 ) { iDC1 = iDC; }
+        else          { iDC2 = iDC; }
+      }
+
+      if( uiDir == DMM_WEDGE_FULL_D_IDX )   
+      { 
+        pcCU->setWedgeFullDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth );
+        pcCU->setWedgeFullDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth );
+      }
+      else if( uiDir == DMM_WEDGE_PREDDIR_D_IDX ) 
+      { 
+        pcCU->setWedgePredDirDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth );
+        pcCU->setWedgePredDirDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth );
+      }
+      else if( uiDir == DMM_WEDGE_PREDTEX_D_IDX)  
+      { 
+        pcCU->setWedgePredTexDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth );
+        pcCU->setWedgePredTexDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth );
+      }
+      else if (uiDir== DMM_CONTOUR_PREDTEX_D_IDX )
+      {
+        pcCU->setContourPredTexDeltaDC1SubParts( iDC1, uiAbsPartIdx, uiDepth );
+        pcCU->setContourPredTexDeltaDC2SubParts( iDC2, uiAbsPartIdx, uiDepth );
+      }
+    }
+  }
+  else if (uiDir >= EDGE_INTRA_IDX)
+  {
+    m_pcTDecBinIf->decodeBin( uiSymbol, m_cEdgeIntraDeltaDCSCModel.get(0, 0, 0) );
+    if( uiSymbol )
+    {
+      uiDir = EDGE_INTRA_DELTA_IDX;
+      Int iDeltaDC = 0,iDeltaDC0 = 0,iDeltaDC1 = 0;
+      for (Int i = 0; i<2; i++)
+      {
+        xReadExGolombLevel( (UInt &) iDeltaDC, m_cEdgeIntraDeltaDCSCModel.get(0, 0, 1) );
+        if( iDeltaDC != 0 )
+        {
+          UInt uiSign;
+          m_pcTDecBinIf->decodeBinEP( uiSign );
+          if ( uiSign )
+          {
+            iDeltaDC = -iDeltaDC;
+          }
+        }
+        if ( i == 0 ) { iDeltaDC0 = iDeltaDC; }
+        else          { iDeltaDC1 = iDeltaDC; }
+      }
+
+      pcCU->setEdgeDeltaDC0( uiAbsPartIdx, iDeltaDC0 );
+      pcCU->setEdgeDeltaDC1( uiAbsPartIdx, iDeltaDC1 );
+    }
+  }
+  else if(bSdcFlag)//SDC mode
+  {
+    assert(pcCU->getPartitionSize(uiAbsPartIdx)!=SIZE_NxN);
+    pcCU->setTrIdxSubParts(0, uiAbsPartIdx, uiDepth);
+    pcCU->setCbfSubParts(1, 1, 1, uiAbsPartIdx, uiDepth);
+
+    UInt uiNumSegments = ( uiDir == DC_IDX || uiDir == PLANAR_IDX )? 1 : 2;
+    for (int uiSeg=0; uiSeg<uiNumSegments; uiSeg++)
+    {
+      parseSDCResidualData(pcCU, uiAbsPartIdx, uiDepth, uiSeg);
+    }
+  }
+
+  pcCU->setLumaIntraDirSubParts( (UChar)uiDir, uiAbsPartIdx, uiDepth );
+}
+#endif
 Void TDecSbac::parseIntraDirLumaAng  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
   UInt uiSymbol;
   Int  intraPredMode;
-
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+  if (pcCU->getSlice()->getSPS()->isDepth())
+  {
+    parseDepthModelingTable(pcCU, uiAbsPartIdx, uiDepth);
+  }
+  if (pcCU->getLumaIntraDir(uiAbsPartIdx)<NUM_INTRA_MODE && !pcCU->getSDCFlag(uiAbsPartIdx))
+  {
+#else
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
   UInt uiFlag = 0;
@@ -952,10 +1079,11 @@
     }
 #endif
-
     Int uiPreds[3] = {-1, -1, -1};
     Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds);  
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if LGE_EDGE_INTRA_A0070
     UInt uiCheckBit = 0;
 #endif
+#endif
 
     m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUIntraPredSCModel.get( 0, 0, 0) );
@@ -977,4 +1105,5 @@
 
       m_pcTDecBinIf->decodeBinsEP( uiSymbol, 5 );
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if LGE_EDGE_INTRA_A0070
       if (bCodeEdgeIntra)
@@ -987,4 +1116,5 @@
         }
       }
+#endif
 #endif
       intraPredMode = uiSymbol;
@@ -1003,17 +1133,22 @@
         std::swap(uiPreds[1], uiPreds[2]);
       }
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if LGE_EDGE_INTRA_A0070
       if ( intraPredMode != EDGE_INTRA_IDX)
       {
 #endif
+#endif
         for ( Int i = 0; i < uiPredNum; i++ )
         {
           intraPredMode += ( intraPredMode >= uiPreds[i] );
         }
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if LGE_EDGE_INTRA_A0070
       }
 #endif
-    }
-
+#endif
+    }
+
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if LGE_EDGE_INTRA_A0070
     if( intraPredMode == EDGE_INTRA_IDX )
@@ -1059,6 +1194,9 @@
   }
 #endif
-
   pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, uiAbsPartIdx, uiDepth );
+#else
+  pcCU->setLumaIntraDirSubParts( (UChar)intraPredMode, uiAbsPartIdx, uiDepth );
+}
+#endif
 }
 
@@ -2629,4 +2767,5 @@
   
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 Void TDecSbac::parseSDCFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
@@ -2661,4 +2800,7 @@
   {
     UInt uiIsMostProb = 0;
+#if INTEL_SDC64_D0193
+    if( !(pcCU->getWidth(uiAbsPartIdx) == 64 && i == 1))
+#endif
     m_pcTDecBinIf->decodeBin( uiIsMostProb, m_cSDCPredModeSCModel.get( 0, i, uiCtx ) );
     
@@ -2679,4 +2821,5 @@
   pcCU->setLumaIntraDirSubParts((UChar)intraPredMode, uiAbsPartIdx, uiDepth);
 }
+#endif
 
 Void TDecSbac::parseSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSegment )
@@ -2692,20 +2835,59 @@
   Int  iIdx       = 0;
   
-  UInt uiMaxResidualBits  = GetBitsPerDepthValue();
+  UInt uiMaxResidualBits  = pcCU->getSlice()->getSPS()->getBitsPerDepthValue();
   assert( uiMaxResidualBits <= g_uiBitDepth );
   
+#if RWTH_SDC_CTX_SIMPL_D0032
+  m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) );
+#else
   m_pcTDecBinIf->decodeBin(uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) );
+#endif
   
   if (uiResidual)
   {
     // decode residual sign bit
+#if RWTH_SDC_CTX_SIMPL_D0032
+    m_pcTDecBinIf->decodeBinEP(uiSign);
+#else
     m_pcTDecBinIf->decodeBin(uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) );
+#endif
     
     // decode residual magnitude
+#if LGE_CONCATENATE_D0141
+    //prefix part
+    UInt uiCount = 0;
+    UInt uiNumDepthValues = pcCU->getSlice()->getSPS()->getNumDepthValues();
+    UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2);
+    for ( UInt ui = 0; ui < uiPrefixThreshold; ui++)
+    {
+        m_pcTDecBinIf->decodeBin( uiBit, m_cSDCResidualSCModel.get(0, 0, 0) );
+        if ( uiBit == 0 )
+            break;
+        else
+            uiCount++;
+    }
+    //suffix part
+    if ( uiCount == uiPrefixThreshold )
+    {
+        for ( UInt ui = 0; ui < ( (UInt)ceil( Log2(uiNumDepthValues - uiPrefixThreshold) ) ); ui++ )
+        {
+            m_pcTDecBinIf->decodeBinEP( uiBit );
+            uiAbsIdx |= uiBit << ui;
+        }
+        uiAbsIdx += uiCount;
+    }
+    else
+        uiAbsIdx = uiCount;
+#else
     for (Int i=0; i<uiMaxResidualBits; i++)
     {
+#if RWTH_SDC_CTX_SIMPL_D0032
+      m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, 0, i ) );
+#else
       m_pcTDecBinIf->decodeBin(uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) );
+#endif
       uiAbsIdx |= uiBit << i;
     }
+#endif
     
     uiAbsIdx += 1;
Index: /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecSbac.h	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibDecoder/TDecSbac.h	(revision 433)
@@ -129,6 +129,8 @@
   
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   Void parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void parseSDCPredMode    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
+#endif
   Void parseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
 #endif
@@ -190,5 +192,4 @@
   Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
-  
   Void parseIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
   
@@ -273,6 +274,8 @@
 
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   ContextModel3DBuffer m_cDmmFlagSCModel;
   ContextModel3DBuffer m_cDmmModeSCModel;
+#endif
   ContextModel3DBuffer m_cDmmDataSCModel;
 #endif
@@ -285,8 +288,15 @@
   
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   ContextModel3DBuffer m_cSDCFlagSCModel;
+#else
+  ContextModel3DBuffer m_cDepthModeModel;
+  ContextModel3DBuffer m_cDmmDeltaFlagModel;
+#endif
   
   ContextModel3DBuffer m_cSDCResidualFlagSCModel;
+#if !RWTH_SDC_CTX_SIMPL_D0032
   ContextModel3DBuffer m_cSDCResidualSignFlagSCModel;
+#endif
   ContextModel3DBuffer m_cSDCResidualSCModel;
   
Index: /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 433)
@@ -1436,5 +1436,9 @@
 }
 
-Void TEncCavlc::codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx )
+Void TEncCavlc::codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+                                    , Bool bSdcRD
+#endif
+                                    )
 {
   assert(0);
@@ -1915,14 +1919,15 @@
 
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 Void TEncCavlc::codeSDCFlag ( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
   assert(0);
 }
-
+#endif
 Void TEncCavlc::codeSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment )
 {
   assert(0);
 }
-
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 Void TEncCavlc::codeSDCPredMode ( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
@@ -1930,3 +1935,4 @@
 }
 #endif
+#endif
 //! \}
Index: /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncCavlc.h	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncCavlc.h	(revision 433)
@@ -194,5 +194,9 @@
   Void codeQtRootCbf     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
   
-  Void codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx );
+  Void codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+    , Bool bSdcRD = false
+#endif
+    );
   
   Void codeIntraDirChroma( TComDataCU* pcCU, UInt uiAbsPartIdx );
@@ -220,8 +224,12 @@
   
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   Void codeSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+#endif
   Void codeSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   Void codeSDCPredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
 #endif
+#endif
 
 };
Index: /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 433)
@@ -877,4 +877,5 @@
   }
 #endif
+#endif
 }
 
@@ -917,4 +918,5 @@
     }
   }
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if RWTH_SDC_DLT_B0036
   if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx)  )
@@ -924,7 +926,9 @@
   }
 #endif
+#endif
   
   m_pcEntropyCoderIf->codePartSize( pcCU, uiAbsPartIdx, uiDepth );
   
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if RWTH_SDC_DLT_B0036
   // code SDC flag now!
@@ -940,4 +944,5 @@
     }
   }
+#endif
 #endif
 }
@@ -1220,7 +1225,15 @@
 
 // Intra direction for Luma
-Void TEncEntropy::encodeIntraDirModeLuma  ( TComDataCU* pcCU, UInt uiAbsPartIdx )
-{
-  m_pcEntropyCoderIf->codeIntraDirLumaAng( pcCU, uiAbsPartIdx );
+Void TEncEntropy::encodeIntraDirModeLuma  ( TComDataCU* pcCU, UInt uiAbsPartIdx 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+                                           ,Bool bSdcRD
+#endif
+                                           )
+{
+  m_pcEntropyCoderIf->codeIntraDirLumaAng( pcCU, uiAbsPartIdx 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+    ,bSdcRD
+#endif
+    );
 }
 
@@ -1236,5 +1249,9 @@
 }
 
-Void TEncEntropy::encodePredInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
+Void TEncEntropy::encodePredInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+                                 ,Bool bSdcRD
+#endif
+                                 )
 {
   if( bRD )
@@ -1243,4 +1260,5 @@
   }
 
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if RWTH_SDC_DLT_B0036
   if( pcCU->getSDCFlag(uiAbsPartIdx) )
@@ -1249,4 +1267,5 @@
     return;
   }
+#endif
 #endif
 
@@ -1263,9 +1282,12 @@
       encodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*2 );
       encodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*3 );
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+      if(!pcCU->getSDCFlag(uiAbsPartIdx))
+#endif
       encodeIntraDirModeChroma( pcCU, uiAbsPartIdx, bRD );
     }
     else                                                              // if it is not NxN size, encode 1 intra directions
     {
-      encodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx );
+      encodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx 
       encodeIntraDirModeChroma( pcCU, uiAbsPartIdx, bRD );
     }
@@ -1465,6 +1487,6 @@
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
-    
     encodeSDCResidualData(pcCU, uiAbsPartIdx);
+#endif
     return;
   }
@@ -1862,4 +1884,5 @@
 
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 Void TEncEntropy::encodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
@@ -1881,5 +1904,4 @@
   m_pcEntropyCoderIf->codeSDCFlag(pcCU, uiAbsPartIdx);
 }
-
 Void TEncEntropy::encodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
Index: /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncEntropy.h	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncEntropy.h	(revision 433)
@@ -126,7 +126,11 @@
   
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   virtual Void codeSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
+#endif
   virtual Void codeSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment ) = 0;
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   virtual Void codeSDCPredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
+#endif
 #endif
   
@@ -136,5 +140,9 @@
   virtual Void codeQtCbf         ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth ) = 0;
   virtual Void codeQtRootCbf     ( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
-  virtual Void codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
+  virtual Void codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+    , Bool bSdcRD = false
+#endif
+    ) = 0;
   
   virtual Void codeIntraDirChroma( TComDataCU* pcCU, UInt uiAbsPartIdx ) = 0;
@@ -279,6 +287,14 @@
   Void encodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool bRD = false );
   Void encodeIPCMInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
-  Void encodePredInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
-  Void encodeIntraDirModeLuma  ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+  Void encodePredInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+    ,Bool bSdcRD = false
+#endif
+    );
+  Void encodeIntraDirModeLuma  ( TComDataCU* pcCU, UInt uiAbsPartIdx 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+ ,Bool bSdcRD = false 
+#endif
+    );
   
   Void encodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
@@ -298,7 +314,11 @@
   
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   Void encodeSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
+#endif
   Void encodeSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   Void encodeSDCPredMode   ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD = false );
+#endif
 #endif
 
Index: /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 433)
@@ -41,9 +41,4 @@
 #include <map>
 #include <algorithm>
-
-#if RWTH_SDC_DLT_B0036
-#define GetNumDepthValues()     (pcCU->getSlice()->getSPS()->getNumDepthValues())
-#define GetBitsPerDepthValue()  (pcCU->getSlice()->getSPS()->getBitsPerDepthValue())
-#endif
 
 //! \ingroup TLibEncoder
@@ -111,6 +106,8 @@
 #endif
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 , m_cDmmFlagSCModel           ( 1,             1,               NUM_DMM_FLAG_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cDmmModeSCModel           ( 1,             1,               NUM_DMM_MODE_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
 , m_cDmmDataSCModel           ( 1,             1,               NUM_DMM_DATA_CTX              , m_contextModels + m_numContextModels, m_numContextModels)
 #endif
@@ -122,9 +119,20 @@
 #endif
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 , m_cSDCFlagSCModel             ( 1,             1,                 SDC_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
+#else
+, m_cDepthModeModel             ( 1,             1,                 DEPTH_MODE_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
+, m_cDmmDeltaFlagModel             ( 1,             1,                 DMM_DELTA_NUM_FLAG_CTX           , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
+#if RWTH_SDC_CTX_SIMPL_D0032
+, 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_cSDCPredModeSCModel             ( 1,             3,                 SDC_NUM_PRED_MODE_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
+#else
 , m_cSDCResidualFlagSCModel     ( 1,             2,  SDC_NUM_RESIDUAL_FLAG_CTX  , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cSDCResidualSignFlagSCModel ( 1,             2,  SDC_NUM_SIGN_FLAG_CTX      , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cSDCResidualSCModel         ( 1,             2,  SDC_NUM_RESIDUAL_CTX       , m_contextModels + m_numContextModels, m_numContextModels)
 , m_cSDCPredModeSCModel             ( 1,             3,                 SDC_NUM_PRED_MODE_CTX     , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
 #endif
 {
@@ -203,6 +211,8 @@
 #endif
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   m_cDmmFlagSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_FLAG );
   m_cDmmModeSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_MODE );
+#endif
   m_cDmmDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_DATA );
 #endif
@@ -214,8 +224,15 @@
 #endif
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
+#else
+  m_cDepthModeModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_DEPTHMODE_FLAG );
+  m_cDmmDeltaFlagModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMMDELTA_FLAG );
+#endif
   m_cSDCResidualFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
   m_cSDCResidualSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
+#if !RWTH_SDC_CTX_SIMPL_D0032
   m_cSDCResidualSignFlagSCModel.initBuffer  ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG );
+#endif
   m_cSDCPredModeSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE );
 #endif
@@ -369,13 +386,22 @@
 #endif
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   m_cDmmFlagSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_FLAG );
   m_cDmmModeSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_MODE );
+#endif
   m_cDmmDataSCModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMM_DATA );
 #endif
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   m_cSDCFlagSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_FLAG );
+#else
+  m_cDepthModeModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_DEPTHMODE_FLAG );
+  m_cDmmDeltaFlagModel.initBuffer           ( eSliceType, iQp, (UChar*)INIT_DMMDELTA_FLAG );
+#endif
   m_cSDCResidualFlagSCModel.initBuffer      ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL_FLAG );
   m_cSDCResidualSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_SDC_RESIDUAL );
+#if !RWTH_SDC_CTX_SIMPL_D0032
   m_cSDCResidualSignFlagSCModel.initBuffer  ( eSliceType, iQp, (UChar*)INIT_SDC_SIGN_FLAG );
+#endif
   m_cSDCPredModeSCModel.initBuffer              ( eSliceType, iQp, (UChar*)INIT_SDC_PRED_MODE );
 #endif
@@ -571,5 +597,13 @@
 }
 
-
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+Void TEncSbac::loadDepthMode( TEncSbac* pSrc)
+{
+  m_pcBinIf->copyState( pSrc->m_pcBinIf );
+
+  this->m_cDepthModeModel      .copyFrom( &pSrc->m_cDepthModeModel       );
+  this->m_cDmmDeltaFlagModel   .copyFrom( &pSrc->m_cDmmDeltaFlagModel       );
+}
+#endif
 Void  TEncSbac::store( TEncSbac* pDest)
 {
@@ -1012,9 +1046,150 @@
 }
 #endif
-
-Void TEncSbac::codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx )
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+Void TEncSbac::codeDepthIntraMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
+{
+  UInt uiCodeWordTable[3][9] =    {{0, 0, 0, 2, 0,6, 0, 0, 7},{0, 2, 3, 4, 5, 6, 14, 31, 30},{0, 2, 0, 0, 0, 0, 3, 0, 0}};
+  UInt uiCodeWordLenTable[3][9] = {{0, 1, 0, 2, 0,3, 0, 0, 3},{2, 3, 3, 3, 3, 3,  4,  5,  5},{1, 2, 0, 0, 0, 0, 2, 0, 0}};
+  UInt uiDir = pcCU->getLumaIntraDir(uiAbsPartIdx);
+  Bool bSdcFlag = pcCU->getSDCFlag(uiAbsPartIdx);
+  UInt uiPuIdx = ( pcCU->getWidth(uiAbsPartIdx) == 64 )? 2 : ( ( pcCU->getPartitionSize(uiAbsPartIdx) == SIZE_NxN && pcCU->getWidth(uiAbsPartIdx) == 8 ) ? 0 : 1 );
+  UInt uiCodeIdx = 0;
+  if ( bSdcFlag ) 
+  { 
+    switch(uiDir)
+    {
+      case PLANAR_IDX: uiCodeIdx = 0; break;
+      case DC_IDX:     uiCodeIdx = 6; break;
+      default:         uiCodeIdx = 2;
+    }
+  }
+  else if ( uiDir>=EDGE_INTRA_IDX ) 
+  { 
+    uiCodeIdx = 8; 
+  }
+  else if ( uiDir<NUM_INTRA_MODE )  
+  { 
+    uiCodeIdx = 1; 
+  }
+  else 
+  {
+    if (uiDir== DMM_WEDGE_FULL_IDX     || uiDir==DMM_WEDGE_FULL_D_IDX     )     {uiCodeIdx = 3;}
+    if (uiDir== DMM_CONTOUR_PREDTEX_IDX|| uiDir==DMM_CONTOUR_PREDTEX_D_IDX)     {uiCodeIdx = 4;}
+    if (uiDir== DMM_WEDGE_PREDTEX_IDX  || uiDir==DMM_WEDGE_PREDTEX_D_IDX  )     {uiCodeIdx = 5;}
+    if (uiDir== DMM_WEDGE_PREDDIR_IDX  || uiDir==DMM_WEDGE_PREDDIR_D_IDX  )     {uiCodeIdx = 7;}
+  }
+  //mode coding
+  for (UInt i=0; i<uiCodeWordLenTable[uiPuIdx][uiCodeIdx]; i++)
+  {
+    UInt uiBit = uiCodeWordTable[uiPuIdx][uiCodeIdx] & ( 1<<(uiCodeWordLenTable[uiPuIdx][uiCodeIdx]-i-1) );
+    UInt uiCtxDepthMode = uiPuIdx*3 + ( i >= 2? 2 : i );
+    m_pcBinIf->encodeBin( uiBit!=0 , m_cDepthModeModel.get(0, 0, uiCtxDepthMode) );
+  }
+}
+Void TEncSbac::codeDepthModelingTable( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bSdcRD)
+{
+  UInt uiDir = pcCU->getLumaIntraDir( uiAbsPartIdx );
+  Bool bSdcFlag =  pcCU->getSDCFlag(uiAbsPartIdx);
+  Bool bDmmFlag = (uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX &&(!bSdcFlag))? 1:0;
+
+  codeDepthIntraMode(pcCU,uiAbsPartIdx);
+  
+  if (uiDir >= NUM_INTRA_MODE && uiDir < EDGE_INTRA_IDX )//DMM modes or SDC DMM1
+  {
+    assert(pcCU->getWidth(uiAbsPartIdx)<64);
+    assert(pcCU->getWidth(uiAbsPartIdx)<64);
+    if( uiDir == DMM_WEDGE_FULL_IDX || uiDir == DMM_WEDGE_FULL_D_IDX)             { xCodeWedgeFullInfo     ( pcCU, uiAbsPartIdx ); }
+    else if( uiDir == DMM_WEDGE_PREDTEX_IDX || uiDir == DMM_WEDGE_PREDTEX_D_IDX ) { xCodeWedgePredTexInfo  ( pcCU, uiAbsPartIdx ); }
+    else if( uiDir == DMM_WEDGE_PREDDIR_IDX || uiDir == DMM_WEDGE_PREDDIR_D_IDX)  { xCodeWedgePredDirInfo  ( pcCU, uiAbsPartIdx ); }
+  } 
+  else if(uiDir >= EDGE_INTRA_IDX)//CCM mode
+  {
+    assert(pcCU->getWidth(uiAbsPartIdx)<64);
+    xCodeEdgeIntraInfo( pcCU, uiAbsPartIdx );
+  }
+
+  if (bDmmFlag)
+  {
+    m_pcBinIf->encodeBin( (uiDir&1) , m_cDmmDeltaFlagModel.get(0, 0, 0) );
+    if (uiDir&1)
+    {
+      Int iDeltaDC1 = 0,iDeltaDC2 = 0;
+      if ( uiDir == DMM_WEDGE_FULL_D_IDX )
+      {
+        iDeltaDC1 = pcCU->getWedgeFullDeltaDC1( uiAbsPartIdx );
+        iDeltaDC2 = pcCU->getWedgeFullDeltaDC2( uiAbsPartIdx );
+      }
+      else if ( uiDir == DMM_WEDGE_PREDTEX_D_IDX )
+      {
+        iDeltaDC1 = pcCU->getWedgePredTexDeltaDC1( uiAbsPartIdx );
+        iDeltaDC2 = pcCU->getWedgePredTexDeltaDC2( uiAbsPartIdx );
+      }
+      else if ( uiDir == DMM_WEDGE_PREDDIR_D_IDX )
+      {
+        iDeltaDC1 = pcCU->getWedgePredDirDeltaDC1( uiAbsPartIdx );
+        iDeltaDC2 = pcCU->getWedgePredDirDeltaDC2( uiAbsPartIdx );
+      }
+      else if ( uiDir == DMM_CONTOUR_PREDTEX_D_IDX )
+      {
+        iDeltaDC1 = pcCU->getContourPredTexDeltaDC1( uiAbsPartIdx );
+        iDeltaDC2 = pcCU->getContourPredTexDeltaDC2( uiAbsPartIdx );
+
+      }
+
+      for ( Int i = 0; i < 2; i++ )
+      {
+        Int iDeltaDC = (i==0)? iDeltaDC1 : iDeltaDC2;
+        xWriteExGolombLevel( UInt( abs( iDeltaDC ) ), m_cDmmDataSCModel.get(0, 0, 1) );
+        if ( iDeltaDC != 0 )
+        {
+          UInt uiSign = iDeltaDC > 0 ? 0 : 1;
+          m_pcBinIf->encodeBinEP( uiSign );
+        }
+      }
+    }
+  }
+  else if (uiDir>=EDGE_INTRA_IDX)
+  {
+    m_pcBinIf->encodeBin( (uiDir == EDGE_INTRA_DELTA_IDX), m_cEdgeIntraDeltaDCSCModel.get(0, 0, 0) );
+    if( uiDir == EDGE_INTRA_DELTA_IDX )
+    {
+      Int iDeltaDC0 = pcCU->getEdgeDeltaDC0( uiAbsPartIdx );
+      Int iDeltaDC1 = pcCU->getEdgeDeltaDC1( uiAbsPartIdx );
+
+      for ( Int i = 0; i < 2; i++ )
+      {
+        Int iDeltaDC = (i==0)? iDeltaDC0 : iDeltaDC1;
+        xWriteExGolombLevel( UInt( abs( iDeltaDC ) ), m_cEdgeIntraDeltaDCSCModel.get(0, 0, 1) );
+        if ( iDeltaDC != 0 )
+        {
+          UInt uiSign = iDeltaDC > 0 ? 0 : 1;
+          m_pcBinIf->encodeBinEP( uiSign );
+        }
+      }
+    }
+  }
+  if (pcCU->getSDCFlag(uiAbsPartIdx))//SDC mode
+  {
+    assert(pcCU->getPartitionSize(uiAbsPartIdx)==SIZE_2Nx2N);
+    UInt uiNumSegments = ( uiDir == DC_IDX || uiDir == PLANAR_IDX )? 1 : 2;
+    if(!bSdcRD)
+    {
+      for (int uiSeg=0; uiSeg<uiNumSegments; uiSeg++)
+      {
+        codeSDCResidualData(pcCU, uiAbsPartIdx, uiSeg);
+      }
+    }
+  }
+}
+#endif
+Void TEncSbac::codeIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+                                   , Bool bSdcRD
+#endif
+                                   )
 {
   UInt uiDir         = pcCU->getLumaIntraDir( uiAbsPartIdx );
 
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
   if( pcCU->getSlice()->getSPS()->getUseDMM() && pcCU->getWidth( uiAbsPartIdx ) <= DMM_WEDGEMODEL_MAX_SIZE )
@@ -1116,5 +1291,12 @@
   }
 #endif
-  
+#else
+  if (pcCU->getSlice()->getSPS()->isDepth())
+  {
+    codeDepthModelingTable(pcCU, uiAbsPartIdx, bSdcRD);
+  }
+  if (pcCU->getLumaIntraDir(uiAbsPartIdx)<NUM_INTRA_MODE && !pcCU->getSDCFlag(uiAbsPartIdx))
+  {
+#endif
   Int uiPreds[3] = {-1, -1, -1};
   Int uiPredNum = pcCU->getIntraDirLumaPredictor(uiAbsPartIdx, uiPreds);  
@@ -1162,12 +1344,19 @@
 
     m_pcBinIf->encodeBinsEP( uiDir, 5 );
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if LGE_EDGE_INTRA_A0070
   if (bCodeEdgeIntra)
     if (uiDir == 31) m_pcBinIf->encodeBinsEP(0,1);
 #endif
+#endif
    }
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+   }
+#else
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
   }
 #endif
+#endif
+
   return;
 }
@@ -2516,4 +2705,5 @@
 
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 Void TEncSbac::codeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
@@ -2530,4 +2720,7 @@
   {
     UInt uiBit = (uiPredMode == g_auiSDCPredModes[uiMPModeIdx]) ? 1 : 0;
+#if INTEL_SDC64_D0193
+    if( !(pcCU->getWidth(uiAbsPartIdx) == 64 && i == 1))
+#endif
     m_pcBinIf->encodeBin( uiBit, m_cSDCPredModeSCModel.get( 0, i, uiCtx ) );
     
@@ -2556,4 +2749,5 @@
   
 }
+#endif
 
 Void TEncSbac::codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment )
@@ -2569,27 +2763,74 @@
   UInt uiSign     = segmentDCOffset < 0 ? 1 : 0;
   UInt uiAbsIdx   = abs(segmentDCOffset);
+#if !LGE_CONCATENATE_D0141
   UInt uiBit = 0;
-  
-  UInt uiMaxResidualBits  = GetBitsPerDepthValue();
+#endif
+  
+  UInt uiMaxResidualBits  = pcCU->getSlice()->getSPS()->getBitsPerDepthValue();
   assert( uiMaxResidualBits <= g_uiBitDepth );
   
   // residual flag
+#if RWTH_SDC_CTX_SIMPL_D0032
+  m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, 0, 0 ) );
+#else
   m_pcBinIf->encodeBin( uiResidual, m_cSDCResidualFlagSCModel.get( 0, uiSegment, 0 ) ); //TODO depthmap: more sophisticated context selection
+#endif
   
   if (uiResidual)
   {
     // encode sign bit of residual
+#if RWTH_SDC_CTX_SIMPL_D0032
+    m_pcBinIf->encodeBinEP( uiSign );
+#else
     m_pcBinIf->encodeBin( uiSign, m_cSDCResidualSignFlagSCModel.get( 0, uiSegment, 0 ) ); //TODO depthmap: more sophisticated context selection
+#endif
         
-    assert(uiAbsIdx < GetNumDepthValues());
+    UInt uiNumDepthValues = pcCU->getSlice()->getSPS()->getNumDepthValues();
+    assert(uiAbsIdx < uiNumDepthValues);
     
     // encode residual magnitude
     uiAbsIdx -= 1;
+#if LGE_CONCATENATE_D0141
+    //prefix part
+    if ( uiAbsIdx == 0 )
+        m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) );
+    else
+    {
+        UInt l = uiAbsIdx;
+        UInt k = 0;
+        UInt uiPrefixThreshold = ((uiNumDepthValues * 3) >> 2);
+        while ( l > 0 && k < uiPrefixThreshold )
+        {
+            m_pcBinIf->encodeBin( 1, m_cSDCResidualSCModel.get(0, 0, 0) );
+            l--;
+            k++;
+        }
+        if ( uiAbsIdx < uiPrefixThreshold )
+            m_pcBinIf->encodeBin( 0, m_cSDCResidualSCModel.get(0, 0, 0) );
+        //suffix part
+        else
+        {
+            uiAbsIdx -= uiPrefixThreshold;
+            UInt uiSuffixLength = ( (UInt)ceil( Log2(uiNumDepthValues - uiPrefixThreshold) ) );
+            UInt uiBitInfo = 0;
+            for ( Int i = 0; i < uiSuffixLength; i++)
+            {
+                uiBitInfo = ( uiAbsIdx & ( 1 << i ) ) >> i;
+                m_pcBinIf->encodeBinEP( uiBitInfo);
+            }
+        }
+    }
+#else
     for (Int i=0; i<uiMaxResidualBits; i++)
     {
       uiBit = (uiAbsIdx & (1<<i))>>i;
       
+#if RWTH_SDC_CTX_SIMPL_D0032
+      m_pcBinIf->encodeBin( uiBit, m_cSDCResidualSCModel.get( 0, 0, i ) );
+#else
       m_pcBinIf->encodeBin( uiBit, m_cSDCResidualSCModel.get( 0, uiSegment, i ) ); //TODO depthmap: more sophisticated context selection
-    }
+#endif
+    }
+#endif
     
   }
Index: /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncSbac.h	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncSbac.h	(revision 433)
@@ -92,4 +92,7 @@
   Void  load                   ( TEncSbac* pScr  );
   Void  loadIntraDirModeLuma   ( TEncSbac* pScr  );
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+  Void  loadDepthMode          ( TEncSbac* pSrc  );
+#endif
   Void  store                  ( TEncSbac* pDest );
   Void  loadContexts           ( TEncSbac* pScr  );
@@ -145,7 +148,11 @@
   
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   Void codeSDCFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+#endif
   Void codeSDCResidualData  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment );
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   Void codeSDCPredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+#endif
 #endif
 
@@ -233,6 +240,13 @@
   Void codeQtCbf               ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth );
   Void codeQtRootCbf           ( TComDataCU* pcCU, UInt uiAbsPartIdx );
-  
-  Void codeIntraDirLumaAng     ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+  Void codeDepthIntraMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
+  Void codeDepthModelingTable  ( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bSdcRD = false );
+#endif
+  Void codeIntraDirLumaAng     ( TComDataCU* pcCU, UInt uiAbsPartIdx 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+    , Bool bSdcRD = false
+#endif
+    );
   
   Void codeIntraDirChroma      ( TComDataCU* pcCU, UInt uiAbsPartIdx );
@@ -319,6 +333,8 @@
 
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   ContextModel3DBuffer m_cDmmFlagSCModel;
   ContextModel3DBuffer m_cDmmModeSCModel;
+#endif
   ContextModel3DBuffer m_cDmmDataSCModel;
 #endif
@@ -331,8 +347,15 @@
   
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
   ContextModel3DBuffer m_cSDCFlagSCModel;
+#else
+  ContextModel3DBuffer m_cDepthModeModel;
+  ContextModel3DBuffer m_cDmmDeltaFlagModel;
+#endif
   
   ContextModel3DBuffer m_cSDCResidualFlagSCModel;
+#if !RWTH_SDC_CTX_SIMPL_D0032
   ContextModel3DBuffer m_cSDCResidualSignFlagSCModel;
+#endif
   ContextModel3DBuffer m_cSDCResidualSCModel;
   
Index: /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 432)
+++ /branches/HTM-6.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 433)
@@ -912,5 +912,9 @@
       if( uiAbsPartIdx == 0 )
       {
-        m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 );
+        m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+         ,true
+#endif
+          );
       }
     }
@@ -1705,9 +1709,14 @@
       UChar ucSegment = pMask?(UChar)pMask[uiX]:0;
       assert( ucSegment < uiNumSegments );
+#if MTK_SAMPLE_BASED_SDC_D0110      
+      Pel pResiDC = apDCResiValues[ucSegment];
       
+      pReco    [ uiX ] = Clip( pPred[ uiX ] + pResiDC );
+#else
       Pel pPredVal= apDCPredValues[ucSegment];
       Pel pResiDC = apDCResiValues[ucSegment];
       
       pReco    [ uiX ] = Clip( pPredVal + pResiDC );
+#endif
       pRecIPred[ uiX ] = pReco[ uiX ];
     }
@@ -1739,4 +1748,15 @@
   if ( m_pcRdCost->getUseVSO() )
   {
+#if FIX_SDC_ENC_RD_WVSO_D0163 && LGE_WVSO_A0119
+    if ( m_pcRdCost->getUseWVSO() )
+    {    
+      Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
+      Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
+      Dist iD = (Dist) m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );
+      Dist iVSO = m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
+      ruiDist += (iDWeight * iD + iVSOWeight * iVSO) / ( iDWeight + iVSOWeight);
+    }
+    else
+#endif
     ruiDist = m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
   }
@@ -1755,6 +1775,9 @@
   
   // encode pred direction + residual data
-  m_pcEntropyCoder->encodePredInfo( pcCU, 0, true );
-  
+  m_pcEntropyCoder->encodePredInfo( pcCU, 0, true 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+    ,true
+#endif
+    );
   UInt   uiBits = m_pcEntropyCoder->getNumberOfWrittenBits();
   
@@ -5997,4 +6020,7 @@
     // Reload only contexts required for coding intra mode information
     m_pcRDGoOnSbacCoder->loadIntraDirModeLuma( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+    m_pcRDGoOnSbacCoder->loadDepthMode( m_pppcRDSbacCoder[uiDepth][CI_CURR_BEST] );
+#endif
   }
   
@@ -6002,5 +6028,9 @@
   
   m_pcEntropyCoder->resetBits();
-  m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiPartOffset);
+  m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, uiPartOffset
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+    ,true
+#endif
+    );
   
   return m_pcEntropyCoder->getNumberOfWrittenBits();
@@ -6412,5 +6442,9 @@
   Int iMaskStride = ( uiWidth<<1 ) + 1;
   piMask += iMaskStride+1;
+#if QC_DC_PREDICTOR_D0183
+  getPredDCs( pcWedgelet->getPattern(), pcWedgelet->getStride(), piMask, iMaskStride, iPredDC1, iPredDC2 );
+#else
   getWedgePredDCs( pcWedgelet, piMask, iMaskStride, iPredDC1, iPredDC2, bAboveAvail, bLeftAvail );
+#endif
 
   riDeltaDC1 = iDC1 - iPredDC1;
@@ -6589,4 +6623,8 @@
 #endif
 
+#if HHI_DELTADC_DLT_D0035
+  riDeltaDC1 = (Int)GetDepthValue2Idx( Clip(iPredDC1 + riDeltaDC1) ) - (Int)GetDepthValue2Idx( iPredDC1 );
+  riDeltaDC2 = (Int)GetDepthValue2Idx( Clip(iPredDC2 + riDeltaDC2) ) - (Int)GetDepthValue2Idx( iPredDC2 );
+#endif
 }
 #endif
@@ -7973,4 +8011,7 @@
 
   // PredDC Calculation
+#if QC_DC_PREDICTOR_D0183
+  getPredDCs( pbRegion, uiWidth, piMask+iMaskStride+1, iMaskStride, iPredDC0, iPredDC1 );
+#else
   {
     UInt uiSum0 = 0;
@@ -8012,4 +8053,5 @@
     iPredDC1 = uiSum1 / uiCount1;
   }
+#endif
 
   iDeltaDC0 = iDC0 - iPredDC0;
