[Pixman] [RFC/PATCH 00/13] Operators with divisions in floating point?
sandmann at cs.au.dk
Wed Dec 11 07:41:49 PST 2013
The following patch series,
(1) Extends the test suite with a new 'tolerance-test' which is
similar in spirit to 'composite', except that it supports more
operators, uses random pixels as input, and isn't limited to 1x1
(2) Fixes a bunch of bugs in the blend mode operators, first reported
here, I think:
(3) Extends pixel-test to support masks and adds a bunch of new pixels
there that failed at one time or other.
Those changes should be mostly uncontroversial, but there is another
one that may not be: It turned out that in order to get the new tests
to actually pass, I had to force all operators that use division to be
computed in floating point. The basic problem is that when the
denominator is small, if it has even a tiny error, the division causes
it to blow up and become huge.
The only other option that I can see is to give up on tolerance based
testing (at least for these operators) and accept that pixman's output
can be more or less random in certain cases involving division with
small numbers. If anyone has a better suggestion, I'm definitely
An upside is that about 1400 lines of code gets deleted from
More information about the Pixman