Index: /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TComDataCU.cpp	(revision 927)
+++ /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TComDataCU.cpp	(revision 928)
@@ -610,4 +610,8 @@
     memset( m_apSegmentDCOffset[1]  + firstElement,     0,                numElements * sizeof( *m_apSegmentDCOffset[1] ) );
 #endif
+#if HS_DMM_SDC_PREDICTOR_UNIFY_H0108
+    m_apDmmPredictor[0] = 0;
+    m_apDmmPredictor[1] = 0;
+#endif
 #endif
 #if H_3D_DBBP
@@ -784,4 +788,8 @@
       m_apSegmentDCOffset[1][ui] = 0;
 #endif
+#if HS_DMM_SDC_PREDICTOR_UNIFY_H0108
+      m_apDmmPredictor[0] = 0;
+      m_apDmmPredictor[1] = 0;
+#endif
 #endif
 #if H_3D_DBBP
@@ -898,4 +906,8 @@
   memset( m_apSegmentDCOffset[0], 0, sizeof(Pel) * m_uiNumPartition   );
   memset( m_apSegmentDCOffset[1], 0, sizeof(Pel) * m_uiNumPartition   );
+#endif
+#if HS_DMM_SDC_PREDICTOR_UNIFY_H0108
+  m_apDmmPredictor[0] = 0;
+  m_apDmmPredictor[1] = 0;
 #endif
 #endif
Index: /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TComDataCU.h	(revision 927)
+++ /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TComDataCU.h	(revision 928)
@@ -193,4 +193,7 @@
   Bool*         m_pbSDCFlag;
   Pel*          m_apSegmentDCOffset[2];
+#if HS_DMM_SDC_PREDICTOR_UNIFY_H0108
+  Pel          m_apDmmPredictor[2];
+#endif
 #endif
 #endif
@@ -556,4 +559,8 @@
   Pel           getSDCSegmentDCOffset( UInt uiSeg, UInt uiPartIdx ) { return m_apSegmentDCOffset[uiSeg][uiPartIdx]; }
   Void          setSDCSegmentDCOffset( Pel pOffset, UInt uiSeg, UInt uiPartIdx) { m_apSegmentDCOffset[uiSeg][uiPartIdx] = pOffset; }
+#if HS_DMM_SDC_PREDICTOR_UNIFY_H0108
+  Void          setDmmPredictor ( Pel pOffset, UInt uiSeg) { m_apDmmPredictor[uiSeg] = pOffset; }
+  Pel           getDmmPredictor ( UInt uiSeg) { return m_apDmmPredictor[uiSeg]; }
+#endif
   UInt          getCtxSDCFlag          ( UInt   uiAbsPartIdx );
   UInt          getCtxAngleFlag        ( UInt   uiAbsPartIdx );
Index: /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TComPrediction.cpp	(revision 927)
+++ /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TComPrediction.cpp	(revision 928)
@@ -500,4 +500,8 @@
   Pel* pDst = piPred;
   xAssignBiSegDCs( pDst, uiStride, biSegPattern, patternStride, segDC1, segDC2 );
+#if HS_DMM_SDC_PREDICTOR_UNIFY_H0108
+  pcCU->setDmmPredictor(segDC1, 0);
+  pcCU->setDmmPredictor(segDC2, 1);
+#endif
 
 #if H_3D_DIM_DMM
@@ -2196,4 +2200,5 @@
   if (orgDC == false)
   {
+#if !HS_DMM_SDC_PREDICTOR_UNIFY_H0108
     if ( getDimType(uiIntraMode) == DMM1_IDX )
     {
@@ -2241,4 +2246,5 @@
     }
     else
+#endif
     {
       Pel* pLeftTop = pOrig;
Index: /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TypeDef.h	(revision 927)
+++ /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibCommon/TypeDef.h	(revision 928)
@@ -273,4 +273,5 @@
 #define H_3D_DIM_DLT                      1   // Depth Lookup Table
 
+#define HS_DMM_SDC_PREDICTOR_UNIFY_H0108  1   // Unification of DMM and SDC predictor derivation
 #define LGE_SIMP_DIM_NOT_PRESENT_FLAG_CODING_H0119_H0135  1 // Use only one context for CABAC of dim_not_present_flag
 #define QC_SIMP_DELTADC_CODING_H0131      1   // Simplify detaDC entropy coding 
Index: /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibDecoder/TDecCu.cpp	(revision 927)
+++ /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibDecoder/TDecCu.cpp	(revision 928)
@@ -1231,4 +1231,12 @@
   // get DC prediction for each segment
   Pel apDCPredValues[2];
+#if HS_DMM_SDC_PREDICTOR_UNIFY_H0108
+  if ( getDimType( uiLumaPredMode ) == DMM1_IDX || getDimType( uiLumaPredMode ) == DMM4_IDX )
+  {
+    apDCPredValues[0] = pcCU->getDmmPredictor( 0 );
+    apDCPredValues[1] = pcCU->getDmmPredictor( 1 );
+  }
+  else
+#endif
   m_pcPrediction->analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode);
   
Index: /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 927)
+++ /branches/HTM-10.2-dev3-Hisilicon/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 928)
@@ -1989,4 +1989,12 @@
   // get DC prediction for each segment
   Pel apDCPredValues[2];
+#if HS_DMM_SDC_PREDICTOR_UNIFY_H0108
+  if ( getDimType( uiLumaPredMode ) == DMM1_IDX || getDimType( uiLumaPredMode ) == DMM4_IDX )
+  {
+    apDCPredValues[0] = pcCU->getDmmPredictor( 0 );
+    apDCPredValues[1] = pcCU->getDmmPredictor( 1 );
+  }
+  else
+#endif
   analyzeSegmentsSDC(piPred, uiStride, uiWidth, apDCPredValues, uiNumSegments, pbMask, uiMaskStride, uiLumaPredMode );
 
