Index: branches/HTM-5.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp	(revision 287)
+++ branches/HTM-5.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp	(revision 289)
@@ -108,9 +108,5 @@
     newPicture[i] = false;
 #if FLEX_CODING_ORDER_M23723
-#if  FIX_FCO_COMP_WARNING
     m_fcoOrder[i] = ' ';
-#else
-    m_fcoOrder[i]=NULL;
-#endif
 #endif
 
Index: branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 287)
+++ branches/HTM-5.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 289)
@@ -1184,9 +1184,5 @@
   
 #if !QC_MVHEVC_B0046
-#if FIX_DEL_NULLPTR
   if ( pcPdmDepthOrg != NULL && m_uiMultiviewMvRegMode )
-#else
-  if ( pcPdmDepthOrg != NULL )
-#endif
   {
     pcPdmDepthOrg->destroy();
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/CommonDef.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/CommonDef.h	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/CommonDef.h	(revision 289)
@@ -148,5 +148,5 @@
 #endif
 
-#if SAIT_IMPROV_MOTION_PRED_M24829&!QC_MULTI_DIS_CAN_A0097
+#if SAIT_IMPROV_MOTION_PRED_M24829&!H3D_NBDV
 #define PDM_AMVP_POS                      0         // position of pdm in amvp list  (0..3)
 #else
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 289)
@@ -3939,5 +3939,5 @@
 #endif
 
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
 #if QC_MRG_CANS_B0048
   acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false; 
@@ -3945,5 +3945,5 @@
   acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = false; 
 #endif
-#endif
+#endif //H3D_NBDV
 
 #if MTK_MDIVRP_C0138
@@ -3951,25 +3951,14 @@
 #endif
 
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
   DisInfo cDisInfo;
   cDisInfo.iN = 0;
   if(!bNoPdmMerge)
   {
-#if LGE_DVMCP_A0126
-#if LGE_IVMP_PARALLEL_MERGE_B0136 && !QC_SIMPLE_NBDV_B0047
-    getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo, true, REF_PIC_LIST_X, -1, true );
-#else
-    getDisMvpCand2(uiPUIdx, uiAbsPartIdx, &cDisInfo
-#if LGE_IVMP_PARALLEL_MERGE_B0136==QC_SIMPLE_NBDV_B0047
-            , true
-#endif
+    getDisMvpCandNBDV(uiPUIdx, uiAbsPartIdx, &cDisInfo , true
 #if MERL_VSP_C0152
             , true
 #endif
 );
-#endif
-#else
-    getDisMvpCand (uiPUIdx, uiAbsPartIdx, &cDisInfo );
-#endif
   }
   if(cDisInfo.iN==0)
@@ -3996,7 +3985,10 @@
     );
 #endif
-#else
+#else // H3D_NBDV
+  Int iPdmDir[2] = {0, 0};
   Int     iPdmInterDir      = getPdmMergeCandidate( uiPUIdx, aiPdmRefIdx, acPdmMv );
-#endif
+  iPdmDir[0] = iPdmInterDir; 
+  iPdmDir[1] = iPdmInterDir; 
+#endif // H3D_NBDV
 #if MTK_MDIVRP_C0138
   if (m_pcSlice->getSPS()->getMultiviewResPredMode()==1 && iPdmDir[0] && !bNoPdmMerge && cCurPS == SIZE_2Nx2N && bDVAvail)
@@ -4065,5 +4057,5 @@
         pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( acPdmMv[ 3 ], aiPdmRefIdx[ 3 ] );
       }
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
       pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
       pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
@@ -4135,5 +4127,5 @@
         bRemoveSpa                      = true;
         abCandIsInter        [ iCount ] = false;
-#if FIX_MISUSE_REFINDEX
+
         //reset to the default value for IC, MC
         puhInterDirNeighbours[iCount]   = 0;
@@ -4142,5 +4134,4 @@
         pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
         break;
-#endif
       }
     }
@@ -4152,5 +4143,5 @@
 #endif
 #endif
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
     pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
@@ -4275,5 +4266,5 @@
         bRemoveSpa                      = true;
         abCandIsInter        [ iCount ] = false;
-#if FIX_MISUSE_REFINDEX
+
         //reset to the default value for IC, MC
         puhInterDirNeighbours[iCount]   = 0;
@@ -4282,5 +4273,4 @@
         pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
         break;
-#endif
       }
     }
@@ -4291,5 +4281,5 @@
 #endif
 #endif
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
     pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
@@ -4401,5 +4391,5 @@
     }
 #endif
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
     pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
@@ -4482,5 +4472,4 @@
           bRemoveSpa                      = true;
           abCandIsInter        [ iCount ] = false;
-#if FIX_MISUSE_REFINDEX
           //reset to the default value for IC, MC
           puhInterDirNeighbours[iCount]   = 0;
@@ -4489,10 +4478,9 @@
           pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );
           break;
-#endif
         }
       }
       if(!bRemoveSpa)
       {
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
         pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
         pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
@@ -4567,5 +4555,5 @@
     }
 #endif
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
     pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
     pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
@@ -4684,5 +4672,5 @@
       }
 #endif
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
       pcMvFieldNeighbours[iCount<<1    ].getMv().m_bDvMcp = false;
       pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false;
@@ -4860,5 +4848,5 @@
 #endif
       }
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
       pcMvFieldNeighbours[uiArrayAddr<<1    ].getMv().m_bDvMcp = false;
       pcMvFieldNeighbours[(uiArrayAddr<<1)+1].getMv().m_bDvMcp = false;
@@ -5356,5 +5344,5 @@
   return m_pcSlice->getSPS()->getAMVPMode(m_puhDepth[uiIdx]);
 }
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 /** construct a list of disparity motion vectors from the neighbouring PUs **/
 Void TComDataCU::getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo )
@@ -5793,26 +5781,13 @@
 #endif
 
-#if LGE_DVMCP_A0126
-#if QC_SIMPLE_NBDV_B0047
-Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo
-#if LGE_IVMP_PARALLEL_MERGE_B0136
-                                , Bool bParMerge
-#endif
+#if H3D_NBDV
+Void TComDataCU::getDisMvpCandNBDV( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo , Bool bParMerge
 #if MERL_VSP_C0152
                                 , Bool bDepthRefine
 #endif
-#else
-Void TComDataCU::getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo, Bool bMerge, RefPicList eRefPicList0, Int iRefIdx0
-#if LGE_IVMP_PARALLEL_MERGE_B0136
-                                , Bool bParMerge
-#endif
-#endif
                                 )
 {
   PartSize eCUMode = getPartitionSize( uiPartAddr );
   TComDataCU* pcTmpCU = NULL;
-#if !QC_SIMPLE_NBDV_B0047
-  TComDataCU* pcCULeft = NULL;
-#endif
   pDInfo->iN = 0;
 
@@ -5822,5 +5797,4 @@
   UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth();
 
-#if QC_SIMPLE_NBDV_B0047
   const Int iNumofDvMCP = 7;
 #if MTK_RELEASE_DV_CONSTRAINT_C0129
@@ -5831,21 +5805,12 @@
 #endif
   Bool  abDvMcpFlag  [2][iNumofDvMCP] = {{false,},{false,}}; 
-#else
-  Int   aiDvMcpDvCand[2][7] = {{0,},    {0,}}; // dummy, 5 spatial + 1 temporal
-  Bool  abDvMcpFlag  [2][7] = {{false,},{false,}}; 
-  //Int   aiRefPOC     [2][7] = {{-1,},{-1}}; // debug
-#endif
   TComMv cTmpMvPred, cMv;
   Bool  bTmpIsSkipped = false;
   Bool  bDvMcpIsFound = false;
-#if LGE_DVMCP_MEM_REDUCTION_B0135
-  Int iLCUAddrDiff = 0;
-#endif
-
-#if LGE_IVMP_PARALLEL_MERGE_B0136
+  Int   iLCUAddrDiff = 0;
+
   Int xP, yP, nPSW, nPSH;
   if( bParMerge)
     this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH);
