# HG changeset patch # User mru # Date 1248611192 0 # Node ID 2d985cc879c97677267b0df8a1444b95cb32a666 # Parent 2de35e3585035c350229f0380c5c8ddf225aa698 Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN diff -r 2de35e358503 -r 2d985cc879c9 libswscale/rgb2rgb.c --- 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 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 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; diff -r 2de35e358503 -r 2d985cc879c9 libswscale/rgb2rgb_template.c --- 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 diff -r 2de35e358503 -r 2d985cc879c9 libswscale/swscale.c --- 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: diff -r 2de35e358503 -r 2d985cc879c9 libswscale/swscale_internal.h --- a/libswscale/swscale_internal.h Fri Jul 24 10:35:22 2009 +0000 +++ b/libswscale/swscale_internal.h Sun Jul 26 12:26:32 2009 +0000 @@ -41,7 +41,7 @@ #define VOF (VOFW*2) -#ifdef WORDS_BIGENDIAN +#if HAVE_BIGENDIAN #define ALT32_CORR (-1) #else #define ALT32_CORR 1