diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-02-06 00:41:54 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-08 02:04:12 +0100 |
commit | 45854df9a5220bdde400a447f63f61618b89dde2 (patch) | |
tree | 453b65fc1702cb7f4b554f892dc812228d08160a /libavcodec/arm | |
parent | 82ae8a44e631b25ba3b2c1b7333a4fe5cf18dc07 (diff) | |
download | ffmpeg-45854df9a5220bdde400a447f63f61618b89dde2.tar.gz |
dcadsp: split lfe_dir cases
The x86 runs short on registers because numerous elements are not static.
In addition, splitting them allows more optimized code, at least for x86.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/arm')
-rw-r--r-- | libavcodec/arm/dcadsp_init_arm.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/libavcodec/arm/dcadsp_init_arm.c b/libavcodec/arm/dcadsp_init_arm.c index 8893f48368..0a8c2feafd 100644 --- a/libavcodec/arm/dcadsp_init_arm.c +++ b/libavcodec/arm/dcadsp_init_arm.c @@ -47,16 +47,43 @@ void ff_synth_filter_float_neon(FFTContext *imdct, float out[32], const float in[32], float scale); +static void lfe_fir0_vfp(float *out, const float *in, const float *coefs, + float scale) +{ + ff_dca_lfe_fir_vfp(out, in, coefs, 32, scale); +} + +static void lfe_fir1_vfp(float *out, const float *in, const float *coefs, + float scale) +{ + ff_dca_lfe_fir_vfp(out, in, coefs, 64, scale); +} + +static void lfe_fir0_neon(float *out, const float *in, const float *coefs, + float scale) +{ + ff_dca_lfe_fir_neon(out, in, coefs, 32, scale); +} + +static void lfe_fir1_neon(float *out, const float *in, const float *coefs, + float scale) +{ + ff_dca_lfe_fir_neon(out, in, coefs, 64, scale); +} + av_cold void ff_dcadsp_init_arm(DCADSPContext *s) { int cpu_flags = av_get_cpu_flags(); if (have_vfp(cpu_flags) && !have_vfpv3(cpu_flags)) { - s->lfe_fir = ff_dca_lfe_fir_vfp; + s->lfe_fir[0] = lfe_fir0_vfp; + s->lfe_fir[1] = lfe_fir1_vfp; s->qmf_32_subbands = ff_dca_qmf_32_subbands_vfp; } - if (have_neon(cpu_flags)) - s->lfe_fir = ff_dca_lfe_fir_neon; + if (have_neon(cpu_flags)) { + s->lfe_fir[0] = lfe_fir0_neon; + s->lfe_fir[1] = lfe_fir1_neon; + } } av_cold void ff_synth_filter_init_arm(SynthFilterContext *s) |