[FFmpeg-cvslog] r23116 - trunk/libavcodec/mathops.h

michael subversion
Thu May 13 18:32:21 CEST 2010


Author: michael
Date: Thu May 13 18:32:21 2010
New Revision: 23116

Log:
Use standard C for implementing sign_extend() and zero_extend().
This fixes compilation of probetest

Modified:
   trunk/libavcodec/mathops.h

Modified: trunk/libavcodec/mathops.h
==============================================================================
--- trunk/libavcodec/mathops.h	Thu May 13 18:30:58 2010	(r23115)
+++ trunk/libavcodec/mathops.h	Thu May 13 18:32:21 2010	(r23116)
@@ -118,14 +118,14 @@ static inline av_const int mid_pred(int 
 #ifndef sign_extend
 static inline av_const int sign_extend(int val, unsigned bits)
 {
-    return (val << (INT_BIT - bits)) >> (INT_BIT - bits);
+    return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits);
 }
 #endif
 
 #ifndef zero_extend
 static inline av_const unsigned zero_extend(unsigned val, unsigned bits)
 {
-    return (val << (INT_BIT - bits)) >> (INT_BIT - bits);
+    return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits);
 }
 #endif
 



More information about the ffmpeg-cvslog mailing list