mirror of
https://github.com/steve-m/hsdaoh.git
synced 2025-12-10 07:44:41 +01:00
lib: remove incomplete big endian support
The number of big endian PPC machines with xHCI controller should be close to zero.
This commit is contained in:
parent
d0984dac17
commit
b0a39859c9
1 changed files with 4 additions and 7 deletions
|
|
@ -31,12 +31,9 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <endian.h>
|
|
||||||
#else
|
#else
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define usleep(t) Sleep((t)/1000)
|
#define usleep(t) Sleep((t)/1000)
|
||||||
#define le32toh(x) (x)
|
|
||||||
#define le16toh(x) (x)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
@ -695,7 +692,7 @@ void hsdaoh_process_frame(hsdaoh_dev_t *dev, uint8_t *data, int size)
|
||||||
metadata_t meta;
|
metadata_t meta;
|
||||||
hsdaoh_extract_metadata(data, &meta, dev->width);
|
hsdaoh_extract_metadata(data, &meta, dev->width);
|
||||||
|
|
||||||
if (le32toh(meta.magic) != 0xda7acab1) {
|
if (meta.magic != 0xda7acab1) {
|
||||||
if (dev->stream_synced)
|
if (dev->stream_synced)
|
||||||
fprintf(stderr, "Lost sync to HDMI input stream\n");
|
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);
|
uint8_t *line_dat = data + (dev->width * sizeof(uint16_t) * i);
|
||||||
|
|
||||||
/* extract number of payload words from reserved field at end of line */
|
/* 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 payload_len = ((uint16_t *)line_dat)[dev->width - 1];
|
||||||
uint16_t crc = le16toh(((uint16_t *)line_dat)[dev->width - 2]);
|
uint16_t crc = ((uint16_t *)line_dat)[dev->width - 2];
|
||||||
uint16_t stream_id = le16toh(((uint16_t *)line_dat)[dev->width - 3]);
|
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;
|
uint16_t format = (meta.flags & FLAG_FORMAT_ID_PRESENT) ? stream_id >> 6 : RAW_8BIT;
|
||||||
|
|
||||||
if (meta.flags & FLAG_STREAM_ID_PRESENT)
|
if (meta.flags & FLAG_STREAM_ID_PRESENT)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue