View Single Post
Old 11-06-2012, 02:53 PM   #6
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
As you can see in my eink code (GMLIB), you will see that the 8-bit eink framebuffer must have a copy of the 4-bit value in both the top and bottom half-bytes. More than 16 colors are created with dithering. You can copy a framebuffer that contains a screensaver image (or special offers ad) , then load it into an image processing program and do histogram analysis on it. You will see 16 spikes, showing that it is really 4 bits duplicated as described above.

The eink driver GPL source code has comments saying that NOT having duplicate half-bytes in 8-bit framebuffer mode can have unpredictable hardware-dependent results.

EDIT: As you can see in your color map, each color value is just 0x0 through 0xf, repeated into each half-byte of the color map word size. 16-colors, even in 8-bit mode. I have code that dithers 256 color to fit into either 4-bit or 8-bit framebuffers, and works in all modes (main and diags) on all the eink kindles.

Check out the newtrix demo for details and sample code:
https://www.mobileread.com/forums/sho...d.php?t=176802

Last edited by geekmaster; 11-06-2012 at 03:08 PM.
geekmaster is offline   Reply With Quote