changeset 4194:5b987ed0a557

Bidir ME: store bits required for bidir which will be used for merge estimation
author Deepthi Devaki <deepthidevaki@multicorewareinc.com>
date Fri, 04 Oct 2013 15:40:48 +0530
parents ae9c68edd6b2
children a201bc951e10
files source/Lib/TLibEncoder/TEncSearch.cpp
diffstat 1 files changed, 3 insertions(+-), 1 deletions(-) [+]
line wrap: on
line diff
--- a/source/Lib/TLibEncoder/TEncSearch.cpp	Fri Oct 04 15:23:07 2013 +0530
+++ b/source/Lib/TLibEncoder/TEncSearch.cpp	Fri Oct 04 15:40:48 2013 +0530
@@ -2437,7 +2437,8 @@ void TEncSearch::predInterSearch(TComDat
                 primitives.pixelavg_pp[partEnum](avg, roiWidth, ref0, ref1, m_predYuv[0].getStride(), m_predYuv[1].getStride());
 
                 int satdCost = primitives.satd[partEnum](pu, fenc->getStride(), avg, roiWidth);
-                costbi =  satdCost + m_rdCost->getCost(bits[0]) + m_rdCost->getCost(bits[1]);
+                bits[2] = bits[0] + bits[1] - mbBits[0] - mbBits[1] + mbBits[2];
+                costbi =  satdCost + m_rdCost->getCost(bits[2]);
 
                 if (mv[0].notZero() || mv[1].notZero())
                 {
@@ -2466,6 +2467,7 @@ void TEncSearch::predInterSearch(TComDat
                         costbi = costZero;
                         mvBidir[0].x = mvBidir[0].y = 0;
                         mvBidir[1].x = mvBidir[1].y = 0;
+                        bits[2] = bitsZero0 + bitsZero1 - mbBits[0] - mbBits[1] + mbBits[2];
                     }
                 }
             } // if (B_SLICE)