[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH 2/2] fbsplash: support 8bit mode
From: Peter Korsgaard <jacmet () sunsite ! dk>
Date: 2011-10-17 6:40:00
Message-ID: 87pqhw3yv3.fsf () macbook ! be ! 48ers ! dk
[Download RAW message or body]
>>>>> "Denys" == Denys Vlasenko <vda.linux@googlemail.com> 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
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic