[Pixman] fast-scale branch performance improvements
siarhei.siamashka at gmail.com
Sun Mar 14 18:25:03 PDT 2010
On Friday 12 March 2010, Alexander Larsson wrote:
> On Thu, 2010-03-11 at 14:41 +0100, Alexander Larsson wrote:
> > This clearly is a significant win, and I'd like to get this branch (or
> > something based on it) into 0.18.0 to avoid performance regressions in
> > spice.
> >  http://cgit.freedesktop.org/~siamashka/pixman/log/?h=fast-scaling
> I took this as a base and created a new branch that does fast scaling,
> achieving similar performance, and passing scaling-test.
> It is based on the new flags system (adding two flags) and uses a single
> macroized function which generates all the different instances.
It's good to know that I'm not alone interested in fast nearest neighbor
scaling. Thanks for taking care of changing this code to the new flags
system. It's something that I otherwise would have to do myself on next
Overall, your branch looks good to me, it's definitely a step in the right
direction. My quick benchmarks showed that it achieves approximately the same
performance in all tests except for a strange performance drop for
over_8888_0565 case (I have still not checked why this happens).
But before it gets committed, some problems with potential fixed point
overflows when dealing with large images need to be addressed. I have
made a test program which can expose some of these problems:
Actually, apparently my old 'fast-scaling' branch also had this check
implemented incorrectly. I have just pushed a fix showing where things
And for the case of scaling without repeat, function 'image_samples_covers'
also needs to be verified with the regards to how it behaves in corner
cases and extreme image size ranges.
More information about the Pixman