The x86 runs short on registers because numerous elements are not static. In addition, splitting them allows more optimized code, at least for x86.
Showing the changes to libavcodec/arm (1 of 4 files). Show all
Unified · Split
| @@ -47,16 +47,43 @@ void ff_synth_filter_float_neon(FFTContext *imdct, · 46 unmodified lines | ||
| 47 | 47 | float out[32], const float in[32], |
| 48 | 48 | float scale); |
| 49 | 49 | |
| 50 | +static void lfe_fir0_vfp(float *out, const float *in, const float *coefs, | |
| 51 | + float scale) | |
| 52 | +{ | |
| 53 | + ff_dca_lfe_fir_vfp(out, in, coefs, 32, scale); | |
| 54 | +} | |
| 55 | + | |
| 56 | +static void lfe_fir1_vfp(float *out, const float *in, const float *coefs, | |
| 57 | + float scale) | |
| 58 | +{ | |
| 59 | + ff_dca_lfe_fir_vfp(out, in, coefs, 64, scale); | |
| 60 | +} | |
| 61 | + | |
| 62 | +static void lfe_fir0_neon(float *out, const float *in, const float *coefs, | |
| 63 | + float scale) | |
| 64 | +{ | |
| 65 | + ff_dca_lfe_fir_neon(out, in, coefs, 32, scale); | |
| 66 | +} | |
| 67 | + | |
| 68 | +static void lfe_fir1_neon(float *out, const float *in, const float *coefs, | |
| 69 | + float scale) | |
| 70 | +{ | |
| 71 | + ff_dca_lfe_fir_neon(out, in, coefs, 64, scale); | |
| 72 | +} | |
| 73 | + | |
| 50 | 74 | av_cold void ff_dcadsp_init_arm(DCADSPContext *s) |
| 51 | 75 | { |
| 52 | 76 | int cpu_flags = av_get_cpu_flags(); |
| 53 | 77 | |
| 54 | 78 | if (have_vfp(cpu_flags) && !have_vfpv3(cpu_flags)) { |
| 55 | − s->lfe_fir = ff_dca_lfe_fir_vfp; | |
| 79 | + s->lfe_fir[0] = lfe_fir0_vfp; | |
| 80 | + s->lfe_fir[1] = lfe_fir1_vfp; | |
| 56 | 81 | s->qmf_32_subbands = ff_dca_qmf_32_subbands_vfp; |
| 57 | 82 | } |
| 58 | − if (have_neon(cpu_flags)) | |
| 59 | − s->lfe_fir = ff_dca_lfe_fir_neon; | |
| 83 | + if (have_neon(cpu_flags)) { | |
| 84 | + s->lfe_fir[0] = lfe_fir0_neon; | |
| 85 | + s->lfe_fir[1] = lfe_fir1_neon; | |
| 86 | + } | |
| 60 | 87 | } |
| 61 | 88 | |
| 62 | 89 | av_cold void ff_synth_filter_init_arm(SynthFilterContext *s) |