Log in

View Full Version : xvid DirectShow decoder produces artifacts when connected to some mp4 splitters


mellon
4th February 2006, 19:16
Hi,

I converted a clip from AVI to MP4 with mp4box and wanted to see wich splitters connect to which decoders. Then I found this strange behaviour of the Xvid DirectShow decoder:

The clip was created with VirtualDub and Koepi's 1.1 final build. There are only I-Frames and P-Frames with Qpel enabled. No B-Frames, no N-Vops, no GMC. But I think this does not matter in this case. Mp4box from gpac 0.4.0 made mp4, no audio.

3ivx 4.5.1 splitter + Xvid dshow decoder = no error (good.png)
Haali (latest) + Xvid dshow decoder = artefacts (bad.png)
Gabest (MPC 6.4.8.7) + Xvid dshow decoder = artefacts

all above splitters + recent ffdshow = no error

all on the same file

then I found that 3ivx splitter converts bitstream into some VfW style which uses BITMAPINFO etc:

Stream 0
3ivx D4 Media Splitter

Media Type 0:
--------------------------
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {7634706D-0000-0010-8000-00AA00389B71}
formattype: FORMAT_VideoInfo {05589F80-C356-11CE-BF01-00AA0055595A}
bFixedSizeSamples: 0
bTemporalCompression: 1
lSampleSize: 0
cbFormat: 130

VIDEOINFOHEADER:
rcSource: (0,0)-(704,352)
rcTarget: (0,0)-(704,352)
dwBitRate: 1000
dwBitErrorRate: 0
AvgTimePerFrame: 400000

BITMAPINFOHEADER:
biSize: 88
biWidth: 704
biHeight: 352
biPlanes: 1
biBitCount: 24
biCompression: mp4v
biSizeImage: 743424
biXPelsPerMeter: 0
biYPelsPerMeter: 0
biYPelsPerMeter: 0
biClrUsed: 0
biClrImportant: 0

while Haali's and Gabest splitter use other stream identification:

Stream 0

Media Type 0:
--------------------------
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {7634706D-0000-0010-8000-00AA00389B71}
formattype: FORMAT_MPEG2_VIDEO {E06D80E3-DB46-11CF-B4D1-00805F6CBBEA}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 174


Media Type 1:
--------------------------
AM_MEDIA_TYPE:
majortype: MEDIATYPE_Video {73646976-0000-0010-8000-00AA00389B71}
subtype: Unknown GUID Name {5634504D-0000-0010-8000-00AA00389B71}
formattype: FORMAT_MPEG2_VIDEO {E06D80E3-DB46-11CF-B4D1-00805F6CBBEA}
bFixedSizeSamples: 1
bTemporalCompression: 0
lSampleSize: 1
cbFormat: 174


Definitly there are different streams passed to the decoder. FFdshow works with both. Xvid only with the one from 3ivx even it connects to the other splitters.

When I use ffdshow but advise it to use xvid.dll for mp4v no artefacts occur. So ffdshow alters the bitstream from Haali's or Gabest splitter and sends it in a compatible way to xvid.dll.

Is this a known limitiation of Xvid? Can someone explain this?
Would really like to understand what happens here.


Best

bond
5th February 2006, 00:25
some more discussion about this:
http://forum.doom9.org/showthread.php?t=105666

mellon
5th February 2006, 20:28
Thanks. So there is nothing to worry about. Would be nice if xvid could handle this.