From 9fc1f55a0f6441532bea822fa5110cf80bf54751 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Thu, 26 Aug 2010 20:37:46 +0000 Subject: Fix residual aac-he distortion reported via forum. Bug was introduded with r27364. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27898 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libfaad/sbr_qmf.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/codecs/libfaad/sbr_qmf.c b/apps/codecs/libfaad/sbr_qmf.c index 85dc60ca3b..3759329c3c 100644 --- a/apps/codecs/libfaad/sbr_qmf.c +++ b/apps/codecs/libfaad/sbr_qmf.c @@ -109,9 +109,19 @@ void sbr_qmf_analysis_32(sbr_info *sbr, qmfa_info *qmfa, const real_t *input, } /* window and summation to create array u */ - for (n = 0; n < 64; n++) + for (n = 0; n < 32; n++) + { + idx0 = qmfa->x_index + n; idx1 = n * 20; + u[n] = FAAD_ANALYSIS_SCALE1( + MUL_F(qmfa->x[idx0 ], qmf_c[idx1 ]) + + MUL_F(qmfa->x[idx0 + 64], qmf_c[idx1 + 2]) + + MUL_F(qmfa->x[idx0 + 128], qmf_c[idx1 + 4]) + + MUL_F(qmfa->x[idx0 + 192], qmf_c[idx1 + 6]) + + MUL_F(qmfa->x[idx0 + 256], qmf_c[idx1 + 8])); + } + for (n = 32; n < 64; n++) { - idx0 = qmfa->x_index + n; idx1 = n * 10; + idx0 = qmfa->x_index + n; idx1 = n * 20 - 639; u[n] = FAAD_ANALYSIS_SCALE1( MUL_F(qmfa->x[idx0 ], qmf_c[idx1 ]) + MUL_F(qmfa->x[idx0 + 64], qmf_c[idx1 + 2]) + -- cgit v1.2.3