mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 13:17:13 +00:00
bigendian fix by (Samuel Kleiner <kleiner at cd dot chalmers dot se>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9989 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
acf20201db
commit
9e938f2f34
@ -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