[FFmpeg-devel] [PATCH] Improve documentation for flush_put_bits()
Sat Apr 11 13:33:34 CEST 2009
On Sat, Apr 11, 2009 at 01:14:37PM +0200, Stefano Sabatini wrote:
> 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
> Index: ffmpeg/libavcodec/bitstream.h
> --- ffmpeg.orig/libavcodec/bitstream.h 2009-04-11 11:14:07.000000000 +0200
> +++ ffmpeg/libavcodec/bitstream.h 2009-04-11 13:08:10.000000000 +0200
> @@ -129,7 +129,8 @@
> - * Pads the end of the output stream with zeros.
> + * Flushes the content of the bitstream writer internal buffer, padded
> + * with zeros, to the bitstream.
if its proper english then ok
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel