[Ffmpeg-devel] clip_uint8

Rich Felker dalias
Fri Apr 28 18:45:59 CEST 2006


On Fri, Apr 28, 2006 at 05:58:56PM +0200, Panagiotis Issaris wrote:
> -static inline int clip_uint8(int a)
> +static inline uint8_t clip_uint8(int a)
>  {
>      if (a&(~255)) return (-a)>>31;
>      else          return a;

This code is slow btw. I'm sure it can be done without conditionals.

Rich





More information about the ffmpeg-devel mailing list