Commit 1bdbaf60 authored by bcoudurier's avatar bcoudurier

add R/WB24 functions

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8216 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f9c2f5c7
...@@ -52,6 +52,14 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed)); ...@@ -52,6 +52,14 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
((uint8_t*)(p))[1] = (d); \ ((uint8_t*)(p))[1] = (d); \
((uint8_t*)(p))[0] = (d)>>8; } ((uint8_t*)(p))[0] = (d)>>8; }
#define AV_RB24(x) ((((uint8_t*)(x))[0] << 16) | \
(((uint8_t*)(x))[1] << 8) | \
((uint8_t*)(x))[2])
#define AV_WB24(p, d) { \
((uint8_t*)(p))[2] = (d); \
((uint8_t*)(p))[1] = (d)>>8; \
((uint8_t*)(p))[0] = (d)>>16; }
#define AV_RB32(x) ((((uint8_t*)(x))[0] << 24) | \ #define AV_RB32(x) ((((uint8_t*)(x))[0] << 24) | \
(((uint8_t*)(x))[1] << 16) | \ (((uint8_t*)(x))[1] << 16) | \
(((uint8_t*)(x))[2] << 8) | \ (((uint8_t*)(x))[2] << 8) | \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment