[MPlayer-dev-eng] PNG and endianness

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Apr 6 18:26:14 CEST 2011


On Tue, Apr 05, 2011 at 10:30:32PM +0200, Ingo Brückl wrote:
> The PNG specification says that all integers that require more than one byte
> shall be in network byte order which is big-endian AFAIK, so there should not
> be such distinction, should it?

The PNG specification is irrelevant.
The libavcodec decoder decodes to PIX_FMT_RGB32 which means each pixel
is a 32 bit value in native endianness with the (I think) highest bits
being red, followed by green and blue.
Since the code works byte-wise, it is correct to do different things on
big- and little-endian.


More information about the MPlayer-dev-eng mailing list