diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-22 12:10:53 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-22 12:10:59 +0200 |
commit | 366e415836c52cce71b2f0d11fd04eea0a590c97 (patch) | |
tree | c3a1f4d86b172e6c26580115d410e2147733ef90 /libavcodec/dcadec.c | |
parent | c30eb74d182063c85a895c6fd3c9d47b93370bb0 (diff) | |
parent | 800ffab48a7844dd5dc0a33b8f6b8e5ed718cf2e (diff) | |
download | ffmpeg-366e415836c52cce71b2f0d11fd04eea0a590c97.tar.gz |
Merge commit '800ffab48a7844dd5dc0a33b8f6b8e5ed718cf2e'
* commit '800ffab48a7844dd5dc0a33b8f6b8e5ed718cf2e':
dcadsp: Add a new method, qmf_32_subbands
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dcadec.c')
-rw-r--r-- | libavcodec/dcadec.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index c82a5e660d..4fa7f894b5 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -1112,10 +1112,8 @@ static void qmf_32_subbands(DCAContext *s, int chans, float scale) { const float *prCoeff; - int i; int sb_act = s->subband_activity[chans]; - int subindex; scale *= sqrt(1 / 8.0); @@ -1125,25 +1123,11 @@ static void qmf_32_subbands(DCAContext *s, int chans, else /* Perfect reconstruction */ prCoeff = fir_32bands_perfect; - for (i = sb_act; i < 32; i++) - s->raXin[i] = 0.0; - - /* Reconstructed channel sample index */ - for (subindex = 0; subindex < 8; subindex++) { - /* Load in one sample from each subband and clear inactive subbands */ - for (i = 0; i < sb_act; i++) { - unsigned sign = (i - 1) & 2; - uint32_t v = AV_RN32A(&samples_in[i][subindex]) ^ sign << 30; - AV_WN32A(&s->raXin[i], v); - } - - s->synth.synth_filter_float(&s->imdct, - s->subband_fir_hist[chans], - &s->hist_index[chans], - s->subband_fir_noidea[chans], prCoeff, - samples_out, s->raXin, scale); - samples_out += 32; - } + s->dcadsp.qmf_32_subbands(samples_in, sb_act, &s->synth, &s->imdct, + s->subband_fir_hist[chans], + &s->hist_index[chans], + s->subband_fir_noidea[chans], prCoeff, + samples_out, s->raXin, scale); } static void lfe_interpolation_fir(DCAContext *s, int decimation_select, |