[Interest] QVideoFrame 32 bit formats byte order
Allan Sandfeld Jensen
kde at carewolf.com
Thu Nov 14 21:43:46 CET 2019
On Thursday, 14 November 2019 21:37:09 CET Allan Sandfeld Jensen wrote:
> 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
> BGRA32 is how RGBA8888 looks if you read it as 32bit integers on a little
> endian machine.
Ooos. how ARGB8888 would look like..
Which is actually rather silly, the two most common formats are ARGB32 and
RGBA8888, and their misinterpreted counterparts on little-endian BGRA8888 and
More information about the Interest