[cairo] [PATCH] Image scaling regression test script and 'fbCompositeSrcScaleNearest' bugfixes

Siarhei Siamashka siarhei.siamashka at nokia.com
Tue Mar 31 12:01:10 PDT 2009


Hello,

I'm currently working on porting performance optimizations from Xomap
(X server used in Nokia internet tablets N800 and N810) into the latest
version of pixman and now also have a permission to submit these patches
directly upstream :)

Xomap has optimizations which include fastpath functions for nearest
neighbour scaling with the support of SRC and OVER operations for
NONE and NORMAL repeat in the case when no rotation is involved and
only a single clipping rectangle is used. Also it has a set of ARMv6
assembly optimizations (they partially overlap with the ARM optimizations
that pixman also got recently, but still have some useful stuff).
Additionally, some very basic (and not quite bitexact) tweaks for BILINEAR
scaling exist, but these need to be replaced by some real optimizations so
don't have much value.

If anybody is interested, the sources of Xomap are available for download at:
http://repository.maemo.org/pool/diablo/free/x/xorg-server/

Also these optimizations had been posted as separate patches here:
https://bugzilla.mozilla.org/show_bug.cgi?id=459078
https://bugzilla.mozilla.org/attachment.cgi?id=345490

Technically, adopting these optimizations just requires lots of copy&paste and
search&replace work as pixman got lots of (mostly cosmetic) changes since
that time. This is for most part a boring and error prone work unless a
reliable regression testing is in place.

So the first thing to have are the tests for verifying correctness and
performance of code. I had something like this hooked into Xomap internals,
but now it is even a lot easier because pixman is a separate library.

An attempt at developing such script to provide a solid testing base is
attached. It's quite simple, but already helped to hunt down two bugs
in 'fbCompositeSrcScaleNearest' function (patch is also attached).

Feedback is very much welcome.

I'm going to submit more patches later with the goal to get all the useful
optimizations from Xomap into pixman. Also more improvements can be added
next (true optimizations for the BILINEAR scaling are a good candidate).

-- 
Best regards,
Siarhei Siamashka
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Image-scaling-regression-test-script.patch
Type: text/x-diff
Size: 13046 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20090331/2423ee54/attachment.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-fbCompositeSrcScaleNearest-bugfixes.patch
Type: text/x-diff
Size: 2014 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20090331/2423ee54/attachment-0001.patch 


More information about the cairo mailing list