get rid of AV_RB32().
authorAndre Noll <maan@systemlinux.org>
Sun, 18 Oct 2009 20:40:06 +0000 (22:40 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 18 Nov 2009 18:34:24 +0000 (19:34 +0100)
bitstream.h

index d13ef4c2bd6946deff17e9104432052b1319b25e..0c0a1eba609629ed488746906443bb9ed34fabbc 100644 (file)
@@ -9,11 +9,6 @@
 
 /** \file bitstream.h Bitstream structures and inline functions. */
 
-#define AV_RB32(x)  ((((const uint8_t*)(x))[0] << 24) | \
-                     (((const uint8_t*)(x))[1] << 16) | \
-                     (((const uint8_t*)(x))[2] <<  8) | \
-                      ((const uint8_t*)(x))[3])
-
 /** Structure for bistream I/O. */
 struct getbit_context {
        /* Start of the internal buffer. */
@@ -35,8 +30,9 @@ struct vlc {
 static inline uint32_t show_bits(struct getbit_context *gbc, int num)
 {
        int idx = gbc->index;
-       uint32_t x = AV_RB32(gbc->buffer + (idx >> 3)) << (idx & 7);
-       return x >> (32 - num);
+       const uint8_t *p = gbc->buffer + (idx >> 3);
+       uint32_t x = ((p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]);
+       return (x << (idx & 7)) >> (32 - num);
 }
 
 static inline int get_bits_count(struct getbit_context *gbc)