dbf-udg
diff 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 diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/dither_matrix.h Tue Jan 08 03:16:48 2013 +0200 1.3 @@ -0,0 +1,26 @@ 1.4 +#ifndef DITHER_MATRIX_H_ 1.5 +#define DITHER_MATRIX_H_ 1.6 + 1.7 +static const float dither_matrix2[2][2] = { 1.8 + {0, 3}, {2, 1} 1.9 +}; 1.10 + 1.11 +static const float dither_matrix4[4][4] = { 1.12 + {0, 12, 3, 15}, 1.13 + {8, 4, 11, 7}, 1.14 + {2, 14, 1, 13}, 1.15 + {10, 6, 9, 5} 1.16 +}; 1.17 + 1.18 +static const float dither_matrix8[8][8] = { 1.19 + {0, 48, 12, 60, 3, 51, 15, 63}, 1.20 + {32, 16, 44, 28, 35, 19, 47, 31}, 1.21 + {8, 56, 4, 52, 11, 59, 7, 55}, 1.22 + {40, 24, 36, 20, 43, 27, 39, 23}, 1.23 + {2, 50, 14, 62, 1, 49, 13, 61}, 1.24 + {34, 18, 46, 30, 33, 17, 45, 29}, 1.25 + {10, 58, 6, 54, 9, 57, 5, 53}, 1.26 + {42, 26, 38, 22, 41, 25, 37, 21} 1.27 +}; 1.28 + 1.29 +#endif /* DITHER_MATRIX_H_ */