diff options
author | Christophe Gisquet <christophe.gisquet@gmail.com> | 2014-02-14 15:03:06 +0000 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2014-02-28 13:00:47 +0100 |
commit | 87ec849fe9acba075c843e67bcd01f256f481a18 (patch) | |
tree | e071371104bda0f397ec2b647f90ae8d5a898bc1 /libavcodec/dcadsp.c | |
parent | a55546f48d55e3d1155840541b2be5f4f8cf18ab (diff) | |
download | ffmpeg-87ec849fe9acba075c843e67bcd01f256f481a18.tar.gz |
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 <janne-libav@jannau.net>
Diffstat (limited to 'libavcodec/dcadsp.c')
-rw-r--r-- | libavcodec/dcadsp.c | 16 |
1 files changed, 7 insertions, 9 deletions
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) |