mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
configure.ac: add AC_C_BIGENDIAN
this defines WORDS_BIGENDIAN, replacing uses of __BIG_ENDIAN__/__BYTE_ORDER__ with it + fixes lossless BGRA output with big-endian toolchains that do not define __BIG_ENDIAN__ (codesourcery mips gcc) Change-Id: Ieaccd623292d235343b5e34b7a720fc251c432d7
This commit is contained in:
@ -1360,7 +1360,7 @@ static void CopyOrSwap(const uint32_t* src, int num_pixels, uint8_t* dst,
|
||||
while (src < src_end) {
|
||||
const uint32_t argb = *src++;
|
||||
|
||||
#if !defined(__BIG_ENDIAN__)
|
||||
#if !defined(WORDS_BIGENDIAN)
|
||||
#if !defined(WEBP_REFERENCE_IMPLEMENTATION)
|
||||
*(uint32_t*)dst = BSwap32(argb);
|
||||
#else // WEBP_REFERENCE_IMPLEMENTATION
|
||||
@ -1369,7 +1369,7 @@ static void CopyOrSwap(const uint32_t* src, int num_pixels, uint8_t* dst,
|
||||
dst[2] = (argb >> 8) & 0xff;
|
||||
dst[3] = (argb >> 0) & 0xff;
|
||||
#endif
|
||||
#else // __BIG_ENDIAN__
|
||||
#else // WORDS_BIGENDIAN
|
||||
dst[0] = (argb >> 0) & 0xff;
|
||||
dst[1] = (argb >> 8) & 0xff;
|
||||
dst[2] = (argb >> 16) & 0xff;
|
||||
|
Reference in New Issue
Block a user