summaryrefslogtreecommitdiff
path: root/apps/codecs/libfaad
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2011-03-20 15:57:38 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2011-03-20 15:57:38 +0000
commite9c5190de7e1b550ea9d6b5293e21cd53e8037be (patch)
tree11724312bc023b2ecf810d19bbd1babcadc8a7b5 /apps/codecs/libfaad
parentd1098f31004e8a751f304062a6252baacb83b4f9 (diff)
downloadrockbox-e9c5190de7e1b550ea9d6b5293e21cd53e8037be.tar.gz
rockbox-e9c5190de7e1b550ea9d6b5293e21cd53e8037be.zip
Headroom in AAC SBR HF-generator's fixed point implementation of autocorrelation was too small. Fixes FS#12019.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29622 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libfaad')
-rw-r--r--apps/codecs/libfaad/sbr_hfgen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/codecs/libfaad/sbr_hfgen.c b/apps/codecs/libfaad/sbr_hfgen.c
index 1e32eb26bc..bdc7d5a0a2 100644
--- a/apps/codecs/libfaad/sbr_hfgen.c
+++ b/apps/codecs/libfaad/sbr_hfgen.c
@@ -186,13 +186,13 @@ typedef struct
186 real_t det; 186 real_t det;
187} acorr_coef; 187} acorr_coef;
188 188
189/* Within auto_correlation(...) a pre-shift of >>2 is needed to avoid overflow 189/* Within auto_correlation(...) a pre-shift of >>ACDET_EXP is needed to avoid
190 * when multiply-adding the FRACT-variables -- FRACT part is 31 bits. After the 190 * overflow when multiply-adding the FRACT-variables -- FRACT part is 31 bits.
191 * calculation has been finished the result 'ac->det' needs to be 191 * After the calculation has been finished the result 'ac->det' needs to be
192 * post-shifted by <<(4*2). This pre-/post-shifting is needed for FIXED_POINT 192 * post-shifted by <<(4*ACDET_EXP). This pre-/post-shifting is needed for
193 * only. */ 193 * FIXED_POINT only. */
194#ifdef FIXED_POINT 194#ifdef FIXED_POINT
195#define ACDET_EXP 2 195#define ACDET_EXP 3
196#define ACDET_PRE(A) (A)>>ACDET_EXP 196#define ACDET_PRE(A) (A)>>ACDET_EXP
197#define ACDET_POST(A) (A)<<(4*ACDET_EXP) 197#define ACDET_POST(A) (A)<<(4*ACDET_EXP)
198#else 198#else