[FFmpeg-devel] [PATCH] Improve documentation for flush_put_bits()
Sat Apr 11 13:14:37 CEST 2009
On date Saturday 2009-04-11 12:35:06 +0200, Reimar D?ffinger encoded:
> On Sat, Apr 11, 2009 at 12:15:32PM +0200, Stefano Sabatini wrote:
> > On date Saturday 2009-04-11 11:57:10 +0200, Diego Biurrun encoded:
> > > On Sat, Apr 11, 2009 at 10:47:17AM +0200, Stefano Sabatini wrote:
> > > > --- ffmpeg.orig/libavcodec/bitstream.h 2009-04-11 10:45:42.000000000 +0200
> > > > +++ ffmpeg/libavcodec/bitstream.h 2009-04-11 10:45:57.000000000 +0200
> > > > @@ -129,7 +129,7 @@
> > > >
> > > > /**
> > > > - * Pads the end of the output stream with zeros.
> > > > + * Pads with zeros up to the end of the bitstream.
> > > > */
> > > > static inline void flush_put_bits(PutBitContext *s)
> > >
> > > You are transforming English into Englian...
> > And here comes the help of some more English-savvy guy...
> > What do you suggest? Possible variants:
> > Pads up to the end of the bitstream with zeros.
> > Pads with zeros up to the bitstream end.
> Are any of these even correct? I think the point is that it writes any
> buffered bits into the associated memory. It probably should pad with
> zeros as necessary for that (i.e. if to flush it has to write more bits
> than what was stored in the context those will be zero).
You're absolutely right, but the original text also wasn't clear.
Please check it out the new patch.
BTW, I wonder if the use done in mjpegenc.c is correct, since we can't
assume the size of the internal buffer:
ptr = pbBufPtr(p);
put_bits(p, 16, 0); /* patched later */
FFmpeg = Foolish & Fierce Mortal Porno Ecumenical Gadget
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 497 bytes
Desc: not available
More information about the ffmpeg-devel