Index: branches/HTM-10.2-dev0/source/Lib/TLibCommon/ContextTables.h
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibCommon/ContextTables.h	(revision 936)
@@ -430,11 +430,20 @@
 
 #if H_3D_DBBP
+#if MTK_DBBP_SIGNALING_H0094
 static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] =
 {
-  { CNU },
-  { CNU },
-  { CNU },
-};
-#endif
-
-#endif
+  { 161 },
+  { 161 },
+  { 161 },
+};
+#else
+static const UChar INIT_DBBP_FLAG[3][DBBP_NUM_FLAG_CTX] =
+{
+  { CNU },
+  { CNU },
+  { CNU },
+};
+#endif
+#endif
+
+#endif
Index: branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 936)
@@ -2352,4 +2352,10 @@
     
     TComMv cDv = depthRefineFlag ? DvInfo.m_acDoNBDV : DvInfo.m_acNBDV;
+#if SEC_VER_DONBDV_H0103
+    if( depthRefineFlag )
+    {
+      cDv.setVer(0);
+    }
+#endif
     
     Int depthPosX = Clip3(0,   iPictureWidth - iWidth,  iBlkX + ((cDv.getHor()+2)>>2));
@@ -4245,4 +4251,7 @@
       && !bARPFlag
 #endif
+#if RWTH_DBBP_NO_SPU_H0057
+      && !bDBBPFlag
+#endif
       )
     {
@@ -4268,4 +4277,7 @@
       && !bARPFlag
 #endif
+#if RWTH_DBBP_NO_SPU_H0057
+      && !bDBBPFlag
+#endif
       )
     {
@@ -4291,4 +4303,7 @@
       && !bARPFlag
 #endif
+#if RWTH_DBBP_NO_SPU_H0057
+      && !bDBBPFlag
+#endif
       )
     {
@@ -4311,4 +4326,7 @@
 #if H_3D_ARP
       && !bARPFlag
+#endif
+#if RWTH_DBBP_NO_SPU_H0057
+      && !bDBBPFlag
 #endif
       )
@@ -4334,4 +4352,7 @@
 #if H_3D_ARP
       && !bARPFlag
+#endif
+#if RWTH_DBBP_NO_SPU_H0057
+      && !bDBBPFlag
 #endif
       )
@@ -5194,4 +5215,7 @@
       (nPSW + nPSH > 12) &&
 #endif
+#if RWTH_DBBP_NO_SPU_H0057
+      !bDBBPFlag &&
+#endif
 #if ETRIKHU_CLEANUP_H0083
       xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) )
@@ -7169,4 +7193,10 @@
 
   TComMv      cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 
+#if SEC_VER_DONBDV_H0103
+  if( depthRefineFlag )
+  {
+    cDv.setVer(0);
+  }
+#endif
 
   Int         iBasePosX   = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + 2 ) >> 2 ) );
@@ -7308,4 +7338,10 @@
 
   TComMv      cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 
+#if SEC_VER_DONBDV_H0103
+  if( depthRefineFlag )
+  {
+    cDv.setVer(0);
+  }
+#endif
 
   Bool abPdmAvailable[8] =  {false, false, false, false, false, false, false, false};
Index: branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 936)
@@ -70,6 +70,8 @@
   Bool        abMergeFlag[2];       // for two segments
   UChar       auhMergeIndex[2];     // for two segments
+#if !RWTH_DBBP_NO_SPU_H0057
   Char        ahVSPFlag[2];         // for two segments
   DisInfo     acDvInfo[2];          // for two segments
+#endif
   
   PartSize    eVirtualPartSize;
Index: branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibCommon/TComPrediction.cpp	(revision 936)
@@ -643,10 +643,17 @@
   
   // start mapping process
+#if !MTK_DBBP_AMP_REM_H0072
   Bool bAMPAvail = uiSize > 8;
   Int matchedPartSum[6][2] = {{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}}; // counter for each part size and boolean option
   PartSize virtualPartSizes[6] = { SIZE_Nx2N, SIZE_2NxN, SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N };
+#else
+  Int matchedPartSum[2][2] = {{0,0},{0,0}}; // counter for each part size and boolean option
+  PartSize virtualPartSizes[2] = { SIZE_Nx2N, SIZE_2NxN};
+#endif
   
   UInt uiHalfSize = uiSize>>1;
+#if !MTK_DBBP_AMP_REM_H0072
   UInt uiQuarterSize = uiSize>>2;
+#endif
   
   for (Int y=0; y<uiSize; y+=iSubSample)
@@ -681,4 +688,5 @@
       }
       
+#if !MTK_DBBP_AMP_REM_H0072
       if( bAMPAvail )
       {
@@ -723,4 +731,5 @@
         }
       }
+#endif
     }
     
@@ -732,5 +741,9 @@
   
   Int iMaxMatchSum = 0;
