[Ffmpeg-devel] Reading blockless bitstream

Reimar Döffinger Reimar.Doeffinger
Sun Mar 25 23:09:18 CEST 2007


Hello,
On Sun, Mar 25, 2007 at 09:56:51PM +0100, M?ns Rullg?rd wrote:
> M?ns Rullg?rd <mans at mansr.com> writes:
> > Is there some trick that can be used to read an arbitrarily long
> > bitstream with no division into blocks when it is supplied as a
> > sequence of buffers?  Copying and merging all buffers is not an option
> > as the length is unbounded.  What I'm looking for is some way to
> > seamlessly shift a GetBitsContext from one buffer to another.  If
> > anyone has done something like that, I'd appreciate if you'd share any
> > hints.
> 
> Please, can someone at least say it's impossible?

Well, it certainly isn't impossible but it needs some meddling with
GetBitContext internals. And finding the right moment to do this
meddling. How easy and ugly that gets I guess depends on how exactly you
need this done (e.g. if the buffer size is always a multiple of 4).
Might also make more sense to just use multiple GetBitContext and
instead implement a read function that automatically switches between
these...

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list