Hi, On Fri, Feb 17, 2012 at 12:54 PM, Ronald S. Bultje <[email protected]> wrote: > From: "Ronald S. Bultje" <[email protected]> > > --- > libavcodec/get_bits.h | 17 ++++++++++++++++- > 1 files changed, 16 insertions(+), 1 deletions(-) > > diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h > index 158e6d2..d542c37 100644 > --- a/libavcodec/get_bits.h > +++ b/libavcodec/get_bits.h > @@ -120,9 +120,24 @@ for examples see get_bits, show_bits, skip_bits, get_vlc > # define MIN_CACHE_BITS 25 > #endif > > +#if UNCHECKED_BITSTREAM_READER > #define OPEN_READER(name, gb) \ > unsigned int name##_index = (gb)->index; \ > unsigned int av_unused name##_cache = 0 > +#else > +#define OPEN_READER(name, gb) \ > + unsigned int name##_index = (gb)->index; \ > + unsigned int av_unused name##_cache = 0; \ > + unsigned int av_unused name##_size_plus8 = \ > + (gb)->size_in_bits_plus8 > +#endif > + > +#if UNCHECKED_BITSTREAM_READER > +#define HAVE_BITS_REMAINING(name, gb) 1 > +#else > +#define HAVE_BITS_REMAINING(name, gb) \ > + name##_index < name##_size_plus8 > +#endif > > #define CLOSE_READER(name, gb) (gb)->index = name##_index > > @@ -156,7 +171,7 @@ for examples see get_bits, show_bits, skip_bits, get_vlc > # define SKIP_COUNTER(name, gb, num) name##_index += (num) > #else > # define SKIP_COUNTER(name, gb, num) \ > - name##_index = FFMIN((gb)->size_in_bits_plus8, name##_index + (num)) > + name##_index = FFMIN(name##_size_plus8, name##_index + (num)) > #endif
Ping. Ronald _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
