Log in

View Full Version : Force DivX H.264 decoder to output YV12


adam777
14th October 2009, 14:13
Hello all,
I've recently tried using madVR renderer along with DivX H.264 decoder (which has been working much better for me comparing to ffmpeg-mt).
Problem is, I can only manage to output YUY2 with the DivX decoder (confirmed by putting FFDShow between the DivX decoder and madVR), so madVR isn't usable.
Anyone knows of a way to force the DivX decoder to output YV12? it seems the decoder is actually supposed to it by default, but it won't work for me for some reason.
Thanks, Adam.

* EDIT *
Another option will be to use FFDShow only for the colorspace conversion, between the decoder and the renderer.
The question is how lossy is such process.

Keiyakusha
14th October 2009, 16:02
I'm using Divx decoder 1.1 and have no problems with yv12 output. it outputs colorspace requested by renderer or filter it connected to. In my case this is yv12 for all renderers includind madVR, but except haali's (which uses YUY2)

LoRd_MuldeR
14th October 2009, 16:09
Another option will be to use FFDShow only for the colorspace conversion, between the decoder and the renderer.
The question is how lossy is such process.

Generally it's not more (or less) lossy than any other colorspace conversion.

Piping the uncompressed/raw video through yet another filter will add some overhead, so it costs CPU cycles.

But quality-wise it doesn't matter which filter in your chain does the required colorspace conversion, as long as you don't add any additional/unnecessary conversion on the way.

I'd even assume the color conversion code in ffdshow to retain at least the same quality as the code in the DivX Decoder filter...

adam777
14th October 2009, 17:14
I'm using Divx decoder 1.1 and have no problems with yv12 output. it outputs colorspace requested by renderer or filter it connected to. In my case this is yv12 for all renderers includind madVR, but except haali's (which uses YUY2)

Weird, whenever i try using the DivX+madVR combination, madVR won't load and instead MPC HC loads some other renderer (I think it's one of the VMR's).
I also made sure the file I was trying to play is indeed a YV12 file.

Keiyakusha
14th October 2009, 17:35
adam777
Try manually (in graphstudio) build graph you expecting to see. If it connects fine - then probably there is something else messed up in your system. Maybe when you trying to use DivX and madVR, some other filter is trying to sneak in between, but it fails... of something else... Also are you sure you using divx decoder?

leeperry
14th October 2009, 17:37
quality-wise it doesn't matter which filter in your chain does the required colorspace conversion, as long as you don't add any additional/unnecessary conversion on the way.

I'd even assume the color conversion code in ffdshow to retain at least the same quality as the code in the DivX Decoder filter...
going YV12(original file)>YUY2(divx decoder)>YV12 in ffdshow is uncalled for and unnecessarily lossy as mVR feeds YV12 anyway.

maybe a bug in either mVR/the DivX decoder/MPC..try in KMPlayer maybe?

adam777
14th October 2009, 18:03
I doubt there's any mess in the computer, it's a fairly new Windows 7 x64 RTM installation (using all 32 bit software in this relation, though).
Since installing the OS, the only things that were installed are FFDShow, Haali Splitter and DivX H.264 Decoder.
As far as I understand the video renderer in the DivX+madVR combination is overlay mixer.
Blocking it in MPC HC and preferring madVR resulted in no ability to play video at all, as DivX insist on outputting YUY2...

* EDIT *
Tried it in KMPlayer, and while not so familiar with this software, I think I set it up correctly, and it behaves just the same.

Keiyakusha
14th October 2009, 18:15
How do you know what colorspace outputting divx? Does it connects to madVR in graphstudio?

If this is win7 you should check and recheck what filter is used. There is some restrictions from microsoft that prevents 3rd party filters to be used. Microsoft filter used instead (however in MPC-HC all should be fine, but who knows...). And I also can't connect MS's decoder to madVR. Check this (http://forum.doom9.org/showthread.php?t=146910) thread and try to use clsid's great tool. If this is not the case - I have no clue, sorry.

adam777
14th October 2009, 18:58
Played a little with GraphStudio.
Indeed, the DivX decoder can't connect to madVR, but I think I also realized why.
It seems that DivX indeed output all kinds of colorspaces for the renderer "to choose from", but sadly YV12 isn't one of them.
The colorspaces I could see in GraphStudio are:
- YUY2
- UYYY
- RGB32
- RGB24
- RGB565
- RGB555

http://img63.imageshack.us/img63/5313/divxout.png

Keiyakusha
14th October 2009, 19:18
Well thats strange. I have 7 types in total and YV12 is the 1st one. Check About and Filter tabs for version info. I have product version 1.1.0.0, Build 08.02.00_00026_Magnolia. I believe this is the latest one. Maybe your version somewhat different (older?).

adam777
14th October 2009, 19:36
Well, I have the exact same version.
And what's more strange is there are 2 registry entries that shows the following:
http://img122.imageshack.us/img122/9206/registry.png

It seems that the decoder IS supposed to output YV12 as needed.
That's just plain weird...
I'll completely uninstall it and reinstall, but do not have my hopes too high.

leeperry
14th October 2009, 19:44
revert to XP, done :D

adam777
14th October 2009, 19:46
Nah, 7 is a great OS.
And, much to my surprise, uninstall, manually clean all registry entries, reinstall, works! :)
Thanks for all your help, leeperry.:thanks:

* EDIT *
It seems that checking "Prefer HW deinterlace" in the DivX decoder settings is the cause to the weird behavior.