diff options
author | Alex Converse <alex.converse@gmail.com> | 2010-06-08 05:57:06 +0400 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2010-06-08 05:57:06 +0400 |
commit | 712209d5672b39dd35abb59e8bea7907ac6b219f (patch) | |
tree | 737bc2a12622f38dfa6c1f87ae9054ee5902eac3 /libavcodec/aacsbr.c | |
parent | 9b98479e7ae678fa9630c9282ba5c73447f62db3 (diff) |
Base downsampled SBR synthesis filterbank on a single IMDCT.
Based on Han-Wen Hsu, et al. "Fast Complex Quadrature Mirror Filterbanks for
MPEG-4 HE-AAC"
Originally committed as revision 23519 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aacsbr.c')
-rw-r--r-- | libavcodec/aacsbr.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index 4a3377d812..3cc927a779 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -1184,21 +1184,22 @@ static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct, *v_off -= 128 >> div; } v = v0 + *v_off; + if (div) { + for (n = 0; n < 32; n++) { + X[0][i][ n] = -X[0][i][n]; + X[0][i][32+n] = X[1][i][31-n]; + } + ff_imdct_half(mdct, mdct_buf[0], X[0][i]); + for (n = 0; n < 32; n++) { + v[ n] = mdct_buf[0][63 - 2*n]; + v[63 - n] = -mdct_buf[0][62 - 2*n]; + } + } else { for (n = 1; n < 64 >> div; n+=2) { X[1][i][n] = -X[1][i][n]; } - if (div) { - memset(X[0][i]+32, 0, 32*sizeof(float)); - memset(X[1][i]+32, 0, 32*sizeof(float)); - } ff_imdct_half(mdct, mdct_buf[0], X[0][i]); ff_imdct_half(mdct, mdct_buf[1], X[1][i]); - if (div) { - for (n = 0; n < 32; n++) { - v[ n] = -mdct_buf[0][63 - 2*n] + mdct_buf[1][2*n ]; - v[ 63 - n] = mdct_buf[0][62 - 2*n] + mdct_buf[1][2*n + 1]; - } - } else { for (n = 0; n < 64; n++) { v[ n] = -mdct_buf[0][63 - n] + mdct_buf[1][ n ]; v[127 - n] = mdct_buf[0][63 - n] + mdct_buf[1][ n ]; |