# HG changeset patch # User michaelni # Date 1026655510 0 # Node ID b2e54bf843b824107783bd052c869121e9ae21c5 # Parent b746a7d75ce6e434d9bec61324e788174abf11ee faster get_bit_cache diff -r b746a7d75ce6 -r b2e54bf843b8 svq1.c --- a/svq1.c Sat Jul 13 19:31:15 2002 +0000 +++ b/svq1.c Sun Jul 14 14:05:10 2002 +0000 @@ -27,15 +27,19 @@ #include #include -#define ALT_BITSTREAM_READER -#define ALIGNED_BITSTREAM #include "common.h" #include "avcodec.h" #include "dsputil.h" #include "mpegvideo.h" #include "bswap.h" #define bit_buffer_t GetBitContext -#define get_bit_cache(buf) (show_bits(buf,24)<<8) + +static inline unsigned int get_bit_cache(GetBitContext *s){ + OPEN_READER(re, s) + UPDATE_CACHE(re, s) + return GET_CACHE(re, s); +// CLOSE_READER(re, s) +} /* variable length (bit) code */ typedef struct vlc_code_s {