提交 15862387 编写于 作者: A Alex Beregszaszi

add little endian 24bit read/write

Originally committed as revision 8269 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 cb50328d
......@@ -78,6 +78,14 @@ struct unaligned_16 { uint16_t l; } __attribute__((packed));
((uint8_t*)(p))[0] = (d); \
((uint8_t*)(p))[1] = (d)>>8; }
#define AV_RL24(x) ((((uint8_t*)(x))[2] << 16) | \
(((uint8_t*)(x))[1] << 8) | \
((uint8_t*)(x))[0])
#define AV_WL24(p, d) { \
((uint8_t*)(p))[0] = (d); \
((uint8_t*)(p))[1] = (d)>>8; \
((uint8_t*)(p))[2] = (d)>>16; }
#define AV_RL32(x) ((((uint8_t*)(x))[3] << 24) | \
(((uint8_t*)(x))[2] << 16) | \
(((uint8_t*)(x))[1] << 8) | \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册