[FFmpeg-devel] [PATCH] swscale alpha channel support (was: [RFC] Alpha support)

Cédric Schieli cschieli
Tue Feb 10 11:12:50 CET 2009


2009/2/10 Michael Niedermayer <michaelni at gmx.at>
[...]

>
> (int)c->alpPixBuf could be 0 with 32bit int and 64bit pointers
>
> int needAlpha = CONFIG_ALPHA_CHANNEL && c->alpPixBuf;\
> seems safer
>

Yes, I didn't check 64bit for now.

[...]


> > +                    YSCALEYUV2PACKEDX_ACCURATE
> > +                    YSCALEYUV2RGBX
> > +                    "movq                      %%mm2, "U_TEMP"(%0)
>  \n\t"
> > +                    "movq                      %%mm4, "V_TEMP"(%0)
>  \n\t"
> > +                    "movq                      %%mm5, "Y_TEMP"(%0)
>  \n\t"
> > +                    YSCALEYUV2PACKEDX_ACCURATE_YA(ALP_MMX_FILTER_OFFSET)
>
> > +                    "movq                      %%mm3, %%mm2
> \n\t"
> > +                    "movq               "Y_TEMP"(%0), %%mm5
> \n\t"
> > +                    "psraw                        $3, %%mm1
> \n\t"
> > +                    "psraw                        $3, %%mm7
> \n\t"
> > +                    "packuswb                  %%mm7, %%mm1
> \n\t"
> > +                    "movq                      %%mm1, %%mm7
> \n\t"
> > +                    WRITEBGR32(%4, %5, %%REGa)
>
> the 2 register-register moves look avoidable if WRITEBGR32 wouldnt use
> fixed registers but rather have the used args passed as arguments.
>
> also note, a patch changing WRITEBGR32 to take its registers as arguments
> should be seperate. Also some of the changes you did like spliting macros
> could be seperate (its trivial and could be commited already)
>

That's what I wanted to do in a second round (to help readability of the
patch), but if you think it should be done first, I'll be happy to issue
those patches.


>
> also iam assuming all the code has been tested?
> and when already speaking about testing things should be tested on
> x86_32 and 64
>

It has only been tested on x86_32 for the moment. I'll try on a 64bit system
soon.


Regards,
C?dric Schieli
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel at mplayerhq.hu
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel




More information about the ffmpeg-devel mailing list