]> granicus.if.org Git - libvpx/commitdiff
Add vp9_int_pro_col_neon.
authorFrank Galligan <fgalligan@google.com>
Wed, 15 Jul 2015 16:04:28 +0000 (09:04 -0700)
committerFrank Galligan <fgalligan@google.com>
Wed, 15 Jul 2015 16:04:28 +0000 (09:04 -0700)
BUG=https://code.google.com/p/webm/issues/detail?id=1023

Change-Id: I212a1d67b23ce3b5ce08800de369b25b9e375e7d

test/vp9_avg_test.cc
vp9/common/vp9_rtcd_defs.pl
vp9/encoder/arm/neon/vp9_avg_neon.c

index 856b4c1653d4d8e5cb88ff83d9b2e8a515c447ff..09c2069c4faed749b481b6d3e887ef861ce8da33 100644 (file)
@@ -291,6 +291,12 @@ INSTANTIATE_TEST_CASE_P(
         make_tuple(16, &vp9_int_pro_row_neon, &vp9_int_pro_row_c),
         make_tuple(32, &vp9_int_pro_row_neon, &vp9_int_pro_row_c),
         make_tuple(64, &vp9_int_pro_row_neon, &vp9_int_pro_row_c)));
+
+INSTANTIATE_TEST_CASE_P(
+    NEON, IntProColTest, ::testing::Values(
+        make_tuple(16, &vp9_int_pro_col_neon, &vp9_int_pro_col_c),
+        make_tuple(32, &vp9_int_pro_col_neon, &vp9_int_pro_col_c),
+        make_tuple(64, &vp9_int_pro_col_neon, &vp9_int_pro_col_c)));
 #endif
 
 #if HAVE_MSA
index 538f1ed7e3bda53096c9d81137167c411d21ddfb..1c1d75fc74ce619b5116e6620ac8d2e47a25d79d 100644 (file)
@@ -824,7 +824,7 @@ add_proto qw/void vp9_int_pro_row/, "int16_t *hbuf, uint8_t const *ref, const in
 specialize qw/vp9_int_pro_row sse2 neon/;
 
 add_proto qw/int16_t vp9_int_pro_col/, "uint8_t const *ref, const int width";
-specialize qw/vp9_int_pro_col sse2/;
+specialize qw/vp9_int_pro_col sse2 neon/;
 
 add_proto qw/int vp9_vector_var/, "int16_t const *ref, int16_t const *src, const int bwl";
 specialize qw/vp9_vector_var sse2/;
index fecab579513bc76c7c289e0609fc50fb50000fde..40d7e8779a31b5d9e5a5edc0252cb7fd7514e7d4 100644 (file)
@@ -100,3 +100,17 @@ void vp9_int_pro_row_neon(int16_t hbuf[16], uint8_t const *ref,
   hbuf += 8;
   vst1q_s16(hbuf, vreinterpretq_s16_u16(vec_sum_hi));
 }
+
+int16_t vp9_int_pro_col_neon(uint8_t const *ref, const int width) {
+  int i;
+  uint16x8_t vec_sum = vdupq_n_u16(0);
+
+  for (i = 0; i < width; i += 16) {
+    const uint8x16_t vec_row = vld1q_u8(ref);
+    vec_sum = vaddw_u8(vec_sum, vget_low_u8(vec_row));
+    vec_sum = vaddw_u8(vec_sum, vget_high_u8(vec_row));
+    ref += 16;
+  }
+
+  return horizontal_add_u16x8(vec_sum);
+}