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
 
Index: branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 936)
@@ -440,4 +440,12 @@
 
             READ_FLAG(uiCode, "inter_view_dlt_pred_enable_flag[ i ]"); 
+
+#if  MTK_DLT_CODING_FIX_H0091
+            if( uiCode )
+            {
+                assert( pcDLT->getUseDLTFlag( 1 ));
+            }
+#endif
+
             pcDLT->setInterViewDltPredEnableFlag( i, (uiCode == 1) ? true : false );
 
Index: branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecCu.cpp	(revision 936)
@@ -794,6 +794,13 @@
     }
     
+#if RWTH_DBBP_NO_SPU_H0057
+    AOF( pcCU->getARPW(uiPartAddr) == 0 );
+    AOF( pcCU->getICFlag(uiPartAddr) == false );
+    AOF( pcCU->getSPIVMPFlag(uiPartAddr) == false );
+    AOF( pcCU->getVSPFlag(uiPartAddr) == 0 );
+#else
     pDBBPTmpData->ahVSPFlag[uiSegment] = pcCU->getVSPFlag( uiPartAddr );
     pDBBPTmpData->acDvInfo[uiSegment] = pcCU->getDvInfo( uiPartAddr );
+#endif
   }
   
@@ -805,6 +812,8 @@
     pcCU->setInterDirSubParts( pDBBPTmpData->auhInterDir[uiSegment], 0, 0, uiDepth );
     
+#if !RWTH_DBBP_NO_SPU_H0057
     pcCU->setVSPFlagSubParts( pDBBPTmpData->ahVSPFlag[uiSegment], 0, 0, uiDepth );
     pcCU->setDvInfoSubParts( pDBBPTmpData->acDvInfo[uiSegment], 0, 0, uiDepth );
+#endif
     
     for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
@@ -828,6 +837,8 @@
     pcCU->setDBBPFlagSubParts(true, uiPartAddr, uiSegment, uiDepth);
     
+#if !RWTH_DBBP_NO_SPU_H0057
     pcCU->setVSPFlagSubParts( pDBBPTmpData->ahVSPFlag[uiSegment], uiPartAddr, uiSegment, uiDepth );
     pcCU->setDvInfoSubParts( pDBBPTmpData->acDvInfo[uiSegment], uiPartAddr, uiSegment, uiDepth );
+#endif
     
     pcCU->setInterDirSubParts(pDBBPTmpData->auhInterDir[uiSegment], uiPartAddr, uiSegment, uiDepth); // interprets depth relative to LCU level
@@ -932,5 +943,5 @@
     for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     {
-#if H_3D
+#if H_3D && !SEC_NO_RESI_DLT_H0105
       if ( useDltFlag )
       {
Index: branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 936)
@@ -139,5 +139,10 @@
   
 #if H_3D_DBBP
+
+#if MTK_DBBP_SIGNALING_H0094
+  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )
+#else
   if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE )
+#endif
   {
     decodeDBBPFlag(pcCU, uiAbsPartIdx, uiDepth);
@@ -145,5 +150,7 @@
     if( pcCU->getDBBPFlag(uiAbsPartIdx) )
     {
+#if !MTK_DBBP_SIGNALING_H0094
       AOF( pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE );
+#endif
       
       // get collocated depth block
@@ -161,4 +168,11 @@
       
       pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth);
+      
+#if RWTH_DBBP_NO_SPU_H0057
+      // make sure that DBBP flag is set for both segments
+      UInt uiPUOffset = ( g_auiPUOffset[UInt( eVirtualPartSize )] << ( ( pcCU->getSlice()->getSPS()->getMaxCUDepth() - uiDepth ) << 1 ) ) >> 4;
+      pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx, 0, uiDepth);
+      pcCU->setDBBPFlagSubParts(true, uiAbsPartIdx+uiPUOffset, 1, uiDepth);
+#endif
     }
   }
Index: branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 936)
@@ -2141,8 +2141,12 @@
 Void TDecSbac::parseDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
 {
+#if !MTK_DBBP_SIGNALING_H0094
   PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
+#endif
   AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
   AOF( !pcCU->getSlice()->getIsDepth() );
+#if !MTK_DBBP_SIGNALING_H0094
   AOF( ePartSize == RWTH_DBBP_PACK_MODE );
+#endif
   
   UInt uiSymbol = 0;
Index: branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecSlice.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 936)
@@ -221,4 +221,10 @@
     }
   }
+#if  MTK_DLT_CODING_FIX_H0091
+  if( pcSlice->getPPS()->getDLT() != NULL )
+  {
+      assert( pcSlice->getSPS()->getBitDepthY() == pcSlice->getPPS()->getDLT()->getDepthViewBitDepth() );
+  }
+#endif
   for( Int iCUAddr = iStartCUAddr; !uiIsLast && iCUAddr < rpcPic->getNumCUsInFrame(); iCUAddr = rpcPic->getPicSym()->xCalculateNxtCUAddr(iCUAddr) )
   {
Index: branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 936)
@@ -272,4 +272,12 @@
   WRITE_FLAG( pcPPS->getSliceHeaderExtensionPresentFlag() ? 1 : 0, "slice_segment_header_extension_present_flag");
 
