Index: branches/HM-10.0-dev-SHM/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HM-10.0-dev-SHM/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 73)
+++ branches/HM-10.0-dev-SHM/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 74)
@@ -1032,7 +1032,4 @@
 #endif
 
-#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV
-  xConfirmPara( REF_IDX_ME_AROUND_ZEROMV && REF_IDX_ME_ZEROMV, "REF_IDX_ME_AROUND_ZEROMV and REF_IDX_ME_ZEROMV cannot be enabled simultaneously");
-#endif
   // max CU width and height should be power of 2
   UInt ui = m_uiMaxCUWidth;
@@ -1667,5 +1664,4 @@
   printf("REF_IDX_FRAMEWORK:%d ", REF_IDX_FRAMEWORK);
   printf("EL_RAP_SliceType: %d ", m_elRapSliceBEnabled);
-  printf("REF_IDX_ME_AROUND_ZEROMV:%d ", REF_IDX_ME_AROUND_ZEROMV);
   printf("REF_IDX_ME_ZEROMV: %d", REF_IDX_ME_ZEROMV);
 #elif INTRA_BL
Index: branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComPic.cpp
===================================================================
--- branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComPic.cpp	(revision 73)
+++ branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComPic.cpp	(revision 74)
@@ -70,5 +70,5 @@
 , m_bSpatialEnhLayer( false )
 , m_pcFullPelBaseRec( NULL )
-#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
+#if REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
 , m_bIsILR                                (false)
 #endif
Index: branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComPic.h
===================================================================
--- branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComPic.h	(revision 73)
+++ branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TComPic.h	(revision 74)
@@ -94,5 +94,5 @@
   Bool                  m_bSpatialEnhLayer;       // whether current layer is a spatial enhancement layer,
   TComPicYuv*           m_pcFullPelBaseRec;    // upsampled base layer recontruction for difference domain inter prediction
-#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
+#if REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
   Bool                  m_bIsILR;                 //  Is ILR picture
 #endif
@@ -126,5 +126,5 @@
   TComPicYuv*   getFullPelBaseRec   ()  { return  m_pcFullPelBaseRec;  }
 #endif
-#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
+#if REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
   Void          setIsILR( Bool bIsILR)      {m_bIsILR = bIsILR;}
   Bool          getIsILR()                  {return m_bIsILR;}
Index: branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TypeDef.h	(revision 73)
+++ branches/HM-10.0-dev-SHM/source/Lib/TLibCommon/TypeDef.h	(revision 74)
@@ -70,5 +70,4 @@
 
 #if REF_IDX_FRAMEWORK
-#define REF_IDX_ME_AROUND_ZEROMV         0      ///< added ME around zero MV for inter-layer reference picture
 #define REF_IDX_ME_ZEROMV                1      ///< L0051: use zero motion for inter-layer reference picture (without fractional ME)
 #define ENCODER_FAST_MODE                1      ///< L0174: enable encoder fast mode. TestMethod 1 is enabled by setting to 1 and TestMethod 2 is enable by setting to 2. By default it is set to 1.
Index: branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecTop.cpp	(revision 73)
+++ branches/HM-10.0-dev-SHM/source/Lib/TLibDecoder/TDecTop.cpp	(revision 74)
@@ -159,5 +159,5 @@
         m_cIlpPic[j]->create(pcSPS->getPicWidthInLumaSamples(), pcSPS->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true);
 #endif
-#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || REF_IDX_MFM
+#if REF_IDX_ME_ZEROMV || REF_IDX_MFM
         m_cIlpPic[j]->setIsILR(true);
 #endif
Index: branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 73)
+++ branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 74)
@@ -4207,23 +4207,4 @@
   setWpScalingDistParam( pcCU, iRefIdxPred, eRefPicList );
   //  Do integer search
-#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV
-#if REF_IDX_ME_AROUND_ZEROMV
-  if( pcCU->getSlice()->getRefPic(eRefPicList, iRefIdxPred )->getIsILR())  //ILR reference pic
-  {
-    xPatternSearchILR  ( pcCU, pcPatternKey, piRefY, iRefStride, rcMv, ruiCost );
-  }
-  else  //non ILR reference pic
-  {
-  if ( !m_iFastSearch || bBi )
-  {
-    xPatternSearch      ( pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost );
-  }
-  else
-  {
-    rcMv = *pcMvPred;
-    xPatternSearchFast  ( pcCU, pcPatternKey, piRefY, iRefStride, &cMvSrchRngLT, &cMvSrchRngRB, rcMv, ruiCost );
-    }
-  }
-#endif
 #if REF_IDX_ME_ZEROMV
   if( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdxPred )->getIsILR())  //ILR reference pic 
