[Ffmpeg-cvslog] r6620 - in trunk: libavutil/common.h libpostproc/postprocess.c
Reimar Döffinger
Reimar.Doeffinger
Tue Oct 10 16:50:49 CEST 2006
Hello,
On Tue, Oct 10, 2006 at 09:49:10AM +0200, diego wrote:
> Author: diego
> Date: Tue Oct 10 09:49:10 2006
> New Revision: 6620
>
> Modified:
> trunk/libavutil/common.h
> trunk/libpostproc/postprocess.c
>
> Log:
> Move sign macro to libavutil.
>
>
> Modified: trunk/libavutil/common.h
> ==============================================================================
> --- trunk/libavutil/common.h (original)
> +++ trunk/libavutil/common.h Tue Oct 10 09:49:10 2006
> @@ -193,6 +193,7 @@
> /* assume b>0 */
> #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
> #define ABS(a) ((a) >= 0 ? (a) : (-(a)))
> +#define SIGN(a) ((a) > 0 ? 1 : -1)
I'm not too happy with macro names like ABS and SIGN in libavutil
common.h, esp. since libavutil is for use by other applications as well.
> #define FFMAX(a,b) ((a) > (b) ? (a) : (b))
> #define FFMIN(a,b) ((a) > (b) ? (b) : (a))
Adding an FF prefix like here might be nice.
> --- trunk/libpostproc/postprocess.c (original)
> +++ trunk/libpostproc/postprocess.c Tue Oct 10 09:49:10 2006
> @@ -101,7 +101,6 @@
>
> #define MIN(a,b) ((a) > (b) ? (b) : (a))
> #define MAX(a,b) ((a) < (b) ? (b) : (a))
That's still a bit duplicate with FFMIN/FFMAX.
In case someone is bored, a patch for these issues would be really nice
IMO.
Greetings,
Reimar D?ffinger
More information about the ffmpeg-cvslog
mailing list