[cairo] [RFC] altivec optimization

Owen Taylor otaylor at redhat.com
Wed Jan 24 08:22:06 PST 2007


On Wed, 2007-01-24 at 15:20 +0100, Luca Barbato wrote:
> I'm writing optimizations for altivec, basically processing 4 pixels at
> time, the problem is that I have to call back the scalar version to
> finish the processing in case the width isn't multiple of 4.
> 
> Which is the best course of action? straight copy the scalar code inside
>  the vector functions or call the scalar function passing the remaining
> pixels?
> 
> I'll try to provide a working patch soon, for now the source is just a
> testcase that compares scalar and vector function outputs.
> 
> http://dev.gentoo.org/~lu_zero/development/fbaltivec.c

This may or may not be helpful, but in developing MMX code to do
compositing (something of a precursor of Soeren's code in fbmmx.c), 
I found it was easier to handle the four channels of a single pixel
in parallel rather than trying to do pixels in in parallel.

Which gets rid of the problem of left-over pixels at the ends of
lines.

					- Owen




More information about the cairo mailing list