From e969e261a5aab6fee64eda4d21eb4d2deffb755e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 13 May 2010 16:32:21 +0000 Subject: Use standard C for implementing sign_extend() and zero_extend(). This fixes compilation of probetest Originally committed as revision 23116 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/mathops.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h index 149910bb1d..df692fdfd3 100644 --- a/libavcodec/mathops.h +++ b/libavcodec/mathops.h @@ -118,14 +118,14 @@ static inline av_const int mid_pred(int a, int b, int c) #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 -- cgit v1.2.3