mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
This commit is contained in:
parent
700490a4d1
commit
d7b8e4b622
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user