-  for(Int p=0; p<6; p++)  // loop over partition sizes
+#if !MTK_DBBP_AMP_REM_H0072
+  for(Int p=0; p<6; p++)  // loop over partition
+#else
+  for(Int p=0; p<2; p++)  // loop over partition
+#endif
   {
     for( Int b=0; b<=1; b++ ) // loop over boolean options
@@ -842,4 +855,9 @@
   
   UInt  uiMaskStride= MAX_CU_SIZE;
+#if SEC_DBBP_FILTERING_H0104
+  Pel  filSrc = 0;
+  Pel* tmpTar = 0;
+  tmpTar = (Pel *)xMalloc(Pel, uiWidth*uiHeight);
+#endif
   
   // backup pointer
@@ -855,4 +873,7 @@
       
       // filtering
+#if SEC_DBBP_FILTERING_H0104
+      tmpTar[y*uiWidth+x] = piSrc[ucSegment][x];
+#else
       Bool t = (y==0)?pMaskStart[(y+1)*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x];
       Bool l = (x==0)?pMaskStart[y*uiMaskStride+x+1]:pMaskStart[y*uiMaskStride+x-1];
@@ -862,11 +883,51 @@
       Bool bBlend = !((t&&l&&b&&r) || (!t&&!l&&!b&&!r));
       piDst[x] = bBlend?((piSrc[0][x]+piSrc[1][x]+1)>>1):piSrc[ucSegment][x];
+#endif
     }
     
     piSrc[0]  += uiSrcStride;
     piSrc[1]  += uiSrcStride;
+#if !SEC_DBBP_FILTERING_H0104
     piDst     += uiDstStride;
+#endif
     pMask     += uiMaskStride;
   }
+  
+#if SEC_DBBP_FILTERING_H0104
+  for (Int y=0; y<uiHeight; y++)
+  {
+    for (Int x=0; x<uiWidth; x++)
+    {
+      Bool t = (y==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y-1)*uiMaskStride+x];
+      Bool l = (x==0)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x-1];
+      Bool b = (y==uiHeight-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[(y+1)*uiMaskStride+x];
+      Bool r = (x==uiWidth-1)?pMaskStart[y*uiMaskStride+x]:pMaskStart[y*uiMaskStride+x+1];
+      Bool c =pMaskStart[y*uiMaskStride+x];
+
+      Pel left, right, top, bottom;
+      left   = (x==0)          ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x-1];
+      right  = (x==uiWidth-1)  ? tmpTar[y*uiWidth+x] : tmpTar[y*uiWidth+x+1];
+      top    = (y==0)          ? tmpTar[y*uiWidth+x] : tmpTar[(y-1)*uiWidth+x];
+      bottom = (y==uiHeight-1) ? tmpTar[y*uiWidth+x] : tmpTar[(y+1)*uiWidth+x];
+
+      if(!((l&&r&&c) || (!l&&!r&&!c)))
+      {
+        filSrc = Clip3( Pel( 0 ), Pel( 255 ), Pel(( left + (tmpTar[y*uiWidth+x] << 1) + right ) >> 2 ));
+      }
+      else
+      {
+        filSrc = tmpTar[y*uiWidth+x];
+      }
+
+      if(!((t&&b&&c) || (!t&&!b&&!c)))
+      {
+        filSrc = Clip3( Pel( 0 ), Pel( 255 ), Pel(( top + (filSrc << 1) + bottom ) >> 2 ));
+      }
+      piDst[x] = filSrc;
+    }
+    piDst     += uiDstStride;
+  }
+  if ( tmpTar    ) { xFree(tmpTar);             tmpTar        = NULL; }
+#endif
   
   // now combine chroma
@@ -879,4 +940,10 @@
   UInt  uiWidthC        = uiWidth >> 1;
   UInt  uiHeightC       = uiHeight >> 1;
+#if SEC_DBBP_FILTERING_H0104
+  Pel  filSrcU = 0, filSrcV = 0;
+  Pel* tmpTarU = 0, *tmpTarV = 0;
+  tmpTarU = (Pel *)xMalloc(Pel, uiWidthC*uiHeightC);
+  tmpTarV = (Pel *)xMalloc(Pel, uiWidthC*uiHeightC);
+#endif
   pMask = pMaskStart;
   
@@ -889,4 +956,8 @@
       
       // filtering
+#if SEC_DBBP_FILTERING_H0104
+      tmpTarU[y*uiWidthC+x] = piSrcU[ucSegment][x];
+      tmpTarV[y*uiWidthC+x] = piSrcV[ucSegment][x];
+#else
       Bool t = (y==0)?pMaskStart[(y+1)*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2];
       Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+(x+1)*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2];
