comparison bytestream.h @ 4251:b0d38ef4b547 libavcodec

add bytestream big endian 16/32 writing functions
author bcoudurier
date Fri, 01 Dec 2006 14:01:50 +0000
parents f6f67a8bdd09
children d6f83e2f8804
comparison
equal deleted inserted replaced
4250:507ba4483ffc 4251:b0d38ef4b547
45 memcpy(dst, *b, size); 45 memcpy(dst, *b, size);
46 (*b) += size; 46 (*b) += size;
47 return size; 47 return size;
48 } 48 }
49 49
50 static always_inline void bytestream_put_be32(uint8_t **b, const unsigned int value)
51 {
52 *(*b)++ = value >> 24;
53 *(*b)++ = value >> 16;
54 *(*b)++ = value >> 8;
55 *(*b)++ = value;
56 };
57
58 static always_inline void bytestream_put_be16(uint8_t **b, const unsigned int value)
59 {
60 *(*b)++ = value >> 8;
61 *(*b)++ = value;
62 }
63
50 static always_inline void bytestream_put_le32(uint8_t **b, const unsigned int value) 64 static always_inline void bytestream_put_le32(uint8_t **b, const unsigned int value)
51 { 65 {
52 *(*b)++ = value; 66 *(*b)++ = value;
53 *(*b)++ = value >> 8; 67 *(*b)++ = value >> 8;
54 *(*b)++ = value >> 16; 68 *(*b)++ = value >> 16;