changeset 4251:b0d38ef4b547 libavcodec

add bytestream big endian 16/32 writing functions
author bcoudurier
date Fri, 01 Dec 2006 14:01:50 +0000
parents 507ba4483ffc
children daaebca81d86
files bytestream.h
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bytestream.h	Fri Dec 01 09:58:06 2006 +0000
+++ b/bytestream.h	Fri Dec 01 14:01:50 2006 +0000
@@ -47,6 +47,20 @@
     return size;
 }
 
+static always_inline void bytestream_put_be32(uint8_t **b, const unsigned int value)
+{
+    *(*b)++ = value >> 24;
+    *(*b)++ = value >> 16;
+    *(*b)++ = value >> 8;
+    *(*b)++ = value;
+};
+
+static always_inline void bytestream_put_be16(uint8_t **b, const unsigned int value)
+{
+    *(*b)++ = value >> 8;
+    *(*b)++ = value;
+}
+
 static always_inline void bytestream_put_le32(uint8_t **b, const unsigned int value)
 {
     *(*b)++ = value;