<div dir="ltr"><div>Hi,<br><br></div>How does this improve the generated asm code/cycles taken? <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 27, 2015 at 7:43 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Min Chen <<a href="mailto:chenm003@163.com">chenm003@163.com</a>><br>
# Date 1435370055 25200<br>
# Node ID a8198965fbf18d7ced2cd8e8acd07fcc4ee6a2b3<br>
# Parent 229602ba850eb11c171d8c3cbb049dda4b41abda<br>
improve duplicate MV check by reduce condition jump<br>
---<br>
source/encoder/motion.cpp | 4 ++--<br>
1 files changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff -r 229602ba850e -r a8198965fbf1 source/encoder/motion.cpp<br>
--- a/source/encoder/motion.cpp Fri Jun 26 18:54:13 2015 -0700<br>
+++ b/source/encoder/motion.cpp Fri Jun 26 18:54:15 2015 -0700<br>
@@ -645,7 +645,7 @@<br>
for (int i = 0; i < numCandidates; i++)<br>
{<br>
MV m = mvc[i].clipped(qmvmin, qmvmax);<br>
- if (m.notZero() && m != pmv && m != bestpre) // check already measured<br>
+ if (m.notZero() & (m != pmv ? 1 : 0) & (m != bestpre ? 1 : 0)) // check already measured<br>
{<br>
int cost = ref->lowresQPelCost(fenc, blockOffset, m, sad) + mvcost(m);<br>
if (cost < bprecost)<br>
@@ -661,7 +661,7 @@<br>
for (int i = 0; i < numCandidates; i++)<br>
{<br>
MV m = mvc[i].clipped(qmvmin, qmvmax);<br>
- if (m.notZero() && m != pmv && m != bestpre) // check already measured<br>
+ if (m.notZero() & (m != pmv ? 1 : 0) & (m != bestpre ? 1 : 0)) // check already measured<br>
{<br>
int cost = subpelCompare(ref, m, sad) + mvcost(m);<br>
if (cost < bprecost)<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>