00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "config.h"
00022 #include "libavutil/arm/cpu.h"
00023 #include "libavutil/attributes.h"
00024 #include "libavcodec/sbrdsp.h"
00025
00026 void ff_sbr_sum64x5_neon(float *z);
00027 float ff_sbr_sum_square_neon(float (*x)[2], int n);
00028 void ff_sbr_neg_odd_64_neon(float *x);
00029 void ff_sbr_qmf_pre_shuffle_neon(float *z);
00030 void ff_sbr_qmf_post_shuffle_neon(float W[32][2], const float *z);
00031 void ff_sbr_qmf_deint_neg_neon(float *v, const float *src);
00032 void ff_sbr_qmf_deint_bfly_neon(float *v, const float *src0, const float *src1);
00033 void ff_sbr_hf_g_filt_neon(float (*Y)[2], const float (*X_high)[40][2],
00034 const float *g_filt, int m_max, intptr_t ixh);
00035 void ff_sbr_hf_gen_neon(float (*X_high)[2], const float (*X_low)[2],
00036 const float alpha0[2], const float alpha1[2],
00037 float bw, int start, int end);
00038 void ff_sbr_autocorrelate_neon(const float x[40][2], float phi[3][2][2]);
00039
00040 void ff_sbr_hf_apply_noise_0_neon(float Y[64][2], const float *s_m,
00041 const float *q_filt, int noise,
00042 int kx, int m_max);
00043 void ff_sbr_hf_apply_noise_1_neon(float Y[64][2], const float *s_m,
00044 const float *q_filt, int noise,
00045 int kx, int m_max);
00046 void ff_sbr_hf_apply_noise_2_neon(float Y[64][2], const float *s_m,
00047 const float *q_filt, int noise,
00048 int kx, int m_max);
00049 void ff_sbr_hf_apply_noise_3_neon(float Y[64][2], const float *s_m,
00050 const float *q_filt, int noise,
00051 int kx, int m_max);
00052
00053 av_cold void ff_sbrdsp_init_arm(SBRDSPContext *s)
00054 {
00055 int cpu_flags = av_get_cpu_flags();
00056
00057 if (have_neon(cpu_flags)) {
00058 s->sum64x5 = ff_sbr_sum64x5_neon;
00059 s->sum_square = ff_sbr_sum_square_neon;
00060 s->neg_odd_64 = ff_sbr_neg_odd_64_neon;
00061 s->qmf_pre_shuffle = ff_sbr_qmf_pre_shuffle_neon;
00062 s->qmf_post_shuffle = ff_sbr_qmf_post_shuffle_neon;
00063 s->qmf_deint_neg = ff_sbr_qmf_deint_neg_neon;
00064 s->qmf_deint_bfly = ff_sbr_qmf_deint_bfly_neon;
00065 s->hf_g_filt = ff_sbr_hf_g_filt_neon;
00066 s->hf_gen = ff_sbr_hf_gen_neon;
00067 s->autocorrelate = ff_sbr_autocorrelate_neon;
00068 s->hf_apply_noise[0] = ff_sbr_hf_apply_noise_0_neon;
00069 s->hf_apply_noise[1] = ff_sbr_hf_apply_noise_1_neon;
00070 s->hf_apply_noise[2] = ff_sbr_hf_apply_noise_2_neon;
00071 s->hf_apply_noise[3] = ff_sbr_hf_apply_noise_3_neon;
00072 }
00073 }