Index: /branches/SHM-dev/source/Lib/TLibCommon/TComRdCost.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComRdCost.cpp	(revision 1468)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComRdCost.cpp	(revision 1469)
@@ -165,5 +165,5 @@
   m_costMode                   = COST_STANDARD_LOSSY;
 
-  m_dCost                      = 0;
+  m_motionLambda               = 0;
   m_iCostScale                 = 0;
 }
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComRdCost.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComRdCost.h	(revision 1468)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComRdCost.h	(revision 1469)
@@ -125,5 +125,5 @@
   // for motion cost
   TComMv                  m_mvPredictor;
-  Double                  m_dCost;
+  Double                  m_motionLambda;
   Int                     m_iCostScale;
 
@@ -157,5 +157,5 @@
   // for motion cost
   static UInt    xGetExpGolombNumberOfBits( Int iVal );
-  Void    getMotionCost( Bool bSad, Int iAdd, Bool bIsTransquantBypass ) { m_dCost = (bSad ? m_dLambdaMotionSAD[(bIsTransquantBypass && m_costMode==COST_MIXED_LOSSLESS_LOSSY_CODING) ?1:0] + iAdd : m_dLambdaMotionSSE[(bIsTransquantBypass && m_costMode==COST_MIXED_LOSSLESS_LOSSY_CODING)?1:0] + iAdd); }
+  Void    selectMotionLambda( Bool bSad, Int iAdd, Bool bIsTransquantBypass ) { m_motionLambda = (bSad ? m_dLambdaMotionSAD[(bIsTransquantBypass && m_costMode==COST_MIXED_LOSSLESS_LOSSY_CODING) ?1:0] + iAdd : m_dLambdaMotionSSE[(bIsTransquantBypass && m_costMode==COST_MIXED_LOSSLESS_LOSSY_CODING)?1:0] + iAdd); }
   Void    setPredictor( TComMv& rcMv )
   {
@@ -163,10 +163,10 @@
   }
   Void    setCostScale( Int iCostScale )    { m_iCostScale = iCostScale; }
-  __inline Distortion getCost( Int x, Int y )
+  Distortion getCost( UInt b )                 { return Distortion(( m_motionLambda * b ) / 65536.0); }
+  Distortion getCostOfVectorWithPredictor( const Int x, const Int y )
   {
-    return Distortion((m_dCost * getBits(x, y)) / 65536.0);
+    return Distortion((m_motionLambda * getBitsOfVectorWithPredictor(x, y)) / 65536.0);
   }
-  Distortion getCost( UInt b )                 { return Distortion(( m_dCost * b ) / 65536.0); }
-  UInt    getBits( Int x, Int y )
+  UInt getBitsOfVectorWithPredictor( const Int x, const Int y )
   {
     return xGetExpGolombNumberOfBits((x << m_iCostScale) - m_mvPredictor.getHor())
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1468)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 1469)
@@ -328,5 +328,5 @@
     Int isubShift = 0;
     // motion cost
-    Distortion uiBitCost = m_pcRdCost->getCost( iSearchX, iSearchY );
+    Distortion uiBitCost = m_pcRdCost->getCostOfVectorWithPredictor( iSearchX, iSearchY );
 
     // Skip search if bit cost is already larger than best SAD
@@ -404,5 +404,5 @@
     {
       // motion cost
-      uiSad += m_pcRdCost->getCost( iSearchX, iSearchY );
+      uiSad += m_pcRdCost->getCostOfVectorWithPredictor( iSearchX, iSearchY );
 
       if( uiSad < rcStruct.uiBestSad )
@@ -862,5 +862,5 @@
     m_cDistParam.bitDepth = pcPatternKey->getBitDepthY();
     uiDist = m_cDistParam.DistFunc( &m_cDistParam );
-    uiDist += m_pcRdCost->getCost( cMvTest.getHor(), cMvTest.getVer() );
+    uiDist += m_pcRdCost->getCostOfVectorWithPredictor( cMvTest.getHor(), cMvTest.getVer() );
 
     if ( uiDist < uiDistBest )
@@ -3158,5 +3158,5 @@
             /*correct the bit-rate part of the current ref*/
             m_pcRdCost->setPredictor  ( cMvPred[iRefList][iRefIdxTemp] );
-            uiBitsTemp += m_pcRdCost->getBits( cMvTemp[1][iRefIdxTemp].getHor(), cMvTemp[1][iRefIdxTemp].getVer() );
+            uiBitsTemp += m_pcRdCost->getBitsOfVectorWithPredictor( cMvTemp[1][iRefIdxTemp].getHor(), cMvTemp[1][iRefIdxTemp].getVer() );
             /*calculate the correct cost*/
             uiCostTemp += m_pcRdCost->getCost( uiBitsTemp );
@@ -3509,5 +3509,5 @@
       TComMvField cMEMvField[2];
 
-      m_pcRdCost->getMotionCost( true, 0, pcCU->getCUTransquantBypass(uiPartAddr) );
+      m_pcRdCost->selectMotionLambda( true, 0, pcCU->getCUTransquantBypass(uiPartAddr) );
 
 #if AMP_MRG
@@ -3745,5 +3745,5 @@
   }
 
-  m_pcRdCost->getMotionCost( true, 0, pcCU->getCUTransquantBypass(0) );
+  m_pcRdCost->selectMotionLambda( true, 0, pcCU->getCUTransquantBypass(0) );
   m_pcRdCost->setCostScale ( 0    );
 
@@ -3751,5 +3751,5 @@
 
   m_pcRdCost->setPredictor( rcMvPred );
-  Int iOrgMvBits  = m_pcRdCost->getBits(cMv.getHor(), cMv.getVer());
+  Int iOrgMvBits  = m_pcRdCost->getBitsOfVectorWithPredictor(cMv.getHor(), cMv.getVer());
   iOrgMvBits += m_auiMVPIdxCost[riMVPIdx][AMVP_MAX_NUM_CANDS];
   Int iBestMvBits = iOrgMvBits;
@@ -3764,5 +3764,5 @@
     m_pcRdCost->setPredictor( pcAMVPInfo->m_acMvCand[iMVPIdx] );
 
-    Int iMvBits = m_pcRdCost->getBits(cMv.getHor(), cMv.getVer());
+    Int iMvBits = m_pcRdCost->getBitsOfVectorWithPredictor(cMv.getHor(), cMv.getVer());
     iMvBits += m_auiMVPIdxCost[iMVPIdx][AMVP_MAX_NUM_CANDS];
 
@@ -3911,5 +3911,5 @@
   }
 
-  m_pcRdCost->getMotionCost( true, 0, pcCU->getCUTransquantBypass(uiPartAddr) );
+  m_pcRdCost->selectMotionLambda( true, 0, pcCU->getCUTransquantBypass(uiPartAddr) );
 
   m_pcRdCost->setPredictor  ( *pcMvPred );
@@ -3949,5 +3949,5 @@
 #endif
 
-  m_pcRdCost->getMotionCost( true, 0, pcCU->getCUTransquantBypass(uiPartAddr) );
+  m_pcRdCost->selectMotionLambda( true, 0, pcCU->getCUTransquantBypass(uiPartAddr) );
   m_pcRdCost->setCostScale ( 1 );
 
@@ -3968,5 +3968,5 @@
   rcMv +=  cMvQter;
 
-  UInt uiMvBits = m_pcRdCost->getBits( rcMv.getHor(), rcMv.getVer() );
+  UInt uiMvBits = m_pcRdCost->getBitsOfVectorWithPredictor( rcMv.getHor(), rcMv.getVer() );
 
   ruiBits      += uiMvBits;
@@ -4044,5 +4044,5 @@
 
       // motion cost
-      uiSad += m_pcRdCost->getCost( x, y );
+      uiSad += m_pcRdCost->getCostOfVectorWithPredictor( x, y );
 
       if ( uiSad < uiSadBest )
@@ -4059,5 +4059,5 @@
   rcMv.set( iBestX, iBestY );
 
-  ruiSAD = uiSadBest - m_pcRdCost->getCost( iBestX, iBestY );
+  ruiSAD = uiSadBest - m_pcRdCost->getCostOfVectorWithPredictor( iBestX, iBestY );
   return;
 }
@@ -4402,5 +4402,5 @@
   // write out best match
   rcMv.set( cStruct.iBestX, cStruct.iBestY );
-  ruiSAD = cStruct.uiBestSad - m_pcRdCost->getCost( cStruct.iBestX, cStruct.iBestY );
+  ruiSAD = cStruct.uiBestSad - m_pcRdCost->getCostOfVectorWithPredictor( cStruct.iBestX, cStruct.iBestY );
 }
 
@@ -4579,5 +4579,5 @@
   // write out best match
   rcMv.set( cStruct.iBestX, cStruct.iBestY );
-  ruiSAD = cStruct.uiBestSad - m_pcRdCost->getCost( cStruct.iBestX, cStruct.iBestY );
+  ruiSAD = cStruct.uiBestSad - m_pcRdCost->getCostOfVectorWithPredictor( cStruct.iBestX, cStruct.iBestY );
 
 }
@@ -5968,5 +5968,5 @@
   setDistParamComp(COMPONENT_Y);
   ruiCost = m_cDistParam.DistFunc( &m_cDistParam );  //SATD
-  ruiCost += m_pcRdCost->getCost( pcMvInt->getHor(), pcMvInt->getVer() );  //SATD rdCost
+  ruiCost += m_pcRdCost->getCostOfVectorWithPredictor( pcMvInt->getHor(), pcMvInt->getVer() );  //SATD rdCost
   rcMvHalf.setZero();
   rcMvQter.setZero();
Index: /branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.h	(revision 1468)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.h	(revision 1469)
@@ -102,6 +102,4 @@
   MESearchMethod  m_motionEstimationSearchMethod;
   Int             m_aaiAdaptSR[MAX_NUM_REF_LIST_ADAPT_SR][MAX_IDX_ADAPT_SR];
-  TComMv          m_cSrchRngLT;
-  TComMv          m_cSrchRngRB;
   TComMv          m_acMvPredictors[NUM_MV_PREDICTORS]; // Left, Above, AboveRight. enum MVP_DIR first NUM_MV_PREDICTORS entries are suitable for accessing.
 
