[Matroska-devel] Request for information to improve the interaction between Windows VC1, H.264 decoders and Haali Media Splitters
mike at haali.net
Sat Jan 3 16:56:39 CET 2009
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
> 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
> 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