[MPlayer-dev-eng] [PATCH] vf_osd updates - fully baked?
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Sep 12 12:39:26 CEST 2005
Hi,
On Mon, Sep 12, 2005 at 12:18:30PM +0200, Michael Niedermayer wrote:
> On Mon, Sep 12, 2005 at 10:30:46AM +0200, Reimar D?ffinger wrote:
> [...]
> > > +#define FALSE 0
> > > +#define TRUE !FALSE
> >
> > I really _hate_ it when people use defines for things like that. Why
> > isn't just using 0 and 1 good enough? I think at least every C programmer
> > knows that 1 is true and 0 is false...
>
> 1
Hey, I was only talking about the defines, not the words true and false
*g*.
Anyway, maybe I should clarify the issues I have with this: I have seen
all kinds of things defined as TRUE and FALSE (e.g. FALSE -1, TRUE 0
etc.). This means to be really sure of what the code does I would have to
look up the defines. Or in short: I just dislike defines without a
really good reason.
> [...]
> >
> > > + "movl %4, %%eax\n\t" // %eax = layer alpha
> > > + "cmpl $255, %%eax\n\t" // don't apply layer alpha if it's 100% opaque
> > "mov %4, %%"REG_a"\n\t" // %eax = layer alpha
> > "cmp $255, %%"REG_a"eax\n\t" // don't apply layer alpha if it's 100% opaque
> >
> > and include (I think) cpudetect.h. Otherwise it won't work on AMD64.
>
> 0
> this is silly to begin with, it should be cmpl $255, %4 or so unless eax is
> used somewhere else which if iam not blind it is not
I didn't check the asm, that would take too much time. I think I'm
already happy if it _compiles_ on AMD64 :-)
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list