Index: branches/HTM-8.2-dev2-Qualcomm/cfg/3D-HEVC/baseCfg_2view+depth.cfg
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/cfg/3D-HEVC/baseCfg_2view+depth.cfg	(revision 669)
@@ -195,5 +195,5 @@
 
 #========== multiview coding tools ==========
-IvMvPred                            : 1                # Inter-view motion prediction
+IvMvPred                            : 1 1              # Inter-view motion prediction
 AdvMultiviewResPred                 : 1                # Advanced inter-view residual prediction (0:off, 1:on)
 IlluCompEnable                      : 1 1              # Enable Illumination compensation ( 0: off, 1: on )   (v/d) 
Index: branches/HTM-8.2-dev2-Qualcomm/cfg/3D-HEVC/baseCfg_3view+depth.cfg
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/cfg/3D-HEVC/baseCfg_3view+depth.cfg	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/cfg/3D-HEVC/baseCfg_3view+depth.cfg	(revision 669)
@@ -225,5 +225,5 @@
 
 #========== multiview coding tools ==========
-IvMvPred                            : 1                # Inter-view motion prediction
+IvMvPred                            : 1 1              # Inter-view motion prediction
 AdvMultiviewResPred                 : 1                # Advanced inter-view residual prediction (0:off, 1:on)
 IlluCompEnable                      : 1 1              # Enable Illumination compensation ( 0: off, 1: on )  (v/d)
Index: branches/HTM-8.2-dev2-Qualcomm/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 669)
@@ -750,5 +750,9 @@
 #endif
 #if H_3D_IV_MERGE
+#if QC_DEPTH_IV_MRG_F0125  
+  ("IvMvPred",                        m_ivMvPredFlag            , std::vector<Bool>(2, true)            , "inter view motion prediction " )
+#else
   ("IvMvPred",                        m_ivMvPredFlag,           true            , "inter view motion prediction " )  
+#endif
 #endif
 #if H_3D_NBDV_REF
@@ -2414,5 +2418,9 @@
 #endif
 #if H_3D_IV_MERGE
+#if QC_DEPTH_IV_MRG_F0125
+  printf("IvMvPred:%d %d", m_ivMvPredFlag[0] ? 1 : 0, m_ivMvPredFlag[1] ? 1 : 0);
+#else
   printf("IvMvPred:%d ", m_ivMvPredFlag );
+#endif
 #endif
 #if H_3D_ARP
Index: branches/HTM-8.2-dev2-Qualcomm/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/App/TAppEncoder/TAppEncCfg.h	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/App/TAppEncoder/TAppEncCfg.h	(revision 669)
@@ -115,5 +115,9 @@
 
 #if H_3D_IV_MERGE
+#if QC_DEPTH_IV_MRG_F0125
+  vector<Bool>           m_ivMvPredFlag;                      ///< Interview motion vector prediction 
+#else
   Bool                   m_ivMvPredFlag;                      ///< Interview motion vector prediction 
+#endif
 #endif
 #if H_3D_ARP                                                  /// < flag and number of weighting factors in ARP
Index: branches/HTM-8.2-dev2-Qualcomm/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/App/TAppEncoder/TAppEncTop.cpp	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/App/TAppEncoder/TAppEncTop.cpp	(revision 669)
@@ -149,8 +149,15 @@
     //====== Camera Parameters =========
     m_cTEncTop.setCameraParameters             ( &m_cCameraData );     
+#if QC_DEPTH_IV_MRG_F0125
+    m_cTEncTop.setCamParPrecision              ( m_cCameraData.getCamParsCodedPrecision  () );
+    m_cTEncTop.setCamParInSliceHeader          ( m_cCameraData.getVaryingCameraParameters() );
+    m_cTEncTop.setCodedScale                   ( m_cCameraData.getCodedScale             () );
+    m_cTEncTop.setCodedOffset                  ( m_cCameraData.getCodedOffset            () );
+#else
     m_cTEncTop.setCamParPrecision              ( isDepth ? false : m_cCameraData.getCamParsCodedPrecision  () );
     m_cTEncTop.setCamParInSliceHeader          ( isDepth ? 0     : m_cCameraData.getVaryingCameraParameters() );
     m_cTEncTop.setCodedScale                   ( isDepth ? 0     : m_cCameraData.getCodedScale             () );
     m_cTEncTop.setCodedOffset                  ( isDepth ? 0     : m_cCameraData.getCodedOffset            () );
+#endif
 #if H_3D_VSO
     //====== VSO =========
@@ -1652,5 +1659,16 @@
 
 #if H_3D_IV_MERGE
