mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-09-09 21:12:22 +08:00
Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN
Originally committed as revision 19508 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -80,7 +80,7 @@ static inline uint64_t av_const bswap_64(uint64_t x)
|
||||
// be2me ... big-endian to machine-endian
|
||||
// le2me ... little-endian to machine-endian
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#if HAVE_BIGENDIAN
|
||||
#define be2me_16(x) (x)
|
||||
#define be2me_32(x) (x)
|
||||
#define be2me_64(x) (x)
|
||||
|
@ -155,7 +155,7 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
|
||||
((uint8_t*)(p))[7] = (d)>>56; } while(0)
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#if HAVE_BIGENDIAN
|
||||
# define AV_RN(s, p) AV_RB##s(p)
|
||||
# define AV_WN(s, p, v) AV_WB##s(p, v)
|
||||
#else
|
||||
@ -189,7 +189,7 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
|
||||
# define AV_WN64(p, v) AV_WN(64, p, v)
|
||||
#endif
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#if HAVE_BIGENDIAN
|
||||
# define AV_RB(s, p) AV_RN(s, p)
|
||||
# define AV_WB(s, p, v) AV_WN(s, p, v)
|
||||
# define AV_RL(s, p) bswap_##s(AV_RN(s, p))
|
||||
|
@ -93,7 +93,7 @@ static void body(uint32_t ABCD[4], uint32_t X[16]){
|
||||
unsigned int c= ABCD[1];
|
||||
unsigned int d= ABCD[0];
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#if HAVE_BIGENDIAN
|
||||
for(i=0; i<16; i++)
|
||||
X[i]= bswap_32(X[i]);
|
||||
#endif
|
||||
|
@ -126,7 +126,7 @@ enum PixelFormat {
|
||||
PIX_FMT_NB, ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
|
||||
};
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#if HAVE_BIGENDIAN
|
||||
# define PIX_FMT_NE(be, le) PIX_FMT_##be
|
||||
#else
|
||||
# define PIX_FMT_NE(be, le) PIX_FMT_##le
|
||||
|
Reference in New Issue
Block a user