[FFmpeg-devel] [RFC] Alpha support

Michael Niedermayer michaelni
Sun Feb 1 11:39:34 CET 2009


On Sun, Feb 01, 2009 at 10:10:57AM +0100, C?dric Schieli wrote:
> 2009/1/31 Michael Niedermayer <michaelni at gmx.at>
[...]
> also this shouldnt be using c->alpPixBuf not in either case because
> > the c-> needs an pointer dereference (unless the compiler is smart but
> > experience says the compiler generally is not)
> 
> 
> Do you mean I should use a local variable to avoid this dereference ?

yes


> 
> 
> > > +            A1 = 1<<18;\
> > > +            A2 = 1<<18;\
> > > +            for (j=0; j<lumFilterSize; j++)\
> > > +            {\
> > > +                A1 += alpSrc[j][i2  ] * lumFilter[j];\
> > > +                A2 += alpSrc[j][i2+1] * lumFilter[j];\
> > > +            }\
> > > +            A1>>=19;\
> > > +            A2>>=19;\
> > > +        }\
> >
> > the int A1,A2 can be moved in the if()
> >
> 
> No, A1 and A2 are used outside the if, in the main switch

indeed sorry


[...]
> 
> > > @@ -625,6 +653,11 @@
> > >              if (B>=(256<<22))   B=(256<<22)-1; \
> > >              else if (B<0)B=0;   \
> > >          }\
> > > +        if (alpha && (!CONFIG_SMALL || c->alpPixBuf) && (A&0xC0000000))\
> > > +        {\
> > > +            if (A>=(256<<22))   A=(256<<22)-1; \
> > > +            else if (A<0)A=0;   \
> >
> > these 2 can be verically aligned prettier
> 
> 
> BTW, that should be av_clip()

of course


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090201/52ed12bc/attachment.pgp>



More information about the ffmpeg-devel mailing list