+#if QC_DEPTH_IV_MRG_F0125
+    if( isDepth )
+    {
+      vps.setIvMvPredFlag         ( layer, (layer != 1) && m_ivMvPredFlag[1] ); 
+    }
+    else
+    {
+      vps.setIvMvPredFlag         ( layer, !isLayerZero && m_ivMvPredFlag[0] ); 
+    }
+#else
     vps.setIvMvPredFlag         ( layer, !isLayerZero && !isDepth && m_ivMvPredFlag ); 
+#endif
 #endif
 #if H_3D_NBDV_REF
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp	(revision 669)
@@ -3522,4 +3522,8 @@
   deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT );
   deriveLeftBottomIdxGeneral  ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB );
+#if QC_DEPTH_IV_MRG_F0125
+  Bool bIsDepth = getSlice()->getIsDepth();
+  Bool bDepthIPMCAvai = false;
+#endif 
 #if H_3D_IV_MERGE
   
@@ -3621,5 +3625,9 @@
   if ( ivMvPredFlag )
   {
-    getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir );
+    getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir 
+#if QC_DEPTH_IV_MRG_F0125
+    , bIsDepth
+#endif
+    );
   }  
   
@@ -3642,4 +3650,30 @@
     }
 
+#if QC_DEPTH_IV_MRG_F0125
+    if ( bIsDepth )
+    {
+      Bool bRemoveSpa = false;
+      Int iCnloop = iCount-1;
+      for(; iCnloop >= 0; iCnloop --)
+      {
+        if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])
+        {
+          bRemoveSpa                      = true;
+          abCandIsInter        [ iCount ] = false;
+
+          puhInterDirNeighbours[iCount]   = 0;
+          pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );
+          pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
+          break;
+        }
+      }
+      if(!bRemoveSpa)
+      {
+        bDepthIPMCAvai = true;
+      }
+    }
+    if ( bDepthIPMCAvai || !bIsDepth )
+    {
+#endif
     if ( mrgCandIdx == iCount )
     {
@@ -3647,4 +3681,7 @@
     }
     iCount ++;
+#if QC_DEPTH_IV_MRG_F0125
+    }
+#endif
   } 
 
@@ -3682,5 +3719,9 @@
 #if H_3D_IV_MERGE 
     Bool bRemoveSpa = false; //pruning to inter-view candidates
+#if QC_DEPTH_IV_MRG_F0125
+    Int  iCnloop = bDepthIPMCAvai ? (iCount-2): (iCount-1);
+#else
     Int  iCnloop    = iCount - 1;
+#endif
     for(; iCnloop >= 0; iCnloop --)
     {
@@ -3758,5 +3799,13 @@
 #if H_3D_IV_MERGE 
     Bool bRemoveSpa = false; //pruning to inter-view candidates
+#if QC_DEPTH_IV_MRG_F0125
+    Int iCnloop;
+    if( bIsDepth )
+      iCnloop = (bLeftAvai && bDepthIPMCAvai) ? (iCount-3) : ((bLeftAvai || bDepthIPMCAvai)  ? (iCount-2): (iCount-1));
+    else
+      iCnloop = bLeftAvai? (iCount-2): (iCount-1);
+#else
     Int  iCnloop    = bLeftAvai? (iCount-2): (iCount-1);
+#endif
     for(; iCnloop >= 0; iCnloop --)
     {
@@ -5411,4 +5460,54 @@
   riPosX = g_auiRasterToPelX[g_auiZscanToRaster[uiAbsPartIndex]] + getCUPelX();
   riPosY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIndex]] + getCUPelY();  
+}
+#endif
+#if QC_DEPTH_IV_MRG_F0125
+Bool TComDataCU::getDispNeighBlocks (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp)
+{
+  Pel pDepPos[3] = {0, 0, 0};
+  assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N);
+  Bool bDepAvail = false;
+  Pel *pDepth  = this->getPic()->getPicYuvRec()->getLumaAddr();
+  Int iDepStride =  this->getPic()->getPicYuvRec()->getStride();
+  TComMv cMv; 
+
+  Int xP, yP, nPSW, nPSH;
+  this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH);
+
+  if(xP != 0 && yP != 0)
+  {
+    pDepPos[0] = pDepth[ (yP-1) * iDepStride + (xP-1) ];
+    bDepAvail = true;
+  }
+
+  if(xP != 0)
+  {
+    pDepPos[1] = pDepth[ (yP+nPSH-1) * iDepStride + (xP-1) ];
+    bDepAvail = true;
+  }
+
+  if(yP != 0)
+  {
+    pDepPos[2] = pDepth[ (yP-1) * iDepStride + (xP+nPSW-1) ];
+    bDepAvail = true;
+  }
+
+  if (bDepAvail)
+  {
+    Pel pAvgDepth = (xP != 0 && yP != 0) ? ((5*pDepPos[0] + 5*pDepPos[1] + 6*pDepPos[2] + 8)>>4) : (xP == 0) ? pDepPos[2] : pDepPos[1];
+    Int iDisp     = getSlice()->getDepthToDisparityB( 0 )[ pAvgDepth ];
+    cMv.setHor(iDisp);
+    cMv.setVer(0);
+    pDisp->m_acNBDV = cMv;
+    pDisp->m_aVIdxCan = 0;
+    return true;
+  }
+  else
+  {  
+    cMv.setZero();
+    pDisp->m_acNBDV = cMv;
+    pDisp->m_aVIdxCan = 0;
+    return false;
+  }
 }
 #endif
