changeset 7254:e100cf54e11e libavcodec

Bitstream: use AV_RB16() in LIBMPEG2_BITSTREAM_READER This makes LIBMPEG2_BITSTREAM_READER_HACK redundant, so remove it.
author mru
date Sun, 13 Jul 2008 00:07:43 +0000
parents 2f5b98d0aa13
children 84dd52687931
files bitstream.h
diffstat 1 files changed, 1 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/bitstream.h	Sat Jul 12 20:12:18 2008 +0000
+++ b/bitstream.h	Sun Jul 13 00:07:43 2008 +0000
@@ -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 @@
         (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);\