[MPlayer-dev-eng] Help with MMX asm code

Billy Biggs vektor at dumbterm.net
Thu Oct 23 15:44:52 CEST 2003


Jason Tackaberry (tack at auc.ca):

> On Thu, 2003-10-23 at 09:13, Billy Biggs wrote:
> > likely have to adapt them for your code.  I usually go from like
> > 4:4:4:4 onto 4:2:2 or from 4:4:4:4 onto 4:4:4:4.  See speedy.[h,c]
> > in CVS at sourceforge.net/projects/tvtime/
> 
> This will be most useful.  Thanks very much.
> 
> I'm actually going from 4:4:4:4 to 4:2:2 as well, but I do that
> conversion up front so that for each frame I'm only doing 4:2:2 onto
> 4:2:2.  This is how the original bmovl did it, and that approach
> seemed sane to me.  Wouldn't it still be advantageous to do it that
> way even if things are optimized with MMX?

  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?

  I just didn't want to do a 4:4:2:2 format because it seemed really
weird, and having a separate key channel didn't seem clean for my
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
used on RGB32 content just as well (the math works out the same for
Y'CbCr vs R'G'B' compositing even with the 128/16 offset and chroma
centered at 0 and all that).

  Having a function to blend an opaque 4:2:2 foreground onto the
background with a fixed alpha seems useful though, but at that point the
function is more general than the pixel format since it's the same
operation on every component in every pixel.

  -Billy




More information about the MPlayer-dev-eng mailing list