summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBasile Clement <basile-pixman@clement.pm>2019-04-22 22:13:57 +0200
committerBryce Harrington <bryce@bryceharrington.org>2019-05-25 07:30:19 -0700
commitcb2ec4268fbde0df3b588ce5cbe2e43e04654520 (patch)
tree7e78184389c983f1be0948cdb226ba5d68b2cfb4 /test
parent98b5ec74ca14448349ef6a33a663ad19d446ed6b (diff)
Ordered dithering with blue noise, v2
On some screens (typically low quality laptop screens), using Bayer ordered dithering has been observed to cause color changes depending on *where the gradient is rendered on the screen*, causing visible flickering when moving an image on the screen. To alleviate the issue, this patch adds support for ordered dithering using a 64x64 matrix tuned from blue noise. In addition to being devoid of the positional dependency on screen, the blue noise matrix also generates more pleasing and less discernable patterns. As such, it is now the method used for PIXMAN_DITHER_GOOD and PIXMAN_DITHER_BEST dithering methods. The 64x64 blue noise matrix has been generated using the provided `pixman/dither/make-blue-noise.c` script, which uses the void-and-cluster method. Changes since v1 (thanks Bill): - Use uint16_t for the blue noise matrix for lower memory usage - Use bitwise computation for array index
Diffstat (limited to 'test')
-rw-r--r--test/tolerance-test.c1
-rw-r--r--test/utils.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/test/tolerance-test.c b/test/tolerance-test.c
index 011cdb4..3c6e818 100644
--- a/test/tolerance-test.c
+++ b/test/tolerance-test.c
@@ -79,6 +79,7 @@ static const pixman_op_t operators[] =
static const pixman_dither_t dithers[] =
{
PIXMAN_DITHER_ORDERED_BAYER_8,
+ PIXMAN_DITHER_ORDERED_BLUE_NOISE_64,
};
#define RANDOM_ELT(array) \
diff --git a/test/utils.c b/test/utils.c
index 9ce7a6c..2e3b547 100644
--- a/test/utils.c
+++ b/test/utils.c
@@ -1193,6 +1193,7 @@ static const dither_entry_t dither_list[] =
*/
ENTRY (ORDERED_BAYER_8),
+ ENTRY (ORDERED_BLUE_NOISE_64),
ENTRY (NONE),
#undef ENTRY