Index: /branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibCommon/TypeDef.h	(revision 798)
+++ /branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibCommon/TypeDef.h	(revision 799)
@@ -243,4 +243,8 @@
                                               // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
                                               // LG_ZEROINTRADEPTHRESI_A0087
+#endif
+#define QC_PKU_SDC_SPLIT_G0123            1   // Intra SDC Split
+#if QC_PKU_SDC_SPLIT_G0123
+#define HS_TSINGHUA_SDC_SPLIT_G0111       1
 #endif
 ///// ***** VIEW SYNTHESIS PREDICTION *********
Index: /branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- /branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibDecoder/TDecCu.cpp	(revision 798)
+++ /branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibDecoder/TDecCu.cpp	(revision 799)
@@ -921,5 +921,59 @@
   UInt uiWidth        = pcCU->getWidth  ( 0 );
   UInt uiHeight       = pcCU->getHeight ( 0 );
-  
+#if QC_PKU_SDC_SPLIT_G0123
+#if QC_GENERIC_SDC_G0122
+  TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
+#endif
+#endif
+#if QC_PKU_SDC_SPLIT_G0123
+  UInt numParts = 1;
+  UInt i = 0;
+  UInt sdcDepth    = 0;
+  TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
+  TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
+  TComYuv* pcResiYuv  = m_ppcYuvResi[uiDepth];
+
+  UInt    uiStride = 0;
+  Pel*    piReco;
+  Pel*    piPred;
+  Pel*    piResi;
+
+  UInt    uiZOrder;        
+  Pel*    piRecIPred;      
+  UInt    uiRecIPredStride;
+
+  UInt    uiLumaPredMode = 0;  
+
+#if HS_TSINGHUA_SDC_SPLIT_G0111
+  if ((uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize()) > 1)
+  {
+    numParts = uiWidth * uiWidth >> (2 * pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
+    sdcDepth = g_aucConvertToBit[uiWidth] + 2 - pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize();
+    uiWidth = uiHeight = (1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize());
+  }
+#else
+  if (uiWidth == 64)
+  {
+    numParts = 4;
+    sdcDepth = 1;
+    uiWidth = uiHeight = 32;
+  }
+#endif
+
+  for ( i = 0; i < numParts; i++ )
+  {
+    uiStride    = pcRecoYuv->getStride  ();
+    piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
+    piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
+    piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
+
+    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
+    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
+    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
+
+    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
+
+    AOF( uiWidth == uiHeight );
+#else
   TComYuv* pcRecoYuv  = m_ppcYuvReco[uiDepth];
   TComYuv* pcPredYuv  = m_ppcYuvReco[uiDepth];
@@ -936,17 +990,25 @@
   
   UInt    uiLumaPredMode    = pcCU->getLumaIntraDir     ( uiAbsPartIdx );
-  
+
   AOF( uiWidth == uiHeight );
   AOF( uiAbsPartIdx == 0 );
   AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
   AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
+#endif
   
   //===== init availability pattern =====
   Bool  bAboveAvail = false;
   Bool  bLeftAvail  = false;
+#if QC_PKU_SDC_SPLIT_G0123
+  pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
+  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
+#else
   pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_pcPrediction->getPredicBuf(), m_pcPrediction->getPredicBufWidth(), m_pcPrediction->getPredicBufHeight(), bAboveAvail, bLeftAvail );
+#endif
+#if !QC_PKU_SDC_SPLIT_G0123
 #if QC_GENERIC_SDC_G0122
   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
+#endif
 #endif
   //===== get prediction signal =====
@@ -967,5 +1029,35 @@
   }
 #endif
-  
+#if QC_PKU_SDC_SPLIT_G0123 
+    if ( numParts > 1 )
+    {
+      for( UInt uiY = 0; uiY < uiHeight; uiY++ )
+      {
+        for( UInt uiX = 0; uiX < uiWidth; uiX++ )
+        {
+          piReco        [ uiX ] = ClipY( piPred[ uiX ] );
+          piRecIPred    [ uiX ] = piReco[ uiX ];
+        }
+        piPred     += uiStride;
+        piReco     += uiStride;
+        piRecIPred += uiRecIPredStride;
+      }
+    }
+    uiAbsPartIdx += ( (uiWidth * uiWidth) >> 4 );
+  }
+  uiAbsPartIdx = 0;
+
+  if ( numParts > 1 )
+  {
+    uiWidth = pcCU->getWidth( 0 );
+    uiHeight = pcCU->getHeight( 0 );
+  }
+  piReco      = pcRecoYuv->getLumaAddr( uiAbsPartIdx );
+  piPred      = pcPredYuv->getLumaAddr( uiAbsPartIdx );
+  piResi      = pcResiYuv->getLumaAddr( uiAbsPartIdx );
+  uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
+  piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
+  uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
+#endif
   // number of segments depends on prediction mode
   UInt uiNumSegments = 1;
Index: /branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 798)
+++ /branches/HTM-9.3-dev3-Hisilicon/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 799)
@@ -1890,4 +1890,57 @@
   UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
   UInt    uiHeight          = pcCU     ->getHeight  ( 0 );
