Index: branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncCu.cpp	(revision 788)
+++ branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncCu.cpp	(revision 795)
@@ -1881,4 +1881,11 @@
 
 #endif
+
+#if MTK_DDD_G0063
+    Int iDDDCand = rpcTempCU->getUseDDDCandIdx(); 
+    UChar ucDDDepth = rpcTempCU->getDDTmpDepth();
+    rpcTempCU->setUseDDD( false, 0, uhDepth );
+#endif
+
   for( UInt uiNoResidual = 0; uiNoResidual < iteration; ++uiNoResidual )
   {
@@ -1914,4 +1921,17 @@
           rpcTempCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMergeCand].m_acDvInfo, 0, 0, uhDepth );
 #endif
+
+#if MTK_DDD_G0063
+          if( rpcTempCU->getSlice()->getIsDepth() && rpcTempCU->getSlice()->getViewIndex() != 0 && iDDDCand == uiMergeCand )
+          {
+              rpcTempCU->setUseDDD( true, 0, 0, uhDepth );
+              rpcTempCU->setDDDepthSubParts( ucDDDepth, 0, 0, uhDepth );
+          }
+          else
+          {
+              rpcTempCU->setUseDDD( false, 0, 0, uhDepth );
+          }
+#endif
+
 #if H_3D_SPIVMP
           rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth);
@@ -2122,4 +2142,8 @@
   rpcTempCU->setCUTransquantBypassSubParts  ( m_pcEncCfg->getCUTransquantBypassFlagValue(),      0, uhDepth );
   
+#if MTK_DDD_G0063
+  rpcTempCU->setUseDDD( false, 0, uhDepth );
+#endif
+
 #if H_3D_ARP
   rpcTempCU->setARPWSubParts( (UChar)nARPW , 0 , uhDepth );
Index: branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 788)
+++ branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 795)
@@ -3675,4 +3675,16 @@
 #endif
 
+#if MTK_DDD_G0063
+      if( uiMergeCand == pcCU->getUseDDDCandIdx() )
+      {
+          pcCU->setUseDDD( true, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
+          pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
+      }
+      else
+      {
+          pcCU->setUseDDD( false, uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
+      }
+#endif
+
       xGetInterPredictionError( pcCU, pcYuvOrg, iPUIdx, uiCostCand, m_pcEncCfg->getUseHADME() );
       uiBitsCand = uiMergeCand + 1;
@@ -4372,4 +4384,19 @@
         pcCU->setDvInfoSubParts(inheritedVSPDisInfo[uiMRGIndex].m_acDvInfo, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
 #endif
+
+#if MTK_DDD_G0063
+        if( uiMRGIndex == pcCU->getUseDDDCandIdx() )
+        {
+            assert( vspFlag[uiMRGIndex]     == 0 );
+            assert( bSPIVMPFlag[uiMRGIndex] == 0 );
+            pcCU->setUseDDD( true, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
+            pcCU->setDDDepthSubParts( pcCU->getDDTmpDepth(), uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
+        }
+        else
+        {
+            pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
+        }
+#endif
+
 #if H_3D_SPIVMP
         pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );  
@@ -4422,4 +4449,8 @@
 #if H_3D_SPIVMP        
         pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 
+#endif
+
+#if MTK_DDD_G0063
+        pcCU->setUseDDD( false, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
 #endif
         // set ME result
Index: branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncSlice.h
===================================================================
--- branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncSlice.h	(revision 788)
+++ branches/HTM-9.3-dev1-MediaTek/source/Lib/TLibEncoder/TEncSlice.h	(revision 795)
@@ -107,4 +107,10 @@
   UInt                    m_uiSliceIdx;
   std::vector<TEncSbac*> CTXMem;
+
+#if MTK_DDD_G0063
+  Int          m_iDDDScale;
+  Int          m_iDDDOffset;
+  UInt         m_uiDDDPrecision;
+#endif
 public:
   TEncSlice();
@@ -147,4 +153,8 @@
   Void      setCtxMem( TEncSbac* sb, Int b )   { CTXMem[b] = sb; }
 
+#if MTK_DDD_G0063
+  Void setDDDPar( Int iScale, Int iOffset, UInt uiPrecision ){ m_iDDDScale = iScale; m_iDDDOffset = iOffset; m_uiDDDPrecision = uiPrecision; }
+#endif
+
 private:
   Double  xGetQPValueAccordingToLambda ( Double lambda );
