[x265] [PATCH 1 of 4] improve duplicate MV check by reduce condition jump

Min Chen chenm003 at 163.com
Fri Jul 10 03:41:35 CEST 2015


# HG changeset patch
# User Min Chen <chenm003 at 163.com>
# Date 1436488177 25200
# Node ID 2df720d48ada93c85d18a6c7e50c7687c67a8b89
# Parent  a7182b1072e6d148db59cf7c073a0a0636e86d5d
improve duplicate MV check by reduce condition jump
---
 source/encoder/motion.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff -r a7182b1072e6 -r 2df720d48ada source/encoder/motion.cpp
--- a/source/encoder/motion.cpp	Thu Jul 09 15:22:53 2015 -0500
+++ b/source/encoder/motion.cpp	Thu Jul 09 17:29:37 2015 -0700
@@ -626,7 +626,7 @@
     for (int i = 0; i < numCandidates; i++)
     {
         MV m = mvc[i].clipped(qmvmin, qmvmax);
-        if (m.notZero() && m != pmv && m != bestpre) // check already measured
+        if (m.notZero() & (m != pmv ? 1 : 0) & (m != bestpre ? 1 : 0)) // check already measured
         {
             int cost = subpelCompare(ref, m, sad) + mvcost(m);
             if (cost < bprecost)



More information about the x265-devel mailing list