Mercurial > mplayer.hg
comparison postproc/rgb2rgb_template.c @ 9988:a32fb6812221
bigendian fix by (Samuel Kleiner <kleiner at cd dot chalmers dot se>)
author | michael |
---|---|
date | Fri, 25 Apr 2003 17:22:11 +0000 |
parents | 988c2ffc5bc1 |
children | f33f908ae085 |
comparison
equal
deleted
inserted
replaced
9987:988c2ffc5bc1 | 9988:a32fb6812221 |
---|---|
1338 #else | 1338 #else |
1339 unsigned i; | 1339 unsigned i; |
1340 unsigned num_pixels = src_size >> 2; | 1340 unsigned num_pixels = src_size >> 2; |
1341 for(i=0; i<num_pixels; i++) | 1341 for(i=0; i<num_pixels; i++) |
1342 { | 1342 { |
1343 dst[4*i + 0] = src[4*i + 2]; | 1343 #ifdef WORDS_BIGENDIAN |
1344 dst[4*i + 1] = src[4*i + 1]; | 1344 dst[4*i + 1] = src[4*i + 3]; |
1345 dst[4*i + 2] = src[4*i + 0]; | 1345 dst[4*i + 2] = src[4*i + 2]; |
1346 dst[4*i + 3] = src[4*i + 1]; | |
1347 #else | |
1348 dst[4*i + 0] = src[4*i + 2]; | |
1349 dst[4*i + 1] = src[4*i + 1]; | |
1350 dst[4*i + 2] = src[4*i + 0]; | |
1351 #endif | |
1346 } | 1352 } |
1347 #endif | 1353 #endif |
1348 } | 1354 } |
1349 | 1355 |
1350 static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned int src_size) | 1356 static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, unsigned int src_size) |