From ad6408960b38ddc6dfbb734e6fcbe07fe7d128ae Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 26 Apr 2010 21:00:33 +0000 Subject: Write clip-related decimal numbers into hex, where they make more sense. Originally committed as revision 22968 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavutil/common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libavutil/common.h') diff --git a/libavutil/common.h b/libavutil/common.h index dd1c22396e..2e72a83913 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -118,7 +118,7 @@ static inline av_const int av_clip(int a, int amin, int amax) */ static inline av_const uint8_t av_clip_uint8(int a) { - if (a&(~255)) return (-a)>>31; + if (a&(~0xFF)) return (-a)>>31; else return a; } @@ -129,7 +129,7 @@ static inline av_const uint8_t av_clip_uint8(int a) */ static inline av_const uint16_t av_clip_uint16(int a) { - if (a&(~65535)) return (-a)>>31; + if (a&(~0xFFFF)) return (-a)>>31; else return a; } @@ -140,7 +140,7 @@ static inline av_const uint16_t av_clip_uint16(int a) */ static inline av_const int16_t av_clip_int16(int a) { - if ((a+32768) & ~65535) return (a>>31) ^ 32767; + if ((a+0x8000) & ~0xFFFF) return (a>>31) ^ 0x7FFF; else return a; } -- cgit v1.2.3