Mercurial > mplayer.hg
changeset 29397:2d985cc879c9
Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN
author | mru |
---|---|
date | Sun, 26 Jul 2009 12:26:32 +0000 |
parents | 2de35e358503 |
children | 039160a7054b |
files | libswscale/rgb2rgb.c libswscale/rgb2rgb_template.c libswscale/swscale.c libswscale/swscale_internal.h |
diffstat | 4 files changed, 15 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/libswscale/rgb2rgb.c Fri Jul 24 10:35:22 2009 +0000 +++ b/libswscale/rgb2rgb.c Sun Jul 26 12:26:32 2009 +0000 @@ -275,7 +275,7 @@ long num_pixels = src_size >> 2; for (i=0; i<num_pixels; i++) { - #ifdef WORDS_BIGENDIAN + #if HAVE_BIGENDIAN /* RGB32 (= A,B,G,R) -> BGR24 (= B,G,R) */ dst[3*i + 0] = src[4*i + 1]; dst[3*i + 1] = src[4*i + 2]; @@ -293,7 +293,7 @@ long i; for (i=0; 3*i<src_size; i++) { - #ifdef WORDS_BIGENDIAN + #if HAVE_BIGENDIAN /* RGB24 (= R,G,B) -> BGR32 (= A,R,G,B) */ dst[4*i + 0] = 255; dst[4*i + 1] = src[3*i + 0]; @@ -318,7 +318,7 @@ { register uint16_t bgr; bgr = *s++; - #ifdef WORDS_BIGENDIAN + #if HAVE_BIGENDIAN *d++ = 255; *d++ = (bgr&0x1F)<<3; *d++ = (bgr&0x7E0)>>3; @@ -382,7 +382,7 @@ { register uint16_t bgr; bgr = *s++; - #ifdef WORDS_BIGENDIAN + #if HAVE_BIGENDIAN *d++ = 255; *d++ = (bgr&0x1F)<<3; *d++ = (bgr&0x3E0)>>2;
--- a/libswscale/rgb2rgb_template.c Fri Jul 24 10:35:22 2009 +0000 +++ b/libswscale/rgb2rgb_template.c Sun Jul 26 12:26:32 2009 +0000 @@ -115,7 +115,7 @@ #endif while (s < end) { - #ifdef WORDS_BIGENDIAN + #if HAVE_BIGENDIAN /* RGB24 (= R,G,B) -> RGB32 (= A,B,G,R) */ *dest++ = 255; *dest++ = s[2]; @@ -201,7 +201,7 @@ #endif while (s < end) { -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN /* RGB32 (= A,B,G,R) -> RGB24 (= R,G,B) */ s++; dest[2] = *s++; @@ -1264,7 +1264,7 @@ #else register uint16_t bgr; bgr = *s++; -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN *d++ = 255; *d++ = (bgr&0x7C00)>>7; *d++ = (bgr&0x3E0)>>2; @@ -1321,7 +1321,7 @@ { register uint16_t bgr; bgr = *s++; -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN *d++ = 255; *d++ = (bgr&0xF800)>>8; *d++ = (bgr&0x7E0)>>3; @@ -1581,7 +1581,7 @@ int i, *idst = (int32_t *) dst; const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc; for (i = 0; i < chromWidth; i++){ -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN *idst++ = (yc[0] << 24)+ (uc[0] << 16) + (yc[1] << 8) + (vc[0] << 0); #else @@ -1687,7 +1687,7 @@ int i, *idst = (int32_t *) dst; const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc; for (i = 0; i < chromWidth; i++){ -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN *idst++ = (uc[0] << 24)+ (yc[0] << 16) + (vc[0] << 8) + (yc[1] << 0); #else
--- a/libswscale/swscale.c Fri Jul 24 10:35:22 2009 +0000 +++ b/libswscale/swscale.c Sun Jul 26 12:26:32 2009 +0000 @@ -89,7 +89,6 @@ //#define HAVE_AMD3DNOW //#undef HAVE_MMX //#undef ARCH_X86 -//#define WORDS_BIGENDIAN #define DITHER1XBPP #define FAST_BGR2YV12 // use 7 bit coefficients instead of 15 bit @@ -3161,25 +3160,25 @@ switch(c->dstFormat) { case PIX_FMT_BGR32: -#ifndef WORDS_BIGENDIAN +#if !HAVE_BIGENDIAN case PIX_FMT_RGB24: #endif c->pal_rgb[i]= r + (g<<8) + (b<<16); break; case PIX_FMT_BGR32_1: -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN case PIX_FMT_BGR24: #endif c->pal_rgb[i]= (r + (g<<8) + (b<<16)) << 8; break; case PIX_FMT_RGB32_1: -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN case PIX_FMT_RGB24: #endif c->pal_rgb[i]= (b + (g<<8) + (r<<16)) << 8; break; case PIX_FMT_RGB32: -#ifndef WORDS_BIGENDIAN +#if !HAVE_BIGENDIAN case PIX_FMT_BGR24: #endif default: