[MPlayer-dev-eng] PNG and endianness

Ingo Brückl ib at wupperonline.de
Tue Apr 5 22:30:32 CEST 2011


I'm not sure whether the question might get lost in mplayer-cvslog, so here
once more:

  static void Normalize (txSample *bf)
  {
    unsigned long i;

    for (i = 0; i < bf->ImageSize; i += 4)
  #if HAVE_BIGENDIAN
      bf->Image[i] = 0;
  #else
      bf->Image[i + 3] = 0;
  #endif
  }

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?

Ingo


More information about the MPlayer-dev-eng mailing list