From b0a39859c94741ca10458814d980abcae4364729 Mon Sep 17 00:00:00 2001 From: Steve Markgraf Date: Mon, 1 Sep 2025 21:38:00 +0200 Subject: [PATCH] lib: remove incomplete big endian support The number of big endian PPC machines with xHCI controller should be close to zero. --- src/libhsdaoh.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/libhsdaoh.c b/src/libhsdaoh.c index f81991b..0ae6aef 100644 --- a/src/libhsdaoh.c +++ b/src/libhsdaoh.c @@ -31,12 +31,9 @@ #include #ifndef _WIN32 #include -#include #else #include #define usleep(t) Sleep((t)/1000) -#define le32toh(x) (x) -#define le16toh(x) (x) #endif #include @@ -695,7 +692,7 @@ void hsdaoh_process_frame(hsdaoh_dev_t *dev, uint8_t *data, int size) metadata_t meta; hsdaoh_extract_metadata(data, &meta, dev->width); - if (le32toh(meta.magic) != 0xda7acab1) { + if (meta.magic != 0xda7acab1) { if (dev->stream_synced) fprintf(stderr, "Lost sync to HDMI input stream\n"); @@ -730,9 +727,9 @@ void hsdaoh_process_frame(hsdaoh_dev_t *dev, uint8_t *data, int size) uint8_t *line_dat = data + (dev->width * sizeof(uint16_t) * i); /* extract number of payload words from reserved field at end of line */ - uint16_t payload_len = le16toh(((uint16_t *)line_dat)[dev->width - 1]); - uint16_t crc = le16toh(((uint16_t *)line_dat)[dev->width - 2]); - uint16_t stream_id = le16toh(((uint16_t *)line_dat)[dev->width - 3]); + uint16_t payload_len = ((uint16_t *)line_dat)[dev->width - 1]; + uint16_t crc = ((uint16_t *)line_dat)[dev->width - 2]; + uint16_t stream_id = ((uint16_t *)line_dat)[dev->width - 3]; uint16_t format = (meta.flags & FLAG_FORMAT_ID_PRESENT) ? stream_id >> 6 : RAW_8BIT; if (meta.flags & FLAG_STREAM_ID_PRESENT)