Index: trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 655)
+++ trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 724)
@@ -1245,4 +1245,7 @@
     pcVPS->setARPStepNum( i, 1 );
 #endif  
+#if MTK_SPIVMP_F0110
+    pcVPS->setSubPULog2Size(i, 0);
+#endif
     if ( i != 0 )
     {
@@ -1251,4 +1254,7 @@
 #if H_3D_IV_MERGE
         READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
+#if MTK_SPIVMP_F0110
+        READ_UVLC (uiCode, "log2_sub_PU_size_minus2");     pcVPS->setSubPULog2Size(i, uiCode+2); 
+#endif
 #endif
 #if H_3D_ARP
@@ -1265,5 +1271,19 @@
       else
       {
-
+#if QC_DEPTH_IV_MRG_F0125 && H_3D_IV_MERGE
+        if(i!=1)
+        {
+          READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( i, uiCode == 1 ? true : false );
+        }
+#endif
+#if MTK_SPIVMP_F0110
+        if (i!=1)
+        {
+          READ_UVLC (uiCode, "log2_sub_PU_size_minus2");     pcVPS->setSubPULog2Size(i, uiCode+2); 
+        }
+#endif
+#if SEC_MPI_ENABLING_MERGE_F0150
+        READ_FLAG( uiCode, "mpi_flag[i]" );             pcVPS->setMPIFlag( i, uiCode == 1 ? true : false );
+#endif
         READ_FLAG( uiCode, "vps_depth_modes_flag[i]" );             pcVPS->setVpsDepthModesFlag( i, uiCode == 1 ? true : false );
         //          READ_FLAG( uiCode, "lim_qt_pred_flag[i]");                  pcVPS->setLimQtPreFlag     ( i, uiCode == 1 ? true : false ); 
@@ -1795,5 +1815,9 @@
     }
 #if H_3D_IC
+#if SEC_ONLY_TEXTURE_IC_F0151
+    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) && !rpcSlice->getIsDepth())
+#else
     else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) )
+#endif
     {
       UInt uiCodeTmp = 0;
@@ -1813,6 +1837,20 @@
       READ_UVLC( uiCode, "five_minus_max_num_merge_cand");
 #if H_3D_IV_MERGE
+#if SEC_MPI_ENABLING_MERGE_F0150
+      if(rpcSlice->getIsDepth())
+      {
+        Bool bMPIFlag = rpcSlice->getVPS()->getMPIFlag( rpcSlice->getLayerIdInVps() ) ;
+        Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ;
+        rpcSlice->setMaxNumMergeCand(( ( bMPIFlag || ivMvPredFlag ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
+      }
+      else
+      {
+        Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ;
+        rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
+      }
+#else
       Bool ivMvPredFlag = rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ;
       rpcSlice->setMaxNumMergeCand(( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode);
+#endif
 #else
       rpcSlice->setMaxNumMergeCand(MRG_MAX_NUM_CANDS - uiCode);
Index: trunk/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 655)
+++ trunk/source/Lib/TLibDecoder/TDecCu.cpp	(revision 724)
@@ -135,5 +135,7 @@
 Void TDecCu::decompressCU( TComDataCU* pcCU )
 {
+#if !QC_DEPTH_IV_MRG_F0125
   xDecompressCU( pcCU, 0,  0 );
+#endif
 }
 
@@ -313,4 +315,12 @@
       m_ppcCU[uiDepth]->setHeight ( 0, pcCU->getSlice()->getSPS()->getMaxCUHeight()/(1<<uiDepth)  );
       m_ppcCU[uiDepth]->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );     
+#if QC_DEPTH_IV_MRG_F0125
+      if( pcCU->getSlice()->getIsDepth())
+      {
+        DvInfo.bDV = m_ppcCU[uiDepth]->getDispNeighBlocks(0, 0, &DvInfo);
+      }
+      else
+      {
+#endif
 #if H_3D_NBDV_REF
       if(pcCU->getSlice()->getVPS()->getDepthRefinementFlag( pcCU->getSlice()->getLayerIdInVps() ))  //Notes from QC: please check the condition for DoNBDV. Remove this comment once it is done.
@@ -323,5 +333,7 @@
         DvInfo.bDV = m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo);
       }
-
+#if QC_DEPTH_IV_MRG_F0125
+      }
+#endif
 #if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC   
       if ( g_decTraceDispDer )
@@ -378,12 +390,45 @@
     UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx);
 
