[Pixman] [PATCH 2/3] Optimize BILINEAR filter to NEAREST for identity transforms

Soeren Sandmann sandmann at cs.au.dk
Sat Sep 10 00:58:33 PDT 2011


Soeren Sandmann <sandmann at cs.au.dk> writes:

> The new code only computes the transformation once, and then it add the
> absolute value of the 00 and 10 components to get a conservative
> estimate of the transformed destination boundary. I'm especially
> interested in review of this part, both of the code and of whether it's
> actually correct mathematically.

It is in fact not at all correct. It's completely bogus in fact. For
affine matrices the idea may not be entirely wrong, but the correct
thing to add to the X coordinates would be |m00| + |m01| + |m11| and not
just |m00|. Similar for Y coordinates.

But that fails to take projective matrices into account, so I just went
back to computing the transformed bounding box twice. New patch below.


Soren




More information about the Pixman mailing list