5:6:5 RGB Considered Harmful

Albert Cahalan acahalan at gmail.com
Mon Mar 12 03:22:36 EDT 2007


Long ago, Tux Paint used 5:6:5. This caused colors to get messed up if
the user did repeated blur, smudge, pixelate, and similar operations.
Tux Paint normally uses 8:8:8 RGB, with occational 32:32:32 (linear float)
RGB for troublesome blending operations like smudge. The version that
runs on the B2 OLPC XO is currently using 5:5:5, but this causes lots of
conversions that require bit shifting. The situation would be much better
if the XO used 5:5:5 or 8:8:8. While 8:8:8 is 50% bigger, it avoids lots
of bit shifting (very slow on many processors) and preserves information.

Eliminating the use of 32:32:32 will probably involve linear integer data,
16:16:16 on normal hardware at least, perhaps with MMX via gcc's vector
support. This wouldn't be 5:6:5 either.

If I recall right, eToys was using 5:5:5 and GDK uses 8:8:8.
Switching to one of those would be good. 5:6:5 can't even do grey.
Not that non-linear data is any good for computation...

The display controller chip probably should use temporal dithering to
overcome the 6:6:6 limit of the LCD panel. This would make 8:8:8 much
more valuable.



More information about the Devel mailing list