<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"><div>End of function, below code made bug</div><div><br></div><div> if (!m_param->limitModes)<br> {<br> splitCUData.mvCost[0] = 0; // L0<br> splitCUData.mvCost[1] = 0; // L1<br> splitCUData.rdCost = 0;<br> }<br> else<br> {<br> splitCUData.mvCost[0] = md.pred[PRED_2Nx2N].bestME[0][0].mvCost; // L0<br> splitCUData.mvCost[1] = md.pred[PRED_2Nx2N].bestME[0][1].mvCost; // L1<br> splitCUData.rdCost = md.pred[PRED_2Nx2N].sa8dCost;<br> }<br><br><br><br></div><div></div><div id="divNeteaseMailCard"></div><div><br></div>At 2016-01-04 12:47:25,"Deepthi Nandakumar" <deepthi@multicorewareinc.com> wrote:<br> <blockquote id="isReplyContent" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div dir="ltr">Min, can you elaborate? Where is bestME being used uninitialised?<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 1, 2016 at 2:48 AM, Min Chen <span dir="ltr"><<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"># HG changeset patch<br>
# User Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
# Date 1451594594 21600<br>
# Node ID e5abd9b22f52fb8800068a2c699aea1648b69f54<br>
# Parent fb58aa76a9ae1eb6b0bac37f34bc418ba2ce941c<br>
fix non-determination output after apply new preset parameter sets<br>
---<br>
source/encoder/analysis.cpp | 16 ++++++++++++++++<br>
1 files changed, 16 insertions(+), 0 deletions(-)<br>
<br>
diff -r fb58aa76a9ae -r e5abd9b22f52 source/encoder/analysis.cpp<br>
--- a/source/encoder/analysis.cpp Thu Dec 31 12:54:33 2015 -0600<br>
+++ b/source/encoder/analysis.cpp Thu Dec 31 14:43:14 2015 -0600<br>
@@ -836,6 +836,14 @@<br>
splitData[2].initSplitCUData();<br>
splitData[3].initSplitCUData();<br>
<br>
+ // avoid uninitialize value in below reference<br>
+ if (m_param->limitModes)<br>
+ {<br>
+ md.pred[PRED_2Nx2N].bestME[0][0].mvCost = 0; // L0<br>
+ md.pred[PRED_2Nx2N].bestME[0][1].mvCost = 0; // L1<br>
+ md.pred[PRED_2Nx2N].rdCost = 0;<br>
+ }<br>
+<br>
/* Step 1. Evaluate Merge/Skip candidates for likely early-outs */<br>
if (mightNotSplit && depth >= minDepth)<br>
{<br>
@@ -1304,6 +1312,14 @@<br>
bool foundSkip = false;<br>
bool splitIntra = true;<br>
<br>
+ // avoid uninitialize value in below reference<br>
+ if (m_param->limitModes)<br>
+ {<br>
+ md.pred[PRED_2Nx2N].bestME[0][0].mvCost = 0; // L0<br>
+ md.pred[PRED_2Nx2N].bestME[0][1].mvCost = 0; // L1<br>
+ md.pred[PRED_2Nx2N].rdCost = 0;<br>
+ }<br>
+<br>
if (m_param->analysisMode == X265_ANALYSIS_LOAD)<br>
{<br>
uint8_t* reuseDepth = &m_reuseInterDataCTU->depth[parentCTU.m_cuAddr * parentCTU.m_numPartitions];<br>
<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" rel="noreferrer">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div>Deepthi Nandakumar<br></div>Engineering Manager, x265<br></div>Multicoreware, Inc<br></div></div>
</div></div>
</blockquote></div>