Commit c7053c98 authored by michael's avatar michael

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


git-svn-id: file:///var/local/repositories/mplayer/trunk/postproc@9989 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 8b15877e
...@@ -1340,9 +1340,15 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsign ...@@ -1340,9 +1340,15 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsign
unsigned num_pixels = src_size >> 2; unsigned num_pixels = src_size >> 2;
for(i=0; i<num_pixels; i++) for(i=0; i<num_pixels; i++)
{ {
#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 + 0] = src[4*i + 2];
dst[4*i + 1] = src[4*i + 1]; dst[4*i + 1] = src[4*i + 1];
dst[4*i + 2] = src[4*i + 0]; dst[4*i + 2] = src[4*i + 0];
#endif
} }
#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