diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-05-02 14:26:28 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-05-02 14:26:28 +0000 |
commit | da7f8893e3241ff5669be9df9b415a023a187d14 (patch) | |
tree | f5cf30502114e559a3594226925aab97f4307571 | |
parent | 0b43db144865b319edde441ba41bcf0ba6665d57 (diff) | |
download | ffmpeg-da7f8893e3241ff5669be9df9b415a023a187d14.tar.gz |
bigendian fix by (Romain Dolbeau <dolbeau at irisa dot fr>)
with #if defined(WORDS_BIGENDIAN) && (WORDS_BIGENDIAN == 1) -> #ifdef WORDS_BIGENDIAN by me
Originally committed as revision 12396 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
-rw-r--r-- | postproc/rgb2rgb_template.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c index d051215e75..81d274b225 100644 --- a/postproc/rgb2rgb_template.c +++ b/postproc/rgb2rgb_template.c @@ -1532,8 +1532,13 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u int i, *idst = (int32_t *) dst; const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc; for(i = 0; i < chromWidth; i++){ +#ifdef WORDS_BIGENDIAN + *idst++ = (yc[0] << 24)+ (uc[0] << 16) + + (yc[1] << 8) + (vc[0] << 0); +#else *idst++ = yc[0] + (uc[0] << 8) + (yc[1] << 16) + (vc[0] << 24); +#endif yc += 2; uc++; vc++; @@ -1634,8 +1639,13 @@ static inline void RENAME(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *u int i, *idst = (int32_t *) dst; const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc; for(i = 0; i < chromWidth; i++){ +#ifdef WORDS_BIGENDIAN + *idst++ = (uc[0] << 24)+ (yc[0] << 16) + + (vc[0] << 8) + (yc[1] << 0); +#else *idst++ = uc[0] + (yc[0] << 8) + (vc[0] << 16) + (yc[1] << 24); +#endif yc += 2; uc++; vc++; |