@@ -4243,5 +4224,4 @@
     }
   }
-#endif
 #else
   if ( !m_iFastSearch || bBi )
@@ -6193,63 +6173,4 @@
 #endif
 
-#if REF_IDX_ME_AROUND_ZEROMV
-//ILR integer pixel motion estimation search
-//pcCU is CU pointer
-//pcPatterney contains target PU infor
-//piRefY is the PU at the same position as the source PU, but in the reference pic
-//iRefStride is the reference stride
-//rcMv output best integer MV
-//ruiSAD outputs the SAD of best integer MV
-Void TEncSearch::xPatternSearchILR( TComDataCU* pcCU, TComPattern* pcPatternKey, Pel* piRefY, Int iRefStride, TComMv& rcMv, UInt& ruiSAD )
-{
-  Int      candMvX[5] = {0, -1, 1,  0, 0};
-  Int      candMvY[5] = {0,  0, 0, -1, 1};
-  Int      numCand    = 1;
-  Int      iBestX = 0;
-  Int      iBestY = 0;
-  Int      uiSadBest = MAX_UINT;
-  UInt     uiSad;
-
-  Pel*  piRefSrch;
-
-  //-- jclee for using the SAD function pointer
-  m_pcRdCost->setDistParam( pcPatternKey, piRefY, iRefStride,  m_cDistParam );
-
-  // fast encoder decision: use subsampled SAD for integer ME
-  if ( m_pcEncCfg->getUseFastEnc() )
-  {
-    if ( m_cDistParam.iRows > 8 )
-    {
-      m_cDistParam.iSubShift = 1;
-    }
-  }
-
-  for(Int candId = 0; candId < numCand; candId++)
-  {
-    piRefSrch         = piRefY + (candMvY[candId] * iRefStride) + candMvX[candId];
-    m_cDistParam.pCur = piRefSrch;
-
-    setDistParamComp(0);
-    
-    uiSad = m_cDistParam.DistFunc( &m_cDistParam );  //SAD
-
-    //motion cost
-    uiSad += m_pcRdCost->getCost( candMvX[candId], candMvY[candId] );  //SAD rdCost
-
-    if(uiSad < uiSadBest)
-    {
-      uiSadBest = uiSad;
-      iBestX    = candMvX[candId];
-      iBestY    = candMvY[candId];
-    }
-  }
-
-  rcMv.set( iBestX, iBestY );
-
-  ruiSAD = uiSadBest - m_pcRdCost->getCost( iBestX, iBestY );
-  return;
-}
-#endif
-
 #if ENCODER_FAST_MODE
 Bool TEncSearch::predInterSearchILRUni( TComDataCU* pcCU, TComYuv* pcOrgYuv, TComYuv*& rpcPredYuv, TComYuv*& rpcResiYuv, TComYuv*& rpcRecoYuv )
Index: branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncSearch.h	(revision 73)
+++ branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncSearch.h	(revision 74)
@@ -462,13 +462,4 @@
                                    ,Bool biPred
                                    );
-#if REF_IDX_ME_AROUND_ZEROMV
-  Void xPatternSearchILR         ( TComDataCU*    pcCU,
-                                   TComPattern*   pcPatternKey,
-                                   Pel*           piRefY, 
-                                   Int            iRefStride, 
-                                   TComMv&        rcMv, 
-                                   UInt&          ruiSAD );
-#endif
-  
 #if REF_IDX_ME_ZEROMV
   Void xPatternSearchFracDIFMv0  ( TComDataCU*   pcCU,
Index: branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncTop.cpp	(revision 73)
+++ branches/HM-10.0-dev-SHM/source/Lib/TLibEncoder/TEncTop.cpp	(revision 74)
@@ -1127,5 +1127,5 @@
         m_cIlpPic[j]->create(m_iSourceWidth, m_iSourceHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth, conformanceWindow, defaultDisplayWindow, numReorderPics, true);
 #endif
-#if REF_IDX_ME_AROUND_ZEROMV || REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
+#if REF_IDX_ME_ZEROMV || ENCODER_FAST_MODE || REF_IDX_MFM
         m_cIlpPic[j]->setIsILR(true);
 #endif
