[Matroska-devel] Request for information to improve the interaction between Windows VC1, H.264 decoders and Haali Media Splitters

Harsha Kikkeri (CODECS & DSP) harshk at microsoft.com
Tue Jan 6 03:39:35 CET 2009

Thanks Haali
Since 1 and 2 are not VC1 dmo bugs, we will not worry about them.
We have opened a bug on issue 3 (VIH2 not being accepted) and are trying to fix it in Win 7. We may backport it to Vista/XP if the change is downlevel compatible.

It would be great if you could add Annex.B format support for your splitter.
We are also trying to add 'AVC1' format support as a separate media type, but adding Annex.B support in splitter will help Vista decoders.

Legal Disclaimer:
This posting is provided "AS IS" with no warranties, and confers no rights


-----Original Message-----
From: Михаил Мацнев [mailto:mike at haali.net]
Sent: Saturday, January 03, 2009 7:57 AM
To: Discussion about the current and future development of Matroska
Cc: Harsha Kikkeri (CODECS & DSP)
Subject: Re: [Matroska-devel] Request for information to improve the interaction between Windows VC1, H.264 decoders and Haali Media Splitters

Harsha Kikkeri (CODECS & DSP) wrote:
> I work in the codecs team of Microsoft, which is responsible for
> VC1/H264/MPEG2 inbox decoders.
> According to the change list, you made certain changes for working
> around the limitations of the VC1 decoder.
> 1) Fixed handling of VC-1 with changing sequence headers in PS and TS
> containers
> 2) Fixed VC-1 aspect ratio detection
> 3) Added a workaround to make MS VC-1 DMO decoder accept formats with
> included aspect ratio information
> We have already fixed 1) for Windows 7 where the VC1 decoder can now
> handle dynamic format changes.
> We would like to fix 2) and 3) as well. Looking at our code, we do
> handle aspect ratio when the media type is VideoInfoHeader2 (VIH2).
> Could you tell us more about the problem that you faced? It would be
> great if you could share the media files which exhibited the problems
> with an older version of Haali media splitter without the fixes.
At first, I didn't know that VC-1 decoder accepted frames with startcodes,
so I stripped sequence headers from the bitstream and tried to send them as
format changes. Now I simply leave them as is, and all is well even without
changing formats dynamicaly. That was for the fix for 1).

2) was caused by incorrect aspect ratio parsing in my code.

As for 3), the VC-1 decoder that I have (probably comes with WMP11), does
and explicit check for the filter that is trying to connect and refuses
VIH2 connection unless the connecting filter is a WM Asf Reader. So I now
check if the call to GetClassID() comes from qasf.dll, and return a fake
CLSID in that case.

My understanding is that it's caused by the DMO wrapper, not by the VC-1
decoder DMO, and it'd be better to have an "official" way to use VIH2 with the
DMO wrapper.

> Also, the splitter is not inserting start codes for ‘AVC1’ format, could
> you add an additional output media type ‘H264’ so that inbox decoder can
> play such content?
> When splitter is connected using ‘H264’ media type it should
> 1.       Send SPS and PPS NALUs as part of compressed bitstream data, and
> 2.       Insert start codes and send AVC bitstream as explained in Byte
> Stream Format section of Annex B of ISO/IEC 14496-10.
Historically, one of the first available H.264 decoders was from Nero,
and it didn't use the raw bitstream format, instead it used mp4-style framing
with nalu sizes instead of startcodes. So my splitter used that format since
the time I added H.264 support.

At the moment there is no support for Annex.B format in my splitter, though
I could add the reformatting code if there is demand for it.

More information about the Matroska-devel mailing list