]> granicus.if.org Git - libvpx/commitdiff
fdct8x8 highbd neon: use tran_low_t for output
authorJohann <johannkoenig@google.com>
Fri, 3 Feb 2017 23:14:06 +0000 (15:14 -0800)
committerJohann Koenig <johannkoenig@google.com>
Mon, 13 Feb 2017 22:16:14 +0000 (22:16 +0000)
Change-Id: I100c4a1955d80bec4d28e82796b3e7f57e84d0ba

test/fdct8x8_test.cc
vpx_dsp/arm/fwd_txfm_neon.c
vpx_dsp/vpx_dsp_rtcd_defs.pl

index e403404906006fad73af3d84c6ee14a3f6524835..7c2df67f6a9e6dd61ef18bb00dda3a0986d78ad3 100644 (file)
@@ -673,7 +673,7 @@ INSTANTIATE_TEST_CASE_P(
 #if HAVE_NEON && !CONFIG_EMULATE_HARDWARE
 #if CONFIG_VP9_HIGHBITDEPTH
 INSTANTIATE_TEST_CASE_P(NEON, FwdTrans8x8DCT,
-                        ::testing::Values(make_tuple(&vpx_fdct8x8_c,
+                        ::testing::Values(make_tuple(&vpx_fdct8x8_neon,
                                                      &vpx_idct8x8_64_add_neon,
                                                      0, VPX_BITS_8)));
 #else   // !CONFIG_VP9_HIGHBITDEPTH
index e9503f13d709f891402e3321005392fc55677229..96f6de1be95c4cdc9e674c74d6be68e43094127d 100644 (file)
 
 #include "./vpx_config.h"
 #include "vpx_dsp/txfm_common.h"
+#include "vpx_dsp/vpx_dsp_common.h"
+#include "vpx_dsp/arm/idct_neon.h"
 
-void vpx_fdct8x8_neon(const int16_t *input, int16_t *final_output, int stride) {
+void vpx_fdct8x8_neon(const int16_t *input, tran_low_t *final_output,
+                      int stride) {
   int i;
   // stage 1
   int16x8_t input_0 = vshlq_n_s16(vld1q_s16(&input[0 * stride]), 2);
@@ -191,18 +194,18 @@ void vpx_fdct8x8_neon(const int16_t *input, int16_t *final_output, int stride) {
     input_6 = vhsubq_s16(input_6, sign_in6);
     input_7 = vhsubq_s16(input_7, sign_in7);
     // store results
-    vst1q_s16(&final_output[0 * 8], input_0);
-    vst1q_s16(&final_output[1 * 8], input_1);
-    vst1q_s16(&final_output[2 * 8], input_2);
-    vst1q_s16(&final_output[3 * 8], input_3);
-    vst1q_s16(&final_output[4 * 8], input_4);
-    vst1q_s16(&final_output[5 * 8], input_5);
-    vst1q_s16(&final_output[6 * 8], input_6);
-    vst1q_s16(&final_output[7 * 8], input_7);
+    store_s16q_to_tran_low(final_output + 0 * 8, input_0);
+    store_s16q_to_tran_low(final_output + 1 * 8, input_1);
+    store_s16q_to_tran_low(final_output + 2 * 8, input_2);
+    store_s16q_to_tran_low(final_output + 3 * 8, input_3);
+    store_s16q_to_tran_low(final_output + 4 * 8, input_4);
+    store_s16q_to_tran_low(final_output + 5 * 8, input_5);
+    store_s16q_to_tran_low(final_output + 6 * 8, input_6);
+    store_s16q_to_tran_low(final_output + 7 * 8, input_7);
   }
 }
 
-void vpx_fdct8x8_1_neon(const int16_t *input, int16_t *output, int stride) {
+void vpx_fdct8x8_1_neon(const int16_t *input, tran_low_t *output, int stride) {
   int r;
   int16x8_t sum = vld1q_s16(&input[0]);
   for (r = 1; r < 8; ++r) {
@@ -214,7 +217,11 @@ void vpx_fdct8x8_1_neon(const int16_t *input, int16_t *output, int stride) {
     const int64x2_t b = vpaddlq_s32(a);
     const int32x2_t c = vadd_s32(vreinterpret_s32_s64(vget_low_s64(b)),
                                  vreinterpret_s32_s64(vget_high_s64(b)));
+#if CONFIG_VP9_HIGHBITDEPTH
+    output[0] = vget_lane_s32(c, 0);
+#else
     output[0] = vget_lane_s16(vreinterpret_s16_s32(c), 0);
+#endif
     output[1] = 0;
   }
 }
index 2e3c78215c67f6caca8d3108f9d825e420fc0d8e..ca116061e15c8f9e715111aa7afc3f2b83cd1499 100644 (file)
@@ -536,10 +536,10 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
   specialize qw/vpx_fdct4x4_1 sse2/;
 
   add_proto qw/void vpx_fdct8x8/, "const int16_t *input, tran_low_t *output, int stride";
-  specialize qw/vpx_fdct8x8 sse2/;
+  specialize qw/vpx_fdct8x8 neon sse2/;
 
   add_proto qw/void vpx_fdct8x8_1/, "const int16_t *input, tran_low_t *output, int stride";
-  specialize qw/vpx_fdct8x8_1 sse2/;
+  specialize qw/vpx_fdct8x8_1 neon sse2/;
 
   add_proto qw/void vpx_fdct16x16/, "const int16_t *input, tran_low_t *output, int stride";
   specialize qw/vpx_fdct16x16 sse2/;