mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-22 08:47:28 +01:00
Add wuffs_base__load_u24be etc functions
This commit is contained in:
1 parent
9afd91075d
commit
9f994948df
8 files changed
+340
-2
No files matched your search
@@ -1337,6 +1337,16 @@ static inline uint16_t wuffs_base__load_u16le(uint8_t* p) {
|
||||
return ((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 16) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 0);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24le(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u32be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) |
|
||||
((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0);
|
||||
@@ -1347,6 +1357,44 @@ static inline uint32_t wuffs_base__load_u32le(uint8_t* p) {
|
||||
((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 32) | ((uint64_t)(p[1]) << 24) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 8) |
|
||||
((uint64_t)(p[4]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 40) | ((uint64_t)(p[1]) << 32) |
|
||||
((uint64_t)(p[2]) << 24) | ((uint64_t)(p[3]) << 16) |
|
||||
((uint64_t)(p[4]) << 8) | ((uint64_t)(p[5]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 48) | ((uint64_t)(p[1]) << 40) |
|
||||
((uint64_t)(p[2]) << 32) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 16) | ((uint64_t)(p[5]) << 8) |
|
||||
((uint64_t)(p[6]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |
|
||||
((uint64_t)(p[6]) << 48);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u64be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 56) | ((uint64_t)(p[1]) << 48) |
|
||||
((uint64_t)(p[2]) << 40) | ((uint64_t)(p[3]) << 32) |
|
||||
|
||||
@@ -1336,6 +1336,16 @@ static inline uint16_t wuffs_base__load_u16le(uint8_t* p) {
|
||||
return ((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 16) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 0);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24le(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u32be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) |
|
||||
((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0);
|
||||
@@ -1346,6 +1356,44 @@ static inline uint32_t wuffs_base__load_u32le(uint8_t* p) {
|
||||
((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 32) | ((uint64_t)(p[1]) << 24) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 8) |
|
||||
((uint64_t)(p[4]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 40) | ((uint64_t)(p[1]) << 32) |
|
||||
((uint64_t)(p[2]) << 24) | ((uint64_t)(p[3]) << 16) |
|
||||
((uint64_t)(p[4]) << 8) | ((uint64_t)(p[5]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 48) | ((uint64_t)(p[1]) << 40) |
|
||||
((uint64_t)(p[2]) << 32) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 16) | ((uint64_t)(p[5]) << 8) |
|
||||
((uint64_t)(p[6]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |
|
||||
((uint64_t)(p[6]) << 48);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u64be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 56) | ((uint64_t)(p[1]) << 48) |
|
||||
((uint64_t)(p[2]) << 40) | ((uint64_t)(p[3]) << 32) |
|
||||
|
||||
@@ -1427,6 +1427,16 @@ static inline uint16_t wuffs_base__load_u16le(uint8_t* p) {
|
||||
return ((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 16) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 0);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24le(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u32be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) |
|
||||
((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0);
|
||||
@@ -1437,6 +1447,44 @@ static inline uint32_t wuffs_base__load_u32le(uint8_t* p) {
|
||||
((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 32) | ((uint64_t)(p[1]) << 24) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 8) |
|
||||
((uint64_t)(p[4]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 40) | ((uint64_t)(p[1]) << 32) |
|
||||
((uint64_t)(p[2]) << 24) | ((uint64_t)(p[3]) << 16) |
|
||||
((uint64_t)(p[4]) << 8) | ((uint64_t)(p[5]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 48) | ((uint64_t)(p[1]) << 40) |
|
||||
((uint64_t)(p[2]) << 32) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 16) | ((uint64_t)(p[5]) << 8) |
|
||||
((uint64_t)(p[6]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |
|
||||
((uint64_t)(p[6]) << 48);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u64be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 56) | ((uint64_t)(p[1]) << 48) |
|
||||
((uint64_t)(p[2]) << 40) | ((uint64_t)(p[3]) << 32) |
|
||||
|
||||
@@ -1480,6 +1480,16 @@ static inline uint16_t wuffs_base__load_u16le(uint8_t* p) {
|
||||
return ((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 16) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 0);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24le(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u32be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) |
|
||||
((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0);
|
||||
@@ -1490,6 +1500,44 @@ static inline uint32_t wuffs_base__load_u32le(uint8_t* p) {
|
||||
((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 32) | ((uint64_t)(p[1]) << 24) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 8) |
|
||||
((uint64_t)(p[4]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 40) | ((uint64_t)(p[1]) << 32) |
|
||||
((uint64_t)(p[2]) << 24) | ((uint64_t)(p[3]) << 16) |
|
||||
((uint64_t)(p[4]) << 8) | ((uint64_t)(p[5]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 48) | ((uint64_t)(p[1]) << 40) |
|
||||
((uint64_t)(p[2]) << 32) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 16) | ((uint64_t)(p[5]) << 8) |
|
||||
((uint64_t)(p[6]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |
|
||||
((uint64_t)(p[6]) << 48);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u64be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 56) | ((uint64_t)(p[1]) << 48) |
|
||||
((uint64_t)(p[2]) << 40) | ((uint64_t)(p[3]) << 32) |
|
||||
|
||||
@@ -1639,6 +1639,16 @@ static inline uint16_t wuffs_base__load_u16le(uint8_t* p) {
|
||||
return ((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 16) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 0);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24le(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u32be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) |
|
||||
((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0);
|
||||
@@ -1649,6 +1659,44 @@ static inline uint32_t wuffs_base__load_u32le(uint8_t* p) {
|
||||
((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 32) | ((uint64_t)(p[1]) << 24) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 8) |
|
||||
((uint64_t)(p[4]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 40) | ((uint64_t)(p[1]) << 32) |
|
||||
((uint64_t)(p[2]) << 24) | ((uint64_t)(p[3]) << 16) |
|
||||
((uint64_t)(p[4]) << 8) | ((uint64_t)(p[5]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 48) | ((uint64_t)(p[1]) << 40) |
|
||||
((uint64_t)(p[2]) << 32) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 16) | ((uint64_t)(p[5]) << 8) |
|
||||
((uint64_t)(p[6]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |
|
||||
((uint64_t)(p[6]) << 48);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u64be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 56) | ((uint64_t)(p[1]) << 48) |
|
||||
((uint64_t)(p[2]) << 40) | ((uint64_t)(p[3]) << 32) |
|
||||
|
||||
@@ -1639,6 +1639,16 @@ static inline uint16_t wuffs_base__load_u16le(uint8_t* p) {
|
||||
return ((uint16_t)(p[0]) << 0) | ((uint16_t)(p[1]) << 8);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 16) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 0);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u24le(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 0) | ((uint32_t)(p[1]) << 8) |
|
||||
((uint32_t)(p[2]) << 16);
|
||||
}
|
||||
|
||||
static inline uint32_t wuffs_base__load_u32be(uint8_t* p) {
|
||||
return ((uint32_t)(p[0]) << 24) | ((uint32_t)(p[1]) << 16) |
|
||||
((uint32_t)(p[2]) << 8) | ((uint32_t)(p[3]) << 0);
|
||||
@@ -1649,6 +1659,44 @@ static inline uint32_t wuffs_base__load_u32le(uint8_t* p) {
|
||||
((uint32_t)(p[2]) << 16) | ((uint32_t)(p[3]) << 24);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 32) | ((uint64_t)(p[1]) << 24) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 8) |
|
||||
((uint64_t)(p[4]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u40le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 40) | ((uint64_t)(p[1]) << 32) |
|
||||
((uint64_t)(p[2]) << 24) | ((uint64_t)(p[3]) << 16) |
|
||||
((uint64_t)(p[4]) << 8) | ((uint64_t)(p[5]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u48le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 48) | ((uint64_t)(p[1]) << 40) |
|
||||
((uint64_t)(p[2]) << 32) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 16) | ((uint64_t)(p[5]) << 8) |
|
||||
((uint64_t)(p[6]) << 0);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u56le(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 0) | ((uint64_t)(p[1]) << 8) |
|
||||
((uint64_t)(p[2]) << 16) | ((uint64_t)(p[3]) << 24) |
|
||||
((uint64_t)(p[4]) << 32) | ((uint64_t)(p[5]) << 40) |
|
||||
((uint64_t)(p[6]) << 48);
|
||||
}
|
||||
|
||||
static inline uint64_t wuffs_base__load_u64be(uint8_t* p) {
|
||||
return ((uint64_t)(p[0]) << 56) | ((uint64_t)(p[1]) << 48) |
|
||||
((uint64_t)(p[2]) << 40) | ((uint64_t)(p[3]) << 32) |
|
||||
|
||||
Reference in new issue
Block a user