-#endif
 
   deriveLeftRightTopIdxGeneral( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLT, uiPartIdxRT );
@@ -5856,163 +5821,4 @@
   if ( getSlice()->getPPS()->getEnableTMVPFlag() )
   {
-#if !QC_SIMPLE_NBDV_B0047
-    UInt uiPUIdx = uiPartIdx;
-    UInt uiAbsPartAddr = uiPartAddr;
-
-    // col [2]
-    Int iRefIdxSkip[2] = {-1, -1};
-    if( !bMerge )
-    {
-      iRefIdxSkip[ eRefPicList0 ] = iRefIdx0;
-    }
-    else
-    {
-      for (Int i=0; i<2; i++)
-      {
-        RefPicList  eRefPicList1 = ( i==1 ? REF_PIC_LIST_1 : REF_PIC_LIST_0 );
-#if SET_MERGE_TMVP_REFIDX
-        Int iRefIdxTmp;
-        if ( uiPUIdx != 0 )
-        {
-          iRefIdxTmp = 0;
-        }
-        else
-        {    
-          iRefIdxTmp = (pcCULeft != NULL) ? pcCULeft->getCUMvField(eRefPicList1)->getRefIdx(uiLeftPartIdx) : -1;
-        }
-#else      
-        Int iRefIdxTmp = (pcCULeft != NULL) ? pcCULeft->getCUMvField(eRefPicList1)->getRefIdx(uiLeftPartIdx) : -1;
-#endif
-        iRefIdxSkip[i] = (iRefIdxTmp != -1) ? iRefIdxTmp : 0;
-      }
-    }
-
-    //>> MTK colocated-RightBottom
-    UInt uiPartIdxRB;
-    Int uiLCUIdx = getAddr();
-    eCUMode = getPartitionSize( 0 );
-
-    deriveRightBottomIdx( eCUMode, uiPUIdx, uiPartIdxRB );  
-
-    UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB];
-    //UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth();
-
-    TComMv cColMv;
-    Int iRefIdx;
-
-    if      ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )  // image boundary check
-    {
-      uiLCUIdx = -1;
-    }
-    else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )
-    {
-      uiLCUIdx = -1;
-    }
-    else
-    {
-      if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) &&           // is not at the last column of LCU 
-        ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row    of LCU
-      {
-        uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ];
-        uiLCUIdx = getAddr();
-      }
-      else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 )           // is not at the last column of LCU But is last row of LCU
-      {
-        uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ];
-        uiLCUIdx = -1 ; 
-      }
-      else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU
-      {
-        uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ];
-        uiLCUIdx = getAddr() + 1;
-      }
-      else //is the right bottom corner of LCU                       
-      {
-        uiAbsPartAddr = 0;
-        uiLCUIdx = -1 ; 
-      }
-    }
-
-    Bool bExistMV = false;
-    UInt uiPartIdxCenter;
-    UInt uiCurLCUIdx = getAddr();
-    xDeriveCenterIdx( eCUMode, uiPUIdx, uiPartIdxCenter );
-
-    Int iTargetView, iStartView; 
-    if( !bMerge ) // AMVP
-    {
-      bExistMV = uiLCUIdx >= 0 && xGetColDisMV( eRefPicList0, iRefIdx0, uiLCUIdx, uiAbsPartAddr, cColMv, iTargetView, iStartView );
-      if( bExistMV == false )
-      {
-        bExistMV = xGetColDisMV( eRefPicList0, iRefIdx0, uiCurLCUIdx, uiPartIdxCenter, cColMv, iTargetView, iStartView );
-      }
-      if( bExistMV ) // DV is found
-      {
-        if( cColMv.m_bDvMcp == false ) //=> DCP, if true => DV-MCP
-        {
-          clipMv(cColMv);
-          pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 
-          pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetView;
-          return;
-        }
-        else // DV-MCP
-        {
-          aiDvMcpDvCand[eRefPicList0][DVFROM_COL] = cColMv.getHor(); 
-          abDvMcpFlag  [eRefPicList0][DVFROM_COL] = true; 
-          bDvMcpIsFound = true;
-        }
-      }
-    }
-    else // MERGE
-    {
-      iRefIdx = iRefIdxSkip[0];
-      bExistMV = uiLCUIdx >= 0 && xGetColDisMV( REF_PIC_LIST_0, iRefIdx, uiLCUIdx, uiAbsPartAddr, cColMv, iTargetView, iStartView );
-      if( bExistMV == false )
-      {
-        bExistMV = xGetColDisMV( REF_PIC_LIST_0, iRefIdx, uiCurLCUIdx, uiPartIdxCenter,  cColMv, iTargetView, iStartView );
-      }
-      if( bExistMV )
-      {
-        if( cColMv.m_bDvMcp == false ) // DCP
-        {
-          clipMv(cColMv);
-          pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 
-          pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetView;
-          return;
-        }
-        else { // // DV-MCP
-          aiDvMcpDvCand[0][DVFROM_COL] = cColMv.getHor(); 
-          abDvMcpFlag  [0][DVFROM_COL] = true; 
-          bDvMcpIsFound = true;
-        }; 
-
-        if ( getSlice()->isInterB() )
-        {       
-          iRefIdx = iRefIdxSkip[1];
-          bExistMV = uiLCUIdx >= 0 && xGetColDisMV( REF_PIC_LIST_1, iRefIdx, uiLCUIdx, uiAbsPartAddr, cColMv, iTargetView, iStartView );
-          if( bExistMV == false )
-          {
-            bExistMV = xGetColDisMV( REF_PIC_LIST_1, iRefIdx, uiCurLCUIdx, uiPartIdxCenter,  cColMv, iTargetView, iStartView );
-          }
-          if( bExistMV )
-          {
-            if( cColMv.m_bDvMcp == false ) // DCP
-            {
-              clipMv(cColMv);
-              pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 
-              pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetView;
-              return;
-            }
-            else // DV-MCP
-            {
-              aiDvMcpDvCand[1][DVFROM_COL] = cColMv.getHor(); 
-              abDvMcpFlag  [1][DVFROM_COL] = true; 
-              bDvMcpIsFound = true;
-            }; 
-          }
-        }
-      }
-    }
-#else
     TComMv cColMv;
     Int iTargetViewIdx = 0;
