[FFmpeg-cvslog] r23715 - trunk/libavcodec/mathops.h

rbultje subversion
Tue Jun 22 21:15:27 CEST 2010


Author: rbultje
Date: Tue Jun 22 21:15:27 2010
New Revision: 23715

Log:
Add a macro to pack 4 bytes into native byte-order so they can be written
at once using a single 32-bit store.

Modified:
   trunk/libavcodec/mathops.h

Modified: trunk/libavcodec/mathops.h
==============================================================================
--- trunk/libavcodec/mathops.h	Tue Jun 22 21:12:54 2010	(r23714)
+++ trunk/libavcodec/mathops.h	Tue Jun 22 21:15:27 2010	(r23715)
@@ -146,5 +146,13 @@ if ((y) < (x)) {\
 #   define NEG_USR32(a,s) (((uint32_t)(a))>>(32-(s)))
 #endif
 
+#ifndef PACK4x8
+# if HAVE_BIGENDIAN
+#  define PACK4x8(a,b,c,d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
+# else
+#  define PACK4x8(a,b,c,d) (((d) << 24) | ((c) << 16) | ((b) << 8) | (a))
+# endif
+#endif
+
 #endif /* AVCODEC_MATHOPS_H */
 



More information about the ffmpeg-cvslog mailing list