Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

get_bits: add simple AV_WB16

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information...
commit 087687bf629f76a0d700a466178d4db122bfaf90 1 parent 8435491
@felipec authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 get_bits.h
View
7 get_bits.h
@@ -95,6 +95,13 @@ static inline uint32_t av_read32_be(const uint8_t *p)
((const uint8_t *)(x))[3])
#endif
+#ifndef AV_WB16
+#define AV_WB16(p, d) do { \
+ ((uint8_t *)(p))[1] = (d); \
+ ((uint8_t *)(p))[0] = (d) >> 8; \
+} while(0)
+#endif
+
static inline unsigned get_bits(struct get_bit_context *s, int n)
{
unsigned index = s->index;
Please sign in to comment.
Something went wrong with that request. Please try again.