@@ -898,4 +969,5 @@
       piDstU[x] = bBlend?((piSrcU[0][x]+piSrcU[1][x]+1)>>1):piSrcU[ucSegment][x];
       piDstV[x] = bBlend?((piSrcV[0][x]+piSrcV[1][x]+1)>>1):piSrcV[ucSegment][x];
+#endif
     }
     
@@ -904,8 +976,60 @@
     piSrcV[0]   += uiSrcStrideC;
     piSrcV[1]   += uiSrcStrideC;
+#if !SEC_DBBP_FILTERING_H0104
     piDstU      += uiDstStrideC;
     piDstV      += uiDstStrideC;
+#endif
     pMask       += 2*uiMaskStride;
   }
+
+#if SEC_DBBP_FILTERING_H0104
+  for (Int y=0; y<uiHeightC; y++)
+  {
+    for (Int x=0; x<uiWidthC; x++)
+    {
+      Bool t = (y==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y-1)*2*uiMaskStride+x*2];
+      Bool l = (x==0)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x-1)*2];
+      Bool b = (y==uiHeightC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[(y+1)*2*uiMaskStride+x*2];
+      Bool r = (x==uiWidthC-1)?pMaskStart[y*2*uiMaskStride+x*2]:pMaskStart[y*2*uiMaskStride+(x+1)*2];
+      Bool c =pMaskStart[y*2*uiMaskStride+x*2];
+
+      Pel leftU, rightU, topU, bottomU;
+      leftU   = (x==0)           ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x-1];
+      rightU  = (x==uiWidthC-1)  ? tmpTarU[y*uiWidthC+x] : tmpTarU[y*uiWidthC+x+1];
+      topU    = (y==0)           ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y-1)*uiWidthC+x];
+      bottomU = (y==uiHeightC-1) ? tmpTarU[y*uiWidthC+x] : tmpTarU[(y+1)*uiWidthC+x];
+
+      Pel leftV, rightV, topV, bottomV;
+      leftV   = (x==0)           ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x-1];
+      rightV  = (x==uiWidthC-1)  ? tmpTarV[y*uiWidthC+x] : tmpTarV[y*uiWidthC+x+1];
+      topV    = (y==0)           ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y-1)*uiWidthC+x];
+      bottomV = (y==uiHeightC-1) ? tmpTarV[y*uiWidthC+x] : tmpTarV[(y+1)*uiWidthC+x];
+
+      if(!((l&&r&&c) || (!l&&!r&&!c)))
+      {
+        filSrcU = Clip3( Pel( 0 ), Pel( 255 ), Pel(( leftU + (tmpTarU[y*uiWidthC+x] << 1) + rightU ) >> 2 ));
+        filSrcV = Clip3( Pel( 0 ), Pel( 255 ), Pel(( leftV + (tmpTarV[y*uiWidthC+x] << 1) + rightV ) >> 2 ));
+      }
+      else
+      {
+        filSrcU = tmpTarU[y*uiWidthC+x];
+        filSrcV = tmpTarV[y*uiWidthC+x];
+      }
+
+      if(!((t&&b&&c) || (!t&&!b&&!c)))
+      {
+        filSrcU = Clip3( Pel( 0 ), Pel( 255 ), Pel(( topU + (filSrcU << 1) + bottomU ) >> 2 ));
+        filSrcV = Clip3( Pel( 0 ), Pel( 255 ), Pel(( topV + (filSrcV << 1) + bottomV ) >> 2 ));
+      }
+
+      piDstU[x] = filSrcU;
+      piDstV[x] = filSrcV;
+    }
+    piDstU      += uiDstStrideC;
+    piDstV      += uiDstStrideC;
+  }
+  if ( tmpTarU    ) { xFree(tmpTarU);             tmpTarU        = NULL; }
+  if ( tmpTarV    ) { xFree(tmpTarV);             tmpTarV        = NULL; }
+#endif
 }
 #endif
Index: branches/HTM-10.2-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 936)
@@ -260,4 +260,5 @@
 #define DVFROM_ABOVE                      1
 #define IDV_CANDS                         2
+#define SEC_VER_DONBDV_H0103              1   // Vertical DV Restriction for DoNBDV
 #endif
 
@@ -275,4 +276,6 @@
 #if H_3D_DIM_DLT
 #define H_3D_DELTA_DLT                    1
+#define SEC_NO_RESI_DLT_H0105             1
+#define MTK_DLT_CODING_FIX_H0091          1
 #endif
 #define H_3D_DIM_ENC                      1   // Depth Intra encoder optimizations, includes:
@@ -303,4 +306,8 @@
 #define DBBP_INVALID_SHORT                (-4)
 #define RWTH_DBBP_PACK_MODE               SIZE_2NxN
+#define MTK_DBBP_AMP_REM_H0072                 1
+#define RWTH_DBBP_NO_SPU_H0057                 1
+#define SEC_DBBP_FILTERING_H0104               1
+#define MTK_DBBP_SIGNALING_H0094               1    
 #endif
 
