[FFmpeg-devel] [PATCH 2/5] libavutil: Optimize clipping routines for avr32

Reimar Döffinger Reimar.Doeffinger
Wed Feb 18 15:39:40 CET 2009


On Wed, Feb 18, 2009 at 03:27:00PM +0100, Hans-Christian Egtvedt wrote:
> +#if ARCH_AVR32
> +#define av_clip(a, amin, amax)                               \
> +    ({                                                       \
> +        int __tmp__;                                         \
> +        __asm__ ("min\t%0, %1, %2\n"                             \
> +             "max\t%0, %0, %3\n"                             \
> +             : "=&r"(__tmp__) : "r"(a), "r"(amax), "r"(amin) \
> +	);                                                   \
> +        __tmp__;                                             \
> +    })
> +#else

Please use a static inline function instead of such gcc-isms, if the
compiler generates worse code for that the compiler should be fixed.




More information about the ffmpeg-devel mailing list