[Ffmpeg-cvslog] r6620 - in trunk: libavutil/common.h libpostproc/postprocess.c

Diego Biurrun diego
Wed Oct 11 02:56:19 CEST 2006


On Tue, Oct 10, 2006 at 04:50:49PM +0200, Reimar D?ffinger wrote:
> On Tue, Oct 10, 2006 at 09:49:10AM +0200, diego wrote:
> > 
> > Modified:
> >    trunk/libavutil/common.h
> >    trunk/libpostproc/postprocess.c
> > 
> > Log:
> > Move sign macro to libavutil.
> > 
> > --- 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.

OK, on it.

> > --- 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.

Look closer, I removed these in another patch ..

Diego




More information about the ffmpeg-cvslog mailing list