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

jm at svn.xiph.org jm at svn.xiph.org
Sat Jan 26 02:35:29 PST 2008


Author: jm
Date: 2008-01-26 02:35:25 -0800 (Sat, 26 Jan 2008)
New Revision: 14434

Modified:
   trunk/speex/libspeex/fixed_debug.h
   trunk/speex/libspeex/fixed_generic.h
Log:
Fixed PSHR32() on TI C5x (and other 16-bit chips)


Modified: trunk/speex/libspeex/fixed_debug.h
===================================================================
--- trunk/speex/libspeex/fixed_debug.h	2008-01-25 17:21:03 UTC (rev 14433)
+++ trunk/speex/libspeex/fixed_debug.h	2008-01-26 10:35:25 UTC (rev 14434)
@@ -161,7 +161,7 @@
 }
 
 #define PSHR16(a,shift) (SHR16(ADD16((a),((1<<((shift))>>1))),shift))
-#define PSHR32(a,shift) (SHR32(ADD32((a),((1<<((shift))>>1))),shift))
+#define PSHR32(a,shift) (SHR32(ADD32((a),((EXTEND32(1)<<((shift))>>1))),shift))
 #define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
 
 #define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))

Modified: trunk/speex/libspeex/fixed_generic.h
===================================================================
--- trunk/speex/libspeex/fixed_generic.h	2008-01-25 17:21:03 UTC (rev 14433)
+++ trunk/speex/libspeex/fixed_generic.h	2008-01-26 10:35:25 UTC (rev 14434)
@@ -47,7 +47,7 @@
 #define SHR32(a,shift) ((a) >> (shift))
 #define SHL32(a,shift) ((a) << (shift))
 #define PSHR16(a,shift) (SHR16((a)+((1<<((shift))>>1)),shift))
-#define PSHR32(a,shift) (SHR32((a)+((1<<((shift))>>1)),shift))
+#define PSHR32(a,shift) (SHR32((a)+((EXTEND32(1)<<((shift))>>1)),shift))
 #define VSHR32(a, shift) (((shift)>0) ? SHR32(a, shift) : SHL32(a, -(shift)))
 #define SATURATE16(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))
 #define SATURATE32(x,a) (((x)>(a) ? (a) : (x)<-(a) ? -(a) : (x)))



More information about the commits mailing list