dithering – part 2 May 23, 2006
Posted by winden in coding, demoscene.trackback
Yesterday I was coming back from work when I remembered the idea about doing realtime dithering… I had started in 1999 to make some routines but since the concept was not that complex, I prefered to recode rather than lose 2 hours searching on the amiga hd… lo and behold, some time later I managed to make a simple moving stripe routine in 256 greyscales, and later added the filter to convert the 256 greys to 16 grey values via floyd-steinberg dithering…
Using 4 bitplanes instead of 8 (16 instead of 256 colors) gained half of the speed of the chunky2planar routine (the dumping from fastmem to chipmem), but the dithering is still far from optimised so perhaps there is still hope about using it for more complex routines :)
Hi. You can maybe gain more speed by using a Sierra Lite dither matrix. Take a look here: http://www.efg2.com/Lab/Library/ImageProcessing/DHALF.TXT
It is an error diffusion dither algorithm and gives results similar to Floyd-Steinberg, but can be done much faster. I implemented it using non-optimized palettes and it looks quite good.
winden: thanks will take a close look at it!