summaryrefslogtreecommitdiffstats
path: root/libavcodec/mathops.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2010-06-22 19:15:27 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2010-06-22 19:15:27 +0000
commitb39a2d19d4d59d21ae1d0413e0e9ca0e08f2d1e9 (patch)
tree1568913688f02d0a89b51fc87188b62cda01dfb0 /libavcodec/mathops.h
parentcaaf098cec5fb1860de88f46cb6342b1c71b0994 (diff)
downloadffmpeg-streaming-b39a2d19d4d59d21ae1d0413e0e9ca0e08f2d1e9.zip
ffmpeg-streaming-b39a2d19d4d59d21ae1d0413e0e9ca0e08f2d1e9.tar.gz
Add a macro to pack 4 bytes into native byte-order so they can be written
at once using a single 32-bit store. Originally committed as revision 23715 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mathops.h')
-rw-r--r--libavcodec/mathops.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index df692fd..917112b 100644
--- a/libavcodec/mathops.h
+++ b/libavcodec/mathops.h
@@ -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 */
OpenPOWER on IntegriCloud