[FFmpeg-cvslog] r14275 - trunk/libavutil/intreadwrite.h

mru subversion
Fri Jul 18 03:19:00 CEST 2008


Author: mru
Date: Fri Jul 18 03:18:59 2008
New Revision: 14275

Log:
intreadwrite: support DEC compiler __unaligned type qualifier

Modified:
   trunk/libavutil/intreadwrite.h

Modified: trunk/libavutil/intreadwrite.h
==============================================================================
--- trunk/libavutil/intreadwrite.h	(original)
+++ trunk/libavutil/intreadwrite.h	Fri Jul 18 03:18:59 2008
@@ -37,7 +37,17 @@ struct unaligned_16 { uint16_t l; } __at
 #define AV_WN32(a, b) (((struct unaligned_32 *) (a))->l) = (b)
 #define AV_WN64(a, b) (((struct unaligned_64 *) (a))->l) = (b)
 
-#else /* __GNUC__ */
+#elif defined(__DECC)
+
+#define AV_RN16(a) (*((const __unaligned uint16_t*)(a)))
+#define AV_RN32(a) (*((const __unaligned uint32_t*)(a)))
+#define AV_RN64(a) (*((const __unaligned uint64_t*)(a)))
+
+#define AV_WN16(a, b) *((__unaligned uint16_t*)(a)) = (b)
+#define AV_WN32(a, b) *((__unaligned uint32_t*)(a)) = (b)
+#define AV_WN64(a, b) *((__unaligned uint64_t*)(a)) = (b)
+
+#else
 
 #define AV_RN16(a) (*((const uint16_t*)(a)))
 #define AV_RN32(a) (*((const uint32_t*)(a)))




More information about the ffmpeg-cvslog mailing list