History

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.

Christophe Gisquet committed 12 years ago

Commit 45854df1 parent 82ae8a44 files · +54 −13Browse files

Showing the changes to libavcodec/arm (1 of 4 files). Show all

Unified · Split

libavcodec/arm/dcadsp_init_arm.c+30−3
@@ -47,16 +47,43 @@ void ff_synth_filter_float_neon(FFTContext *imdct, · 46 unmodified lines
47 float out[32], const float in[32],47 float out[32], const float in[32],
48 float scale);48 float scale);
49 49
50static 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
56static 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
62static 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
68static 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
50av_cold void ff_dcadsp_init_arm(DCADSPContext *s)74av_cold void ff_dcadsp_init_arm(DCADSPContext *s)
51{75{
52 int cpu_flags = av_get_cpu_flags();76 int cpu_flags = av_get_cpu_flags();
53 77
54 if (have_vfp(cpu_flags) && !have_vfpv3(cpu_flags)) {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 s->qmf_32_subbands = ff_dca_qmf_32_subbands_vfp;81 s->qmf_32_subbands = ff_dca_qmf_32_subbands_vfp;
57 }82 }
58 if (have_neon(cpu_flags))83 if (have_neon(cpu_flags)) {
59 s->lfe_fir = ff_dca_lfe_fir_neon;84 s->lfe_fir[0] = lfe_fir0_neon;
85 s->lfe_fir[1] = lfe_fir1_neon;
86 }
60}87}
61 88
62av_cold void ff_synth_filter_init_arm(SynthFilterContext *s)89av_cold void ff_synth_filter_init_arm(SynthFilterContext *s)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t