]> granicus.if.org Git - libvpx/commitdiff
partial fdct neon: add 16x16_1
authorJohann <johannkoenig@google.com>
Fri, 23 Jun 2017 01:22:27 +0000 (18:22 -0700)
committerJohann <johannkoenig@google.com>
Wed, 28 Jun 2017 22:37:44 +0000 (15:37 -0700)
For the 8x8_1, the highbd output fit nicely in the existing function. 12
bit input will overflow this implementation of 16x16_1.

BUG=webm:1424

Change-Id: I2945fe5478b18f996f1a5de80110fa30f3f4e7ec

test/dct_partial_test.cc
vpx_dsp/arm/fdct_partial_neon.c
vpx_dsp/vpx_dsp_rtcd_defs.pl

index f197349e56ad0a40d4264af285ee86d4e3cb677b..95c1f7bdf9d5a77d5e8d1ca30b5ed3de5e74a6eb 100644 (file)
@@ -142,14 +142,16 @@ INSTANTIATE_TEST_CASE_P(
 #if CONFIG_VP9_HIGHBITDEPTH
 INSTANTIATE_TEST_CASE_P(
     NEON, PartialFdctTest,
-    ::testing::Values(make_tuple(&vpx_fdct8x8_1_neon, 8, VPX_BITS_12),
+    ::testing::Values(make_tuple(&vpx_fdct16x16_1_neon, 16, VPX_BITS_8),
+                      make_tuple(&vpx_fdct8x8_1_neon, 8, VPX_BITS_12),
                       make_tuple(&vpx_fdct8x8_1_neon, 8, VPX_BITS_10),
                       make_tuple(&vpx_fdct8x8_1_neon, 8, VPX_BITS_8),
                       make_tuple(&vpx_fdct4x4_1_neon, 4, VPX_BITS_8)));
 #else
 INSTANTIATE_TEST_CASE_P(
     NEON, PartialFdctTest,
-    ::testing::Values(make_tuple(&vpx_fdct8x8_1_neon, 8, VPX_BITS_8),
+    ::testing::Values(make_tuple(&vpx_fdct16x16_1_neon, 16, VPX_BITS_8),
+                      make_tuple(&vpx_fdct8x8_1_neon, 8, VPX_BITS_8),
                       make_tuple(&vpx_fdct4x4_1_neon, 4, VPX_BITS_8)));
 #endif  // CONFIG_VP9_HIGHBITDEPTH
 #endif  // HAVE_NEON
index 945b96a21e60a09c2729cbd90ddabaf14727b17f..4e1a6dfda3193edc3951d3f04a787b11cfb6f203 100644 (file)
@@ -59,3 +59,21 @@ void vpx_fdct8x8_1_neon(const int16_t *input, tran_low_t *output, int stride) {
   output[0] = sum_int16x8(sum);
   output[1] = 0;
 }
+
+void vpx_fdct16x16_1_neon(const int16_t *input, tran_low_t *output,
+                          int stride) {
+  int r;
+  int16x8_t left = vld1q_s16(input);
+  int16x8_t right = vld1q_s16(input + 8);
+  input += stride;
+  for (r = 1; r < 16; ++r) {
+    const int16x8_t a = vld1q_s16(input);
+    const int16x8_t b = vld1q_s16(input + 8);
+    input += stride;
+    left = vaddq_s16(left, a);
+    right = vaddq_s16(right, b);
+  }
+
+  output[0] = (sum_int16x8(left) + sum_int16x8(right)) >> 1;
+  output[1] = 0;
+}
index 0453a6a6e6f953dda4d1ad4387dc405a29689428..734f6e1e23ffb3328b40926f51d36b955c2a3ec9 100644 (file)
@@ -499,7 +499,7 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
   specialize qw/vpx_fdct16x16 neon sse2/;
 
   add_proto qw/void vpx_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride";
-  specialize qw/vpx_fdct16x16_1 sse2/;
+  specialize qw/vpx_fdct16x16_1 sse2 neon/;
 
   add_proto qw/void vpx_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride";
   specialize qw/vpx_fdct32x32 neon sse2/;
@@ -549,7 +549,7 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
   specialize qw/vpx_fdct16x16 neon sse2 msa/;
 
   add_proto qw/void vpx_fdct16x16_1/, "const int16_t *input, tran_low_t *output, int stride";
-  specialize qw/vpx_fdct16x16_1 sse2 msa/;
+  specialize qw/vpx_fdct16x16_1 sse2 neon msa/;
 
   add_proto qw/void vpx_fdct32x32/, "const int16_t *input, tran_low_t *output, int stride";
   specialize qw/vpx_fdct32x32 neon sse2 avx2 msa/;