[Pixman] [PATCH] MIPS: DSPr2: Fix for bug in in_n_8 routine.

Siarhei Siamashka siarhei.siamashka at gmail.com
Wed Mar 6 13:22:16 PST 2013


On Mon,  4 Mar 2013 15:36:42 +0100
Nemanja Lukic <nemanja.lukic at rt-rk.com> wrote:

> Rounding logic was not implemented right.
> Instead of using rounding version of the 8-bit shift, logical shifts were used.
> Also, code used unnecessary multiplications, which could be avoided by packing
> 4 destination (a8) pixel into one 32bit register. There were also, unnecessary
> spills on stack. Code is rewritten to address mentioned issues.

OK, looks good.

> The bug was revealed by increasing number of the iterations in blitters-test.

With the default 2000000 iterations, the function sse2_composite_in_n_8
gets called 213 times in blitters-test. It is likely that we do not get
enough unique color values tested for solid source just because we
are testing only a single color value per whole compositing operation.
Especially considering that a lot of the solid colors originate
from the the formats without alpha channel or the formats with the
reduced number of bits per color component.

It would be a good idea to reduce the probability for such bugs to
remain undetected. What would you think about increasing the number
of iterations in blitters-test?

Alternatively we could increase the probability of testing the
compositing operations with solid source or mask, try to ensure
better variety for solid colors in such tests, or maybe even avoid
testing uncommon operators and formats (the ones which are not
represented in optimized fast paths) and move them into a separate
test.

-- 
Best regards,
Siarhei Siamashka


More information about the Pixman mailing list