[XviD-devel] Bitstream header information

Michael Militzer xvid-devel@xvid.org
Sat, 17 Aug 2002 18:09:21 +0200


Hi,

----- Original Message -----
From: "Christoph Lampert" <chl@math.uni-bonn.de>
To: <xvid-devel@xvid.org>
Sent: Saturday, August 17, 2002 3:55 PM
Subject: Re: [XviD-devel] Bitstream header information


> On Sat, 17 Aug 2002, Michael Militzer wrote:
>
> > > I don't remember if this done, maybe you know:
> > >
> > > There was a plan to add a function that reads the header
> > > information (in particular image dimensions) from a raw
> > > MPEG-4 stream so the application doesn't have to know
> > > dimensions when called.
> > >
> > > Is this done? If not we should simply add it. It would come
> > > handy for the new B-frames testing examples I'm writing
> > > at the moment.
> >
> > something like that is available (at least image dimensions etc)...
>
> Would you tell me how?  ;-)

you need to call BitstreamReadHeaders with dec->width and dec->height set to
0. Then dec->width and dec->height are filled with the resolution
information found in the bitstream.

However after having reread your post (and rereading is sometimes helpful)
this functionality is not sufficient to allow an application to use XviD
without specifying resolution information. The problem is that the memory
initializing is done _before_ BitstreamReadHeaders is called...

you're right, we should implement proper support for this asap

bye
Michael