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/dcadec.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/dcadec.c')
-rw-r--r-- | libavcodec/dcadec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index 6c240ee5fd..c251db80a9 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -947,7 +947,7 @@ static void qmf_32_subbands(DCAContext *s, int chans, static void lfe_interpolation_fir(DCAContext *s, int decimation_select, int num_deci_sample, float *samples_in, - float *samples_out, float scale) + float *samples_out) { /* samples_in: An array holding decimated samples. * Samples in current subframe starts from samples_in[0], @@ -971,7 +971,7 @@ static void lfe_interpolation_fir(DCAContext *s, int decimation_select, } /* Interpolation */ for (deciindex = 0; deciindex < num_deci_sample; deciindex++) { - s->dcadsp.lfe_fir[idx](samples_out, samples_in, prCoeff, scale); + s->dcadsp.lfe_fir[idx](samples_out, samples_in, prCoeff); samples_in++; samples_out += 2 * 32 * (1 + idx); } @@ -1265,8 +1265,7 @@ static int dca_filter_channels(DCAContext *s, int block_index) if (s->lfe) { lfe_interpolation_fir(s, s->lfe, 2 * s->lfe, s->lfe_data + 2 * s->lfe * (block_index + 4), - s->samples_chanptr[dca_lfe_index[s->amode]], - 1.0 / (256.0 * 32768.0)); + s->samples_chanptr[dca_lfe_index[s->amode]]); /* Outputs 20bits pcm samples */ } |