[Matroska-devel] MVC codec in Matroska container

Peter Wimmer (Lists) peter.wimmer.lists at 3dtv.at
Wed Dec 12 16:21:17 CET 2012

I assume the highlighted part is never present in the CodecPrivate element, at least it is not mentioned in the Matroska spec. This means it is not fully correct to say that CodecPrivate contains the avcC atom because it is actually a simplified version. That’s why I’ve written avcC-like.

mkvmerge simply copies the whole avcC atom from an MP4 file. Therefore I'd guess this code is present in such cases. Dunno for avcCs constructed from raw bitstreams, though -- probably missing in that case.

Good to know! I’ve made my code more robust so that it will quit when it finds an invalid atom length. When interpreting

bit(6) reserved = ‘111111’b;

unsigned int(2) chroma_format;

bit(5) reserved = ‘11111’b;

unsigned int(3) bit_depth_luma_minus8;

bit(5) reserved = ‘11111’b;

unsigned int(3) bit_depth_chroma_minus8;

as length, the many reserved 1 bits result in a very high value exceeding the length of CodecPrivate, which makes it impossible to accidentally treat the rest of the avcC structure as new atom.

When an mvcC-like atom follows the avcC-like atom, avcC must not include the profile-dependent fields. It should be mentioned in the Matroska spec that CodecPrivate is similar, but not identical to avcC and that for MVC files the difference really matters.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20121212/caa8972d/attachment.html>

More information about the Matroska-devel mailing list