summaryrefslogtreecommitdiff
path: root/libavcodec/aarch64/sbrdsp_init_aarch64.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@gmail.com>2017-05-23 14:29:35 +0000
committerMatthieu Bouron <matthieu.bouron@gmail.com>2017-07-03 14:29:22 +0200
commit0a24d7ca831b85db18593e5f18d765adb40e5cd9 (patch)
treea17653fde601203f142f7b21405c085e0a3854df /libavcodec/aarch64/sbrdsp_init_aarch64.c
parent7864e07f4af248d35a1e81d6d5c435f4cd2023e1 (diff)
lavc/aarch64: add sbrdsp neon implementation
autocorrelate_c: 644.0 autocorrelate_neon: 420.0 hf_apply_noise_0_c: 1688.5 hf_apply_noise_0_neon: 1498.6 hf_apply_noise_1_c: 1691.2 hf_apply_noise_1_neon: 1500.6 hf_apply_noise_2_c: 1688.1 hf_apply_noise_2_neon: 1500.3 hf_apply_noise_3_c: 1696.6 hf_apply_noise_3_neon: 1502.2 hf_g_filt_c: 2117.8 hf_g_filt_neon: 1218.7 hf_gen_c: 4573.4 hf_gen_neon: 2461.0 neg_odd_64_c: 72.0 neg_odd_64_neon: 64.7 qmf_deint_bfly_c: 1107.6 qmf_deint_bfly_neon: 291.6 qmf_deint_neg_c: 210.4 qmf_deint_neg_neon: 107.4 qmf_post_shuffle_c: 163.0 qmf_post_shuffle_neon: 107.7 qmf_pre_shuffle_c: 120.5 qmf_pre_shuffle_neon: 110.7 sum64x5_c: 1361.6 sum64x5_neon: 435.4 sum_square_c: 1686.4 sum_square_neon: 787.2
Diffstat (limited to 'libavcodec/aarch64/sbrdsp_init_aarch64.c')
-rw-r--r--libavcodec/aarch64/sbrdsp_init_aarch64.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/libavcodec/aarch64/sbrdsp_init_aarch64.c b/libavcodec/aarch64/sbrdsp_init_aarch64.c
new file mode 100644
index 0000000000..9c967990df
--- /dev/null
+++ b/libavcodec/aarch64/sbrdsp_init_aarch64.c
@@ -0,0 +1,70 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "libavutil/aarch64/cpu.h"
+#include "libavutil/attributes.h"
+#include "libavcodec/sbrdsp.h"
+
+void ff_sbr_sum64x5_neon(float *z);
+float ff_sbr_sum_square_neon(float (*x)[2], int n);
+void ff_sbr_neg_odd_64_neon(float *x);
+void ff_sbr_qmf_pre_shuffle_neon(float *z);
+void ff_sbr_qmf_post_shuffle_neon(float W[32][2], const float *z);
+void ff_sbr_qmf_deint_neg_neon(float *v, const float *src);
+void ff_sbr_qmf_deint_bfly_neon(float *v, const float *src0, const float *src1);
+void ff_sbr_hf_g_filt_neon(float (*Y)[2], const float (*X_high)[40][2],
+ const float *g_filt, int m_max, intptr_t ixh);
+void ff_sbr_hf_gen_neon(float (*X_high)[2], const float (*X_low)[2],
+ const float alpha0[2], const float alpha1[2],
+ float bw, int start, int end);
+void ff_sbr_autocorrelate_neon(const float x[40][2], float phi[3][2][2]);
+void ff_sbr_hf_apply_noise_0_neon(float Y[64][2], const float *s_m,
+ const float *q_filt, int noise,
+ int kx, int m_max);
+void ff_sbr_hf_apply_noise_1_neon(float Y[64][2], const float *s_m,
+ const float *q_filt, int noise,
+ int kx, int m_max);
+void ff_sbr_hf_apply_noise_2_neon(float Y[64][2], const float *s_m,
+ const float *q_filt, int noise,
+ int kx, int m_max);
+void ff_sbr_hf_apply_noise_3_neon(float Y[64][2], const float *s_m,
+ const float *q_filt, int noise,
+ int kx, int m_max);
+
+av_cold void ff_sbrdsp_init_aarch64(SBRDSPContext *s)
+{
+ int cpu_flags = av_get_cpu_flags();
+
+ if (have_neon(cpu_flags)) {
+ s->sum64x5 = ff_sbr_sum64x5_neon;
+ s->sum_square = ff_sbr_sum_square_neon;
+ s->neg_odd_64 = ff_sbr_neg_odd_64_neon;
+ s->qmf_pre_shuffle = ff_sbr_qmf_pre_shuffle_neon;
+ s->qmf_post_shuffle = ff_sbr_qmf_post_shuffle_neon;
+ s->qmf_deint_neg = ff_sbr_qmf_deint_neg_neon;
+ s->qmf_deint_bfly = ff_sbr_qmf_deint_bfly_neon;
+ s->hf_g_filt = ff_sbr_hf_g_filt_neon;
+ s->hf_gen = ff_sbr_hf_gen_neon;
+ s->autocorrelate = ff_sbr_autocorrelate_neon;
+ s->hf_apply_noise[0] = ff_sbr_hf_apply_noise_0_neon;
+ s->hf_apply_noise[1] = ff_sbr_hf_apply_noise_1_neon;
+ s->hf_apply_noise[2] = ff_sbr_hf_apply_noise_2_neon;
+ s->hf_apply_noise[3] = ff_sbr_hf_apply_noise_3_neon;
+ }
+}