+  #if MTK_DLT_CODING_FIX_H0091
+    if(( !pcPPS->getSPS()->getVPS()->getDepthId( pcPPS->getSPS()->getLayerId() ) )||
+        pcPPS->getLayerId() != 1  )
+    {
+        pcPPS->setPpsExtensionTypeFlag( PPS_EX_T_3D, false );
+    }
+  #endif
+
 #if !H_MV
   WRITE_FLAG( 0, "pps_extension_flag" );
Index: branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 936)
@@ -2397,6 +2397,11 @@
     pDBBPTmpData->auhMergeIndex[uiSegment] = rpcTempCU->getMergeIndex(0);
     
+#if RWTH_DBBP_NO_SPU_H0057
+    AOF( rpcTempCU->getSPIVMPFlag(0) == false );
+    AOF( rpcTempCU->getVSPFlag(0) == 0 );
+#else
     pDBBPTmpData->ahVSPFlag[uiSegment] = rpcTempCU->getVSPFlag(0);
     pDBBPTmpData->acDvInfo[uiSegment] = rpcTempCU->getDvInfo(0);
+#endif
     
     for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
@@ -2430,6 +2435,8 @@
     rpcTempCU->setMergeIndexSubParts(pDBBPTmpData->auhMergeIndex[uiSegment], uiPartAddr, uiSegment, uhDepth);
     
+#if !RWTH_DBBP_NO_SPU_H0057
     rpcTempCU->setVSPFlagSubParts(pDBBPTmpData->ahVSPFlag[uiSegment], uiPartAddr, uiSegment, uhDepth);
     rpcTempCU->setDvInfoSubParts(pDBBPTmpData->acDvInfo[uiSegment], uiPartAddr, uiSegment, uhDepth);
+#endif
     
     for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
Index: branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp	(revision 936)
@@ -246,5 +246,10 @@
   
 #if H_3D_DBBP
+
+#if MTK_DBBP_SIGNALING_H0094
+  if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) )
+#else
   if( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) && pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE )
+#endif
   {
     encodeDBBPFlag(pcCU, uiAbsPartIdx, bRD);
@@ -252,5 +257,7 @@
     if( pcCU->getDBBPFlag(uiAbsPartIdx) )
     {
+#if !MTK_DBBP_SIGNALING_H0094
       AOF( pcCU->getPartitionSize(uiAbsPartIdx) == RWTH_DBBP_PACK_MODE );
+#endif
       // restore virtual partition size for DBBP blocks
       pcCU->setPartSizeSubParts(eVirtualPartSize, uiAbsPartIdx, uiDepth);
Index: branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 936)
@@ -2356,6 +2356,8 @@
 Void TEncSbac::codeDBBPFlag( TComDataCU* pcCU, UInt uiAbsPartIdx )
 {
+#if !MTK_DBBP_SIGNALING_H0094
   PartSize ePartSize = pcCU->getPartitionSize( uiAbsPartIdx );
   AOF( ePartSize == RWTH_DBBP_PACK_MODE );
+#endif
   AOF( pcCU->getSlice()->getVPS()->getUseDBBP(pcCU->getSlice()->getLayerIdInVps()) );
   AOF( !pcCU->getSlice()->getIsDepth() );
Index: branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 935)
+++ branches/HTM-10.2-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 936)
@@ -1146,5 +1146,5 @@
         for( UInt uiX = 0; uiX < uiWidth; uiX++ )
         {
-#if H_3D_DIM
+#if H_3D_DIM && !SEC_NO_RESI_DLT_H0105
           if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
           {
@@ -1221,5 +1221,5 @@
       for( UInt uiX = 0; uiX < uiWidth; uiX++ )
       {
-#if H_3D_DIM
+#if H_3D_DIM && !SEC_NO_RESI_DLT_H0105
         if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getPPS()->getDLT()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
         {
@@ -3666,6 +3666,8 @@
       pcCU->setInterDirSubParts(pDBBPTmpData->auhInterDir[0], 0, 0, pcCU->getDepth(0)); // interprets depth relative to LCU level
       
+#if !RWTH_DBBP_NO_SPU_H0057
       pcCU->setVSPFlagSubParts(pDBBPTmpData->ahVSPFlag[0], 0, 0, pcCU->getDepth(0));
       pcCU->setDvInfoSubParts(pDBBPTmpData->acDvInfo[0], 0, 0, pcCU->getDepth(0));
+#endif
       
       for ( UInt uiRefListIdx = 0; uiRefListIdx < 2; uiRefListIdx++ )
