[matroska-devel] Re: AVI compatibility mode?

Steve Lhomme steve.lhomme at free.fr
Mon Feb 17 15:24:29 CET 2003


En réponse à Moritz Bunkus <moritz at bunkus.org>:

> 
> Hi.
> 
> Sunday Cyrius and I had a rather long discussion about the 'AVI
> compatibility mode'. He told me he'd save the BITMAPDONTASKMETHATNAME
> and the WAVEHEADEREX and other structures in KaxCodecPrivate and
> didn't set all the KaxVideo* elements.

All the matroska field should be filled when the value is known and different
that the default one.

> This was the first time I actually heard about such a compatibility
> mode, and I was a bit confused why anyone would want to do such a
> thing. That's why I'd like some clarification on that point.
> 
> Some disadvantages that I can see right now:
>  - These structures are Windows specific. Neither Unix/Linux nor MacOS
> knows about them.

As long as they don't deal with AVI. Otherwise it is handled somewhere.

>  - These structures are stored as they are lying around in memory
> which produces the usual Endianess problems.

Correct, but since it's a Microsoft compatibility mode, we can assume the
structure is little endian. It should also be aligned on 1 octet. (uint8 = 1
octet, not 4)

>  - Why use separate structures that are not coded in EBML if Matroska
> itself contains elements for the contents? e.g. KaxVideoPixelWidth
> etc.

As said above, all matroska fields should be filled when possible.

> If there are any fields in those structures that are necessary or even
> only important and there's no Matroska element for storing this piece
> of information, then Matroska should be changed.

Normally most of them should already be in matroska and general to any
(audio/video) codec. For the rest, they probably have no meaning at the
container level.

> Another point: I now know that there are dummy frames in AVIs if B
> frames are being used. I understand that you want to store that fact
> in Matroska in some way. But there's alreadly KaxCodecID...

?

> Another question: if I use 'V_MS/VFW/FOURCC' for the CodecID (as I'm
> reading an AVI) - where do I store the FourCC?

In the Microsoft structure, that takes place in the codec private data.

> http://www.corecodec.com/modules.php?op=modload&name=PNphpBB2&file=viewtopic&t=227
> says 'see codec 'private' data and use suitable decoder based on
> FourCC
> code' but where do I then store e.g. the Huffman tables required by
> the
> MJPEG codec? And why does the spec say that CodecID is 128bits long
> with the upper half being reserved? Aaaaaaaand...

That's Christian again trying to be technical ;)
There is finally no limit on the CodecID (why would there be one ?).
For MJPEG in AVI, where is the Huffman table saved ? I would assume it would be
next to the Microsoft structures we were talking about, and should be stored
next to them as in AVI. At least that's the way it works in audio. If that's
elsewhere... We need to know where :)
http://matroska.org



More information about the Matroska-devel mailing list