>>>>> "Denys" == Denys Vlasenko <[email protected]> writes:

 >> +
 >> +   /* RGB:332 */
 >> +   for (i = 0; i < 256; i++)
 >> +   {
 >> +           red[i]   = ((i & 0xe0) << 8)  + ((i & 0x20) ? 0x1fff : 0);
 >> +           green[i] = ((i & 0x1c) << 11) + ((i & 0x04) ? 0x1fff : 0);
 >> +           blue[i]  = ((i & 0x03) << 14) + ((i & 0x01) ? 0x3fff : 0);
 >> +   }

 Denys> This doesn't map values entirely correctly.
 Denys> How about this?

Intuitively I would say that using anything else than the least
significant bit of the 2/3 MSB to extimate the missing bits doesn't make
sense, but then I found:

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.17.5503&rep=rep1&type=pdf

Which does exactly like you propose - So I'll shut up ;)

Thanks!

-- 
Bye, Peter Korsgaard
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to