Mercurial > libavcodec.hg
changeset 11849:f2c42ef01008 libavcodec
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"
author | alexc |
---|---|
date | Tue, 08 Jun 2010 01:57:06 +0000 |
parents | 6b52f0c3263d |
children | 954d05e65641 |
files | aacsbr.c |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/aacsbr.c Mon Jun 07 22:55:58 2010 +0000 +++ b/aacsbr.c Tue Jun 08 01:57:06 2010 +0000 @@ -1184,21 +1184,22 @@ *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 ];