summaryrefslogtreecommitdiff
path: root/libavcodec/bitstream.h
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2008-07-13 00:07:43 +0000
committerMåns Rullgård <mans@mansr.com>2008-07-13 00:07:43 +0000
commit71c465a151d812c6b57168c11459502e3d6d5773 (patch)
treeb60e17f3cc0358332247dadb858110e0093339e7 /libavcodec/bitstream.h
parentc1c9046656e976601284bce2f5630c5b958fdb68 (diff)
downloadffmpeg-71c465a151d812c6b57168c11459502e3d6d5773.tar.gz
Bitstream: use AV_RB16() in LIBMPEG2_BITSTREAM_READER
This makes LIBMPEG2_BITSTREAM_READER_HACK redundant, so remove it. Originally committed as revision 14197 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bitstream.h')
-rw-r--r--libavcodec/bitstream.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h
index 737c58c5a3..b0e4ce9984 100644
--- a/libavcodec/bitstream.h
+++ b/libavcodec/bitstream.h
@@ -49,7 +49,6 @@
//#define A32_BITSTREAM_READER
# endif
#endif
-#define LIBMPEG2_BITSTREAM_READER_HACK //add BERO
extern const uint8_t ff_reverse[256];
@@ -484,26 +483,13 @@ static inline void skip_bits_long(GetBitContext *s, int n){
(gb)->cache= name##_cache;\
(gb)->buffer_ptr= name##_buffer_ptr;\
-#ifdef LIBMPEG2_BITSTREAM_READER_HACK
-
-# define UPDATE_CACHE(name, gb)\
- if(name##_bit_count >= 0){\
- name##_cache+= (int)be2me_16(*(uint16_t*)name##_buffer_ptr) << name##_bit_count;\
- name##_buffer_ptr += 2;\
- name##_bit_count-= 16;\
- }\
-
-#else
-
# define UPDATE_CACHE(name, gb)\
if(name##_bit_count >= 0){\
- name##_cache+= ((name##_buffer_ptr[0]<<8) + name##_buffer_ptr[1]) << name##_bit_count;\
+ name##_cache+= AV_RB16(name##_buffer_ptr) << name##_bit_count; \
name##_buffer_ptr+=2;\
name##_bit_count-= 16;\
}\
-#endif
-
# define SKIP_CACHE(name, gb, num)\
name##_cache <<= (num);\