]> granicus.if.org Git - libvpx/commitdiff
Move prototype wrapper function
authorYi Luo <luoyi@google.com>
Tue, 7 Jun 2016 01:25:25 +0000 (18:25 -0700)
committerYi Luo <luoyi@google.com>
Tue, 7 Jun 2016 01:25:25 +0000 (18:25 -0700)
- Found after setting height on command line change, HorizP turns
  to be slower. The change include moving this wrapper function.
  This change restores it. This is a mystery now.

convolve/horiz_filter.c

index 35be482ebf8b3cfe3d8803744290a1834a4972b2..3f13b104db555254965e5a64ce09a09e621ee560 100644 (file)
@@ -297,6 +297,24 @@ void horiz_filter_ssse3(const uint8_t *src, const struct Filter fData,
   }
 }
 
+// C prototype wrapper function
+void run_prototype_filter(uint8_t *src, int width, int height, int stride,
+                          const int16_t *filter, int flen, uint8_t *dst) {
+  uint32_t start, end;
+  int count = 0;
+
+  start = readtsc();
+  do {
+    convolve(src, width, filter, flen, dst);
+    src += stride;
+    dst += stride;
+    count++;
+  } while (count < height);
+  end = readtsc();
+
+  printf("C version cycles:\t%d\n", end - start);
+}
+
 // sub-pixel 4x4 method
 static void transpose4x4_to_dst(const uint8_t *src, ptrdiff_t src_stride,
                                 uint8_t *dst, ptrdiff_t dst_stride) {
@@ -400,23 +418,6 @@ static void filter_horiz_w4_ssse3(const uint8_t *src_ptr, ptrdiff_t src_pitch,
 
 // Testing wrapper functions
 
-void run_prototype_filter(uint8_t *src, int width, int height, int stride,
-                          const int16_t *filter, int flen, uint8_t *dst) {
-  uint32_t start, end;
-  int count = 0;
-
-  start = readtsc();
-  do {
-    convolve(src, width, filter, flen, dst);
-    src += stride;
-    dst += stride;
-    count++;
-  } while (count < height);
-  end = readtsc();
-
-  printf("C version cycles:\t%d\n", end - start);
-}
-
 void run_target_filter(uint8_t *src, int width, int height, int stride,
                        struct Filter filter, uint8_t *dst) {
   uint32_t start, end;