Mercurial > libavutil.hg
comparison common.h @ 38:e7df68ba31a2 libavutil
clip_uint8 should return an uint8_t instead of an int (patch by Panagiotis Issaris < takis.issaris _at_ uhasselt.be >)
author | aurel |
---|---|
date | Sun, 30 Apr 2006 17:49:11 +0000 |
parents | 59ae491910a5 |
children | c25cab283094 |
comparison
equal
deleted
inserted
replaced
37:205312eb9c6e | 38:e7df68ba31a2 |
---|---|
435 return amax; | 435 return amax; |
436 else | 436 else |
437 return a; | 437 return a; |
438 } | 438 } |
439 | 439 |
440 static inline int clip_uint8(int a) | 440 static inline uint8_t clip_uint8(int a) |
441 { | 441 { |
442 if (a&(~255)) return (-a)>>31; | 442 if (a&(~255)) return (-a)>>31; |
443 else return a; | 443 else return a; |
444 } | 444 } |
445 | 445 |