@@ -5944,5 +6043,9 @@
 #if H_3D_IV_MERGE
 Bool
-TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc )
+TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc 
+#if QC_DEPTH_IV_MRG_F0125
+, Bool bIsDepth           
+#endif
+)
 {
   TComSlice*    pcSlice = getSlice ();  
@@ -5950,5 +6053,9 @@
   
   //--- get base CU/PU and check prediction mode ---
+#if QC_DEPTH_IV_MRG_F0125
+  TComPic*    pcBasePic   = pcSlice->getIvPic( bIsDepth, iViewIndex );
+#else
   TComPic*    pcBasePic   = pcSlice->getIvPic( false, iViewIndex );
+#endif
   TComPicYuv* pcBaseRec   = pcBasePic->getPicYuvRec   ();
 
@@ -5961,6 +6068,11 @@
   pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );
 
+#if QC_DEPTH_IV_MRG_F0125
+  iCurrPosX  += ( iWidth  >> 1 );
+  iCurrPosY  += ( iHeight >> 1 );
+#else
   iCurrPosX  += ( ( iWidth  - 1 ) >> 1 );
   iCurrPosY  += ( ( iHeight - 1 ) >> 1 );
+#endif
 
   Bool depthRefineFlag = false; 
@@ -6026,8 +6138,15 @@
                   TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
 #if H_3D_NBDV 
-                  cMv.setIDVFlag   (true);
-                  cMv.setIDVHor    (cDv.getHor());                  
-                  cMv.setIDVVer    (cDv.getVer());  
-                  cMv.setIDVVId    (iViewIndex); 
+#if QC_DEPTH_IV_MRG_F0125
+                  if( !bIsDepth )
+                  {
+#endif
+                    cMv.setIDVFlag   (true);
+                    cMv.setIDVHor    (cDv.getHor());                  
+                    cMv.setIDVVer    (cDv.getVer());  
+                    cMv.setIDVVId    (iViewIndex); 
+#if QC_DEPTH_IV_MRG_F0125
+                  }
+#endif
 #endif
                   clipMv( cMv );
@@ -6071,4 +6190,8 @@
 #endif
           cMv.setHor( cMv.getHor() + ioffsetDV );
+#if QC_DEPTH_IV_MRG_F0125
+          if( bIsDepth )
+            cMv.setHor((cMv.getHor()+2)>>2); 
+#endif
           cMv.setVer( 0 );
           clipMv( cMv );
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.h	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComDataCU.h	(revision 669)
@@ -493,4 +493,9 @@
    ); 
    
+#if QC_DEPTH_IV_MRG_F0125
+  Bool          getDispNeighBlocks  ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);
+  Bool          getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm );
+#endif
+
 #if H_3D_NBDV_REF
   Pel           getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT );
@@ -502,5 +507,9 @@
 #endif
 #if H_3D_IV_MERGE
-  Bool          getInterViewMergeCands          ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc );   
+  Bool          getInterViewMergeCands          ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc 
+#if QC_DEPTH_IV_MRG_F0125
+    , Bool bIsDepth           
+#endif
+    );   
 #endif
 #if H_3D_ARP
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp	(revision 669)
@@ -2968,4 +2968,8 @@
 #endif 
 
+#if QC_DEPTH_IV_MRG_F0125
+  setupLUT = setupLUT || ( getVPS()->getIvMvPredFlag(layerIdInVPS ) && getIsDepth() );
+#endif
+
   if( !setupLUT )
     return; 
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComSlice.h	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TComSlice.h	(revision 669)
@@ -1338,4 +1338,7 @@
   UInt getCamParPrecision    ()  { return m_uiCamParPrecision; }
   Bool hasCamParInSliceHeader()  { return m_bCamParInSliceHeader; }
