Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

get_bits: add simple AV_WB16

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information...
commit 087687bf629f76a0d700a466178d4db122bfaf90 1 parent 8435491
Felipe Contreras authored April 28, 2012

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  get_bits.h
7  get_bits.h
@@ -95,6 +95,13 @@ static inline uint32_t av_read32_be(const uint8_t *p)
95 95
 	 ((const uint8_t *)(x))[3])
96 96
 #endif
97 97
 
  98
+#ifndef AV_WB16
  99
+#define AV_WB16(p, d) do { \
  100
+	((uint8_t *)(p))[1] = (d); \
  101
+	((uint8_t *)(p))[0] = (d) >> 8; \
  102
+} while(0)
  103
+#endif
  104
+
98 105
 static inline unsigned get_bits(struct get_bit_context *s, int n)
99 106
 {
100 107
 	unsigned index = s->index;

0 notes on commit 087687b

Please sign in to comment.
Something went wrong with that request. Please try again.