@@ -6178,5 +5984,4 @@
       }
     }
-#endif
   } // if TMVP Flag
 #endif
@@ -6187,11 +5992,9 @@
   pcTmpCU = getPULeft(uiIdx, uiPartIdxLB);
 #endif
-#if DV_DERIVATION_PARALLEL_B0096
   if ( uiPartIdx == 1 && (eCUMode == SIZE_Nx2N || eCUMode == SIZE_nLx2N || eCUMode == SIZE_nRx2N) )
   {
     pcTmpCU = NULL;
   }
-#endif
-#if LGE_IVMP_PARALLEL_MERGE_B0136
+
   if (pcTmpCU && bParMerge) 
   {
@@ -6201,10 +6004,4 @@
     }
   }
-#endif
-
-#if !QC_SIMPLE_NBDV_B0047
-  pcCULeft = pcTmpCU;
-  UInt uiLeftPartIdx = uiIdx;
-#endif
 
   if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )
@@ -6280,11 +6077,9 @@
   pcTmpCU = getPUAbove(uiIdx, uiPartIdxRT);
 #endif
-#if DV_DERIVATION_PARALLEL_B0096
   if ( uiPartIdx == 1 && (eCUMode == SIZE_2NxN || eCUMode == SIZE_2NxnU || eCUMode == SIZE_2NxnD) )
   {
     pcTmpCU = NULL;
   }
-#endif
-#if LGE_IVMP_PARALLEL_MERGE_B0136
+
   if (pcTmpCU && bParMerge) 
   {
@@ -6294,11 +6089,8 @@
     }
   }
-#endif
 
   if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
   {
-#if LGE_DVMCP_MEM_REDUCTION_B0135
     iLCUAddrDiff = getAddr() - pcTmpCU->getAddr();
-#endif
     bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
     for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
@@ -6332,9 +6124,5 @@
           return;
         }
-#if LGE_DVMCP_MEM_REDUCTION_B0135
         else if(iLCUAddrDiff == 0) //MCP, within same LCU
-#else
-        else // MCP 
-#endif
         {
           cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);
@@ -6375,5 +6163,5 @@
   pcTmpCU = getPUAboveRight(uiIdx, uiPartIdxRT, true, true, true);
 #endif
-#if LGE_IVMP_PARALLEL_MERGE_B0136
+
   if (pcTmpCU && bParMerge) 
   {
@@ -6383,11 +6171,8 @@
     }
   }
-#endif
 
   if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) )
   {
-#if LGE_DVMCP_MEM_REDUCTION_B0135
     iLCUAddrDiff = getAddr() - pcTmpCU->getAddr();
-#endif
     bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
     for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
@@ -6421,9 +6206,5 @@
           return;
         }
-#if LGE_DVMCP_MEM_REDUCTION_B0135
         else if(iLCUAddrDiff == 0)
-#else
-        else  // MCP 
-#endif
         {
           cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);
@@ -6464,5 +6245,5 @@
   pcTmpCU = getPUBelowLeft(uiIdx, uiPartIdxLB);
 #endif
-#if LGE_IVMP_PARALLEL_MERGE_B0136
+
   if (pcTmpCU && bParMerge)
   {
@@ -6472,5 +6253,5 @@
     }
   }
-#endif
+
   if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
   {
@@ -6547,5 +6328,5 @@
   pcTmpCU = getPUAboveLeft(uiIdx, uiPartIdxLT, true, true, true);
 #endif
-#if LGE_IVMP_PARALLEL_MERGE_B0136
+
   if (pcTmpCU && bParMerge) 
   {
@@ -6555,11 +6336,9 @@
     }
   }
-#endif
 
   if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ))
   {
-#if LGE_DVMCP_MEM_REDUCTION_B0135
     iLCUAddrDiff = getAddr() - pcTmpCU->getAddr();
-#endif
+
     bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx );
     for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
@@ -6593,9 +6372,5 @@
           return;
         }
-#if LGE_DVMCP_MEM_REDUCTION_B0135
         else if(iLCUAddrDiff <= 1)
-#else
-        else // MCP 
-#endif
         {
           cTmpMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);
@@ -6634,163 +6409,4 @@
   if ( getSlice()->getPPS()->getEnableTMVPFlag() )
   {
-#if !QC_SIMPLE_NBDV_B0047
-    UInt uiPUIdx = uiPartIdx;
-    UInt uiAbsPartAddr = uiPartAddr;
-
-    // col [2]
-    Int iRefIdxSkip[2] = {-1, -1};
-    if( !bMerge )
-    {
-      iRefIdxSkip[ eRefPicList0 ] = iRefIdx0;
-    }
-    else
-    {
-      for (Int i=0; i<2; i++)
-      {
-        RefPicList  eRefPicList1 = ( i==1 ? REF_PIC_LIST_1 : REF_PIC_LIST_0 );
-#if SET_MERGE_TMVP_REFIDX
-        Int iRefIdxTmp;
-        if ( uiPUIdx != 0 )
-        {
-          iRefIdxTmp = 0;
-        }
-        else
-        {    
-          iRefIdxTmp = (pcCULeft != NULL) ? pcCULeft->getCUMvField(eRefPicList1)->getRefIdx(uiLeftPartIdx) : -1;
-        }
-#else      
-        Int iRefIdxTmp = (pcCULeft != NULL) ? pcCULeft->getCUMvField(eRefPicList1)->getRefIdx(uiLeftPartIdx) : -1;
-#endif
-        iRefIdxSkip[i] = (iRefIdxTmp != -1) ? iRefIdxTmp : 0;
-      }
-    }
-
-    //>> MTK colocated-RightBottom
-    UInt uiPartIdxRB;
-    Int uiLCUIdx = getAddr();
-    eCUMode = getPartitionSize( 0 );
-
-    deriveRightBottomIdx( eCUMode, uiPUIdx, uiPartIdxRB );  
-
-    UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB];
-    //UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth();
-
-    TComMv cColMv;
-    Int iRefIdx;
-
-    if      ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() )  // image boundary check
-    {
-      uiLCUIdx = -1;
-    }
-    else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() )
-    {
-      uiLCUIdx = -1;
-    }
-    else
-    {
-      if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) &&           // is not at the last column of LCU 
-        ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row    of LCU
-      {
-        uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ];
-        uiLCUIdx = getAddr();
-      }
-      else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 )           // is not at the last column of LCU But is last row of LCU
-      {
-        uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ];
-        uiLCUIdx = -1 ; 
-      }
-      else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU
-      {
-        uiAbsPartAddr = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ];
-        uiLCUIdx = getAddr() + 1;
-      }
-      else //is the right bottom corner of LCU                       
-      {
-        uiAbsPartAddr = 0;
-        uiLCUIdx = -1 ; 
-      }
-    }
-
-    Bool bExistMV = false;
-    UInt uiPartIdxCenter;
-    UInt uiCurLCUIdx = getAddr();
-    xDeriveCenterIdx( eCUMode, uiPUIdx, uiPartIdxCenter );
-
-    Int iTargetView, iStartView; 
-    if( !bMerge ) // AMVP
-    {
-      bExistMV = uiLCUIdx >= 0 && xGetColDisMV( eRefPicList0, iRefIdx0, uiLCUIdx, uiAbsPartAddr, cColMv, iTargetView, iStartView );
-      if( bExistMV == false )
-      {
-        bExistMV = xGetColDisMV( eRefPicList0, iRefIdx0, uiCurLCUIdx, uiPartIdxCenter, cColMv, iTargetView, iStartView );
-      }
-      if( bExistMV ) // DV is found
-      {
-        if( cColMv.m_bDvMcp == false ) //=> DCP, if true => DV-MCP
-        {
-          clipMv(cColMv);
-          pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 
-          pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetView;
-          return;
-        }
-        else // DV-MCP
-        {
-          aiDvMcpDvCand[eRefPicList0][DVFROM_COL] = cColMv.getHor(); 
-          abDvMcpFlag  [eRefPicList0][DVFROM_COL] = true; 
-          bDvMcpIsFound = true;
-        }
-      }
-    }
-    else // MERGE
-    {
-      iRefIdx = iRefIdxSkip[0];
-      bExistMV = uiLCUIdx >= 0 && xGetColDisMV( REF_PIC_LIST_0, iRefIdx, uiLCUIdx, uiAbsPartAddr, cColMv, iTargetView, iStartView );
-      if( bExistMV == false )
-      {
-        bExistMV = xGetColDisMV( REF_PIC_LIST_0, iRefIdx, uiCurLCUIdx, uiPartIdxCenter,  cColMv, iTargetView, iStartView );
-      }
-      if( bExistMV )
-      {
-        if( cColMv.m_bDvMcp == false ) // DCP
-        {
-          clipMv(cColMv);
-          pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 
-          pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetView;
-          return;
-        }
-        else { // // DV-MCP
-          aiDvMcpDvCand[0][DVFROM_COL] = cColMv.getHor(); 
-          abDvMcpFlag  [0][DVFROM_COL] = true; 
-          bDvMcpIsFound = true;
-        }; 
-
-        if ( getSlice()->isInterB() )
-        {       
-          iRefIdx = iRefIdxSkip[1];
-          bExistMV = uiLCUIdx >= 0 && xGetColDisMV( REF_PIC_LIST_1, iRefIdx, uiLCUIdx, uiAbsPartAddr, cColMv, iTargetView, iStartView );
-          if( bExistMV == false )
-          {
-            bExistMV = xGetColDisMV( REF_PIC_LIST_1, iRefIdx, uiCurLCUIdx, uiPartIdxCenter,  cColMv, iTargetView, iStartView );
-          }
-          if( bExistMV )
-          {
-            if( cColMv.m_bDvMcp == false ) // DCP
-            {
-              clipMv(cColMv);
-              pDInfo->m_acMvCand[ pDInfo->iN] = cColMv; 
-              pDInfo->m_aVIdxCan[ pDInfo->iN++] = iTargetView;
-              return;
-            }
-            else // DV-MCP
-            {
-              aiDvMcpDvCand[1][DVFROM_COL] = cColMv.getHor(); 
-              abDvMcpFlag  [1][DVFROM_COL] = true; 
-              bDvMcpIsFound = true;
-            }; 
-          }
-        }
-      }
-    }
-#else
     TComMv cColMv;
     Int iTargetViewIdx = 0;
@@ -6956,5 +6572,4 @@
       }
     }
-#endif
   } // if TMVP Flag
 #endif
@@ -6962,9 +6577,5 @@
   if( bDvMcpIsFound ) // skip dvmcp
   {
-#if QC_SIMPLE_NBDV_B0047 
     for( Int i=1 ; i<iNumofDvMCP-1 ; i++ ) // 5 spatial
-#else
-    for( Int i=1 ; i<7 ; i++ ) // 5 spatial + 1 temporal
-#endif
     {
       for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++)
@@ -7040,24 +6651,18 @@
     if (iMVPIdx<=0)
     {
-      // extention part
+#if H3D_NBDV
+      // Extension part
       DisInfo cDisInfo;
       cDisInfo.iN = 0;
-#if LGE_DVMCP_A0126
-#if QC_SIMPLE_NBDV_B0047
+
 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136
-      getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false
+      getDisMvpCandNBDV(uiPartIdx, uiPartAddr, &cDisInfo, false
 #if MERL_VSP_C0152
             , true
 #endif
               ); 
-#else
-      getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo); 
-#endif
-#else
-      getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx );
-#endif
-#else
-      getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo );
-#endif
+#else  // FIX_LGE_IVMP_PARALLEL_MERGE_B0136
+      getDisMvpCandNBDV(uiPartIdx, uiPartAddr, &cDisInfo); 
+#endif // FIX_LGE_IVMP_PARALLEL_MERGE_B0136
       if(cDisInfo.iN==0)
       {
@@ -7077,12 +6682,12 @@
       cPdmMvPred[0].m_bDvMcp = cPdmMvPred[1].m_bDvMcp = false; 
       if(getUnifiedMvPredCan(uiPartIdx, eRefPicList, iRefIdx, paiPdmRefIdx, cPdmMvPred, &cDisInfo, iPdmDir, false))
-#else
+#else // QC_AMVP_MRG_UNIFY_IVCAN_C0051
       TComMv  cPdmMvPred;
-#if QC_MULTI_DIS_CAN_A0097
       if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) )
-#else
+#endif // QC_AMVP_MRG_UNIFY_IVCAN_C0051
+#else // H3D_NBDV
       if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) )
 #endif
-#endif
+
 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
       {
@@ -7125,21 +6730,13 @@
   }
   
-#if QC_MULTI_DIS_CAN_A0097 && !SHARP_INTERVIEW_DECOUPLE_B0111
+#if H3D_NBDV && !SHARP_INTERVIEW_DECOUPLE_B0111
   DisInfo cDisInfo;
   cDisInfo.iN = 0;
   if(m_pcSlice->getSPS()->getViewId() && m_pcSlice->getSPS()->getMultiviewMvPredMode())
   {
-#if LGE_DVMCP_A0126
-#if QC_SIMPLE_NBDV_B0047 
 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136
-    getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false);
-#else
-    getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo);
-#endif
-#else
-    getDisMvpCand2(uiPartIdx, uiPartAddr, &cDisInfo, false, eRefPicList, iRefIdx );
-#endif
-#else
-    getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo );
+    getDisMvpCandNBDV(uiPartIdx, uiPartAddr, &cDisInfo, false);
+#else
+    getDisMvpCandNBDV(uiPartIdx, uiPartAddr, &cDisInfo);
 #endif
   }
@@ -7156,5 +6753,5 @@
   // get inter-view mv predictor (at position 0)
   TComMv  cPdmMvPred;
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
   if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) )
 #else
@@ -7215,5 +6812,5 @@
   // get inter-view mv predictor (at position 1)
   TComMv  cPdmMvPred;
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
   if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) )
 #else
@@ -7267,5 +6864,5 @@
   // get inter-view mv predictor (at position 2)
   TComMv  cPdmMvPred;
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
   if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) )
 #else