+#if QC_DEPTH_IV_MRG_F0125
+  Void setHasCamParInSliceHeader( Bool b )  { m_bCamParInSliceHeader = b; }
+#endif
   Int* getCodedScale         ()  { return m_aaiCodedScale [0]; }
   Int* getCodedOffset        ()  { return m_aaiCodedOffset[0]; }
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TypeDef.h	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibCommon/TypeDef.h	(revision 669)
@@ -207,4 +207,9 @@
 #if H_3D_ARP
 #define H_3D_ARP_WFNR                     3
+#endif
+
+///// ***** Inter-view motion merge candidate *********
+#if H_3D_IV_MERGE
+#define QC_DEPTH_IV_MRG_F0125             1   // JCT3V-F0125: Depth oriented Inter-view MV candidate
 #endif
 
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 669)
@@ -1265,5 +1265,10 @@
       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
         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 ); 
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp	(revision 669)
@@ -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 )
@@ -430,4 +442,7 @@
 #endif
     xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
+#if QC_DEPTH_IV_MRG_F0125
+    xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
+#endif
     return;
   }
@@ -443,4 +458,7 @@
     {
       xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
+#if QC_DEPTH_IV_MRG_F0125
+      xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
+#endif
       return;
     }
@@ -466,4 +484,7 @@
   setdQPFlag( bCodeDQP );
   xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
+#if QC_DEPTH_IV_MRG_F0125
+  xDecompressCU(pcCU, uiAbsPartIdx, uiDepth );
+#endif
 }
 
@@ -481,5 +502,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 +537,5 @@
     return;
   }
-  
+#endif  
   // Residual reconstruction
   m_ppcYuvResi[uiDepth]->clear();
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecTop.cpp	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecTop.cpp	(revision 669)
@@ -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()
@@ -1053,4 +1068,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 +1082,10 @@
     m_pcCamParsCollector->setSlice( pcSlice );
   }
+#if QC_DEPTH_IV_MRG_F0125
+  if( pcSlice->getIsDepth() )
+  {
+    pcSlice->getSPS()->setHasCamParInSliceHeader( false );
+  }
+#endif
 #endif
   m_bFirstSliceInPicture = false;
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecTop.h	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibDecoder/TDecTop.h	(revision 669)
@@ -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:
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 669)
@@ -1019,4 +1019,10 @@
       else
       {
+#if QC_DEPTH_IV_MRG_F0125
+        if(i!=1)
+        {
+          WRITE_FLAG( pcVPS->getIvMvPredFlag         ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]");
+        }
+#endif
         WRITE_FLAG( pcVPS->getVpsDepthModesFlag( i ) ? 1 : 0 ,          "vps_depth_modes_flag[i]" );
         //WRITE_FLAG( pcVPS->getLimQtPredFlag    ( i ) ? 1 : 0 ,          "lim_qt_pred_flag[i]"     ); 
@@ -1452,5 +1458,9 @@
     WRITE_UVLC(0,"slice_header_extension_length"); //<- this element needs to be set to the correct value!!
 
+#if QC_DEPTH_IV_MRG_F0125
+    if( pcSlice->getSPS()->hasCamParInSliceHeader() && !pcSlice->getIsDepth() )
+#else
     if( pcSlice->getSPS()->hasCamParInSliceHeader() )
+#endif
     {
       for( UInt uiId = 0; uiId < pcSlice->getViewIndex(); uiId++ )
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp	(revision 669)
@@ -567,4 +567,12 @@
           PartSize ePartTemp = rpcTempCU->getPartitionSize(0);
           rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uiDepth );     
+#if QC_DEPTH_IV_MRG_F0125
+          if (rpcTempCU->getSlice()->getIsDepth() )
+          {
+            DvInfo.bDV = rpcTempCU->getDispNeighBlocks(0, 0, &DvInfo);
+          }
+          else
+          {
+#endif 
 #if H_3D_NBDV_REF
           if(rpcTempCU->getSlice()->getVPS()->getDepthRefinementFlag( rpcTempCU->getSlice()->getLayerIdInVps()))
@@ -574,4 +582,7 @@
             DvInfo.bDV = rpcTempCU->getDisMvpCandNBDV(&DvInfo);
 
+#if QC_DEPTH_IV_MRG_F0125
+          }
+#endif
           rpcTempCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
           rpcBestCU->setDvInfoSubParts(DvInfo, 0, uiDepth);
Index: branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncTop.cpp	(revision 668)
+++ branches/HTM-8.2-dev2-Qualcomm/source/Lib/TLibEncoder/TEncTop.cpp	(revision 669)
@@ -835,5 +835,7 @@
   }
 #if H_3D
+#if !QC_DEPTH_IV_MRG_F0125
   if ( !m_isDepth )
+#endif
   {
     m_cSPS.initCamParaSPS           ( m_viewIndex, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset );
