[xiph-commits] r11233 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Fri Apr 21 21:37:01 PDT 2006


Author: jm
Date: 2006-04-21 21:36:58 -0700 (Fri, 21 Apr 2006)
New Revision: 11233

Modified:
   trunk/speex/libspeex/fixed_generic.h
Log:
QCONST should now be 16-bit clean


Modified: trunk/speex/libspeex/fixed_generic.h
===================================================================
--- trunk/speex/libspeex/fixed_generic.h	2006-04-22 02:58:04 UTC (rev 11232)
+++ trunk/speex/libspeex/fixed_generic.h	2006-04-22 04:36:58 UTC (rev 11233)
@@ -35,8 +35,8 @@
 #ifndef FIXED_GENERIC_H
 #define FIXED_GENERIC_H
 
-#define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(1<<(bits))))
-#define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(1<<(bits))))
+#define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
+#define QCONST32(x,bits) ((spx_word32_t)(.5+(x)*(((spx_word32_t)1)<<(bits))))
 
 #define NEG16(x) (-(x))
 #define NEG32(x) (-(x))



More information about the commits mailing list