diff options
author | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2006-11-19 05:33:03 +0300 |
---|---|---|
committer | jm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2006-11-19 05:33:03 +0300 |
commit | 95861b731098397088377a124da477b721d8875c (patch) | |
tree | 6e94e61576a0ac3db977933dae05ce2dde51b7e8 /libspeex/nb_celp.c | |
parent | d4695483ae0908ac2dffb9e2de773b6416db37ea (diff) |
Fixed an overflow in the excitation decoding (again on heavily-clipped signal)
and made operators mode explicit.
git-svn-id: http://svn.xiph.org/trunk/speex@12131 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'libspeex/nb_celp.c')
-rw-r--r-- | libspeex/nb_celp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libspeex/nb_celp.c b/libspeex/nb_celp.c index be56770..24b6866 100644 --- a/libspeex/nb_celp.c +++ b/libspeex/nb_celp.c @@ -1621,7 +1621,7 @@ int nb_decode(void *state, SpeexBits *bits, void *vout) } } else { for (i=0;i<st->subframeSize;i++) - exc[i]=PSHR32(ADD32(SHL32(exc32[i],1),innov[i]),SIG_SHIFT); + exc[i]=EXTRACT16(SATURATE32(PSHR32(ADD32(SHL32(exc32[i],1),innov[i]),SIG_SHIFT),32767)); /*print_vec(exc, 40, "innov");*/ } if (innov_save) |