+#if LGE_SHARP_VSP_INHERIT_F0104
+#if H_3D_IC
+    m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
+#endif
+#if H_3D_ARP
+    m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
+#endif
+#endif
+
 #if H_3D_VSP
     Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
     memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
+#if MTK_SPIVMP_F0110
+    Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
+    memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
+    TComMvField*  pcMvFieldSP;
+    UChar* puhInterDirSP;
+    pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 
+    puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 
+#endif
+#if ETRIKHU_MERGE_REUSE_F0093
+    m_ppcCU[uiDepth]->initAvailableFlags();
+    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
+    m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
+#if MTK_SPIVMP_F0110
+      , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
+#endif
+      , numValidMergeCand, uiMergeIndex );
+#else
     m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand, uiMergeIndex );
+#endif
     pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth );
 #else
+#if ETRIKHU_MERGE_REUSE_F0093
+    m_ppcCU[uiDepth]->initAvailableFlags();
     m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
+    m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
+#else
+    m_ppcCU[uiDepth]->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
+#endif
 #endif
 #if H_3D_VSP
@@ -423,4 +468,28 @@
       }
     }
+#if MTK_SPIVMP_F0110
+    pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 
+    if (bSPIVMPFlag[uiMergeIndex])
+    {
+      UInt uiSPAddr;
+      Int iWidth = pcCU->getWidth(uiAbsPartIdx);
+      Int iHeight = pcCU->getHeight(uiAbsPartIdx);
+
+      Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
+
+      pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
+
+      for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
+      {
+        pcCU->getSPAbsPartIdx(uiAbsPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
+        pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
+        pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
+        pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
+      }
+    }
+    delete pcMvFieldSP;
+    delete puhInterDirSP;
+#endif
+#if !LGE_SHARP_VSP_INHERIT_F0104
 #if H_3D_IC
     m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
@@ -429,5 +498,10 @@
     m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
 #endif
+#endif
+
     xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
+#if QC_DEPTH_IV_MRG_F0125
+    xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
+#endif
     return;
   }
@@ -443,4 +517,7 @@
     {
       xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
+#if QC_DEPTH_IV_MRG_F0125
+      xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
+#endif
       return;
     }
@@ -452,4 +529,5 @@
   // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
   m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
+#if !LGE_SHARP_VSP_INHERIT_F0104
 #if H_3D_IC
   m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
@@ -458,4 +536,5 @@
   m_pcEntropyDecoder->decodeARPW    ( pcCU , uiAbsPartIdx , uiDepth );  
 #endif  
+#endif
 #if H_3D_INTER_SDC
   m_pcEntropyDecoder->decodeInterSDCFlag( pcCU, uiAbsPartIdx, uiDepth );
@@ -466,4 +545,7 @@
   setdQPFlag( bCodeDQP );
   xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
+#if QC_DEPTH_IV_MRG_F0125
+  xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
+#endif
 }
 
@@ -481,5 +563,5 @@
 {
   TComPic* pcPic = pcCU->getPic();
-  
+#if !QC_DEPTH_IV_MRG_F0125  
   Bool bBoundary = false;
   UInt uiLPelX   = pcCU->getCUPelX() + g_auiRasterToPelX[ g_auiZscanToRaster[uiAbsPartIdx] ];
@@ -516,5 +598,5 @@
     return;
   }
-  
+#endif  
   // Residual reconstruction
   m_ppcYuvResi[uiDepth]->clear();
