[Matroska-devel] New generation HD codecs support by matroska. Proposed spec change.

Steve Lhomme steve.lhomme at free.fr
Mon Apr 23 14:26:16 CEST 2007


Mike Chen wrote:
> Hello, All.

Hi,

> I would like to know if there are any plans to add codec support for
> HD formats to matroska, and if not – to propose this addition. The
> codecs in question are VC1, E-AC3 and DTS-HD. In order to keep
> discussion relevant, it makes sense to discuss one codec at a time.
> So, assuming the format is not yet supported and no plans were made
> about it, does anyone objects to the following specification for VC1
> (advanced profile):

The question is wether these codec need some extra codec data and a 
special block treatment or if they can be handled via the VfW 
compatibility layer.

All players that can read matroska also support VfW codec without any 
problem. So either these codec need extra handling or we don't really 
need to do much.

On the other hand they can all come from MPEG TS (and maybe PS) streams 
and therefore have no VfW equivalent... So I'd agree to add them to the 
native codec list. As long as we know the frame boundaries and the extra 
codec data needed to initialize the decoder...

For E-AC3 I think it's already handled by mkvmerge. Maybe using the same 
AC3 ID. Is the difference between AC3 and E-AC3 significant ?

Steve

> Codec names: VC-1, SMPTE-421M, WMV9 Advanced Profile
> Fourcc: WVC1
> Win guid: { 0xc9bfbccf, 0xe60e, 0x4588, { 0xa3, 0xdf, 0x5a, 0x03,
> 0xb1, 0xfd, 0x95, 0x85 } }
> 
> Matroska codec name: V_VC1/AP
> Matroska codec private:
> Windows/ffmpeg-compatible private data: First byte is entire structure
> size, followed by sequence EBDU (sequence start code + sequence
> header), followed by entrypoint EBDU (entrypoint start code+entrypoint
> header)

Can you provide any bitstream spec so that we can build a parser ?

> Bitstream syntax:
> Frames/fields are in coding order, encapsulated, with
> timecode/duration/references assigned in a usual way.
> 
> Frame structure in progressive or frame-interlace mode:
> 
> I (key) frames:
> Sequence EBDU + entrypoint EBDU + frame EBDU concatenated together.
> 
> I(regular)/P/skipped/B/Bi/ frames:
> Frame EBDU (frame start code + frame data encapsulated)
> 
> Frame structure in field-interlace mode:
> 
> I (key) frames(actually fields):
> Sequence EBDU + entrypoint EBDU + field/frame EBDU concatenated together.
> 
> I(regular)/P/skipped/B/Bi/ frames (actually fields):
> Frame/field EBDU (frame/field start code + frame/filed data encapsulated)
> 
> Rationale:
> -    V_VC1/AP name is to distinguish from VC1-simple/main profile, which
> has completely different bit stream syntax (and different fourcc codes
> and decoding dll).
> -    Coding is consistent with current mpeg-like coding – to demux one
> should just extract packets and send them down along with timecodes.
> -    Changes to add are minimal – just associate V_VC1/AP with WVC1. For
> example, below is the patch for VLC – with this patch a test file
> plays nicely with both ffmpeg decoder and windows DMO.
> 
> Any objections? Is it possible to add this to specs / haali splitter?
> What is the procedure?
> 
> 
> Yours, Mike.
> 
> p.s. Vlc patch (for reference):
> 
> 
> --- mkv.cpp.old    2007-02-02 11:23:52.000000000
> +++ mkv.cpp.vc1    2007-04-19 19:58:14.656250000
> @@ -2232,6 +2232,13 @@
>             MP4_FreeBox_sample_vide( p_box );
>             stream_Delete( p_mp4_stream );
>         }
> +        else if( !strcmp( tracks[i_track]->psz_codec, "V_VC1/AP" ) )
> +        {
> +            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'W', 'V', 'C', 
> '1' );
> +            tracks[i_track]->fmt.i_extra = tracks[i_track]->i_extra_data;
> +            tracks[i_track]->fmt.p_extra = malloc(
> tracks[i_track]->i_extra_data );
> +            memcpy(
> tracks[i_track]->fmt.p_extra,tracks[i_track]->p_extra_data,
> tracks[i_track]->i_extra_data );
> +        }
>         else if( !strcmp( tracks[i_track]->psz_codec, "A_MS/ACM" ) )
>         {
>             if( tracks[i_track]->i_extra_data < (int)sizeof( 
> WAVEFORMATEX ) )
> 
> 
> 
> p.p.s. Sample test file: http://savefile.com/files/660155 , pwd: 
> MatroskaRulez
> _______________________________________________
> Matroska-devel mailing list
> 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

-- 
robUx4 on blog <http://robux4.blogspot.com/>




More information about the Matroska-devel mailing list