@@ -7285,10 +6882,10 @@
     {
       pInfo->iN = 1;
-#if FIX_MISUSE_REFINDEX
+#if QC_MRG_CANS_B0048
       pInfo->m_acMvCand[ 1 ].set(0, 0);
 #endif
     }
   }
-#if QC_MULTI_DIS_CAN_A0097 && !SHARP_INTERVIEW_DECOUPLE_B0111
+#if H3D_NBDV && !SHARP_INTERVIEW_DECOUPLE_B0111
   if ( getSlice()->getViewId()!=0 && pInfo->iN == 3 )
   {
@@ -7364,5 +6961,5 @@
     if ( uiLCUIdx >= 0 && xGetColMVP( eRefPicList, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx_Col ) )
     {
-#if FIX_LGE_DVMCP_B0133
+#if H3D_NBDV
       cColMv.m_bDvMcp = false;
 #endif
@@ -7376,5 +6973,5 @@
       if (xGetColMVP( eRefPicList, uiCurLCUIdx, uiPartIdxCenter,  cColMv, iRefIdx_Col ))
       {
-#if FIX_LGE_DVMCP_B0133
+#if H3D_NBDV
         cColMv.m_bDvMcp = false;
 #endif
@@ -7389,5 +6986,5 @@
   // get inter-view mv predictor (at position 3)
   TComMv  cPdmMvPred;
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
   if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) )
 #else
@@ -7586,5 +7183,5 @@
   {
     TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx);
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
     cMvPred.m_bDvMcp = false;
 #endif 
@@ -7630,5 +7227,5 @@
     {
       TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx);
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
       cMvPred.m_bDvMcp = false;
 #endif
@@ -7800,5 +7397,5 @@
     {
       TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList2nd)->getMv(uiIdx);
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
       cMvPred.m_bDvMcp = false;
 #endif
@@ -7845,5 +7442,5 @@
       rcMv = cMvPred.scaleMv( iScale );
     }
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
     rcMv.m_bDvMcp = false;
 #endif
@@ -7890,5 +7487,5 @@
       rcMv = cMvPred.scaleMv( iScale );
     }
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
     rcMv.m_bDvMcp = false;
 #endif
@@ -7903,13 +7500,7 @@
 }
 
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 Bool TComDataCU::xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx )
 {
-#if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047
-  Int  iDvMcpDispX[2] = {-1,};
-  Bool bDvMcpFlag [2] = { false, }; 
-  Int iCurrViewIdx = m_pcSlice->getViewId();
-#endif
-
   UInt uiAbsPartAddr = uiPartUnitIdx;
 
@@ -7931,7 +7522,4 @@
     return false;
   }
-#if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047
-  Bool bColIsSkipped = pColCU->isSkipped( uiAbsPartAddr );
-#endif
   for (Int ilist = 0; ilist < (pColCU->getSlice()->isInterB()? 2:1); ilist++) 
   {
@@ -7959,17 +7547,4 @@
     if ( iColViewIdx    == iColRefViewIdx ) // temporal vector
     {
-#if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047
-      if( iColViewIdx >0 )
-      {
-        TComMv tmpMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr);
-        if( tmpMv.m_bDvMcp && bColIsSkipped ) // DV-MCP SKIP
-        {
-          iDvMcpDispX[ilist] = tmpMv.m_iDvMcpDispX; 
-          bDvMcpFlag [ilist] = true; 
-          iTargetViewIdx  = 0; //iColRefViewIdx ;
-          iStartViewIdx   = 0; //iCurrViewIdx; //iColViewIdx   ;
-        }
-      }
-#endif
       continue;
     }
@@ -7977,7 +7552,5 @@
     {
       rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr);
-#if LGE_DVMCP_A0126
       rcMv.m_bDvMcp = false;
-#endif
       iTargetViewIdx  = iColRefViewIdx ;
       iStartViewIdx   = iColViewIdx   ;
@@ -7985,19 +7558,4 @@
     }
   }
-
-#if LGE_DVMCP_A0126 && !QC_SIMPLE_NBDV_B0047
-  for( Int ilist=0 ; ilist<2 ; ilist++ )
-  {
-    if( bDvMcpFlag[ilist] )
-    {
-      rcMv.setHor( iDvMcpDispX[ilist] ); 
-      rcMv.setVer( 0 );
-      rcMv.m_bDvMcp = true;
-      iTargetViewIdx  = 0; //iColRefViewIdx ;
-      iStartViewIdx   = iCurrViewIdx; //iColViewIdx   ;
-      return true;
-    }
-  }
-#endif
 
   return false;
@@ -9126,5 +8684,5 @@
 // -------------------------------------------------------------------------------------------------------------------
 #if HHI_INTER_VIEW_MOTION_PRED
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
 Int
 TComDataCU::getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv )
@@ -9143,5 +8701,5 @@
   return pcDepthMapGenerator->getPdmMvPred( this, uiPartIdx, eRefPicList, iRefIdx, rcMv, bMerge );
 }
-#else
+#else //H3D_NBDV
 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
 Bool
@@ -9180,5 +8738,5 @@
 }
 #endif
-#endif
+#endif //H3D_NBDV
 
 Bool      
@@ -9201,21 +8759,13 @@
   TComResidualGenerator*  pcResidualGenerator = m_pcSlice->getSPS()->getResidualGenerator();
   ROFRS( pcResidualGenerator, false );
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
   DisInfo cDisInfo;
   cDisInfo.iN = 0;
   PartSize m_peSaved =  getPartitionSize( 0 );
   m_pePartSize[0] =  SIZE_2Nx2N;
-#if LGE_DVMCP_A0126
-#if QC_SIMPLE_NBDV_B0047
 #if FIX_LGE_IVMP_PARALLEL_MERGE_B0136
-  getDisMvpCand2( 0, 0,  &cDisInfo, false );
-#else
-  getDisMvpCand2( 0, 0,  &cDisInfo);
-#endif
-#else
-  getDisMvpCand2( 0, 0,  &cDisInfo, true );
-#endif
-#else
-  getDisMvpCand        ( 0, 0,  &cDisInfo );
+  getDisMvpCandNBDV( 0, 0,  &cDisInfo, false );
+#else
+  getDisMvpCandNBDV( 0, 0,  &cDisInfo);
 #endif
   if( cDisInfo.iN == 0)
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 289)
@@ -298,5 +298,5 @@
 #endif
   );
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
   Bool          xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx );
 #endif 
@@ -568,39 +568,27 @@
 
 #if HHI_INTER_VIEW_MOTION_PRED
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
   Int           getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv );
   Bool          getPdmMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false );
-#else
+#else //!H3D_NBDV
 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
   Bool getUnifiedMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge );
-#else
+#else //QC_AMVP_MRG_UNIFY_IVCAN_C0051
   Bool          getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false );
   Int           getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 
 #if QC_MRG_CANS_B0048
     , Int* iPdm
-#endif
+#endif //QC_MRG_CANS_B0048
   );
-#endif
+#endif //QC_AMVP_MRG_UNIFY_IVCAN_C0051
   Void          getDisMvpCand        ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo );
