Michel Dänzer wrote:
> On Tue, 2008-02-12 at 18:50 +0200, Ville Syrjälä wrote:
>> On Tue, Feb 12, 2008 at 03:01:53PM +0100, Denis Oliver Kropp wrote:
>>> RGB24 is weird. Does anybody know which is the real standard byte order and 
>>> endianness dependency?
>> I don't think anyone agrees on this stuff. Many people don't even agree
>> how the easier formats are arranged (ie. sometimes when you read the
>> name left-to-right is msb-to-lsb, sometimes the other way around).
>>
>> One thing that might serve as a rule is that you should be able to copy
>> RGB32 to RGB24 by simply walking both streams byte at a time and
>> copying the relevant bytes (and skipping the extra bytes in RGB32). And
>> since out RGB32 is native endian that implies that RGB24/BGR24 are
>> stored in native endian format as well.
> 
> Actually, as the greatest common denominator between 3 and the CPU word
> size is 1, the endianness concept doesn't really make sense with RGB24
> but it can just be treated as a byte stream of colour components in a
> defined order, similar to how the characters of a C string always have
> the same order regardless of endianness.

That's what I thought, like NV12 having a defined order of 16bit words
regardless of the endianness (chroma plane).

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to