diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2010-04-26 21:00:33 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2010-04-26 21:00:33 +0000 |
commit | ad6408960b38ddc6dfbb734e6fcbe07fe7d128ae (patch) | |
tree | 70d0c567d8bb3f4e220a90646ef5fafeb3d4c4ae | |
parent | 3bfd582c963fa02eb50b541f11f3a5a6c43af8c3 (diff) | |
download | ffmpeg-ad6408960b38ddc6dfbb734e6fcbe07fe7d128ae.tar.gz |
Write clip-related decimal numbers into hex, where they make more sense.
Originally committed as revision 22968 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavutil/common.h | 6 |
1 files changed, 3 insertions, 3 deletions
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; } |