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

Jason Tackaberry tack at auc.ca
Thu Oct 23 14:53:28 CEST 2003


It's clear to me that the work I'm doing with vf_bmovl2 will vastly
benefit from MMX optimizations.  Unfortunately it's been years since
I've done anything with assembly, and I'm also completely unfamiliar
with the MMX instruction set.  So I'm posting here in the hopes that one
of you guys who has done some MMX asm work will take pity on me and lend
a hand. :)

I spent a couple hours last night going through much of the existing MMX
code in Mplayer, but I fear I am just spinning my wheels and not getting
anywhere.

In principle, what I want to do is fairly straight forward.  For each
calculation, I have 3 arrays of bytes: a given plane from the original
image (mpi_plane, say), a plane from an external image (img_plane) that
I want to overlay on top of mpi, and an alpha channel (alpha).  The
calculation looks like this:

   mpi_plane[pos] = ((255 - alpha[pos]) * mpi_plane[pos] +
      alpha[pos] * img_plane[pos]) >> 8;

This calculation would apply to each byte in img_plane.  So you can see
this would be a prime candidate for MMX optimization.  Any help would be
much appreciated.

Cheers,
Jason.

-- 
Jason Tackaberry  ::  tack at auc.ca  :: 705-949-2301 x330 
Academic Computing Support Specialist
Information Technology Services
Algoma University College  ::  www.auc.ca




More information about the MPlayer-dev-eng mailing list