Index: branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncCu.cpp	(revision 783)
+++ branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncCu.cpp	(revision 792)
@@ -1979,4 +1979,37 @@
           if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && !uiNoResidual )
           {
+#if SEC_INTER_SDC_G0101
+            for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ )
+            {
+              if( rpcTempCU != rpcTempCUPre )
+              {
+                rpcTempCU->initEstData( uhDepth, orgQP );
+                rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth );
+              }
+              rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
+              rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
+              rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth );
+#if H_3D_VSO //M2
+              if( m_pcRdCost->getUseRenModel() )
+              { //Reset
+                UInt  uiWidth     = m_ppcOrigYuv[uhDepth]->getWidth    ();
+                UInt  uiHeight    = m_ppcOrigYuv[uhDepth]->getHeight   ();
+                Pel*  piSrc       = m_ppcOrigYuv[uhDepth]->getLumaAddr ();
+                UInt  uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride   ();
+                m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
+              }
+#endif
+              m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 
+                m_ppcOrigYuv[uhDepth], 
+                ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth], 
+                m_ppcResiYuvTemp[uhDepth], 
+                m_ppcRecoYuvTemp[uhDepth],
+                uiOffest,
+                uhDepth );
+
+              xCheckDQP( rpcTempCU );
+              xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth );
+            }
+#else
             if( rpcTempCU != rpcTempCUPre )
             {
@@ -2006,4 +2039,5 @@
             xCheckDQP( rpcTempCU );
             xCheckBestMode( rpcBestCU, rpcTempCU, uhDepth );
+#endif
           }
 #endif
@@ -2202,6 +2236,45 @@
   xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
 #if H_3D_INTER_SDC
+#if SEC_INTER_SDC_G0101 // ONLY_2NX2N_SDC
+  if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() && ePartSize == SIZE_2Nx2N)
+#else
   if( rpcTempCU->getSlice()->getVPS()->getInterSDCFlag( rpcTempCU->getSlice()->getLayerIdInVps() ) && rpcTempCU->getSlice()->getIsDepth() )
-  {
+#endif
+  {
+#if SEC_INTER_SDC_G0101
+    for( Int uiOffest = -2 ; uiOffest <= 2 ; uiOffest++ )
+    {
+      if( rpcTempCU != rpcTempCUPre )
+      {
+        Int orgQP = rpcBestCU->getQP( 0 );
+        rpcTempCU->initEstData( uhDepth, orgQP );
+        rpcTempCU->copyPartFrom( rpcBestCU, 0, uhDepth );
+      }
+      rpcTempCU->setSkipFlagSubParts( false, 0, uhDepth );
+      rpcTempCU->setTrIdxSubParts( 0, 0, uhDepth );
+      rpcTempCU->setCbfSubParts( 1, 1, 1, 0, uhDepth );
+#if H_3D_VSO // M3
+      if( m_pcRdCost->getUseRenModel() )
+      {
+        UInt  uiWidth     = m_ppcOrigYuv[uhDepth]->getWidth ( );
+        UInt  uiHeight    = m_ppcOrigYuv[uhDepth]->getHeight( );
+        Pel*  piSrc       = m_ppcOrigYuv[uhDepth]->getLumaAddr( );
+        UInt  uiSrcStride = m_ppcOrigYuv[uhDepth]->getStride();
+        m_pcRdCost->setRenModelData( rpcTempCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
+      }
+#endif
+
+      m_pcPredSearch->encodeResAndCalcRdInterSDCCU( rpcTempCU, 
+        m_ppcOrigYuv[uhDepth],
+        ( rpcTempCU != rpcTempCUPre ) ? m_ppcPredYuvBest[uhDepth] : m_ppcPredYuvTemp[uhDepth],
+        m_ppcResiYuvTemp[uhDepth],
+        m_ppcRecoYuvTemp[uhDepth],
+        uiOffest,
+        uhDepth );
+
+      xCheckDQP( rpcTempCU );
+      xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
+    }
+#else
     if( rpcTempCU != rpcTempCUPre )
     {
@@ -2233,4 +2306,5 @@
   xCheckDQP( rpcTempCU );
   xCheckBestMode(rpcBestCU, rpcTempCU, uhDepth);
+#endif
   }
 #endif
Index: branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 783)
+++ branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 792)
@@ -882,10 +882,18 @@
   }
 
+#if SEC_INTER_SDC_G0101
+  if( !pcCU->getSlice()->getIsDepth() || pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N || pcCU->isSkipped( uiAbsPartIdx ) )
+#else
   if( !pcCU->getSlice()->getIsDepth() || ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) != SIZE_2Nx2N ) || pcCU->isSkipped( uiAbsPartIdx ) )
-  {
-    return;
-  }
-
+#endif
+  {
+    return;
+  }
+
+#if SEC_INTER_SDC_G0101
+  assert( pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
+#else
   assert( ( pcCU->isIntra( uiAbsPartIdx ) && pcCU->getPartitionSize( uiAbsPartIdx ) == SIZE_2Nx2N ) || ( !pcCU->isIntra( uiAbsPartIdx ) && !pcCU->isSkipped( uiAbsPartIdx ) ) );
+#endif
 
   if( bRD )
@@ -905,5 +913,4 @@
 
   if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( uiAbsPartIdx ) || pcCU->isSkipped( uiAbsPartIdx ) )
-  {
     return;
   }
