View Single Post
Old 04-21-2012, 04:46 PM   #30
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: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by jmseight View Post
Hi kiri87,

I ran the demo and is is very good! My son loves it.

However, I don't think you need to use the dither algorithm because it is all black and white.

Maybe you can modify the demo so it shows dithering...

Thanks,
James
Geekmaster formula 42 does a lot more than just dithering. It works on all eink kindles. It works for 4-bit and 8-bit framebuffers. It works for color 0 = white and for color 0 = black. It works on 6-inch and 9.7-inch displays. It has no branches (if else statements) so it is very fast and cache-friendly. It is fine to use it only for black and white. Dithered gray is just an added benefit.

I have a new modified formula 42 that takes color values 0-255 instead of 0-65, so it can be used directly with 8-bit images with no need to pre-scale the color values. It was published as part of "paldemo". It also works with non-linear dither tables, including a LCD 2.2-gamma table (screenshot provided in paldemo post).

I just ran your version. The dithered grays do look interesting on this demo. I like seeing my code grow in unexpected directions that are not on MY "to do" list.

P.S. I am getting an occasional "sementation fault" error on this, which probably means that it tried to write past the end of the framebuffer (y > 799). Although there is no harm in this for a demo, it SHOULD be fixed in the next version (so this error does not end up in other code that borrowed from this, perhaps causing real damage in some other scenario -- better to just do it right).



Last edited by geekmaster; 11-25-2012 at 11:01 PM.
geekmaster is offline   Reply With Quote