[xiph-commits] r13382 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Sat Jul 28 15:54:34 PDT 2007
Author: jm
Date: 2007-07-28 15:54:34 -0700 (Sat, 28 Jul 2007)
New Revision: 13382
Modified:
trunk/speex/libspeex/filterbank.c
Log:
Preventing an overflow when sampling rate is larger than 32767
Modified: trunk/speex/libspeex/filterbank.c
===================================================================
--- trunk/speex/libspeex/filterbank.c 2007-07-28 21:28:30 UTC (rev 13381)
+++ trunk/speex/libspeex/filterbank.c 2007-07-28 22:54:34 UTC (rev 13382)
@@ -59,7 +59,7 @@
int id1;
int id2;
df = DIV32(SHL32(sampling,15),MULT16_16(2,len));
- max_mel = toBARK(EXTRACT16(MULT16_16_Q15(QCONST16(.5f,15),sampling)));
+ max_mel = toBARK(EXTRACT16(sampling/2));
mel_interval = PDIV32(max_mel,banks-1);
bank = (FilterBank*)speex_alloc(sizeof(FilterBank));
More information about the commits
mailing list