@@ -693,5 +775,16 @@
     for( UInt uiX = 0; uiX < uiWidth; uiX++ )
     {
+#if LGE_PRED_RES_CODING_DLT_DOMAIN_F0159
+        if( (isDimMode( uiLumaPredMode ) || uiLumaPredMode == HOR_IDX || uiLumaPredMode == VER_IDX || uiLumaPredMode == DC_IDX) && pcCU->getSlice()->getIsDepth() && pcCU->getSlice()->getVPS()->getUseDLTFlag(pcCU->getSlice()->getLayerIdInVps()) )
+        {
+            pReco    [ uiX ] = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), Clip3( 0, pcCU->getSlice()->getVPS()->getNumDepthValues( pcCU->getSlice()->getLayerIdInVps() ) - 1, pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), pPred[ uiX ] ) + pResi[ uiX ] ) );
+        }
+        else
+        {
       pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] );
+        }
+#else
+      pReco    [ uiX ] = ClipY( pPred[ uiX ] + pResi[ uiX ] );
+#endif
       pRecIPred[ uiX ] = pReco[ uiX ];
     }
Index: trunk/source/Lib/TLibDecoder/TDecEntropy.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 655)
+++ trunk/source/Lib/TLibDecoder/TDecEntropy.cpp	(revision 724)
@@ -111,5 +111,9 @@
   pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
 
+#if SEC_ONLY_TEXTURE_IC_F0151
+  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )
+#else
   if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) )
+#endif
   {
     return;
@@ -209,5 +213,11 @@
   UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS];
 #endif
-
+#if MTK_SPIVMP_F0110
+  Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM];
+  TComMvField*  pcMvFieldSP;
+  UChar* puhInterDirSP;
+  pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition()*2]; 
+  puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition()]; 
+#endif
   for ( UInt ui = 0; ui < pcCU->getSlice()->getMaxNumMergeCand(); ui++ )
   {
@@ -235,4 +245,12 @@
       decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth );
       UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx);
+#if LGE_SHARP_VSP_INHERIT_F0104
+#if H_3D_IC
+      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
+#endif
+#if H_3D_ARP
+      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
+#endif
+#endif
       if ( pcCU->getSlice()->getPPS()->getLog2ParallelMergeLevelMinus2() && ePartSize != SIZE_2Nx2N && pcSubCU->getWidth( 0 ) <= 8 ) 
       {
@@ -244,5 +262,18 @@
           memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
           InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
+#if MTK_SPIVMP_F0110
+          memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
+#endif
+#if ETRIKHU_MERGE_REUSE_F0093
+          pcSubCU->initAvailableFlags();
+          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
+          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
+#if MTK_SPIVMP_F0110
+            , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
+#endif
+            , numValidMergeCand );
+#else
           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, numValidMergeCand );
+#endif
           pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
 
@@ -252,5 +283,12 @@
           }
 #else
+#if ETRIKHU_MERGE_REUSE_F0093
+          pcSubCU->initAvailableFlags();
+          pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
+          pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
+
+#else
           pcSubCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
+#endif
 #endif
           isMerged = true;
@@ -265,5 +303,18 @@
         memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
         InheritedVSPDisInfo inheritedVSPDisInfo[MRG_MAX_NUM_CANDS_MEM];
+#if MTK_SPIVMP_F0110
+        memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM);
+#endif
+#if ETRIKHU_MERGE_REUSE_F0093
+        pcSubCU->initAvailableFlags();
+        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
+        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo
+#if MTK_SPIVMP_F0110
+          , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP
+#endif
+          ,numValidMergeCand, uiMergeIndex );
+#else
         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, vspFlag, inheritedVSPDisInfo,numValidMergeCand, uiMergeIndex );
+#endif
         pcCU->setVSPFlagSubParts( vspFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );
         if(vspFlag[uiMergeIndex])
@@ -272,5 +323,11 @@
         }
 #else
+#if ETRIKHU_MERGE_REUSE_F0093
+        pcSubCU->initAvailableFlags();
         pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
+        pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
+#else
+        pcSubCU->getInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand, uiMergeIndex );
+#endif
 #endif
       }
@@ -288,4 +345,27 @@
         }
       }
