[Matroska-devel] MVC codec in Matroska container

Peter Wimmer (Lists) peter.wimmer.lists at 3dtv.at
Wed Dec 12 14:59:42 CET 2012


Hi,



Here a summary of what we did:



*        Currently, for the AVC codec the CodecPrivate element contains an avcC-like atom, but without the length and 'avcC' ID.



*        For MVC we do the following: CodecPrivate still starts with the avcC-like atom. This allows all existing parsers to play the file in 2D. They should ignore all data beyond the avcC-like atom. For MVC, the avcC-like atom is followed by an mvcC-like atom. Contrary to the avcC-like atom, the mvcC-like atom includes the 4 byte length and the 4 byte 'mvcC' ID. This allows to add other atoms in the future and skip them without understanding their structure.



*        The structures of the avcC-like and mvcC-like atoms are identical, both contain a list of SPS and PPS NALs. While the avcC-like atom typically contains a single SPS and PPS, the mvcC-like atom contains a subset SPS, a SPS and two PPS NALs.





There is one issue I would like to clarify. The MP4 standard defines the content of the avcC atom as follows:



aligned(8) class AVCDecoderConfigurationRecord {

 unsigned int(8) configurationVersion = 1;

  unsigned int(8) AVCProfileIndication;

  unsigned int(8) profile_compatibility;

  unsigned int(8) AVCLevelIndication;

  bit(6) reserved = '111111'b;

  unsigned int(2) lengthSizeMinusOne;

 bit(3) reserved = '111'b;

  unsigned int(5) numOfSequenceParameterSets;

  for (i=0; i< numOfSequenceParameterSets;  i++) {

   unsigned int(16) sequenceParameterSetLength ;

   bit(8*sequenceParameterSetLength) sequenceParameterSetNALUnit;

  }

  unsigned int(8) numOfPictureParameterSets;

  for (i=0; i< numOfPictureParameterSets;  i++) {

   unsigned int(16) pictureParameterSetLength;

   bit(8*pictureParameterSetLength) pictureParameterSetNALUnit;

  }

  if( profile_idc  ==  100  ||  profile_idc  ==  110  ||      profile_idc  ==  122  ||  profile_idc  ==  144 )  {

   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;

   unsigned int(8) numOfSequenceParameterSetExt;

   for (i=0; i< numOfSequenceParameterSetExt; i++) {

    unsigned int(16) sequenceParameterSetExtLength;    bit(8*sequenceParameterSetExtLength) sequenceParameterSetExtNALUnit;

   }

  }

}



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.



The MVCDecoderConfigurationRecord is structurally identical to an AVCDecoderConfigurationRecord. However, the reserved bits preceding and succeeding the lengthSizeMinusOne field are re-defined. The syntax is as follows:



aligned(8) class MVCDecoderConfigurationRecord {

  unsigned int(8) configurationVersion = 1;

  unsigned int(8) AVCProfileIndication;

  unsigned int(8) profile_compatibility;

  unsigned int(8) AVCLevelIndication;

  bit(1) complete_representation;

  bit(1) explicit_au_track;

  bit(4) reserved = '1111'b;

  unsigned int(2) lengthSizeMinusOne;

   bit(1) reserved = '0'b;

 unsigned int(7) numOfSequenceParameterSets;

  for (i=0; i< numOfSequenceParameterSets; i++) {

   unsigned int(16) sequenceParameterSetLength ;

   bit(8*sequenceParameterSetLength) sequenceParameterSetNALUnit;

  }

 unsigned int(8) numOfPictureParameterSets;

  for (i=0; i< numOfPictureParameterSets; i++) {

   unsigned int(16) pictureParameterSetLength;

   bit(8*pictureParameterSetLength) pictureParameterSetNALUnit;

  }

}



The complete_representation and the explicit_au_track fields have no meaning for Matroska, and should always be set to 1.





In general MP4 provides (too) many options to store MVC content. In Matroska, we will only use the 'one track' approach. I doubt anybody will ever implement all the advanced options MP4 provides, so we should ignore them for Matroska and offer a simple, easy-to-implement spec instead. Here's an excerpt from the MP4 spec:



The support for MVC includes a number of tools, and there are various 'models' of how they might be used. In particular, an MVC stream can be placed in tracks in a number of ways, among which are the following:



1. all the views in one track, labelled with sample groups;

2. each view in its own track, labelled in the sample entries;

3. a hybrid, one track containing all views, and one or more single-view tracks each containing a view that can be independently coded;

4. the expected operating points each in a track (e.g. the AVC base, a stereo pair, a multiview scene).



[cid:image001.png at 01CDD879.2282EAE0]



Peter





-----Original Message-----
From: matroska-devel-bounces at lists.matroska.org [mailto:matroska-devel-bounces at lists.matroska.org] On Behalf Of Moritz Bunkus
Sent: Wednesday, December 12, 2012 1:50 PM
To: Discussion about the current and future development of Matroska
Cc: mike at makemkv.com
Subject: Re: [Matroska-devel] MVC codec in Matroska container



Hey,



hmmm it'll be difficult for me as my next three evenings are pretty full, and I'll go on vacation (actually leave town) on Saturday. I'll try to review the code until then but I cannot make any promises.



Kind regards,

mosu

_______________________________________________

Matroska-devel mailing list

Matroska-devel at lists.matroska.org<mailto:Matroska-devel at lists.matroska.org>

http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel

Read Matroska-Devel on GMane: http://dir.gmane.org/gmane.comp.multimedia.matroska.devel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20121212/dc5f55fa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 97039 bytes
Desc: image001.png
URL: <http://lists.matroska.org/pipermail/matroska-devel/attachments/20121212/dc5f55fa/attachment-0001.png>


More information about the Matroska-devel mailing list