[cairo] Faster bilinear scaling
Soeren Sandmann
sandmann at daimi.au.dk
Tue Oct 6 13:06:34 PDT 2009
Hi,
This branch:
http://cgit.freedesktop.org/~sandmann/pixman/log/?h=bilinear
contains a fast path for fetching of bilinearly filtered, scaled
images. It is basically Andre's work, described here:
http://lists.cairographics.org/archives/cairo/2008-December/016170.html
What I did was
- Update scaling-test to also test bilinear scaling
- Remove bilinear_interpolation_left/right() functions in
favor of just calling bilinear_interpolation().
- Fix coding style.
The performance improvement for the swfdec-youtube benchmark on a
3.8GHz P4 is around 17%:
Before:
[ # ] backend test min(s) median(s) stddev. count
[ 0] image swfdec-youtube 8.375 8.431 0.44% 6/6
After:
[ # ] backend test min(s) median(s) stddev. count
[ 0] image swfdec-youtube 6.942 7.019 0.61% 6/6
Much of the profile of this benchmark is in radial gradients, so other
users of bilinear scaling may see more improvement.
Also, if anyone is interested in adding support for SIMD acceeleration
of fetchers, the the bilinear_interpolation() function is begging to
be written with SSE2 or NEON.
Comments welcome.
Thanks,
Soren
More information about the cairo
mailing list