summaryrefslogtreecommitdiffstats
path: root/libavcodec/mathops.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2010-05-13 16:32:21 +0000
committerMichael Niedermayer <michaelni@gmx.at>2010-05-13 16:32:21 +0000
commite969e261a5aab6fee64eda4d21eb4d2deffb755e (patch)
tree266f6fdb4f97a98a0d3329d3222e3dd712398106 /libavcodec/mathops.h
parenta74d707cb7a42be692243196856fc21b2ee9b4c6 (diff)
downloadffmpeg-streaming-e969e261a5aab6fee64eda4d21eb4d2deffb755e.zip
ffmpeg-streaming-e969e261a5aab6fee64eda4d21eb4d2deffb755e.tar.gz
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
Diffstat (limited to 'libavcodec/mathops.h')
-rw-r--r--libavcodec/mathops.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index 149910b..df692fd 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
OpenPOWER on IntegriCloud