[Ffmpeg-cvslog] r8269 - trunk/libavutil/intreadwrite.h
alex
subversion
Tue Mar 6 14:04:47 CET 2007
Author: alex
Date: Tue Mar 6 14:04:47 2007
New Revision: 8269
Modified:
trunk/libavutil/intreadwrite.h
Log:
add little endian 24bit read/write
Modified: trunk/libavutil/intreadwrite.h
==============================================================================
--- trunk/libavutil/intreadwrite.h (original)
+++ trunk/libavutil/intreadwrite.h Tue Mar 6 14:04:47 2007
@@ -78,6 +78,14 @@ struct unaligned_16 { uint16_t l; } __at
((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) | \
More information about the ffmpeg-cvslog
mailing list