Index: /branches/HTM-DEV-2.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 602)
+++ /branches/HTM-DEV-2.0-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 603)
@@ -772,4 +772,13 @@
   printRateSummary();
 
+#if H_3D_FIX_REN_WARNING
+  Double dMaxDispDiff = m_cCameraData.getMaxShiftDeviation(); 
+
+  if ( !(dMaxDispDiff < 0) )
+  {  
+    printf("\n Max. possible shift error: %12.3f samples.\n", dMaxDispDiff );
+  }
+#endif
+
   return;
 }
Index: /branches/HTM-DEV-2.0-dev0/source/App/TAppRenderer/TAppRendererTop.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev0/source/App/TAppRenderer/TAppRendererTop.cpp	(revision 602)
+++ /branches/HTM-DEV-2.0-dev0/source/App/TAppRenderer/TAppRendererTop.cpp	(revision 603)
@@ -476,8 +476,16 @@
     renderUsedPelsMap( );
       break;
-
   default:
     AOT(true);
   }
+
+#if H_3D_FIX_REN_WARNING
+  Double dMaxDispDiff = m_cCameraData.getMaxShiftDeviation(); 
+
+  if ( !(dMaxDispDiff < 0) )
+  {  
+    printf("\n Max. possible shift error: %12.3f samples.\n", dMaxDispDiff );
+  }
+#endif
 }
 
@@ -937,6 +945,4 @@
   while ( ( ( iNumOfRenderedFrames < m_iFramesToBeRendered ) || ( m_iFramesToBeRendered == 0 ) ) && !bAnyEOS )
   {
-
-
     if ( iFrame >= m_iFrameSkip )
     {      
Index: /branches/HTM-DEV-2.0-dev0/source/Lib/TAppCommon/TAppComCamPara.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev0/source/Lib/TAppCommon/TAppComCamPara.cpp	(revision 602)
+++ /branches/HTM-DEV-2.0-dev0/source/Lib/TAppCommon/TAppComCamPara.cpp	(revision 603)
@@ -841,7 +841,9 @@
   Int     iLog2DivLuma   = m_uiBitDepthForLUT + m_uiCamParsCodedPrecision + 1 - m_iLog2Precision;   AOF( iLog2DivLuma > 0 );
   Int     iLog2DivChroma = iLog2DivLuma + 1;
+#if !H_3D_FIX_REN_WARNING
   Double  dMaxDispDev    = 0.0;
   Double  dMaxRndDispDvL = 0.0;
   Double  dMaxRndDispDvC = 0.0;
+#endif
   for( UInt uiSourceView = 0; uiSourceView < uiNumberSourceViews; uiSourceView++ )
   {
@@ -885,5 +887,7 @@
         // integer-valued look-up tables
         Int64   iTempScale      = (Int64)uiDepthValue * iScale;
+#if !H_3D_FIX_REN_WARNING        
         Int64   iTestScale      = ( iTempScale + iOffset       );   // for checking accuracy of camera parameters
+#endif
         Int64   iShiftLuma      = ( iTempScale + iOffsetLuma   ) >> iLog2DivLuma;
         Int64   iShiftChroma    = ( iTempScale + iOffsetChroma ) >> iLog2DivChroma;
@@ -892,7 +896,11 @@
 
         // maximum deviation
+#if H_3D_FIX_REN_WARNING        
+        m_dMaxShiftDeviation = std::max( m_dMaxShiftDeviation, fabs( Double( (Int) iShiftLuma   ) - dShiftLuma   ) / Double( 1 << m_iLog2Precision ) );        
+#else
         dMaxDispDev     = std::max( dMaxDispDev,    fabs( Double( (Int) iTestScale   ) - dShiftLuma * Double( 1 << iLog2DivLuma ) ) / Double( 1 << iLog2DivLuma ) );
         dMaxRndDispDvL  = std::max( dMaxRndDispDvL, fabs( Double( (Int) iShiftLuma   ) - dShiftLuma   ) );
         dMaxRndDispDvC  = std::max( dMaxRndDispDvC, fabs( Double( (Int) iShiftChroma ) - dShiftChroma ) );
+#endif
       }
 
@@ -904,4 +912,5 @@
   }
 
+#if !H_3D_FIX_REN_WARNING
   // check maximum deviation
   Double  dMaxAllowedDispDev    =       Double( 1 << m_iLog2Precision ) / Double( 1 << m_uiCamParsCodedPrecision );       //  counting only the impact of camera parameter rounding
@@ -925,4 +934,5 @@
     }
   }
+#endif
 }
 
@@ -1026,4 +1036,7 @@
   m_bCamParsCodedPrecSet      = false;
 
+#if H_3D_FIX_REN_WARNING
+  m_dMaxShiftDeviation        = -1; 
+#endif
 
 }
Index: /branches/HTM-DEV-2.0-dev0/source/Lib/TAppCommon/TAppComCamPara.h
===================================================================
--- /branches/HTM-DEV-2.0-dev0/source/Lib/TAppCommon/TAppComCamPara.h	(revision 602)
+++ /branches/HTM-DEV-2.0-dev0/source/Lib/TAppCommon/TAppComCamPara.h	(revision 603)
@@ -67,4 +67,7 @@
   Bool                m_bCamParsCodedPrecSet;                 ///< Coded Cam Para precision set for current frame;
   