+#if MTK_SPIVMP_F0110
+      pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth );  
+      if (bSPIVMPFlag[uiMergeIndex] != 0)
+      {
+        Int iWidth, iHeight;
+        UInt uiIdx;
+        pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true );
+
+        UInt uiSPAddr;
+
+        Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight;
+
+        pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight);
+
+        for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++)
+        {
+          pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr);
+          pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight);
+          pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight);
+          pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight);
+        }
+      }
+#endif
     }
     else
@@ -301,4 +381,12 @@
         }
       }
+#if LGE_SHARP_VSP_INHERIT_F0104
+#if H_3D_IC
+      decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
+#endif
+#if H_3D_ARP
+      decodeARPW  ( pcCU, uiAbsPartIdx, uiDepth );
+#endif
+#endif
     }
 #if H_3D_VSP
@@ -313,4 +401,8 @@
     }
   }
+#if MTK_SPIVMP_F0110
+  delete pcMvFieldSP;
+  delete puhInterDirSP;
+#endif
   return;
 }
Index: trunk/source/Lib/TLibDecoder/TDecSbac.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 655)
+++ trunk/source/Lib/TLibDecoder/TDecSbac.cpp	(revision 724)
@@ -89,5 +89,7 @@
 #if H_3D_DIM_DMM
 , m_cDmm1DataSCModel          ( 1,             1,               NUM_DMM1_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
+#if !SEC_DMM3_RBC_F0147
 , m_cDmm3DataSCModel          ( 1,             1,               NUM_DMM3_DATA_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -176,5 +178,7 @@
 #if H_3D_DIM_DMM
   m_cDmm1DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM1_DATA );
+#if !SEC_DMM3_RBC_F0147
   m_cDmm3DataSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_DMM3_DATA );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -249,5 +253,7 @@
 #if H_3D_DIM_DMM
   m_cDmm1DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM1_DATA );
+#if !SEC_DMM3_RBC_F0147
   m_cDmm3DataSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_DMM3_DATA );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -408,4 +414,22 @@
 }
 
+#if QC_DIM_DELTADC_UNIFY_F0132
+Void TDecSbac::xParseDimDeltaDC( Pel& rValDeltaDC, UInt uiNumSeg )
+{
+  UInt absValDeltaDC = 0;
+  xReadExGolombLevel( absValDeltaDC, m_cDdcDataSCModel.get(0, 0, 0) );
+  rValDeltaDC = (Pel)absValDeltaDC + ( uiNumSeg > 1 ? 0 : 1 );
+
+  if( rValDeltaDC != 0 )
+  {
+    UInt uiSign;
+    m_pcTDecBinIf->decodeBinEP( uiSign );
+    if ( uiSign )
+    {
+      rValDeltaDC = -rValDeltaDC;
+    }
+  }
+}
+#else
 Void TDecSbac::xParseDimDeltaDC( Pel& rValDeltaDC, UInt dimType )
 {
@@ -424,4 +448,6 @@
   }
 }
+#endif
+
 #if H_3D_DIM_DMM
 Void TDecSbac::xParseDmm1WedgeIdx( UInt& ruiTabIdx, Int iNumBit )
@@ -435,5 +461,5 @@
   ruiTabIdx = uiIdx;
 }
-
+#if !SEC_DMM3_RBC_F0147
 Void TDecSbac::xParseDmm3WedgeIdx( UInt& ruiIntraIdx, Int iNumBit )
 {
@@ -446,4 +472,5 @@
   ruiIntraIdx = uiIdx;
 }
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -1140,4 +1167,5 @@
       pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, absPartIdx, depth );
     } break;
+#if !SEC_DMM3_RBC_F0147
   case( DMM3_IDX ):
     {
@@ -1146,4 +1174,5 @@
       pcCU->setDmm3IntraTabIdxSubParts( uiIntraIdx, absPartIdx, depth );
     } break;
+#endif
   case( DMM4_IDX ): break;
 #endif
@@ -1157,5 +1186,5 @@
   }
 
