[XviD-devel] Transcode module
Christoph Lampert
xvid-devel@xvid.org
Wed, 2 Oct 2002 10:15:13 +0200 (CEST)
On Wed, 2 Oct 2002, peter ross wrote:
> >P.S. Would it be possible to write a import_xvidraw.c module that
> >reads finished output from export_xvidraw.c module and put that
> >e.g. into an AVI file?
>
> iam no transcode wiz, but, the problem with raw files is:
>
> a) the width/height dimensions must be either specified on the cmd
> line, or you need to modifiy xvid to auto detect width/height.
Not a big problem. Transcode (and I guess all other encoding application)
have parameters for width/height. And I thought the feature to read
from stream was added to XVID a while ago, or "almost" added?
> b) there is no framing, and therefore you have to be careful about
> reading the file, such that the there is no buffer underflow.
> the solutions to this are:
> * naive: read the whole file into memory
Bad for large files or streaming material.
> * always read in width*height*3/2 bytes (an individual mpeg-4 frame
> should not be larger than this, "but it could be").
I thought of 2*framesize (=width*height*3), I read somewhere that this is
an upper bound. Don't ask me where...
> * modify xvid to support some kind of buffer underflow callback.
>
> api3 does not currently address decoding buffer underflows.
Is there still need for this if our buffer is large enough?
Most important for me for the moment:
* It should be possible to detect where the next VOP starts
without decoding the whole frame to enable some kind of
"pass-through". Is this simple?
gruel