Index: /branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- /branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TComDataCU.cpp	(revision 264)
+++ /branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TComDataCU.cpp	(revision 265)
@@ -5526,5 +5526,9 @@
 
 #if MERL_VSP_C0152
+#if LGE_SIMP_DVP_REFINE_C0112
+Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec, Bool bSimpleDvpRefine)
+#else
 Pel TComDataCU::getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec)
+#endif
 {
   Int depStride =  pcBaseViewDepthPicYuv->getStride();
@@ -5538,5 +5542,40 @@
   Pel *depth  = pcBaseViewDepthPicYuv->getLumaAddr() + depthPosX + depthPosY * depStride;
   Pel  maxDepth = 0;
-
+#if LGE_SIMP_DVP_REFINE_C0112
+  if ( bSimpleDvpRefine )
+  {
+    Int depthStartPosX = Clip3(0,   width - iWidth  - 1,  iBlkX + (mv->getHor()>>2));
+    Int depthStartPosY = Clip3(0,   height- iHeight - 1,  iBlkY + (mv->getVer()>>2));
+    Int depthEndPosX = Clip3(0,   width - iWidth  - 1,  iBlkX + iWidth  + (mv->getHor()>>2));
+    Int depthEndPosY = Clip3(0,   height- iHeight - 1,  iBlkY + iHeight + (mv->getVer()>>2));
+    Int iCenterX = (depthStartPosX + depthEndPosX) >> 1;
+    Int iCenterY = (depthStartPosY + depthEndPosY) >> 1;
+
+    Pel *depthTL  = pcBaseViewDepthPicYuv->getLumaAddr();
+    Int aiDepth[5];
+    aiDepth[0] = depthTL[ (depthStartPosY) * depStride + depthStartPosX ];      // Left Top
+    aiDepth[1] = depthTL[ (depthEndPosY)   * depStride + depthStartPosX ];      // Left Bottom
+    aiDepth[2] = depthTL[ (depthStartPosY) * depStride + depthEndPosX   ];      // Right Top
+    aiDepth[3] = depthTL[ (depthEndPosY)   * depStride + depthEndPosX   ];      // Right Bottom
+    aiDepth[4] = depthTL[ (iCenterY)       * depStride + iCenterX       ];      // Center
+    for (Int i = 0; i < 5; i++)
+    {
+      if (maxDepth < aiDepth[i])
+        maxDepth = aiDepth[i];
+    }
+  }
+  else
+  {
+    for (Int j = 0; j < iHeight; j++)
+    {
+      for (Int i = 0; i < iWidth; i++)
+      {
+        if (maxDepth < depth[i])
+          maxDepth = depth[i];
+      }
+      depth += depStride;
+    }
+  }
+#else
   for (Int j = 0; j < iHeight; j++)
   {
@@ -5548,11 +5587,14 @@
     depth += depStride;
   }
-
+#endif
   Int disparity = aiShiftLUT[ maxDepth ] << iShiftPrec;
 
   return disparity;
 }
-
+#if LGE_SIMP_DVP_REFINE_C0112
+Void TComDataCU::estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred, Bool bSimpleDvpRefine)
+#else
 Void TComDataCU::estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred)
+#endif
 {
   if (picDepth)
@@ -5568,7 +5610,9 @@
     Int  iShiftPrec;
     getSlice()->getBWVSPLUTParam(aiShiftLUT, iShiftPrec);
-    
-    Pel x = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT, iShiftPrec );
-
+#if LGE_SIMP_DVP_REFINE_C0112
+    Pel x = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT, iShiftPrec, bSimpleDvpRefine );
+#else
+    Pel x = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT, iShiftPrec);
+#endif
     cMvPred->setHor(x);
     clipMv(*cMvPred);
@@ -5896,5 +5940,9 @@
               picDepth = getSlice()->getRefPicBaseDepth();
               if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
+#else
                 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
+#endif
 
               pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
@@ -5918,5 +5966,9 @@
               picDepth = getSlice()->getRefPicBaseDepth();
               if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
+#else
                 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
+#endif
               pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
               pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;
@@ -5939,5 +5991,9 @@
               picDepth = getSlice()->getRefPicBaseDepth();
               if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
