[MPlayer-dev-eng] [PATCH] SwScaler YV12 to BGR32 having zeroed alpha

Jason Tackaberry tack at sault.org
Mon May 30 01:16:59 CEST 2005


On Mon, 2005-05-30 at 00:31 +0200, Michael Niedermayer wrote:
> why not add the 255 into one of the r,g,b arrays, this would avoid the 
> slowdown
> (or add 85<<24 to all 3)

That certainly solves the inelegance of the overflow for under 32bpp and
makes the patch simpler.  I also fixed a whitespace issue with the
change in swscale_template.c.  See attached.

Also, when reading the code for yuv420_rgb32() in yuv2rgb_template.c, I
see that %mm4 is zeroed initially and in the loop, but I can't see why.
(Perhaps inside the loop it has to do with keeping ops paired for
pipelining, but I don't really know.  My assembler sucks.)

This patch doesn't address altivec.  I don't have access to a PowerPC
system, and I really know nothing about it.  It's probably a similarly
trivial modification, however.  Perhaps someone else can look at it?

Cheers,
Jason.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postproc-2005-05-29.patch
Type: text/x-patch
Size: 1461 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050529/c5c2baf1/attachment.bin>


More information about the MPlayer-dev-eng mailing list