summaryrefslogtreecommitdiff
path: root/libavcodec/dcadec.c
diff options
context:
space:
mode:
authorChristophe Gisquet <christophe.gisquet@gmail.com>2014-02-05 23:40:52 +0000
committerJanne Grunau <janne-libav@jannau.net>2014-02-07 22:54:18 +0100
commit5fdbfcb5b793f5849c496214668094a8ec99fa07 (patch)
tree8f705b537443ec12285e367aa0747fd1fec1671b /libavcodec/dcadec.c
parent5b59a9fc6152169599561f04b4f66370edda5c9c (diff)
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 <janne-libav@jannau.net>
Diffstat (limited to 'libavcodec/dcadec.c')
-rw-r--r--libavcodec/dcadec.c10
1 files changed, 5 insertions, 5 deletions
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);
}
}