Index: branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 379)
+++ branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 382)
@@ -1406,5 +1406,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);
@@ -1884,14 +1888,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 )
 {
@@ -1899,3 +1904,4 @@
 }
 #endif
+#endif
 //! \}
Index: branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.h
===================================================================
--- branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.h	(revision 379)
+++ branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.h	(revision 382)
@@ -183,5 +183,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 );
@@ -209,8 +213,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-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 379)
+++ branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 382)
@@ -828,4 +828,5 @@
   m_pcEntropyCoderIf->codePredMode( pcCU, uiAbsPartIdx );
   
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if RWTH_SDC_DLT_B0036
   // if B-Slice, code SDC flag later
@@ -835,4 +836,5 @@
     encodeSDCFlag(pcCU, uiAbsPartIdx, bRD);
   }
+#endif
 #endif
 }
@@ -876,4 +878,5 @@
     }
   }
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if RWTH_SDC_DLT_B0036
   if( !pcCU->getSlice()->isInterB() && pcCU->isIntra(uiAbsPartIdx) && pcCU->getSDCFlag(uiAbsPartIdx)  )
@@ -883,7 +886,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!
@@ -899,4 +904,5 @@
     }
   }
+#endif
 #endif
 }
@@ -1179,7 +1185,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
+    );
 }
 
@@ -1195,5 +1209,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 )
@@ -1202,4 +1220,5 @@
   }
 
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 #if RWTH_SDC_DLT_B0036
   if( pcCU->getSDCFlag(uiAbsPartIdx) )
@@ -1208,4 +1227,5 @@
     return;
   }
+#endif
 #endif
 
@@ -1222,10 +1242,20 @@
       encodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*2 );
       encodeIntraDirModeLuma( pcCU, uiAbsPartIdx + uiPartOffset*3 );
-      encodeIntraDirModeChroma( pcCU, uiAbsPartIdx, bRD );
+#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 );
-      encodeIntraDirModeChroma( pcCU, uiAbsPartIdx, bRD );
+      encodeIntraDirModeLuma  ( pcCU, uiAbsPartIdx 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+        ,bSdcRD
+#endif
+        );
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+      if(!pcCU->getSDCFlag(uiAbsPartIdx))
+#endif
+        encodeIntraDirModeChroma( pcCU, uiAbsPartIdx, bRD );
     }
   }
@@ -1417,6 +1447,7 @@
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_U) == 1 );
     assert( pcCU->getCbf(uiAbsPartIdx, TEXT_CHROMA_V) == 1 );
-    
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
     encodeSDCResidualData(pcCU, uiAbsPartIdx);
+#endif
     return;
   }
@@ -1715,4 +1746,5 @@
 
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 Void TEncEntropy::encodeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
@@ -1734,5 +1766,5 @@
   m_pcEntropyCoderIf->codeSDCFlag(pcCU, uiAbsPartIdx);
 }
-
+#endif
 Void TEncEntropy::encodeSDCResidualData( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD )
 {
Index: branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.h
===================================================================
--- branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.h	(revision 379)
+++ branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncEntropy.h	(revision 382)
@@ -123,7 +123,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
   
@@ -133,5 +137,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;
@@ -265,6 +273,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 );
@@ -284,7 +300,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-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 379)
+++ branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 382)
@@ -103,6 +103,8 @@
 , m_cSaoTypeIdxSCModel        ( 1,             1,               NUM_SAO_TYPE_IDX_CTX          , m_contextModels + m_numContextModels, m_numContextModels)
 #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,5 +116,10 @@
 #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
 , 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)
@@ -187,6 +194,8 @@
   m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
 #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
@@ -198,5 +207,10 @@
 #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 );
@@ -340,10 +354,17 @@
   m_cSaoTypeIdxSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_SAO_TYPE_IDX );
 #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 );
@@ -542,5 +563,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)
 {
@@ -966,9 +995,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 )
@@ -1070,5 +1240,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);  
@@ -1116,12 +1293,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;
 }
@@ -2397,4 +2581,5 @@
 
 #if RWTH_SDC_DLT_B0036
+#if !PKU_QC_DEPTH_INTRA_UNI_D0195
 Void TEncSbac::codeSDCPredMode( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
@@ -2440,4 +2625,5 @@
   
 }
+#endif
 
 Void TEncSbac::codeSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiSegment )
Index: branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h
===================================================================
--- branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h	(revision 379)
+++ branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSbac.h	(revision 382)
@@ -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  );
@@ -137,7 +140,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
 
@@ -222,6 +229,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 );
@@ -300,6 +314,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
@@ -312,5 +328,10 @@
   
 #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;
Index: branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 379)
+++ branches/HTM-6.2-dev3-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 382)
@@ -908,5 +908,9 @@
       if( uiAbsPartIdx == 0 )
       {
-        m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 );
+        m_pcEntropyCoder->encodeIntraDirModeLuma ( pcCU, 0 
+#if PKU_QC_DEPTH_INTRA_UNI_D0195
+         ,true
+#endif
+          );
       }
     }
@@ -1762,6 +1766,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();
   
@@ -5903,4 +5910,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
   }
   
@@ -5908,5 +5918,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();