-#if LGE_DVMCP_A0126
-#if QC_SIMPLE_NBDV_B0047
-  Void          getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo
-#if LGE_IVMP_PARALLEL_MERGE_B0136
-                              , Bool bParMerg = false
-#endif
+  Void          getDisMvpCandNBDV( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo , Bool bParMerg = false
 #if MERL_VSP_C0152
                               , Bool bDepthRefine = false
-#endif
+#endif //MERL_VSP_C0152
     );
-#else
-  Void          getDisMvpCand2( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo, Bool bMerge=false, RefPicList eRefPicList=REF_PIC_LIST_X, Int iRefIdx=-1
-#if LGE_IVMP_PARALLEL_MERGE_B0136
-    , Bool bParMerg = false
-#endif
-    );
-#endif
-#endif
-
-#endif
+#endif // !H3D_NBDV
+
+
 
 #if MERL_VSP_C0152
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.cpp	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.cpp	(revision 289)
@@ -78,5 +78,5 @@
   m_uiSubSampExpX       = uiSubSampExpX;
   m_uiSubSampExpY       = uiSubSampExpY;
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
   m_ppcYuv              = new TComYuv*    [ m_uiMaxDepth ];
   m_ppcCU               = new TComDataCU* [ m_uiMaxDepth ];
@@ -92,5 +92,5 @@
   m_cTmpPic.create( uiPicWidth >> m_uiSubSampExpX, uiPicHeight >> m_uiSubSampExpY, uiMaxCUWidth >> m_uiSubSampExpX, uiMaxCUHeight >> m_uiSubSampExpY, uiMaxCUDepth );
   xSetChroma( &m_cTmpPic, ( 1 << uiOrgBitDepth ) >> 1 );
-#endif
+#endif //!H3D_NBDV
   m_bCreated    = true;
 }
@@ -102,5 +102,5 @@
   {
     m_bCreated    = false;
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
     for( UInt uiDepth = 0; uiDepth < m_uiMaxDepth; uiDepth++ )
     {
@@ -117,5 +117,5 @@
     delete [] m_ppcCU;  m_ppcCU  = 0;
     m_cTmpPic.destroy();
-#endif
+#endif //!H3D_NBDV
     m_uiMaxDepth          = 0;
     m_uiOrgDepthBitDepth  = 0;
@@ -377,5 +377,5 @@
 }
 
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
 Bool
 TComDepthMapGenerator::predictDepthMap( TComPic* pcPic )
@@ -563,5 +563,5 @@
 }
 
-#endif
+#endif //!H3D_NBDV
 
 #if HHI_INTER_VIEW_MOTION_PRED
@@ -670,5 +670,5 @@
   if(bMerge || !bInterview)
   {
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
     Int  iCurrPosX, iCurrPosY;
     UInt          uiPartAddr;
@@ -686,5 +686,5 @@
     Int         iBaseAbsPartIdx;
     pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx );
-#else
+#else //H3D_NBDV
     Int  iPrdDepth, iCurrPosX, iCurrPosY;
     Bool bAvailable  = xGetPredDepth( pcCU, uiPartIdx, iPrdDepth, &iCurrPosX, &iCurrPosY );
@@ -699,5 +699,5 @@
     Int         iBaseAbsPartIdx;
     pcBaseRec->getCUAddrAndPartIdx( iBasePosX<< m_uiSubSampExpX , iBasePosY<< m_uiSubSampExpY , iBaseCUAddr, iBaseAbsPartIdx );
-#endif 
+#endif // H3D_NBDV
     TComDataCU* pcBaseCU    = pcBasePic->getCU( iBaseCUAddr );
     if( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTER || pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_SKIP )
@@ -726,5 +726,5 @@
                   abPdmAvailable[ uiCurrRefListId ] = true;
                   TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
                   if( bMerge )
                   {
@@ -772,5 +772,5 @@
           paiPdmRefIdx  [ iRefListId ] = iPdmRefIdx;
 #endif
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
           TComMv cMv = pDInfo->m_acMvCand[0]; 
           cMv.setVer(0);
@@ -804,5 +804,5 @@
 }
 #else
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 Int
 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo 
@@ -819,5 +819,5 @@
   AOF  ( m_bCreated && m_bInit );
 
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
   ROFRS( m_bPDMAvailable, 0 );
 #endif
@@ -864,5 +864,5 @@
   TComPicYuv* pcBaseRec   = pcBasePic->getPicYuvRec   ();
 
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
   Int  iCurrPosX, iCurrPosY;
   UInt          uiPartAddr;
@@ -918,5 +918,5 @@
               paiPdmRefIdx  [ uiBaseRefListId ] = iPdmRefIdx;
               TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer());
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
               cMv.m_bDvMcp = true;
               cMv.m_iDvMcpDispX = pDInfo->m_acMvCand[0].getHor();
@@ -924,5 +924,5 @@
               cMv.m_iDvMcpDispY = pDInfo->m_acMvCand[0].getVer();
 #endif
-#endif
+#endif //H3D_NBDV
               pcCU->clipMv( cMv );
               pacPdmMv      [ uiBaseRefListId ] = cMv;
@@ -956,5 +956,5 @@
           paiPdmRefIdx  [ iRefListId ] = iPdmRefIdx;
 #endif
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
           TComMv cMv = pDInfo->m_acMvCand[0]; 
           cMv.setVer(0);
@@ -997,5 +997,5 @@
       if( pcCU->getSlice()->getRefPOC( eRefPicList, iPdmRefIdx ) != pcCU->getSlice()->getPOC() )
       {
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
         if( getDisCanPdmMvPred (pcCU, uiPartIdx, eRefPicList, iPdmRefIdx, cMv, pDInfo, true ) )       
 #else 
@@ -1023,5 +1023,5 @@
       for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ )
       {
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
         if ( getDisCanPdmMvPred (pcCU, uiPartIdx, eRefPicList, iPdmRefIdx, cMv, pDInfo, true ) ) 
 #else 
@@ -1043,15 +1043,12 @@
 }
 
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 Bool
 TComDepthMapGenerator::getDisCanPdmMvPred    ( TComDataCU*   pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge )
 {
-#if LGE_DVMCP_A0126
   rcMv.m_bDvMcp = false;
-#endif
   AOF  ( m_bCreated && m_bInit );
   AOF  ( iRefIdx >= 0 );
   AOF  ( pcCU );
-  //ROFRS( m_bPDMAvailable, false );
   TComSlice*    pcSlice     = pcCU->getSlice ();
   TComSPS*      pcSPS       = pcSlice->getSPS();
@@ -1080,5 +1077,5 @@
   for( UInt uiBId = 0; uiBId < m_uiCurrViewId; uiBId++ )
   {
-    UInt        uiBaseId    = uiBId;  //m_auiBaseIdList[ uiBId ];
+    UInt        uiBaseId    = uiBId; 
 
     if (m_uiCurrViewId >1 && uiBaseId ==1 ) 
@@ -1115,5 +1112,4 @@
       {
         rcMv.set( cBaseMvField.getHor(), cBaseMvField.getVer() );
-#if LGE_DVMCP_A0126
         // save disparity vector when a merge candidate for IVMP is set as DV-MCP
         if( bMerge ) 
@@ -1128,5 +1124,4 @@
           rcMv.m_bDvMcp = false;
         }
-#endif
         return true;
       }
@@ -1135,5 +1130,5 @@
   return false;
 }
