1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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
This commit is contained in:
Michael Niedermayer 2010-05-13 16:32:21 +00:00
parent a74d707cb7
commit e969e261a5

View File

@ -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