dbf-udg

view src/dither_matrix.h @ 0:2d27bfd21fc5

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 08 Jan 2013 03:16:48 +0200
parents
children 403ec1be3a1a
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 #endif /* DITHER_MATRIX_H_ */