[Pixman] Dithering patches, v2

Basile Clement basile-pixman at clement.pm
Mon Apr 22 20:09:22 UTC 2019


There is less calculation, but the noise matrix takes up cache space
(about half a modern CPU's L1) and hence increases memory pressure.  The
actual performance relationship is probably hardware dependent, but on
my laptop doing a quick check with patched lowlevel-blt-bench:

 - Bayer is ~8% faster than blue noise
 - Bayer is only ~5% faster if I use `dither_blue_noise_64x64[((y &
0x3f) << 6) | (x & 0x3f)]` in the index computation, which I would have
expected GCC to do automatically but oh well.
 - Both are about the same speed with uint16_t array for the blue noise
(halves memory consumption).

I will make those two changes (they are clearly desirable) and re-post
the blue noise patch.  Since this is in a write-back loop which should
be memory-bound in general, I think it makes sense to keep Bayer as FAST
dithering -- but I'm not opposed to removing it.

- Basile

On 4/22/19 8:12 PM, Bill Spitzak wrote:
> Is the "blue noise" version actually slower than the Bayer? Seems to
> be doing a bit less calculation but it reading the array of weights.
> The removal of the need for the pattern offset seems like a win.
>
> On Mon, Apr 22, 2019 at 9:27 AM Matt Turner <mattst88 at gmail.com
> <mailto:mattst88 at gmail.com>> wrote:
>
>     On Fri, Apr 19, 2019 at 4:52 PM Bryce Harrington
>     <bryce at bryceharrington.org <mailto:bryce at bryceharrington.org>> wrote:
>     > Inkscape would love to see Basile's dithering patches included.  Our
>     > testing shows that they make a huge quality difference for our
>     users;
>     > this solves a critical need.
>     >
>     > Mc and I have done some preliminary investigation into how to
>     plumb this
>     > into Cairo, and would love to hear your review of Basile's
>     approach to
>     > the problem.
>
>     I don't feel like I'm experienced enough with that side of pixman to
>     offer meaningful comments. I've Cc'd Søren in the hopes that he
>     remains interested enough in the project to review the patches that
>     Basile says implement the approach Søren described.
>     _______________________________________________
>     Pixman mailing list
>     Pixman at lists.freedesktop.org <mailto:Pixman at lists.freedesktop.org>
>     https://lists.freedesktop.org/mailman/listinfo/pixman
>
>
> _______________________________________________
> Pixman mailing list
> Pixman at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/pixman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pixman/attachments/20190422/a97bde3f/attachment.html>


More information about the Pixman mailing list