From 5fdbfcb5b793f5849c496214668094a8ec99fa07 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Wed, 5 Feb 2014 23:40:52 +0000 Subject: 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. Arm asm changes by Janne Grunau. Signed-off-by: Janne Grunau --- libavcodec/dcadec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'libavcodec/dcadec.c') diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 6ffb040aaa..723ed191dc 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -957,23 +957,23 @@ static void lfe_interpolation_fir(DCAContext *s, int decimation_select, * samples_out: An array holding interpolated samples */ - int decifactor; + int idx; const float *prCoeff; int deciindex; /* Select decimation filter */ if (decimation_select == 1) { - decifactor = 64; + idx = 1; prCoeff = lfe_fir_128; } else { - decifactor = 32; + idx = 0; prCoeff = lfe_fir_64; } /* Interpolation */ for (deciindex = 0; deciindex < num_deci_sample; deciindex++) { - s->dcadsp.lfe_fir(samples_out, samples_in, prCoeff, decifactor, scale); + s->dcadsp.lfe_fir[idx](samples_out, samples_in, prCoeff, scale); samples_in++; - samples_out += 2 * decifactor; + samples_out += 2 * 32 * (1 + idx); } } -- cgit v1.2.3