[FFmpeg-devel] [PATCH] Implement pixdesc.h:write_line()
Stefano Sabatini
stefano.sabatini-lala
Thu Apr 2 23:31:45 CEST 2009
On date Thursday 2009-04-02 23:03:04 +0200, Michael Niedermayer encoded:
> On Thu, Apr 02, 2009 at 10:53:25PM +0200, Stefano Sabatini wrote:
> > On date Thursday 2009-04-02 22:40:50 +0200, Michael Niedermayer encoded:
[...]
> > > [...]
> > > > + while (w--) {
> > > > + int val = *src++;
> > > > + put_bits(&pb, depth, val);
> > > > + if (step - depth)
> > >
> > > > + skip_put_bits(&pb, step - depth);
> > >
> > > i suspect this will randomize the bits
> >
> > That's why I added the if (step - depth) check (yes without that it
> > was broken).
> > Am I missing something?
> /**
> * Skips the given number of bits.
> * Must only be used if the actual values in the bitstream do not matter.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Well I read it as "the actual values in the bitstream do not matter,
that is the skipped bits are simply discarded".
Now I can't say if the various put_bits() optimized implementation
randomize the skipped bits or not.
So I cannot say if we have to simply update the documentation or we
have somehow to extend the API to support such a functionality (which
looks to me - preserving the skipped bits - such a basic requirement
that I'm puzzled discovering that it isn't supported).
Regards.
--
FFmpeg = Foolish and Freak Mythic Portentous Excellent Game
More information about the ffmpeg-devel
mailing list