projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0a6a282
)
Fix broken 32-bit clipping, and write numbers in hex instead of decimal so
author
Ronald S. Bultje
<rsbultje@gmail.com>
Mon, 26 Apr 2010 13:36:17 +0000
(13:36 +0000)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Mon, 26 Apr 2010 13:36:17 +0000
(13:36 +0000)
they are easier to understand. Also give the add a 'u' postfix to silence
a pre-c99 compiler warning.
Originally committed as revision 22965 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavutil/common.h
patch
|
blob
|
history
diff --git
a/libavutil/common.h
b/libavutil/common.h
index
8d7cc10
..
dd1c223
100644
(file)
--- a/
libavutil/common.h
+++ b/
libavutil/common.h
@@
-151,7
+151,7
@@
static inline av_const int16_t av_clip_int16(int a)
*/
static inline av_const int32_t av_clipl_int32(int64_t a)
{
- if ((a+
2147483648) & ~2147483647) return (a>>63) ^ 2147483647
;
+ if ((a+
0x80000000u) & ~UINT64_C(0xFFFFFFFF)) return (a>>63) ^ 0x7FFFFFFF
;
else return a;
}