[MPlayer-dev-eng] Help with MMX asm code
Billy Biggs
vektor at dumbterm.net
Thu Oct 23 16:10:02 CEST 2003
Jason Tackaberry (tack at auc.ca):
> On Thu, 2003-10-23 at 09:44, Billy Biggs wrote:
> > So where is your alpha channel, or is it an opaque forground with
> > just a blend parameter, or is the alpha channel in a separate
> > buffer?
>
> In fact it is both.
>
> I load the image as RGBA which gets converted to YUVA (4:2:2:4).
> There is also a separate alpha parameter that applies to the whole
> image that acts as a multiplier for each byte in the alpha channel.
> The idea is to allow fading in/out images while still preserving the
> image's alpha channel.
Yeah I do that too. I have composite functions 4:4:4:4 to 4:2:2 with
or without an additional alpha parameter (with the range 0-256 for
efficiency).
> > application. So I just have everything as 32bit pixels until the
> > output. It's also nice because any 4:4:4:4->4:4:4:4 routines can be
>
> For my purposes, I want to store the image that in the optimal format
> to make blending with YUV the most efficient. My intuition is that
> the best format would be YUVA, but maybe there's a better way?
Using 4:2:2:4 you have 5 bytes for every two pixels. That sounds like
it really sucks for alignment. You want to read in 64bits at a time or
32bits at a time, it will be faster than trying to shuffle stuff around
with these 5-byte chunks. Reading 4:4:4:4 is nice, 32bpp, and writing
4:2:2 is nice too, since it's 32bits for two pixels.
-Billy
More information about the MPlayer-dev-eng
mailing list