-#if H_3D_DIM_SDC
+#if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132
   if( pcCU->getSDCFlag(absPartIdx) )
   {
@@ -1173,7 +1202,48 @@
   {
 #endif
+#if QC_DIM_DELTADC_UNIFY_F0132
+    if( dimType < DIM_NUM_TYPE || pcCU->getSDCFlag( absPartIdx ) )
+#else
     if( dimType < DIM_NUM_TYPE )
+#endif
     {
       UInt symbol;
+#if QC_DIM_DELTADC_UNIFY_F0132
+      UInt uiNumSegments = ( dir == PLANAR_IDX ) ? 1 : 2;
+
+      if( pcCU->getSDCFlag( absPartIdx ) )
+      {
+        assert(pcCU->getPartitionSize(absPartIdx)==SIZE_2Nx2N);
+        pcCU->setTrIdxSubParts(0, absPartIdx, depth);
+        pcCU->setCbfSubParts(1, 1, 1, absPartIdx, depth);
+      }
+
+      m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, uiNumSegments-1) );
+
+      if( symbol )
+      {
+        if( !pcCU->getSDCFlag( absPartIdx ) )
+        {
+          dir += symbol;
+        }
+      }
+      for( UInt segment = 0; segment < uiNumSegments; segment++ )
+      {
+        Pel valDeltaDC = 0;
+        if( symbol )
+        {
+          xParseDimDeltaDC( valDeltaDC, uiNumSegments );
+        }
+
+        if( pcCU->getSDCFlag( absPartIdx ) )
+        {
+          pcCU->setSDCSegmentDCOffset( valDeltaDC, segment, absPartIdx );
+        }
+        else
+        {
+          pcCU->setDimDeltaDC( dimType, segment, absPartIdx, valDeltaDC );
+        }
+      }
+#else
       m_pcTDecBinIf->decodeBin( symbol, m_cDdcFlagSCModel.get(0, 0, (RBC_IDX == dimType) ? 1 : 0) );
       if( symbol )
@@ -1187,6 +1257,7 @@
         }
       }
-    }
-#if H_3D_DIM_SDC
+#endif
+    }
+#if H_3D_DIM_SDC && !QC_DIM_DELTADC_UNIFY_F0132
   }
 #endif
@@ -1218,5 +1289,9 @@
   else if( puIdx == 0 )
   {
+#if SEC_DMM3_RBC_F0147
+    while( binNum < 1 && symbol )
+#else
     while( binNum < 3 && symbol )
+#endif
     {
       ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);
@@ -1225,11 +1300,30 @@
       binNum++;
     }
+#if SEC_DMM3_RBC_F0147
+    if( modeCode == 0 ) { dir = 0;                       sdcFlag = 0;}
+    else if( modeCode == 1 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
+#else
          if( modeCode == 0 ) { dir = 0;                       sdcFlag = 0;}
     else if( modeCode == 2 ) { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
     else if( modeCode == 6 ) { dir = (2*DMM3_IDX+DIM_OFFSET); sdcFlag = 0;}
     else if( modeCode == 7 ) { dir = (2* RBC_IDX+DIM_OFFSET); sdcFlag = 0;}
+#endif
   }
   else
   {
+#if SEC_DMM3_RBC_F0147
+    while( binNum < 4 && symbol )
+    {
+      ctxDepthMode = puIdx*3 + ((binNum >= 2) ? 2 : binNum);
+      m_pcTDecBinIf->decodeBin( symbol, m_cDepthIntraModeSCModel.get(0,0,ctxDepthMode) );
+      modeCode = (modeCode<<1) + symbol;
+      binNum++;
+    }
+    if ( modeCode == 0 )        { dir =  PLANAR_IDX;             sdcFlag = 1;}
+    else if ( modeCode == 2 )   { dir = 5;                       sdcFlag = 0;}
+    else if ( modeCode == 6 )   { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 1;}
+    else if ( modeCode == 14 )  { dir = (2*DMM1_IDX+DIM_OFFSET); sdcFlag = 0;}
+    else if ( modeCode == 15 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
+#else
     UInt maxBinNum = 0;
     m_pcTDecBinIf->decodeBinEP(symbol);
@@ -1263,4 +1357,5 @@
       else if ( modeCode == 3 )  { dir = (2*DMM4_IDX+DIM_OFFSET); sdcFlag = 0;}
     }
+#endif
   }
   pcCU->setLumaIntraDirSubParts( (UChar)dir, absPartIdx, depth );
Index: trunk/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 655)
+++ trunk/source/Lib/TLibDecoder/TDecSbac.h	(revision 724)
@@ -99,8 +99,14 @@
 #if H_3D_DIM
   Void  xReadExGolombLevel   ( UInt& ruiSymbol, ContextModel& rcSCModel  );
