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
4747 float out[32], const float in[32],
4848 float scale);
4949
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+
5074 av_cold void ff_dcadsp_init_arm(DCADSPContext *s)
5175 {
5276 int cpu_flags = av_get_cpu_flags();
5377
5478 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;
5681 s->qmf_32_subbands = ff_dca_qmf_32_subbands_vfp;
5782 }
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+ }
6087 }
6188
6289 av_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