[Matroska-devel] MVC codec in Matroska container

Moritz Bunkus moritz at bunkus.org
Sat Dec 8 15:31:45 CET 2012


Hey,

On Sat, Dec 8, 2012 at 3:25 PM, Steve Lhomme <slhomme at matroska.org> wrote:

> Does the current AVC codec private include size boundaries ?

It does, more or less. The format is as follows:

- the first six bytes contain reserved bytes and the information how
big size fields are in this AVC track (2, 3 or 4 bytes, usually 4)
- byte 7 contains the number of SPS units following
- each SPS unit consists of a size field (in the length mentioned in
step above) and the SPS content (specified by the size field directly
preceding it)
- afterwards another bye containing the number of PPS units following
- each PPS unit consists of a size field (in the length mentioned in
step above) and the SPS content (specified by the size field directly
preceding it)

So yes, conforming decoders should stop decoding after the AvcC even
if the CodecPrivate contains more data than indicated by those 6 + 1 +
(total size of SPS units & their size fields) + 1 + (total size of PPS
units & their size fields).

The current proposal is to add similar structures at the end: 1. size
field (number of bytes of this size field is again equal to the length
indicated in those very first 7 bytes); 2. four-byte
identification/type field (something like a FourCC); 3. content

> If so it could be extended.

I agree, it can, and I think I prefer it slightly over a CodecPrivateEx.

Kind regards,
mosu


More information about the Matroska-devel mailing list