+#if QC_DIM_DELTADC_UNIFY_F0132
+  Void  xParseDimDeltaDC     ( Pel& rValDeltaDC, UInt uiNumSeg );
+#else
   Void  xParseDimDeltaDC     ( Pel& rValDeltaDC, UInt dimType );
+#endif
 #if H_3D_DIM_DMM
   Void  xParseDmm1WedgeIdx   ( UInt& ruiTabIdx, Int iNumBit );
+#if !SEC_DMM3_RBC_F0147
   Void  xParseDmm3WedgeIdx   ( UInt& ruiIntraIdx, Int iNumBit );
+#endif
 #endif
 #if H_3D_DIM_RBC
@@ -213,5 +219,7 @@
 #if H_3D_DIM_DMM
   ContextModel3DBuffer m_cDmm1DataSCModel;
+#if !SEC_DMM3_RBC_F0147
   ContextModel3DBuffer m_cDmm3DataSCModel;
+#endif
 #endif
 #if H_3D_DIM_RBC
Index: trunk/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 655)
+++ trunk/source/Lib/TLibDecoder/TDecTop.cpp	(revision 724)
@@ -282,4 +282,19 @@
 }
 
+#if QC_DEPTH_IV_MRG_F0125
+Void
+CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice )
+{
+  UInt uiViewIndex = pcSlice->getViewIndex();
+
+  pcSlice->getSPS()->initCamParaSPS( uiViewIndex, m_uiCamParsCodedPrecision, m_bCamParsVaryOverTime, m_aaiCodedScale, m_aaiCodedOffset );
+
+  if( m_bCamParsVaryOverTime )
+  {
+    pcSlice->setCamparaSlice( m_aaiCodedScale, m_aaiCodedOffset );
+  }
+}
+#endif
+
 Bool
 CamParsCollector::xIsComplete()
@@ -951,5 +966,9 @@
     pcSlice->setRefPicList     ( tempRefPicLists, usedAsLongTerm, numPocTotalCurr, true ); 
 #if H_3D_ARP
+#if SHARP_ARP_REF_CHECK_F0105
+    pcSlice->setARPStepNum(m_ivPicLists);
+#else
     pcSlice->setARPStepNum();
+#endif
     if( pcSlice->getARPStepNum() > 1 )
     {
@@ -1053,4 +1072,11 @@
   }
 
+#if QC_DEPTH_IV_MRG_F0125
+  if( pcSlice->getIsDepth() && m_pcCamParsCollector )
+  {
+    m_pcCamParsCollector->copyCamParamForSlice( pcSlice );
+  }
+#endif
+
   //  Decode a picture
   m_cGopDecoder.decompressSlice(nalu.m_Bitstream, pcPic);
@@ -1060,4 +1086,10 @@
     m_pcCamParsCollector->setSlice( pcSlice );
   }
+#if QC_DEPTH_IV_MRG_F0125
+  if( pcSlice->getIsDepth() )
+  {
+    pcSlice->getSPS()->setHasCamParInSliceHeader( false );
+  }
+#endif
 #endif
   m_bFirstSliceInPicture = false;
Index: trunk/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 655)
+++ trunk/source/Lib/TLibDecoder/TDecTop.h	(revision 724)
@@ -77,4 +77,8 @@
   Bool  isInitialized() const     { return m_bInitialized; }
   Int**** getBaseViewShiftLUTI()  { return m_aiBaseViewShiftLUT;   }
+
+#if QC_DEPTH_IV_MRG_F0125
+  Void  copyCamParamForSlice( TComSlice* pcSlice );
+#endif
 
 private:
