dbf-udg

view src/dither_matrix.h @ 3:403ec1be3a1a

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 11 Jan 2013 22:52:56 +0200
parents 2d27bfd21fc5
children 1abbed71e9c9
line source
1 #ifndef DITHER_MATRIX_H_
2 #define DITHER_MATRIX_H_
4 static const float dither_matrix2[2][2] = {
5 {0, 3}, {2, 1}
6 };
8 static const float dither_matrix4[4][4] = {
9 {0, 12, 3, 15},
10 {8, 4, 11, 7},
11 {2, 14, 1, 13},
12 {10, 6, 9, 5}
13 };
15 static const float dither_matrix8[8][8] = {
16 {0, 48, 12, 60, 3, 51, 15, 63},
17 {32, 16, 44, 28, 35, 19, 47, 31},
18 {8, 56, 4, 52, 11, 59, 7, 55},
19 {40, 24, 36, 20, 43, 27, 39, 23},
20 {2, 50, 14, 62, 1, 49, 13, 61},
21 {34, 18, 46, 30, 33, 17, 45, 29},
22 {10, 58, 6, 54, 9, 57, 5, 53},
23 {42, 26, 38, 22, 41, 25, 37, 21}
24 };
26 static const float halftone_matrix8[8][8] = {
27 {24, 10, 12, 26, 35, 47, 49, 37},
28 {8, 0, 2, 14, 45, 59, 61, 51},
29 {22, 6, 4, 16, 43, 57, 63, 53},
30 {30, 20, 18, 28, 33, 41, 55, 39},
31 {34, 46, 48, 36, 25, 11, 13, 27},
32 {44, 58, 60, 50, 9, 1, 3, 15},
33 {42, 56, 62, 52, 23, 7, 5, 17},
34 {32, 40, 54, 38, 31, 21, 19, 29}
35 };
37 #endif /* DITHER_MATRIX_H_ */