1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Andree Buschmann 2011-03-20 15:57:38 +00:00
parent d1098f3100
commit e9c5190de7

View file

@ -186,13 +186,13 @@ typedef struct
real_t det; real_t det;
} acorr_coef; } acorr_coef;
/* Within auto_correlation(...) a pre-shift of >>2 is needed to avoid overflow /* Within auto_correlation(...) a pre-shift of >>ACDET_EXP is needed to avoid
* when multiply-adding the FRACT-variables -- FRACT part is 31 bits. After the * overflow when multiply-adding the FRACT-variables -- FRACT part is 31 bits.
* calculation has been finished the result 'ac->det' needs to be * After the calculation has been finished the result 'ac->det' needs to be
* post-shifted by <<(4*2). This pre-/post-shifting is needed for FIXED_POINT * post-shifted by <<(4*ACDET_EXP). This pre-/post-shifting is needed for
* only. */ * FIXED_POINT only. */
#ifdef FIXED_POINT #ifdef FIXED_POINT
#define ACDET_EXP 2 #define ACDET_EXP 3
#define ACDET_PRE(A) (A)>>ACDET_EXP #define ACDET_PRE(A) (A)>>ACDET_EXP
#define ACDET_POST(A) (A)<<(4*ACDET_EXP) #define ACDET_POST(A) (A)<<(4*ACDET_EXP)
#else #else