summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-08-26 20:37:46 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-08-26 20:37:46 +0000
commit9fc1f55a0f6441532bea822fa5110cf80bf54751 (patch)
tree11986f5262a3c8403bb117af2f6bf0a42df11e24
parent0e19e3f859b20cf0c522f093bc1c8d60d847100c (diff)
downloadrockbox-9fc1f55a0f6441532bea822fa5110cf80bf54751.tar.gz
rockbox-9fc1f55a0f6441532bea822fa5110cf80bf54751.zip
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
-rw-r--r--apps/codecs/libfaad/sbr_qmf.c14
1 files 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,
109 } 109 }
110 110
111 /* window and summation to create array u */ 111 /* window and summation to create array u */
112 for (n = 0; n < 64; n++) 112 for (n = 0; n < 32; n++)
113 {
114 idx0 = qmfa->x_index + n; idx1 = n * 20;
115 u[n] = FAAD_ANALYSIS_SCALE1(
116 MUL_F(qmfa->x[idx0 ], qmf_c[idx1 ]) +
117 MUL_F(qmfa->x[idx0 + 64], qmf_c[idx1 + 2]) +
118 MUL_F(qmfa->x[idx0 + 128], qmf_c[idx1 + 4]) +
119 MUL_F(qmfa->x[idx0 + 192], qmf_c[idx1 + 6]) +
120 MUL_F(qmfa->x[idx0 + 256], qmf_c[idx1 + 8]));
121 }
122 for (n = 32; n < 64; n++)
113 { 123 {
114 idx0 = qmfa->x_index + n; idx1 = n * 10; 124 idx0 = qmfa->x_index + n; idx1 = n * 20 - 639;
115 u[n] = FAAD_ANALYSIS_SCALE1( 125 u[n] = FAAD_ANALYSIS_SCALE1(
116 MUL_F(qmfa->x[idx0 ], qmf_c[idx1 ]) + 126 MUL_F(qmfa->x[idx0 ], qmf_c[idx1 ]) +
117 MUL_F(qmfa->x[idx0 + 64], qmf_c[idx1 + 2]) + 127 MUL_F(qmfa->x[idx0 + 64], qmf_c[idx1 + 2]) +