Index: /branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp	(revision 521)
+++ /branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp	(revision 522)
@@ -2674,4 +2674,7 @@
         iRefListIdY = 1 - iRefListIdX;
         pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acDoNBDV, i );
+#if H_3D_NBDV
+        pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].getMv().setIDVFlag (false);
+#endif
       }
     }
@@ -2693,4 +2696,7 @@
           predFlag[iRefListIdY] = 1;
           pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].setMvField( pDInfo->m_acDoNBDV, i );
+#if H_3D_NBDV
+          pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].getMv().setIDVFlag (false);
+#endif
         }
       }
@@ -2801,5 +2807,19 @@
         //pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,pcMvFieldNeighbours[iCount<<1].getRefIdx());
 #if H_3D_CLEANUPS //Notes from QC: for BVSP coded blocks, the reference index shall not be equal to -1 due to the adoption of JCT3V-D0191
+#if !H_3D_VSP_FIX
         pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,pcMvFieldNeighbours[iCount<<1].getRefIdx());
+#else
+        if ( pcTextureCU->getVSPFlag( uiPartIdxCenter ) != 0 ) // Texture coded using VSP mode
+        {
+          for ( Int i = 0; i < m_pcSlice->getNumRefIdx( REF_PIC_LIST_0 ); i++ )
+          {
+            if (m_pcSlice->getRefPOC( REF_PIC_LIST_0, i ) == m_pcSlice->getPOC())
+            {
+              pcMvFieldNeighbours[ iCount<<1 ].setMvField(cMvPred, i);
+              break;
+            }
+          }
+        }
+#endif
 #else
         if (pcMvFieldNeighbours[iCount<<1].getRefIdx()<0)
@@ -2831,6 +2851,20 @@
 #endif
           //pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx());
-#if H_3D_CLEANUPS
+#if H_3D_CLEANUPS //Notes from QC: for BVSP coded blocks, the reference index shall not be equal to -1 due to the adoption of JCT3V-D0191
+#if !H_3D_VSP_FIX
           pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx());
+#else
+          if ( pcTextureCU->getVSPFlag( uiPartIdxCenter ) != 0 ) // Texture coded using VSP mode
+          {
+            for ( Int i = 0; i < m_pcSlice->getNumRefIdx( REF_PIC_LIST_1 ); i++ )
+            {
+              if (m_pcSlice->getRefPOC( REF_PIC_LIST_1, i ) == m_pcSlice->getPOC())
+              {
+                pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField(cMvPred, i);
+                break;
+              }
+            }
+          }
+#endif
 #else
           if (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()<0)
@@ -2853,4 +2887,8 @@
       {
 #endif
+#if H_3D_VSP_FIX
+      if ( pcTextureCU->getVSPFlag( uiPartIdxCenter ) == 0 ) // MERL Question: When texture coded using nonVSP mode????????
+      {
+#endif
 #if H_3D_NBDV
         pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
@@ -2862,4 +2900,9 @@
         }
         iCount ++;
+#if H_3D_VSP_FIX
+      }
+//      else
+//        assert(0);  // MERL Question: Should the assert be kept???
+#endif
 #if !H_3D_CLEANUPS
       }
@@ -4899,5 +4942,5 @@
         Int refViewIdx  = pcTmpCU->getSlice()->getRefPic(eRefPicList, refId)->getViewIndex();
         if (refViewIdx != m_pcSlice->getViewIndex()) 
-        {          
+        {
           clipMv(cMvPred);
           pNbDvInfo->m_acNBDV = cMvPred;
@@ -4919,5 +4962,9 @@
           return true;
         }
+#if 0 // H_3D_VSP  // MERL: To be confirmed
+        else if ( bSearchForMvpDv && (cMvPred.getIDVFlag() || pcTmpCU->getVSPFlag( uiIdx )) && bTmpIsSkipped )
+#else
         else if ( bSearchForMvpDv && cMvPred.getIDVFlag() && bTmpIsSkipped )
+#endif
         {
           assert( uiMvpDvPos < IDV_CANDS );
Index: /branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TypeDef.h	(revision 521)
+++ /branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TypeDef.h	(revision 522)
@@ -120,4 +120,5 @@
 #define H_3D_VSP_CONSTRAINED              0
 #endif
+#define H_3D_VSP_FIX                      1   // Temporary, to be removed soon
 #endif
 
