Commit d7b8e4b6 authored by Michael Niedermayer's avatar Michael Niedermayer

bigendian fix by (Samuel Kleiner <kleiner at cd dot chalmers dot se>)

Originally committed as revision 9989 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
parent 700490a4
......@@ -1340,9 +1340,15 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsign
unsigned num_pixels = src_size >> 2;
for(i=0; i<num_pixels; i++)
{
dst[4*i + 0] = src[4*i + 2];
dst[4*i + 1] = src[4*i + 1];
dst[4*i + 2] = src[4*i + 0];
#ifdef WORDS_BIGENDIAN
dst[4*i + 1] = src[4*i + 3];
dst[4*i + 2] = src[4*i + 2];
dst[4*i + 3] = src[4*i + 1];
#else
dst[4*i + 0] = src[4*i + 2];
dst[4*i + 1] = src[4*i + 1];
dst[4*i + 2] = src[4*i + 0];
#endif
}
#endif
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment