Commit 46396d58 authored by michael's avatar michael

Use standard C for implementing sign_extend() and zero_extend().

This fixes compilation of probetest


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@23116 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8181b725
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment