shithub: libvpx

Download patch

ref: 6ae8f8dbe80b4b8dce1ac010e34d7f2ee0ade55d
parent: 67cffc1ef6cd15eaf8e4b319a7308d351c9d8177
author: Johann <johannkoenig@google.com>
date: Thu Jul 6 04:58:06 EDT 2017

sad neon: macroize 64xN definitions

Change-Id: Iaa6ea75b10e75784f31b1e08637eecf0dcb5cff9

--- a/vpx_dsp/arm/sad_neon.c
+++ b/vpx_dsp/arm/sad_neon.c
@@ -297,14 +297,12 @@
   }
 }
 
-uint32_t vpx_sad64x32_neon(const uint8_t *src, int src_stride,
-                           const uint8_t *ref, int ref_stride) {
-  const uint32x4_t abs = sad64x(src, src_stride, ref, ref_stride, 32);
-  return horizontal_add_32x4(abs);
-}
+#define sad64xN(n)                                                      \
+  uint32_t vpx_sad64x##n##_neon(const uint8_t *src, int src_stride,     \
+                                const uint8_t *ref, int ref_stride) {   \
+    const uint32x4_t abs = sad64x(src, src_stride, ref, ref_stride, n); \
+    return horizontal_add_32x4(abs);                                    \
+  }
 
-uint32_t vpx_sad64x64_neon(const uint8_t *src, int src_stride,
-                           const uint8_t *ref, int ref_stride) {
-  const uint32x4_t abs = sad64x(src, src_stride, ref, ref_stride, 64);
-  return horizontal_add_32x4(abs);
-}
+sad64xN(32);
+sad64xN(64);