[x265] [PATCH] motion: Enable star search for HME Level-0

Pooja Venkatesan pooja at multicorewareinc.com
Fri Jul 26 07:48:16 CEST 2019


# HG changeset patch
# User Pooja Venkatesan <pooja at multicorewareinc.com>
# Date 1564118589 -19800
#      Fri Jul 26 10:53:09 2019 +0530
# Node ID 661effca62e3904bf3577ac4b60670e2f17f643e
# Parent  21db162c8622677c41a4fc77a14a59eb7326b46a
motion: Enable star search for HME Level-0

diff -r 21db162c8622 -r 661effca62e3 source/encoder/motion.cpp
--- a/source/encoder/motion.cpp	Fri Jul 12 16:22:24 2019 +0530
+++ b/source/encoder/motion.cpp	Fri Jul 26 10:53:09 2019 +0530
@@ -367,12 +367,13 @@
                                        int &            bPointNr,
                                        int &            bDistance,
                                        int              earlyExitIters,
-                                       int              merange)
+                                       int              merange,
+                                       int              hme)
 {
     ALIGN_VAR_16(int, costs[16]);
     pixel* fenc = fencPUYuv.m_buf[0];
-    pixel* fref = ref->fpelPlane[0] + blockOffset;
-    intptr_t stride = ref->lumaStride;
+    pixel* fref = (hme? ref->fpelLowerResPlane[0] : ref->fpelPlane[0]) + blockOffset;
+    intptr_t stride = hme? ref->lumaStride / 2 : ref->lumaStride;
 
     MV omv = bmv;
     int saved = bcost;
@@ -1134,7 +1135,7 @@
         int bDistance = 0;
 
         const int EarlyExitIters = 3;
-        StarPatternSearch(ref, mvmin, mvmax, bmv, bcost, bPointNr, bDistance, EarlyExitIters, merange);
+        StarPatternSearch(ref, mvmin, mvmax, bmv, bcost, bPointNr, bDistance, EarlyExitIters, merange, hme);
         if (bDistance == 1)
         {
             // if best distance was only 1, check two missing points.  If no new point is found, stop
@@ -1207,7 +1208,7 @@
             bDistance = 0;
             bPointNr = 0;
             const int MaxIters = 32;
-            StarPatternSearch(ref, mvmin, mvmax, bmv, bcost, bPointNr, bDistance, MaxIters, merange);
+            StarPatternSearch(ref, mvmin, mvmax, bmv, bcost, bPointNr, bDistance, MaxIters, merange, hme);
 
             if (bDistance == 1)
             {
diff -r 21db162c8622 -r 661effca62e3 source/encoder/motion.h
--- a/source/encoder/motion.h	Fri Jul 12 16:22:24 2019 +0530
+++ b/source/encoder/motion.h	Fri Jul 26 10:53:09 2019 +0530
@@ -109,7 +109,8 @@
                                   int &            bPointNr,
                                   int &            bDistance,
                                   int              earlyExitIters,
-                                  int              merange);
+                                  int              merange,
+                                  int              hme);
 };
 }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x265.patch
Type: text/x-patch
Size: 2675 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20190726/7f5a4010/attachment.bin>


More information about the x265-devel mailing list