From 87ec849fe9acba075c843e67bcd01f256f481a18 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Fri, 14 Feb 2014 15:03:06 +0000 Subject: dcadec: remove scaling in lfe_interpolation_fir The scaling factor is constant so it is faster to scale the FIR coefficients in the tables during compilation. Signed-off-by: Janne Grunau --- libavcodec/dcadsp.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'libavcodec/dcadsp.c') diff --git a/libavcodec/dcadsp.c b/libavcodec/dcadsp.c index 8d242c5959..8fc49cebda 100644 --- a/libavcodec/dcadsp.c +++ b/libavcodec/dcadsp.c @@ -34,7 +34,7 @@ static void int8x8_fmul_int32_c(float *dst, const int8_t *src, int scale) static inline void dca_lfe_fir(float *out, const float *in, const float *coefs, - int decifactor, float scale) + int decifactor) { float *out2 = out + decifactor; const float *cf0 = coefs; @@ -50,8 +50,8 @@ dca_lfe_fir(float *out, const float *in, const float *coefs, v0 += s * *cf0++; v1 += s * *--cf1; } - *out++ = v0 * scale; - *out2++ = v1 * scale; + *out++ = v0; + *out2++ = v1; } } @@ -83,16 +83,14 @@ static void dca_qmf_32_subbands(float samples_in[32][8], int sb_act, } } -static void dca_lfe_fir0_c(float *out, const float *in, const float *coefs, - float scale) +static void dca_lfe_fir0_c(float *out, const float *in, const float *coefs) { - dca_lfe_fir(out, in, coefs, 32, scale); + dca_lfe_fir(out, in, coefs, 32); } -static void dca_lfe_fir1_c(float *out, const float *in, const float *coefs, - float scale) +static void dca_lfe_fir1_c(float *out, const float *in, const float *coefs) { - dca_lfe_fir(out, in, coefs, 64, scale); + dca_lfe_fir(out, in, coefs, 64); } av_cold void ff_dcadsp_init(DCADSPContext *s) -- cgit v1.2.3