get rid of WORDS_BIGENDIAN

WORDS_BIGENDIAN is defiend by config.h

Use __BYTE_ORDER__  defined by GNU compilers (POSIX 2024 further defines
endian.h header but not yet in macOS /15/),
This commit is contained in:
Martin Pulec
2024-09-26 10:51:32 +02:00
parent 01e4d1b432
commit 707e4af458
6 changed files with 5 additions and 17 deletions

View File

@@ -50,7 +50,7 @@
#include "aja_common.hpp" // include after color_out to override its stuff for MSVC
#ifndef BYTE_SWAP
#ifdef WORDS_BIGENDIAN
#if !defined _MSC_VER && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define BYTE_SWAP(x) (3 - x)
#else
#define BYTE_SWAP(x) x

View File

@@ -71,7 +71,7 @@
#define MOD_NAME "[from_lavc_vid_conv] "
#ifdef WORDS_BIGENDIAN
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define BYTE_SWAP(x) (3 - x)
#else
#define BYTE_SWAP(x) x

View File

@@ -66,7 +66,7 @@
#define MOD_NAME "[to_lavc_vid_conv] "
#ifdef WORDS_BIGENDIAN
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define BYTE_SWAP(x) (3 - x)
#else
#define BYTE_SWAP(x) x
@@ -1152,12 +1152,6 @@ static void r10k_to_gbrp16le(AVFrame * __restrict out_frame, const unsigned char
r10k_to_gbrpXXle(out_frame, in_data, width, height, 16U);
}
#ifdef WORDS_BIGENDIAN
#define BYTE_SWAP(x) (3 - x)
#else
#define BYTE_SWAP(x) x
#endif
/// @note out_depth needs to be at least 12
#if defined __GNUC__
static inline void r12l_to_gbrpXXle(AVFrame * __restrict out_frame, const unsigned char * __restrict in_data, int width, int height, unsigned int out_depth)

View File

@@ -143,7 +143,7 @@ static void rtp_process_data(struct rtp *session, uint32_t curr_rtp_ts,
#define RTCP_RX 205
typedef struct {
#ifdef WORDS_BIGENDIAN
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
unsigned short version:2; /* packet type */
unsigned short p:1; /* padding flag */
unsigned short count:5; /* varies by payload type */

View File

@@ -108,7 +108,7 @@
* Therefore, this is stored as a big endian even on little-endian architectures - first byte
* of FourCC is in the memory on the lowest address.
*/
#ifdef WORDS_BIGENDIAN
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define to_fourcc(a,b,c,d) (((uint32_t)(d)) | ((uint32_t)(c)<<8U) | ((uint32_t)(b)<<16U) | ((uint32_t)(a)<<24U))
#else
#define to_fourcc(a,b,c,d) (((uint32_t)(a)) | ((uint32_t)(b)<<8U) | ((uint32_t)(c)<<16U) | ((uint32_t)(d)<<24U))

View File

@@ -79,12 +79,6 @@
char pixfmt_conv_pref[] = "dsc"; ///< bitdepth, subsampling, color space
#ifdef WORDS_BIGENDIAN
#define BYTE_SWAP(x) (3 - x)
#else
#define BYTE_SWAP(x) x
#endif
#ifdef __SSE2__
static void vc_deinterlace_aligned(unsigned char *src, long src_linesize, int lines);
static void vc_deinterlace_unaligned(unsigned char *src, long src_linesize, int lines);