+#else
                 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
+#endif
               pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
               pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;
@@ -6002,5 +6058,9 @@
             picDepth = getSlice()->getRefPicBaseDepth();
             if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
+#else
               estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
+#endif
             pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;
             pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;
@@ -6089,5 +6149,9 @@
             picDepth = getSlice()->getRefPicBaseDepth();
             if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
+#else
               estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
+#endif
             pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;
             pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;
@@ -6174,5 +6238,9 @@
             picDepth = getSlice()->getRefPicBaseDepth();
             if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
+#else
               estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
+#endif
             pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;
             pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;
@@ -6255,5 +6323,9 @@
             picDepth = getSlice()->getRefPicBaseDepth();
             if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
+#else
               estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
+#endif
             pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;
             pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;
@@ -6338,5 +6410,9 @@
             picDepth = getSlice()->getRefPicBaseDepth();
             if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred, true);
+#else
               estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cMvPred);
+#endif
             pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred;
             pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx;
@@ -6642,5 +6718,9 @@
               picDepth = getSlice()->getRefPicBaseDepth();
               if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
+#else
                 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
+#endif
 
               pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
@@ -6664,5 +6744,9 @@
               picDepth = getSlice()->getRefPicBaseDepth();
               if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
+#else
                 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
+#endif
               pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
               pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;
@@ -6685,5 +6769,9 @@
               picDepth = getSlice()->getRefPicBaseDepth();
               if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+                estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv, true);
+#else
                 estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &cColMv);
+#endif
               pDInfo->m_acMvCand[ pDInfo->iN] = cColMv;
               pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetViewIdx;
@@ -6726,5 +6814,9 @@
             picDepth = getSlice()->getRefPicBaseDepth();
             if (picDepth && bDepthRefine)
+#if LGE_SIMP_DVP_REFINE_C0112
+              estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &dv, true);
+#else
               estimateDVFromDM(uiPartIdx, picDepth, uiPartAddr, &dv);
+#endif
             pDInfo->m_acMvCand[ pDInfo->iN] = dv;
             pDInfo->m_aVIdxCan[ pDInfo->iN++] = 0;
Index: /branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- /branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TComDataCU.h	(revision 264)
+++ /branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TComDataCU.h	(revision 265)
@@ -589,6 +589,11 @@
 
 #if MERL_VSP_C0152
+#if LGE_SIMP_DVP_REFINE_C0112
+  Pel           getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec, Bool bSimpleDvpRefine = false);
+  Void          estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred, Bool bSimpleDvpRefine = false);
+#else
   Pel           getMcpFromDM(TComPicYuv* pcBaseViewDepthPicYuv, TComMv* mv, Int iBlkX, Int iBlkY, Int iWidth, Int iHeight, Int* aiShiftLUT, Int iShiftPrec);
   Void          estimateDVFromDM(UInt uiPartIdx, TComPic* picDepth, UInt uiPartAddr, TComMv* cMvPred);
+#endif
 #endif
   Bool          getIViewOrgDepthMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv );
Index: /branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TypeDef.h	(revision 264)
+++ /branches/HTM-5.1-dev3-LG/source/Lib/TLibCommon/TypeDef.h	(revision 265)
@@ -78,4 +78,5 @@
 #define MERL_VSP_BLOCKSIZE_C0152             4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4.
 #define VSP_MERGE_POS                        5 // JCT3V-C0152: fixed position of VSP candidate in merge list, supported values: 5.
+#define LGE_SIMP_DVP_REFINE_C0112            1 // JCT3V-C0112: 1: simplification of refining disparity vector using a warped depth block
 
 #else // !MERL_VSP_C0152
@@ -83,4 +84,5 @@
 #define MERL_MTK_VSP_DVP_REFINE_C0152_C0131  0 // JCT3V-C0152 && JCT3V-C0131: 1: refine disparity vector using a warped depth block; 0: not to refine
 #define MERL_VSP_BLOCKSIZE_C0152             4 // JCT3V-C0152: VSP block size, supported values: 1, 2 and 4.
+#define LGE_SIMP_DVP_REFINE_C0112            0 // JCT3V-C0112: 1: simplification of refining disparity vector using a warped depth block
 #endif
 
