Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/speexdsp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2006-11-26 13:50:12 +0300
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2006-11-26 13:50:12 +0300
commit9c84ddb524bba98d91d512e62e828f6a64225b53 (patch)
tree12ac0b01b8276388aa8cd406f5c6cf1132406193 /libspeex/nb_celp.c
parent9d2371d0fc478a415e3540dbc93c22345982f08c (diff)
More debug info and fixed two unlikely overflows on clipped input.
git-svn-id: http://svn.xiph.org/trunk/speex@12147 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'libspeex/nb_celp.c')
-rw-r--r--libspeex/nb_celp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libspeex/nb_celp.c b/libspeex/nb_celp.c
index 0702577..8c65add 100644
--- a/libspeex/nb_celp.c
+++ b/libspeex/nb_celp.c
@@ -910,7 +910,7 @@ int nb_encode(void *state, void *vin, SpeexBits *bits)
/* FIXME: Make sure this is save from overflows (so far so good) */
for (i=0;i<st->subframeSize;i++)
- real_exc[i] = SUB16(real_exc[i], EXTRACT16(PSHR32(exc32[i],SIG_SHIFT-1)));
+ real_exc[i] = EXTRACT16(SUB32(EXTEND32(real_exc[i]), PSHR32(exc32[i],SIG_SHIFT-1)));
ener = SHL32(EXTEND32(compute_rms16(real_exc, st->subframeSize)),SIG_SHIFT);