Go to the source code of this file.
|
u16 | read_le16 (const void *p) |
| read a little-endian number from memory into native byte order. More...
|
|
u32 | read_le32 (const void *p) |
|
u64 | read_le64 (const void *p) |
| see read_le16 More...
|
|
u16 | read_be16 (const void *p) |
| see read_le16 More...
|
|
u32 | read_be32 (const void *p) |
|
u64 | read_be64 (const void *p) |
| see read_be16 More...
|
|
void | write_le16 (void *p, u16 x) |
| see read_be16 More...
|
|
void | write_le32 (void *p, u32 x) |
|
void | write_le64 (void *p, u64 x) |
| see write_le16 More...
|
|
void | write_be16 (void *p, u16 x) |
| see write_le16 More...
|
|
void | write_be32 (void *p, u32 x) |
|
void | write_be64 (void *p, u64 x) |
| see write_be16 More...
|
|
u64 | movzx_le64 (const u8 *p, size_t size) |
| see write_be16 More...
|
|
u64 | movzx_be64 (const u8 *p, size_t size) |
|
i64 | movsx_le64 (const u8 *p, size_t size) |
| sign-extend <size> (truncated to 8) bytes of little-endian data to i64, starting at address <p> (need not be aligned). More...
|
|
i64 | movsx_be64 (const u8 *p, size_t size) |
|
u16 | swap16 (const u16 x) |
|
u32 | swap32 (const u32 x) |
|
u64 | swap64 (const u64 x) |
|
◆ BIG_ENDIAN
#define BIG_ENDIAN 0x1234 |
◆ BYTE_ORDER
◆ FOURCC [1/2]
#define FOURCC |
( |
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d |
|
) |
| |
convert 4 characters to u32 (at compile time) for easy comparison.
output is in native byte order; e.g. FOURCC_LE can be used instead.
◆ FOURCC [2/2]
convert 4 characters to u32 (at compile time) for easy comparison.
output is in native byte order; e.g. FOURCC_LE can be used instead.
◆ FOURCC_BE
#define FOURCC_BE |
( |
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d |
|
) |
| |
Value:
uint8_t u8
Definition: types.h:37
uint32_t u32
Definition: types.h:39
big-endian version of FOURCC
◆ FOURCC_LE
#define FOURCC_LE |
( |
|
a, |
|
|
|
b, |
|
|
|
c, |
|
|
|
d |
|
) |
| |
Value:
little-endian version of FOURCC
◆ LITTLE_ENDIAN
#define LITTLE_ENDIAN 0x4321 |
◆ to_be16
◆ to_be32
◆ to_be64
◆ to_le16
#define to_le16 |
( |
|
x | ) |
swap16(x) |
◆ to_le32
#define to_le32 |
( |
|
x | ) |
swap32(x) |
◆ to_le64
#define to_le64 |
( |
|
x | ) |
swap64(x) |
◆ movsx_be64()
i64 movsx_be64 |
( |
const u8 * |
p, |
|
|
size_t |
size |
|
) |
| |
◆ movsx_le64()
i64 movsx_le64 |
( |
const u8 * |
p, |
|
|
size_t |
size |
|
) |
| |
sign-extend <size> (truncated to 8) bytes of little-endian data to i64, starting at address <p> (need not be aligned).
◆ movzx_be64()
u64 movzx_be64 |
( |
const u8 * |
p, |
|
|
size_t |
size |
|
) |
| |
◆ movzx_le64()
u64 movzx_le64 |
( |
const u8 * |
p, |
|
|
size_t |
size |
|
) |
| |
see write_be16
zero-extend <size> (truncated to 8) bytes of little-endian data to u64, starting at address <p> (need not be aligned).
◆ read_be16()
u16 read_be16 |
( |
const void * |
p | ) |
|
see read_le16
read a big-endian number from memory into native byte order.
◆ read_be32()
u32 read_be32 |
( |
const void * |
p | ) |
|
◆ read_be64()
u64 read_be64 |
( |
const void * |
p | ) |
|
◆ read_le16()
u16 read_le16 |
( |
const void * |
p | ) |
|
read a little-endian number from memory into native byte order.
◆ read_le32()
u32 read_le32 |
( |
const void * |
p | ) |
|
◆ read_le64()
u64 read_le64 |
( |
const void * |
p | ) |
|
◆ swap16()
◆ swap32()
◆ swap64()
◆ write_be16()
void write_be16 |
( |
void * |
p, |
|
|
u16 |
x |
|
) |
| |
see write_le16
write a big-endian number to memory in native byte order.
◆ write_be32()
void write_be32 |
( |
void * |
p, |
|
|
u32 |
x |
|
) |
| |
◆ write_be64()
void write_be64 |
( |
void * |
p, |
|
|
u64 |
x |
|
) |
| |
◆ write_le16()
void write_le16 |
( |
void * |
p, |
|
|
u16 |
x |
|
) |
| |
see read_be16
write a little-endian number to memory in native byte order.
◆ write_le32()
void write_le32 |
( |
void * |
p, |
|
|
u32 |
x |
|
) |
| |
◆ write_le64()
void write_le64 |
( |
void * |
p, |
|
|
u64 |
x |
|
) |
| |