+#if H_3D_FIX_REN_WARNING
+  Double              m_dMaxShiftDeviation;                   ///< Maximum deviation of shifts with integer precision compare to double precision
+#endif
   //SAIT_VSO_EST_A0033
   Double              m_dDispCoeff;
@@ -180,4 +183,7 @@
   UInt                getCurFrameId             ()  { return m_iCurrentFrameId;   }
   static Void         convertNumberString       ( Char* pchViewNumberString, std::vector<Int>& raiViewNumbers, Double dViewNumPrec );
+#if H_3D_FIX_REN_WARNING
+  Double              getMaxShiftDeviation      () { return m_dMaxShiftDeviation; }; 
+#endif
 
 #if H_3D_VSO
Index: /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 602)
+++ /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 603)
@@ -3404,5 +3404,5 @@
 #endif
         iRefListIdY = 1 - iRefListIdX;
-#if H_3D_BVSP_FIX
+#if H_3D_FIX_BVSP
         pcMvFieldNeighbours[(iCount<<1)+iRefListIdX].setMvField( pDInfo->m_acNBDV, i );
 #else
@@ -3428,5 +3428,5 @@
         predFlag[iRefListIdY] = 1;
 #if MTK_VSP_FIX_E0172 || MTK_VSP_FIX_ALIGN_WD_E0172
-#if H_3D_BVSP_FIX
+#if H_3D_FIX_BVSP
         TComMv  cMv = pDInfo->m_acNBDV;
 #else
@@ -3447,5 +3447,5 @@
         pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].setMvField( cMv, i );
 #else
-#if H_3D_BVSP_FIX
+#if H_3D_FIX_BVSP
         pcMvFieldNeighbours[(iCount<<1)+iRefListIdY].setMvField( pDInfo->m_acNBDV, i );
 #else
Index: /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRdCost.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRdCost.cpp	(revision 602)
+++ /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TComRdCost.cpp	(revision 603)
@@ -605,5 +605,9 @@
     dist = (Dist) (iDWeight * distDepth + iVSOWeight * dist ) / ( iDWeight + iVSOWeight);
   }
+#if H_3D_FIX_UINT_WARNING
+  return (UInt) dist; 
+#else
   return dist; 
+#endif
 
 }
Index: /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 602)
+++ /branches/HTM-DEV-2.0-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 603)
@@ -197,7 +197,9 @@
 
 /// FIXES
-#define H_3D_BVSP_FIX                     1  //DV from NBDV instead of DoNBDV should be used
-#define FIX036                            1  // fix for ticket #36
-
+#define H_3D_FIX_BVSP                     1  // DV from NBDV instead of DoNBDV should be used
+#define H_3D_FIX_TICKET_036               1  // fix for ticket #36
+#define H_3D_FIX_REN                      1  // fix of erroneous inpainting for renderer
+#define H_3D_FIX_REN_WARNING              1  // fix of warning related to camera parameter precision
+#define H_3D_FIX_UINT_WARNING             1  // explicit in VSD
 #endif // H_3D
 
@@ -475,5 +477,5 @@
 
 #if H_3D_VSO_DIST_INT
-#if FIX036
+#if H_3D_FIX_TICKET_036
 typedef       Int64            Dist;       ///< RDO distortion
 #else
Index: /branches/HTM-DEV-2.0-dev0/source/Lib/TLibRenderer/TRenTop.cpp
===================================================================
--- /branches/HTM-DEV-2.0-dev0/source/Lib/TLibRenderer/TRenTop.cpp	(revision 602)
+++ /branches/HTM-DEV-2.0-dev0/source/Lib/TLibRenderer/TRenTop.cpp	(revision 603)
@@ -1033,4 +1033,22 @@
             for ( ; iInterPolPos <= xCeil (iShiftedPos ) -1 ; iInterPolPos++)
             {
+#if H_3D_FIX_REN
+              if ( ( iInterPolPos >= 0 ) && ( iInterPolPos < iOutputWidth ) )
+              {
+                if( pcFilledData[iInterPolPos] == REN_IS_HOLE )
+                {               
+                  Int iNextPos = std::min(iInputWidth-1,iPosX + iStep); 
+                  Int iPosXBG  = ( std::abs( pcDepthData[iNextPos] - pcDepthData[iPosX] ) > 5  ) ? iPosX : iNextPos; 
+                  for( UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++)
+                  {
+                    apcOutputData[uiCurPlane][iInterPolPos]  = apcInputData[uiCurPlane][iPosXBG];
+                  }
+                }
+                else
+                {
+                  pcFilledData[iInterPolPos] = REN_IS_HOLE + 1; 
+                }
+              }
+#else
               for( UInt uiCurPlane = 0; uiCurPlane < uiNumberOfPlanes; uiCurPlane++)
               {
@@ -1040,4 +1058,5 @@
                 }
               }
+#endif
             }
           }
@@ -1285,5 +1304,9 @@
         else
         {
+#if H_3D_FIX_REN
+          pcAlphaData[iXPos] = pcFilledData[iXPos];
+#else
           pcAlphaData[iXPos] = REN_IS_FILLED;
+#endif
         }
       }
