Hi,
On Mon, Dec 12, 2011 at 7:45 AM, Kostya Shishkov
<[email protected]>wrote:
> On Mon, Dec 12, 2011 at 07:35:44AM -0800, Ronald S. Bultje wrote:> ---
> a/configure
> > +++ b/configure
> > @@ -113,6 +113,7 @@ Configuration options:
> > --disable-dxva2 disable DXVA2 code
> > --enable-runtime-cpudetect detect cpu capabilities at runtime (bigger
> binary)
> > --enable-hardcoded-tables use hardcoded tables instead of runtime
> generation
> > + --disable-safe-bitstream-reader disable buffer boundary checking in
> bitreaders (faster, but may crash)
>
> --this-option-name-is-too-short-and-still-can-enabled-by-persistent-people
> (I'd prefer --disable-safe-bitreader)
>
Somewhat funny, that was the original name I gave the option but other
options in get_bits.h were called *_BITSTREAM_READER, so I decided to stay
with that theme. I'll change it back if you prefer.
> @@ -55,7 +72,7 @@ typedef struct GetBitContext {
> > #ifdef ALT_BITSTREAM_READER
> > int index;
> > #elif defined A32_BITSTREAM_READER
> > - uint32_t *buffer_ptr;
> > + const uint32_t *buffer_ptr;
>
> making buffer const is a separate thing IMO
>
Well, yes and no. I agree I can do it before (which I will), but I can't do
it after since the compiler barfs because we're comparing incompatible
types (const uint32_t * to uint32_t *).
> static inline void skip_bits_long(GetBitContext *s, int n){
> > OPEN_READER(re, s);
> > re_bit_count += n;
> > +#if UNCHECKED_BITSTREAM_READER
> > re_buffer_ptr += re_bit_count>>5;
> > +#else
> > + re_buffer_ptr = FFMIN(re_buffer_ptr + (re_bit_count >> 5),
> > + (const uint32_t *) s->buffer_end);
>
> probably it's fine but I still have an uneasy feeling about pointers in
> FFMIN()
>
I thought it was cute. :-). It really works.
Ronald
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel