<div dir="ltr">Yes, we are sharing the best reference and recomputed the MVs for that best ref alone<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 17, 2014 at 3:42 PM, Deepthi Nandakumar <span dir="ltr"><<a href="mailto:deepthi@multicorewareinc.com" target="_blank">deepthi@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">MVs are no longer shared or reused, but are instead re-computed?<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Nov 17, 2014 at 3:36 PM, <span dir="ltr"><<a href="mailto:gopu@multicorewareinc.com" target="_blank">gopu@multicorewareinc.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"># HG changeset patch<br>
# User Gopu Govindaswamy <<a href="mailto:gopu@multicorewareinc.com" target="_blank">gopu@multicorewareinc.com</a>><br>
# Date 1416218723 -19800<br>
# Mon Nov 17 15:35:23 2014 +0530<br>
# Node ID 23bba9b2de1c930976a9018c5127b566ba31c44a<br>
# Parent 27d36c4b4a27d2872430c6a6fc538fbddcf791e6<br>
search: fix binary mismatch and inconsistent crash for share inter information<br>
<br>
diff -r 27d36c4b4a27 -r 23bba9b2de1c source/common/common.h<br>
--- a/source/common/common.h Mon Nov 17 01:30:26 2014 +0530<br>
+++ b/source/common/common.h Mon Nov 17 15:35:23 2014 +0530<br>
@@ -350,9 +350,6 @@<br>
struct analysis_inter_data<br>
{<br>
int ref;<br>
- int costZero;<br>
- int16_t mvx;<br>
- int16_t mvy;<br>
};<br>
<br>
/* Stores intra analysis data for a single frame. This struct needs better packing */<br>
diff -r 27d36c4b4a27 -r 23bba9b2de1c source/encoder/analysis.cpp<br>
--- a/source/encoder/analysis.cpp Mon Nov 17 01:30:26 2014 +0530<br>
+++ b/source/encoder/analysis.cpp Mon Nov 17 15:35:23 2014 +0530<br>
@@ -1454,10 +1454,7 @@<br>
MotionData* bestME = interMode.bestME[part];<br>
for (int32_t i = 0; i < numPredDir; i++)<br>
{<br>
- bestME[i].mv.x = m_reuseInterDataCTU->mvx;<br>
- bestME[i].mv.y = m_reuseInterDataCTU->mvy;<br>
bestME[i].ref = m_reuseInterDataCTU->ref;<br>
- bestME[i].costZero = !!m_reuseInterDataCTU->costZero;<br>
m_reuseInterDataCTU++;<br>
}<br>
}<br>
@@ -1477,10 +1474,7 @@<br>
MotionData* bestME = interMode.bestME[part];<br>
for (int32_t i = 0; i < numPredDir; i++)<br>
{<br>
- m_reuseInterDataCTU->mvx = bestME[i].mv.x;<br>
- m_reuseInterDataCTU->mvy = bestME[i].mv.y;<br>
m_reuseInterDataCTU->ref = bestME[i].ref;<br>
- m_reuseInterDataCTU->costZero = bestME[i].costZero;<br>
m_reuseInterDataCTU++;<br>
}<br>
}<br>
@@ -1507,10 +1501,7 @@<br>
MotionData* bestME = interMode.bestME[part];<br>
for (int32_t i = 0; i < numPredDir; i++)<br>
{<br>
- bestME[i].mv.x = m_reuseInterDataCTU->mvx;<br>
- bestME[i].mv.y = m_reuseInterDataCTU->mvy;<br>
bestME[i].ref = m_reuseInterDataCTU->ref;<br>
- bestME[i].costZero = !!m_reuseInterDataCTU->costZero;<br>
m_reuseInterDataCTU++;<br>
}<br>
}<br>
@@ -1526,10 +1517,7 @@<br>
MotionData* bestME = interMode.bestME[part];<br>
for (int32_t i = 0; i < numPredDir; i++)<br>
{<br>
- m_reuseInterDataCTU->mvx = bestME[i].mv.x;<br>
- m_reuseInterDataCTU->mvy = bestME[i].mv.y;<br>
m_reuseInterDataCTU->ref = bestME[i].ref;<br>
- m_reuseInterDataCTU->costZero = bestME[i].costZero;<br>
m_reuseInterDataCTU++;<br>
}<br>
}<br>
diff -r 27d36c4b4a27 -r 23bba9b2de1c source/encoder/search.cpp<br>
--- a/source/encoder/search.cpp Mon Nov 17 01:30:26 2014 +0530<br>
+++ b/source/encoder/search.cpp Mon Nov 17 15:35:23 2014 +0530<br>
@@ -2001,7 +2001,7 @@<br>
uint32_t bits = m_listSelBits[l] + MVP_IDX_BITS;<br>
bits += getTUBits(ref, numRefIdx[l]);<br>
<br>
- cu.fillMvpCand(puIdx, m_puAbsPartIdx, l, ref, interMode.amvpCand[l][ref], mvc);<br>
+ int numMvc = cu.fillMvpCand(puIdx, m_puAbsPartIdx, l, ref, interMode.amvpCand[l][ref], mvc);<br>
<br>
// Pick the best possible MVP from AMVP candidates based on least residual<br>
uint32_t bestCost = MAX_INT;<br>
@@ -2028,18 +2028,14 @@<br>
}<br>
<br>
MV mvmin, mvmax, outmv, mvp = interMode.amvpCand[l][ref][mvpIdx];<br>
- m_me.setMVP(mvp);<br>
- MV bmv(bestME[l].mv.x, bestME[l].mv.y);<br>
<br>
int satdCost;<br>
- if (bestME[l].costZero)<br>
- satdCost = m_me.mvcost(bmv);<br>
- else<br>
- satdCost = bestME[l].cost;<br>
+ setSearchRange(cu, mvp, merange, mvmin, mvmax);<br>
+ satdCost = m_me.motionEstimate(&slice->m_mref[l][ref], mvmin, mvmax, mvp, numMvc, mvc, merange, outmv);<br>
<br>
/* Get total cost of partition, but only include MV bit cost once */<br>
- bits += m_me.bitcost(bmv);<br>
- uint32_t cost = (satdCost - m_me.mvcost(bmv)) + m_rdCost.getCost(bits);<br>
+ bits += m_me.bitcost(outmv);<br>
+ uint32_t cost = (satdCost - m_me.mvcost(outmv)) + m_rdCost.getCost(bits);<br>
<br>
/* Refine MVP selection, updates: mvp, mvpIdx, bits, cost */<br>
checkBestMVP(interMode.amvpCand[l][ref], outmv, mvp, mvpIdx, bits, cost);<br>
@@ -2049,7 +2045,6 @@<br>
bestME[l].mv = outmv;<br>
bestME[l].mvp = mvp;<br>
bestME[l].mvpIdx = mvpIdx;<br>
- bestME[l].ref = ref;<br>
bestME[l].cost = cost;<br>
bestME[l].bits = bits;<br>
}<br></div></div>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div>
<br>_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Thanks & Regards<br>Gopu G<br>Multicoreware Inc <br><br></div>
</div>