5:6:5 RGB Considered Harmful

Bert Freudenberg bert at freudenbergs.de
Mon Mar 12 05:21:30 EDT 2007


On Mar 12, 2007, at 8:22 , Albert Cahalan wrote:

> 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...

Seconded - etoys can do 5:5:5 and 8:8:8:8 out-of-the-box.

- Bert -






More information about the Devel mailing list