-#else
+#else // H3D_NBDV
 Bool  
 TComDepthMapGenerator::getPdmMvPred( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge )
@@ -1219,5 +1214,5 @@
   return false;
 }
-#endif
+#endif // H3D_NBDV
 #endif
 
@@ -1268,5 +1263,5 @@
 
 
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
 /*=======================================================*
  *=====                                             =====*
@@ -2095,5 +2090,5 @@
   return        true;
 }
-#endif
+#endif // H3D_NBDV
 
 #endif // DEPTH_MAP_GENERATION
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.h	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.h	(revision 289)
@@ -136,5 +136,5 @@
 
   Void  initViewComponent     ( TComPic*      pcPic );
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
   Bool  predictDepthMap       ( TComPic*      pcPic );
   Void  updateDepthMap        ( TComPic*      pcPic );
@@ -151,5 +151,5 @@
   Int   getDisparity          ( TComPic*      pcPic, Int iPosX, Int iPosY, UInt uiRefViewId );
 #if HHI_INTER_VIEW_MOTION_PRED
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 #if QC_AMVP_MRG_UNIFY_IVCAN_C0051
   Bool getPdmCandidate ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* iPdm, Bool bMerge );
@@ -180,5 +180,5 @@
 private:
   // picture operations
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
   Bool  xConvertDepthMapCurr2Ref  ( TComPic*    pcRef, TComPic* pcCur );
   Bool  xConvertDepthMapRef2Curr  ( TComPic*    pcCur, TComPic* pcRef );
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComMotionInfo.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComMotionInfo.h	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComMotionInfo.h	(revision 289)
@@ -59,5 +59,5 @@
 
 // ====================================================================================================================
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 typedef struct _DisCand
 {
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComMv.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComMv.h	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComMv.h	(revision 289)
@@ -57,5 +57,5 @@
 public:
   
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
   Bool  m_bDvMcp;       // is dv-mcp ?
   Int   m_iDvMcpDispX;  // disparity for dv-mcp
@@ -72,5 +72,5 @@
   m_iHor(0),
   m_iVer(0)
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
   , m_bDvMcp(false)
   , m_iDvMcpDispX(0)
@@ -85,5 +85,5 @@
   m_iHor(iHor),
   m_iVer(iVer)
-#if LGE_DVMCP_A0126
+#if H3D_NBDV
   , m_bDvMcp(false)
   , m_iDvMcpDispX(0)
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPic.cpp	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPic.cpp	(revision 289)
@@ -84,5 +84,5 @@
   m_bReduceBitsQTL    = 0;
 #endif
-#if QC_SIMPLE_NBDV_B0047
+#if H3D_NBDV
   m_bRapCheck = false;
   m_eRapRefList = REF_PIC_LIST_0;
@@ -489,5 +489,5 @@
   }
 }
-#if QC_SIMPLE_NBDV_B0047
+#if H3D_NBDV
 Bool TComPic::getDisCandRefPictures(Int iColPOC)
 {
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPic.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPic.h	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComPic.h	(revision 289)
@@ -79,8 +79,6 @@
 #if HHI_INTER_VIEW_MOTION_PRED
   TComPicYuv*           m_pcOrgDepthMap;          //  original depth map
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
   Bool          m_checked;
-#endif
-#if QC_SIMPLE_NBDV_B0047
   UInt        m_uiRapRefIdx;
   RefPicList  m_eRapRefList;
@@ -169,5 +167,5 @@
 #if HHI_INTER_VIEW_MOTION_PRED
   TComPicYuv*   getOrgDepthMap()      { return  m_pcOrgDepthMap; }
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
   Void          setCandPicCheckedFlag (Bool bchecked)   { m_checked = bchecked; }
   Bool          getCandPicCheckedFlag ()                { return m_checked;}
@@ -178,5 +176,5 @@
   TComPicYuv*   getResidual()         { return  m_pcResidual; }
 #endif
-#if QC_SIMPLE_NBDV_B0047
+#if H3D_NBDV
   UInt          getRapRefIdx()                         {return m_uiRapRefIdx;}
   RefPicList    getRapRefList()                        {return m_eRapRefList;}
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComResidualGenerator.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComResidualGenerator.cpp	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComResidualGenerator.cpp	(revision 289)
@@ -226,5 +226,5 @@
 }
 
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 #if MTK_RELEASE_DV_CONSTRAINT_C0129
 Bool
@@ -249,5 +249,5 @@
 #endif
   )
-#endif
+#endif //H3D_NBDV
 {
   AOF(  pcCU );
@@ -259,5 +259,5 @@
   iBlkHeight  = pcCU->getHeight ( 0 );
   pcCU->getPic()->getPicYuvRec()->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iXPos, iYPos );
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 #if MTK_RELEASE_DV_CONSTRAINT_C0129
   return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv, iDisp 
@@ -279,8 +279,8 @@
 #endif
     );
-#endif
+#endif // H3D_NBDV
 }
   
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 #if MTK_RELEASE_DV_CONSTRAINT_C0129
 Bool
@@ -319,5 +319,5 @@
   UInt uiXPosInRefView = uiXPos , uiYPosInRefView = uiYPos;
 #endif
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 #if MTK_RELEASE_DV_CONSTRAINT_C0129
   xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv, iDisp
@@ -567,5 +567,5 @@
 
 
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 #if MTK_RELEASE_DV_CONSTRAINT_C0129
 Void  
@@ -575,5 +575,5 @@
 #endif
 )
-#else
+#else // MTK_RELEASE_DV_CONSTRAINT_C0129
 Void  
 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp 
@@ -582,6 +582,6 @@
 #endif
 )
-#endif
-#else
+#endif // MTK_RELEASE_DV_CONSTRAINT_C0129
+#else // H3D_NBDV
 Void  
 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv 
@@ -590,5 +590,5 @@
 #endif
   )
-#endif
+#endif // H3D_NBDV
 {
   //===== set and check some basic variables =====
@@ -607,5 +607,5 @@
 
   //===== get disparity =====
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 #if MTK_RELEASE_DV_CONSTRAINT_C0129
   Int iDisparity_y = iDisp.getVer();
@@ -614,9 +614,9 @@
   Int iDisparity = iDisp;
 #endif
-#else
+#else //H3D_NBDV
   Int           iMidPosX    = Int( uiXPos + ( ( uiBlkWidth  - 1 ) >> 1 ) ) >> m_pcDepthMapGenerator->getSubSampExpX();
   Int           iMidPosY    = Int( uiYPos + ( ( uiBlkHeight - 1 ) >> 1 ) ) >> m_pcDepthMapGenerator->getSubSampExpY();
   Int           iDisparity  = m_pcDepthMapGenerator->getDisparity( pcPic, iMidPosX, iMidPosY, uiBaseViewId );
-#endif
+#endif //H3D_NBDV
   //===== compensate luma =====
   Int           iYWidth     = Int( uiBlkWidth  );
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComResidualGenerator.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComResidualGenerator.h	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TComResidualGenerator.h	(revision 289)
@@ -69,5 +69,5 @@
   Void  setRecResidualPic     ( TComPic*      pcPic );
 
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 #if MTK_RELEASE_DV_CONSTRAINT_C0129
   Bool  getResidualSamples    ( TComDataCU*   pcCU,  UInt uiPUIdx, TComYuv* pcYuv, TComMv iDisp_x
@@ -113,5 +113,5 @@
   Void  xClearIntViewResidual ( TComDataCU*   pcCU,  TComYuv* pcCUResidual, UInt uiPartIdx    );
   Void  xClearResidual        (                      TComYuv* pcCUResidual, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight );
-#if QC_MULTI_DIS_CAN_A0097
+#if H3D_NBDV
 #if MTK_RELEASE_DV_CONSTRAINT_C0129
   Void  xSetPredResidualBlock ( TComPic*      pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, TComMv iDisp
Index: branches/HTM-5.1-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 289)
@@ -45,7 +45,4 @@
 #define QC_TMVP_IDX_MOD_B0046             1   //JCT3V-B0046: the reference index for temporal merging candidate is set to 0, as defined in HEVC
 #define QC_REM_IDV_B0046                  1   //JCT3V-B0046: removal of IDV NAL unit type
-#define FIX_DEL_NULLPTR                   1
-#define FIX_MISUSE_REFINDEX               1
-#define FIX_FCO_COMP_WARNING              1
 #define DV_V_RESTRICTION_B0037            1   // JCT3V-B0037 disparity vector vertical range restriction
 
@@ -69,5 +66,5 @@
 #define FIX_RDO_NEGDIST                   1
 #define FIX_DMM_NEG_DIST                  1
-#define FIX_LGE_DVMCP_B0133               1
+
 
 // 3rd meeting
@@ -89,7 +86,11 @@
 #define HHI_DMM_PRED_TEX                  1   // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction )
 #define LGE_EDGE_INTRA_A0070              1   // JCT3V-A0070
+
 #define RWTH_SDC_DLT_B0036                1   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
-#define HHIQC_DMMFASTSEARCH_B0039         1   // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3
+
+#define HHIQC_DMMFASTSEARCH_B0039         1   // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3 // --> weg 
+
 #define HHI_DMM_DELTADC_Q1_C0034          1   // JCT3V-C0034: no quantization and fast encoder search for DMM delta DC values
+
 #if HHIQC_DMMFASTSEARCH_B0039 && HHI_DMM_PRED_TEX
 #define LGE_DMM3_SIMP_C0044               1
@@ -129,9 +130,13 @@
 
 ///// ***** DISPARITY VECTOR DERIVATION *********
-#define QC_MULTI_DIS_CAN_A0097            1   // JCT3V-A0097
-#define LGE_DVMCP_A0126                   1   // JCT3V-A0126     
-#define LGE_DVMCP_MEM_REDUCTION_B0135     1   // JCT3V-B0135     
-#define DV_DERIVATION_PARALLEL_B0096      1   // JCT3V-B0096, enable parallel derivation of disparity vector
-#define QC_SIMPLE_NBDV_B0047              1   // JCT3V-B0047
+#define H3D_NBDV                          1   // Neighboring block disparity derivation 
+                                              // JCT3V-A0097 
+                                              // LGE_DVMCP_A0126
+                                              // LGE_DVMCP_MEM_REDUCTION_B0135     
+                                              // DV_DERIVATION_PARALLEL_B0096, enable parallel derivation of disparity vector
+                                              // QC_SIMPLE_NBDV_B0047
+                                              // FIX_LGE_DVMCP_B0133
+                                              // LGE_IVMP_PARALLEL_MERGE_B0136, B0136 support of parallel merge/skip in disparity vector derivation
+
 ///// ***** MOTION PARAMETER INHERITANCE  *********
 #define MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137   1   // JCT3V-C0137
@@ -216,5 +221,5 @@
 
 ///// ***** DEFINED PARAMETERS *********
-#if QC_MULTI_DIS_CAN_A0097                    
+#if H3D_NBDV                    
 #define DIS_CANS                          1
 #endif                                  
@@ -238,5 +243,5 @@
 
 
-#if LGE_DVMCP_A0126                           
+#if H3D_NBDV                           
 #define DVFROM_LEFTBELOW                  1
 #define DVFROM_LEFT                       2
@@ -271,5 +276,4 @@
 
 #define PARALLEL_MERGE  1                   //< H0082 parallel merge/skip
-#define LGE_IVMP_PARALLEL_MERGE_B0136     1 //< B0136 support of parallel merge/skip in disparity vector derivation
 #define LOG2_PARALLEL_MERGE_LEVEL_MINUS2  0 //< H0082 parallel merge level 0-> 4x4, 1-> 8x8, 2->16x16, 3->32x32, 4->64x64
 
@@ -453,7 +457,7 @@
 
 #if LGE_EDGE_INTRA_A0070
-#if HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
+#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
 #define EDGE_INTRA_IDX  (NUM_INTRA_MODE+NUM_DMM_MODE)
-#endif // HHI_DMM_WEDGE_INTRA && HHI_DMM_PRED_TEX
+#endif // HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
 #if LGE_EDGE_INTRA_DELTA_DC
 #define EDGE_INTRA_DELTA_IDX          (EDGE_INTRA_IDX+1)
Index: branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecGop.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecGop.cpp	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibDecoder/TDecGop.cpp	(revision 289)
@@ -303,5 +303,5 @@
     {
       m_pcDepthMapGenerator->initViewComponent( rpcPic );
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
       m_pcDepthMapGenerator->predictDepthMap  ( rpcPic );
 #endif
@@ -312,5 +312,5 @@
 #endif
 
-#if QC_SIMPLE_NBDV_B0047
+#if H3D_NBDV
     if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode())
     {
@@ -348,5 +348,5 @@
 #endif
 #if DEPTH_MAP_GENERATION
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
     // update virtual depth map
     m_pcDepthMapGenerator->updateDepthMap( rpcPic );
Index: branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 287)
+++ branches/HTM-5.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 289)
@@ -754,5 +754,5 @@
       // init view component and predict virtual depth map
       m_pcDepthMapGenerator->initViewComponent( pcPic );
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
       m_pcDepthMapGenerator->predictDepthMap  ( pcPic );
 #endif
@@ -765,5 +765,5 @@
 #endif
 
-#if QC_SIMPLE_NBDV_B0047
+#if H3D_NBDV
       if(pcSlice->getViewId() && pcSlice->getSPS()->getMultiviewMvPredMode())
       {
@@ -830,5 +830,5 @@
 #endif
 #if DEPTH_MAP_GENERATION
-#if !QC_MULTI_DIS_CAN_A0097
+#if !H3D_NBDV
       // update virtual depth map
       m_pcDepthMapGenerator->updateDepthMap( pcPic );
