[Interest] QVideoFrame 32 bit formats byte order

Allan Sandfeld Jensen kde at carewolf.com
Thu Nov 14 21:37:09 CET 2019


On Thursday, 14 November 2019 21:17:38 CET Stefan Fabian wrote:
> That may be explained by the endianness, though, since ARGB as 32bit uint on
> little-endian (what most if not all consumer pcs use) would be BGRA in
> memory. In the case of BGRA32, endianness could change it to ARGB but not
> ABGR or RGBA as in my test. Either way, it should be documented how raw
> memory is interpreted (consecutive bytes [big-endian] or one 4 byte word
> per pixel [cpu dependent]). 

Formats called something32 are 32-bit formats, they are the same regardless of endian 
when read in as 32bit integers. Formats that are called something8888 are bytewise 
formats and the same regardless of endian when reads a series of 8bit integers.

See https://en.wikipedia.org/wiki/RGBA_color_space#Representation[1] 


BGRA32 is how RGBA8888 looks if you read it as 32bit integers on a little endian 
machine.

Regards
Allan

--------
[1] https://en.wikipedia.org/wiki/RGBA_color_space#Representation
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20191114/9867b10b/attachment.html>


More information about the Interest mailing list