|
|
@ -126,7 +126,7 @@ for examples see get_bits, show_bits, skip_bits, get_vlc |
|
|
|
|
|
|
|
|
|
|
|
#define CLOSE_READER(name, gb) (gb)->index = name##_index |
|
|
|
#define CLOSE_READER(name, gb) (gb)->index = name##_index |
|
|
|
|
|
|
|
|
|
|
|
#ifdef ALT_BITSTREAM_READER_LE |
|
|
|
#ifdef BITSTREAM_READER_LE |
|
|
|
|
|
|
|
|
|
|
|
# ifdef LONG_BITSTREAM_READER |
|
|
|
# ifdef LONG_BITSTREAM_READER |
|
|
|
# define UPDATE_CACHE(name, gb) name##_cache = \ |
|
|
|
# define UPDATE_CACHE(name, gb) name##_cache = \ |
|
|
@ -166,7 +166,7 @@ for examples see get_bits, show_bits, skip_bits, get_vlc |
|
|
|
|
|
|
|
|
|
|
|
#define LAST_SKIP_BITS(name, gb, num) SKIP_COUNTER(name, gb, num) |
|
|
|
#define LAST_SKIP_BITS(name, gb, num) SKIP_COUNTER(name, gb, num) |
|
|
|
|
|
|
|
|
|
|
|
#ifdef ALT_BITSTREAM_READER_LE |
|
|
|
#ifdef BITSTREAM_READER_LE |
|
|
|
# define SHOW_UBITS(name, gb, num) zero_extend(name##_cache, num) |
|
|
|
# define SHOW_UBITS(name, gb, num) zero_extend(name##_cache, num) |
|
|
|
# define SHOW_SBITS(name, gb, num) sign_extend(name##_cache, num) |
|
|
|
# define SHOW_SBITS(name, gb, num) sign_extend(name##_cache, num) |
|
|
|
#else |
|
|
|
#else |
|
|
@ -256,7 +256,7 @@ static inline unsigned int get_bits1(GetBitContext *s) |
|
|
|
{ |
|
|
|
{ |
|
|
|
unsigned int index = s->index; |
|
|
|
unsigned int index = s->index; |
|
|
|
uint8_t result = s->buffer[index>>3]; |
|
|
|
uint8_t result = s->buffer[index>>3]; |
|
|
|
#ifdef ALT_BITSTREAM_READER_LE |
|
|
|
#ifdef BITSTREAM_READER_LE |
|
|
|
result >>= index & 7; |
|
|
|
result >>= index & 7; |
|
|
|
result &= 1; |
|
|
|
result &= 1; |
|
|
|
#else |
|
|
|
#else |
|
|
@ -290,7 +290,7 @@ static inline unsigned int get_bits_long(GetBitContext *s, int n) |
|
|
|
if (n <= MIN_CACHE_BITS) |
|
|
|
if (n <= MIN_CACHE_BITS) |
|
|
|
return get_bits(s, n); |
|
|
|
return get_bits(s, n); |
|
|
|
else { |
|
|
|
else { |
|
|
|
#ifdef ALT_BITSTREAM_READER_LE |
|
|
|
#ifdef BITSTREAM_READER_LE |
|
|
|
int ret = get_bits(s, 16); |
|
|
|
int ret = get_bits(s, 16); |
|
|
|
return ret | (get_bits(s, n-16) << 16); |
|
|
|
return ret | (get_bits(s, n-16) << 16); |
|
|
|
#else |
|
|
|
#else |
|
|
|