[FFmpeg-devel] [PATCH] flush_put_bits_cache

Sascha Sommer saschasommer
Wed Sep 16 21:37:35 CEST 2009


Hi,

On Mittwoch, 16. September 2009, Michael Niedermayer wrote:
> On Wed, Sep 16, 2009 at 03:24:12PM +0200, Sascha Sommer wrote:
> > Hi,
> >
> > On Sonntag, 13. September 2009, Michael Niedermayer wrote:
> > > On Sat, Aug 29, 2009 at 01:36:45PM +0200, Sascha Sommer wrote:
> > > > Hi,
> > > >
> > > > attached patch adds an alternate way of flushing the put bits buffer.
> > > > The new function makes it possible to access a put bits buffer till
> > > > the last bit without loosing the possibility to still append some
> > > > more bits at the position of the last write.
> > >
> > > why do we need 2 such functions with slightly different semantics?
> >
> > We don't need both. The new function could be made the default for
> > flush_put_bits. The old behaviour could be emulated by calling
> > align_put_bits before flush_put_bits.
>
> is any code depending on the old behaviour?
>

I don't know the bitstream details for every muxer/parser/decoder that uses 
flush_put_bits, therefore the new function name. Shall I try to come up with 
a list of use cases where this is not obvious?

> > > why is it inline in a header? is it speed critical
> >
> > The only reason it is inline in the header is that the other function was
> > also declared like this.
>
> thats a weak reason
>

Well, I thought that there was a reason why the old version was declared this 
way. As the new version only works a bit differently and can be used as a 
replacement, I thought that the same reason must also be true for the new 
version. At least it would have been consistent then.

Regards

Sascha



More information about the ffmpeg-devel mailing list