diff avcodec.h @ 1881:39ad6cd5d4a6 libavcodec

remove numerous definitions of BE_*/LE_* macros; convert FOURCC_TAG -> MKTAG/MKBETAG
author melanson
date Sun, 14 Mar 2004 04:04:08 +0000
parents 17a445838da3
children 85fe2f4633ec
line wrap: on
line diff
--- a/avcodec.h	Sat Mar 13 22:01:32 2004 +0000
+++ b/avcodec.h	Sun Mar 14 04:04:08 2004 +0000
@@ -2118,6 +2118,18 @@
 extern void av_log_set_level(int);
 extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
 
+/* endian macros */
+#define BE_16(x)  ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1])
+#define BE_32(x)  ((((uint8_t*)(x))[0] << 24) | \
+                   (((uint8_t*)(x))[1] << 16) | \
+                   (((uint8_t*)(x))[2] << 8) | \
+                    ((uint8_t*)(x))[3])
+#define LE_16(x)  ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
+#define LE_32(x)  ((((uint8_t*)(x))[3] << 24) | \
+                   (((uint8_t*)(x))[2] << 16) | \
+                   (((uint8_t*)(x))[1] << 8) | \
+                    ((uint8_t*)(x))[0])
+
 #ifdef __cplusplus
 }
 #endif