[Pixman] [PATCH 0/7] Faster pipelined ARM NEON bilinear scalers: 'src_8888_8888' and 'src_8888_0565'

Soeren Sandmann sandmann at cs.au.dk
Sun Apr 10 12:45:16 PDT 2011


Siarhei Siamashka <siarhei.siamashka at gmail.com> writes:

>> Also, a bilinear src_8888_0565 scaler would also be a convenient place
>> to add dithering, which is something that youtube on my netbook could
>> decidedly benefit from.
>>
>> So, basically, I like this idea a lot.
>
> Yes, I also like it, because it looks much easier to implement. And
> extra dithering would be indeed nice to have, but I wonder how can it
> be added to pixman in a consistent way.

There could simply be something like

    pixman_image_set_dither (image, dither_type, x_off, y_off);

and then when the image is used as a destination, a dither signal is
added after combining, but before writing back.

The x_off/y_off would offset the dither signal so that a dithered image
could be scrolled without stripe artefacts.

It would be straightforward to implement in the general pipeline: just
add a dither table somewhere (the one from GdkRGB is a good one, and in
the public domain), and make the destination iterator add it in when
dithering is enabled.

All the existing fast paths would have to be disabled when dithering is
enabled, of course, which is annoying, but until we have a JIT compiler,
I guess every new feature pretty much causes the number of required fast
paths to double.


Soren


More information about the Pixman mailing list