+#if QC_PKU_SDC_SPLIT_G0123
+#if QC_GENERIC_SDC_G0122
+  TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
+#endif
+#endif
+#if QC_PKU_SDC_SPLIT_G0123
+  UInt numParts = 1;
+  UInt i = 0;
+  UInt sdcDepth = 0;
+  UInt uiStride;         
+  Pel* piOrg;          
+  Pel* piPred;          
+  Pel* piReco;        
+
+  UInt uiZOrder;         
+  Pel* piRecIPred;       
+  UInt uiRecIPredStride; 
+
+#if HS_TSINGHUA_SDC_SPLIT_G0111
+  if ( ( uiWidth >> pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() ) > 1 )
+  {
+    if ( getDimType( uiLumaPredMode ) == DMM4_IDX )
+    {
+      dmm4Segmentation->destroy(); delete dmm4Segmentation;
+      ruiDist = MAX_INT;
+      return;
+    }
+    numParts = uiWidth * uiWidth >> ( 2 * pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() );
+    sdcDepth = g_aucConvertToBit[uiWidth] + 2 - pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize();
+    uiWidth = uiHeight = ( 1 << pcCU->getSlice()->getSPS()->getQuadtreeTULog2MaxSize() );
+  }
+#else
+  if (uiWidth == 64)
+  {
+    numParts = 4;
+    sdcDepth = 1;
+    uiWidth = uiHeight = 32;
+  }
+#endif
+
+  for ( i = 0; i < numParts; i++ )
+  {
+    uiStride          = pcOrgYuv ->getStride  ();
+    piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
+    piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
+    piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
+
+    uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
+    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
+    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
+
+    AOF( uiWidth == uiHeight );
+#else
   UInt    uiStride          = pcOrgYuv ->getStride  ();
   Pel*    piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
@@ -1898,9 +1951,10 @@
   Pel*    piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
   UInt    uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
-  
+
   AOF( uiWidth == uiHeight );
   AOF( uiAbsPartIdx == 0 );
   AOF( pcCU->getSDCAvailable(uiAbsPartIdx) );
   AOF( pcCU->getSDCFlag(uiAbsPartIdx) );
+#endif
 #if !QC_GENERIC_SDC_G0122
   AOF( uiLumaPredMode == DC_IDX || uiLumaPredMode == PLANAR_IDX || ( getDimType( uiLumaPredMode ) == DMM1_IDX && !isDimDeltaDC( uiLumaPredMode ) ) );
@@ -1911,8 +1965,15 @@
   Bool  bAboveAvail = false;
   Bool  bLeftAvail  = false;
+#if QC_PKU_SDC_SPLIT_G0123
+  pcCU->getPattern()->initPattern   ( pcCU, sdcDepth, uiAbsPartIdx );
+  pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, sdcDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
+#else
   pcCU->getPattern()->initPattern   ( pcCU, 0, uiAbsPartIdx );
   pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, 0, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail );
+#endif
+#if !QC_PKU_SDC_SPLIT_G0123
 #if QC_GENERIC_SDC_G0122
   TComWedgelet* dmm4Segmentation = new TComWedgelet( uiWidth, uiHeight );
+#endif
 #endif
   //===== get prediction signal =====
@@ -1920,4 +1981,16 @@
   if( isDimMode( uiLumaPredMode ) )
   {
+#if HS_TSINGHUA_SDC_SPLIT_G0111  
+    UInt dimType   = getDimType  ( uiLumaPredMode );
+    UInt patternID = pcCU->getDmmWedgeTabIdx(dimType, uiAbsPartIdx);
+    if ( patternID >= g_dmmWedgeLists[g_aucConvertToBit[uiWidth]].size() && dimType == DMM1_IDX )
+    {
+      if (g_aucConvertToBit[uiWidth] == 2)  // Encoder method. Avoid DMM1 pattern list index exceeds the maximum DMM1 pattern number when SDC split is used.
+        patternID = 1349;  // Split 32x32 to 16x16. 1349: Maximum DMM1 pattern number when block size is 16x16
+      else 
+        patternID = patternID >> 1;  // Other cases
+      pcCU->setDmmWedgeTabIdx(dimType, uiAbsPartIdx, patternID);
+    }
+#endif
     predIntraLumaDepth( pcCU, uiAbsPartIdx, uiLumaPredMode, piPred, uiStride, uiWidth, uiHeight, true 
 #if QC_GENERIC_SDC_G0122
@@ -1933,5 +2006,36 @@
   }
 #endif
-  
+#if QC_PKU_SDC_SPLIT_G0123
+    if ( numParts > 1 )
+    {
+      for( UInt uiY = 0; uiY < uiHeight; uiY++ )
+      {
+        for( UInt uiX = 0; uiX < uiWidth; uiX++ )
+        {
+          piPred        [ uiX ] = ClipY( piPred[ uiX ] );
+          piRecIPred    [ uiX ] = piPred[ uiX ];
+        }
+        piPred     += uiStride;
+        piRecIPred += uiRecIPredStride;
+      }
+    }
+    uiAbsPartIdx += ( ( uiWidth * uiWidth ) >> 4 );
+  }
+  uiAbsPartIdx = 0;
+  uiStride          = pcOrgYuv ->getStride  ();
+  piOrg             = pcOrgYuv ->getLumaAddr( uiAbsPartIdx );
+  piPred            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
+  piReco            = pcPredYuv->getLumaAddr( uiAbsPartIdx );
+
+  uiZOrder          = pcCU->getZorderIdxInCU() + uiAbsPartIdx;
+  piRecIPred        = pcCU->getPic()->getPicYuvRec()->getLumaAddr( pcCU->getAddr(), uiZOrder );
+  uiRecIPredStride  = pcCU->getPic()->getPicYuvRec()->getStride  ();
+
+  if (numParts > 1)
+  {
+    uiWidth = pcCU->getWidth( 0 );
+    uiHeight = pcCU->getHeight( 0 );
+  }
+#endif
   // number of segments depends on prediction mode
   UInt uiNumSegments = 1;
