[x265] [PATCH] motion: lowres mvc[] are measured in slicetype no need to measure again in ME

gopu at multicorewareinc.com gopu at multicorewareinc.com
Wed Apr 22 08:24:24 CEST 2015


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1429683763 -19800
#      Wed Apr 22 11:52:43 2015 +0530
# Node ID 6d34a490302ee75f2ddc6ef7d841fb900dce1bb7
# Parent  c135c117ffb083a00d4353279ea669e8f3f7a8ee
motion: lowres mvc[] are measured in slicetype no need to measure again in ME

diff -r c135c117ffb0 -r 6d34a490302e source/encoder/motion.cpp
--- a/source/encoder/motion.cpp	Tue Apr 21 13:42:36 2015 -0500
+++ b/source/encoder/motion.cpp	Wed Apr 22 11:52:43 2015 +0530
@@ -621,36 +621,16 @@
         }
     }
 
-    // measure SAD cost at each QPEL motion vector candidate
-    if (ref->isLowres)
+    for (int i = 0; i < numCandidates; i++)
     {
-        for (int i = 0; i < numCandidates; i++)
+        MV m = mvc[i].clipped(qmvmin, qmvmax);
+        if (m.notZero() && m != pmv && m != bestpre) // check already measured
         {
-            MV m = mvc[i].clipped(qmvmin, qmvmax);
-            if (m.notZero() && m != pmv && m != bestpre) // check already measured
+            int cost = subpelCompare(ref, m, sad) + mvcost(m);
+            if (cost < bprecost)
             {
-                int cost = ref->lowresQPelCost(fenc, blockOffset, m, sad) + mvcost(m);
-                if (cost < bprecost)
-                {
-                    bprecost = cost;
-                    bestpre = m;
-                }
-            }
-        }
-    }
-    else
-    {
-        for (int i = 0; i < numCandidates; i++)
-        {
-            MV m = mvc[i].clipped(qmvmin, qmvmax);
-            if (m.notZero() && m != pmv && m != bestpre) // check already measured
-            {
-                int cost = subpelCompare(ref, m, sad) + mvcost(m);
-                if (cost < bprecost)
-                {
-                    bprecost = cost;
-                    bestpre = m;
-                }
+                bprecost = cost;
+                bestpre = m;
             }
         }
     }


More information about the x265-devel mailing list