summaryrefslogtreecommitdiff
path: root/libavcodec/bytestream.h
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-12-01 14:01:50 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-12-01 14:01:50 +0000
commite68e5ab0cf0d50a9d6a1794e43f11b42263ec324 (patch)
tree39df008763eac399704bda6fa8bb3897c6696046 /libavcodec/bytestream.h
parentfb132953d40cc7fe31f5784f30f71c31ea458c16 (diff)
downloadffmpeg-e68e5ab0cf0d50a9d6a1794e43f11b42263ec324.tar.gz
add bytestream big endian 16/32 writing functions
Originally committed as revision 7200 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bytestream.h')
-rw-r--r--libavcodec/bytestream.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h
index c9d6130f1b..25c457fe4c 100644
--- a/libavcodec/bytestream.h
+++ b/libavcodec/bytestream.h
@@ -47,6 +47,20 @@ static always_inline unsigned int bytestream_get_buffer(uint8_t **b, uint8_t *ds
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;