Index: branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 783)
+++ branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 792)
@@ -2259,7 +2259,10 @@
   else //all-zero inter SDC is not allowed
   {
+#if SEC_INTER_SDC_G0101
+    uiNumSegments = 1;
+#else
     PartSize cPartSize = pcCU->getPartitionSize( absPartIdx );
-
     uiNumSegments = ( cPartSize == SIZE_2Nx2N ) ? 1 : ( cPartSize == SIZE_NxN ? 4 : 2 );
+#endif
     dimDeltaDC = 1;
   }
Index: branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 783)
+++ branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 792)
@@ -5633,5 +5633,9 @@
 
 #if H_3D_INTER_SDC
+#if SEC_INTER_SDC_G0101
+Void TEncSearch::encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, TComYuv* pcRec, Int uiOffest, const UInt uiDepth )
+#else
 Void TEncSearch::encodeResAndCalcRdInterSDCCU( TComDataCU* pcCU, TComYuv* pcOrg, TComYuv* pcPred, TComYuv* pcResi, TComYuv* pcRec, const UInt uiDepth )
+#endif
 {
   if( !pcCU->getSlice()->getIsDepth() || pcCU->isIntra( 0 ) )
@@ -5647,4 +5651,7 @@
   UInt  uiWidth      = pcCU->getWidth ( 0 );
   UInt  uiHeight     = pcCU->getHeight( 0 );
+#if SEC_INTER_SDC_G0101
+  UInt uiSegSize = 0;
+#else
   UChar* pMask       = pcCU->getInterSDCMask();
   memset( pMask, 0, uiWidth*uiHeight );
@@ -5653,14 +5660,21 @@
 
   UInt uiSegSize[4] = { 0, 0, 0, 0 };
+#endif
   Pel *pPred, *pOrg;
   UInt uiPredStride = pcPred->getStride();
   UInt uiOrgStride  = pcOrg->getStride();
   UInt uiPelX, uiPelY;
+#if !SEC_INTER_SDC_G0101
   UInt uiPartitionSize = pcCU->getPartitionSize( 0 );
   UInt uiSegmentNum = ( uiPartitionSize == SIZE_2Nx2N ) ? 1 : ( uiPartitionSize == SIZE_NxN ? 4 : 2 );
+#endif
 
   pPred = pcPred->getLumaAddr( 0 );
   pOrg  = pcOrg->getLumaAddr( 0 );
+#if SEC_INTER_SDC_G0101
+  Int pResDC = 0;
+#else
   Int pResDC[4] = { 0, 0, 0, 0};
+#endif
 
   //calculate dc value for prediction and original signal, and calculate residual and reconstruction
@@ -5669,7 +5683,12 @@
     for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )
     {
+#if SEC_INTER_SDC_G0101
+      pResDC += (Int)( pOrg [uiPelX] - pPred[uiPelX] );
+      uiSegSize++;
+#else
       UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];
       pResDC[uiSeg] += (Int)( pOrg [uiPelX] - pPred[uiPelX] );
       uiSegSize[uiSeg]++;
+#endif
     }
     pOrg  += uiOrgStride;
@@ -5677,4 +5696,10 @@
   }
 
+#if SEC_INTER_SDC_G0101
+  Int iResiOffset = ( pResDC  > 0 ? ( uiSegSize >> 1 ) : -1*( uiSegSize >> 1 ) );
+  pResDC          = ( pResDC + iResiOffset ) / (Int) uiSegSize;
+
+  pcCU->setSDCSegmentDCOffset( pResDC + uiOffest, 0, 0 );
+#else
   for( UInt uiSeg = 0; uiSeg < uiSegmentNum; uiSeg++ )
   {
@@ -5687,4 +5712,5 @@
 #endif
   }
+#endif
 
   Pel *pRec;
@@ -5697,8 +5723,12 @@
     for( uiPelX = 0; uiPelX < uiWidth; uiPelX++ )
     {
+#if SEC_INTER_SDC_G0101
+      pRec[ uiPelX ] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, pPred[uiPelX] + pcCU->getSDCSegmentDCOffset(0, 0) );
+#else
       UChar uiSeg = pMask[ uiPelX + uiPelY*uiWidth ];
       assert( uiSeg < uiSegmentNum );
 
       pRec[ uiPelX ] = Clip3( 0, ( 1 << g_bitDepthY ) - 1, pPred[uiPelX] + pResDC[uiSeg] );
+#endif
     }
     pPred     += uiPredStride;
@@ -5745,4 +5775,7 @@
   Bool bNonSkip = true;
 #endif
+#if SEC_INTER_SDC_G0101
+  bNonSkip |= ( pcCU->getSDCSegmentDCOffset( 0, 0 ) != 0 ) ? 1 : 0;
+#else
   for( UInt uiSeg = 0; uiSeg < uiSegmentNum; uiSeg++ )
   {
@@ -5753,4 +5786,5 @@
 #endif
   }
+#endif
 
   if( !bNonSkip )
Index: branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.h	(revision 783)
+++ branches/HTM-9.3-dev3-Samsung/source/Lib/TLibEncoder/TEncSearch.h	(revision 792)
@@ -219,4 +219,7 @@
     TComYuv* pcResi, 
     TComYuv* pcRec, 
+#if SEC_INTER_SDC_G0101
+    Int      uiOffset,
+#endif
     const UInt uiDepth );
 #endif
