Skip to content

Commit

Permalink
get_bits: add simple AV_WB16
Browse files Browse the repository at this point in the history
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information
felipec committed Apr 28, 2012
1 parent 8435491 commit 087687b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions get_bits.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 087687b

Please sign in to comment.