mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-04-05 06:04:50 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user