<div dir="ltr">I'd like to put this patch on hold. We have a commandline that occasionally produces a corrupted stack around this same array. <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 23, 2015 at 3:13 PM, <span dir="ltr"><<a href="mailto:gopu@multicorewareinc.com" target="_blank">gopu@multicorewareinc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Gopu Govindaswamy <<a href="mailto:gopu@multicorewareinc.com">gopu@multicorewareinc.com</a>><br>
# Date 1435051224 -19800<br>
# Tue Jun 23 14:50:24 2015 +0530<br>
# Node ID 49a44529ef7ca4810e341f4b8a9a7b7f693ae818<br>
# Parent dfdf378a3968a15a1465a3aa3098e507fb4f10e5<br>
search: remove the AMVP candidates from the motion candidate list<br>
<br>
diff -r dfdf378a3968 -r 49a44529ef7c source/common/cudata.cpp<br>
--- a/source/common/cudata.cpp Mon Jun 22 17:44:14 2015 -0500<br>
+++ b/source/common/cudata.cpp Tue Jun 23 14:50:24 2015 +0530<br>
@@ -1657,44 +1657,80 @@<br>
validIndirect[MD_ABOVE_LEFT] = getIndirectPMV(indirectMV[MD_ABOVE_LEFT], neighbours + MD_ABOVE_LEFT, picList, refIdx);<br>
<br>
int num = 0;<br>
+ int numMvc = 0;<br>
+<br>
// Left predictor search<br>
- if (validDirect[MD_BELOW_LEFT])<br>
- amvpCand[num++] = directMV[MD_BELOW_LEFT];<br>
+ if (validDirect[MD_BELOW_LEFT])<br>
+ {<br>
+ amvpCand[num++] = directMV[MD_BELOW_LEFT];<br>
+ pmv[numMvc] = directMV[MD_LEFT]; numMvc += validDirect[MD_LEFT];<br>
+ pmv[numMvc] = indirectMV[MD_BELOW_LEFT]; numMvc += validIndirect[MD_BELOW_LEFT];<br>
+ pmv[numMvc] = indirectMV[MD_LEFT]; numMvc += validIndirect[MD_LEFT];<br>
+ }<br>
else if (validDirect[MD_LEFT])<br>
- amvpCand[num++] = directMV[MD_LEFT];<br>
+ {<br>
+ amvpCand[num++] = directMV[MD_LEFT];<br>
+ pmv[numMvc] = directMV[MD_BELOW_LEFT]; numMvc += validDirect[MD_BELOW_LEFT];<br>
+ pmv[numMvc] = indirectMV[MD_BELOW_LEFT]; numMvc += validIndirect[MD_BELOW_LEFT];<br>
+ pmv[numMvc] = indirectMV[MD_LEFT]; numMvc += validIndirect[MD_LEFT];<br>
+ }<br>
else if (validIndirect[MD_BELOW_LEFT])<br>
+ {<br>
amvpCand[num++] = indirectMV[MD_BELOW_LEFT];<br>
+ pmv[numMvc] = directMV[MD_BELOW_LEFT]; numMvc += validDirect[MD_BELOW_LEFT];<br>
+ pmv[numMvc] = directMV[MD_LEFT]; numMvc += validDirect[MD_LEFT];<br>
+ pmv[numMvc] = indirectMV[MD_LEFT]; numMvc += validIndirect[MD_LEFT];<br>
+ }<br>
else if (validIndirect[MD_LEFT])<br>
+ {<br>
amvpCand[num++] = indirectMV[MD_LEFT];<br>
+ pmv[numMvc] = directMV[MD_BELOW_LEFT]; numMvc += validDirect[MD_BELOW_LEFT];<br>
+ pmv[numMvc] = directMV[MD_LEFT]; numMvc += validDirect[MD_LEFT];<br>
+ pmv[numMvc] = indirectMV[MD_BELOW_LEFT]; numMvc += validIndirect[MD_BELOW_LEFT];<br>
+ }<br>
<br>
bool bAddedSmvp = num > 0;<br>
<br>
- // Above predictor search<br>
+ // Above pridictor search<br>
if (validDirect[MD_ABOVE_RIGHT])<br>
+ {<br>
amvpCand[num++] = directMV[MD_ABOVE_RIGHT];<br>
+ pmv[numMvc] = directMV[MD_ABOVE]; numMvc += validDirect[MD_ABOVE];<br>
+ pmv[numMvc] = directMV[MD_ABOVE_LEFT]; numMvc += validDirect[MD_ABOVE_LEFT];<br>
+ }<br>
else if (validDirect[MD_ABOVE])<br>
+ {<br>
amvpCand[num++] = directMV[MD_ABOVE];<br>
+ pmv[numMvc] = directMV[MD_ABOVE_RIGHT]; numMvc += validDirect[MD_ABOVE_RIGHT];<br>
+ pmv[numMvc] = directMV[MD_ABOVE_LEFT]; numMvc += validDirect[MD_ABOVE_LEFT];<br>
+ }<br>
else if (validDirect[MD_ABOVE_LEFT])<br>
+ {<br>
amvpCand[num++] = directMV[MD_ABOVE_LEFT];<br>
+ pmv[numMvc] = directMV[MD_ABOVE_RIGHT]; numMvc += validDirect[MD_ABOVE_RIGHT];<br>
+ pmv[numMvc] = directMV[MD_ABOVE]; numMvc += validDirect[MD_ABOVE];<br>
+ }<br>
<br>
if (!bAddedSmvp)<br>
{<br>
if (validIndirect[MD_ABOVE_RIGHT])<br>
+ {<br>
amvpCand[num++] = indirectMV[MD_ABOVE_RIGHT];<br>
- else if (validIndirect[MD_ABOVE])<br>
+ pmv[numMvc] = indirectMV[MD_ABOVE]; numMvc += validIndirect[MD_ABOVE];<br>
+ pmv[numMvc] = indirectMV[MD_ABOVE_LEFT]; numMvc += validIndirect[MD_ABOVE_LEFT];<br>
+ }<br>
+ else if (validDirect[MD_ABOVE])<br>
+ {<br>
amvpCand[num++] = indirectMV[MD_ABOVE];<br>
- else if (validIndirect[MD_ABOVE_LEFT])<br>
+ pmv[numMvc] = indirectMV[MD_ABOVE_RIGHT]; numMvc += validIndirect[MD_ABOVE_RIGHT];<br>
+ pmv[numMvc] = indirectMV[MD_ABOVE_LEFT]; numMvc += validIndirect[MD_ABOVE_LEFT];<br>
+ }<br>
+ else if (validDirect[MD_ABOVE_LEFT])<br>
+ {<br>
amvpCand[num++] = indirectMV[MD_ABOVE_LEFT];<br>
- }<br>
-<br>
- int numMvc = 0;<br>
- for (int dir = MD_LEFT; dir <= MD_ABOVE_LEFT; dir++)<br>
- {<br>
- if (validDirect[dir] && directMV[dir].notZero())<br>
- pmv[numMvc++] = directMV[dir];<br>
-<br>
- if (validIndirect[dir] && indirectMV[dir].notZero())<br>
- pmv[numMvc++] = indirectMV[dir];<br>
+ pmv[numMvc] = indirectMV[MD_ABOVE_RIGHT]; numMvc += validIndirect[MD_ABOVE_RIGHT];<br>
+ pmv[numMvc] = indirectMV[MD_ABOVE]; numMvc += validIndirect[MD_ABOVE];<br>
+ }<br>
}<br>
<br>
if (num == 2)<br>
@@ -1718,7 +1754,7 @@<br>
int curRefPOC = m_slice->m_refPOCList[picList][refIdx];<br>
int curPOC = m_slice->m_poc;<br>
<br>
- pmv[numMvc++] = amvpCand[num++] = scaleMvByPOCDist(neighbours[MD_COLLOCATED].mv[picList], curPOC, curRefPOC, colPOC, colRefPOC);<br>
+ amvpCand[num++] = scaleMvByPOCDist(neighbours[MD_COLLOCATED].mv[picList], curPOC, curRefPOC, colPOC, colRefPOC);<br>
}<br>
}<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" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</blockquote></div><br></div>