Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp	(revision 511)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp	(revision 512)
@@ -2683,8 +2683,4 @@
   if(ucVspMergePos == H_3D_VSP_POSITION && picDepth != NULL && 0 != m_pcSlice->getViewIndex() ) // VSP can be used only when depth is used as input
   {
-    abCandIsInter[iCount] = true;
-    puhInterDirNeighbours[iCount] = 0;
-    vspFlag[iCount] = 1;
-
     Bool refViewAvailFlag = false;
     UChar predFlag[2] = {0, 0};
@@ -2732,5 +2728,7 @@
     }
 
+    abCandIsInter[iCount] = true;
     puhInterDirNeighbours[iCount] = (predFlag[0] | (predFlag[1] << 1));
+    vspFlag[iCount] = 1;
 
     if ( mrgCandIdx == iCount )
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPrediction.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPrediction.cpp	(revision 511)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComPrediction.cpp	(revision 512)
@@ -1510,7 +1510,7 @@
 
   Pel* depthTemp, *depthInitial=depth;
-  for (Int yTxt =0; yTxt<sizeY; yTxt++)
-  {
-    for (Int xTxt =0; xTxt<sizeX; xTxt++)
+  for (Int yTxt = 0; yTxt < sizeY; yTxt++)
+  {
+    for (Int xTxt = 0; xTxt < sizeX; xTxt++)
     {
       if (depthPosX+xTxt < widthDepth)
