View Single Post
Old 04-18-2012, 12:45 AM   #94
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by geekmaster View Post
You just change the cutoffs in the dither table, so no active code changes. Or, you could scale and offset the numbers before dithering.
Dither errors resulting in no pure black or no pure white are usually scaling error. Dither always gives power of two PLUS ONE, or 65 shades of gray (0-64) for an 8x8 table. It is easy to assume 0-63 incorrectly...

Or it could be integer round-off error. When doing fixed-point math, you need to add half the divisor to the numerator before dividing. In dithering a 6-bit value, that would put the "error in the middle (value 32) instead of at white or black.


Last edited by geekmaster; 04-18-2012 at 12:48 AM.
geekmaster is offline   Reply With Quote