Fixed a bunch of fixed-point overflows on insanely hot signals by changing

the time-domain representation from Q14 to Q12 (Q29 to Q27 using the
standard convention).
This commit is contained in:
Jean-Marc Valin 2008-08-28 23:34:24 -04:00
parent 8dff923a5d
commit 5c3bc67959
6 changed files with 12 additions and 14 deletions

View file

@ -246,7 +246,7 @@ static inline celt_word32_t celt_exp2(celt_word16_t x)
celt_word16_t frac;
integer = SHR16(x,11);
if (integer>14)
return 0x7fffffff;
return 0x7f000000;
else if (integer < -15)
return 0;
frac = SHL16(x-SHL16(integer,11),3);