View Full Version : Hardware Deinterlace
adam777
20th February 2011, 19:13
Hello all,
Not sure it's the right place, but hoping for the best :)
I have an ATI card and my Catalyst control center is set to "use automatic deinterlacing", so the video player handles the deinterlacing.
Suppose I set it to one of the deinterlacing algorithms, does it apply only to decoders that utilize DXVA(/2), and pure software decoders (like FFDShow) skip this setting?
Thanks, Adam.
roozhou
21st February 2011, 10:49
It is unrelated to DXVA.
In ffdshow's settings under Output tab, there is an option "Set interlace flag in output media type". If you check this and set output pixel format to NV12 or YUY2, HW deinterlacer will be enabled.
DXVA is done by decoding chip and deinterlacing is done by stream processors. You can write your own HW deinterlacer using shaders.
nevcairiel
21st February 2011, 11:35
HW deinterlacing is usually done in the renderer. On Vista/7 you will have to use the EVR renderer to get hardware deinterlacing to work properly (it might work with Overlay as well in some cases). It is technically part of the DXVA specification, but its not strictly related to DXVA decoding, so any decoder can use it. Like roozhou mentioned, it only works if a supported pixel format is being used, the best for the job usually being NV12 for 4:2:0 video (most common) and YUY2 for 4:2:2 video (rather rare).
While you can write your own deinterlacer using shaders, it won't really be worth doing so. The high quality adaptive deinterlacers on the GPU cannot be beaten by software solutions (at least not anything running "live" during playback), a shader might come close, but most likely not offer the same performance/quality.
PS:
With NVIDIA cards you could also do the deinterlacing using the CUDA interface to the video processor, somewhat similar to how CoreAVC uses CUDA to decode video without the limitations of DXVA (that is, not requiring the renderer to support it), but i don't think anyone has ever implemented something like this yet. This sounds like a new project!
adam777
21st February 2011, 14:53
Thanks.
So on a more practical note...
If I set the deinterlacing mode to vector adaptive in catalyst control center and use FFDShow without "set interlace flag" checked and YV12 as output colorspace, no deinterlacing will actually take place on the GPU, right?
However, if the deinterlacing mode is selected, but I use Microsoft's decoder on interlaced material (DVB-T broadcast), than HW deinterlacing should kick in, correct?
Thanks again, Adam.
nevcairiel
21st February 2011, 15:01
YV12 is not compatible with hardware deinterlacing, thats correct. The flag is usually also required, but you cannot set it with YV12 active anyway, iirc. Is there any reason you would not want deinterlacing to happen? :)
The Microsoft Decoder should in theory always supply an output format that allows deinterlacing, assuming you use the EVR Renderer.
bobdynlan
21st February 2011, 16:07
Is there any reason you would not want deinterlacing to happen? :) Using interlaced res, watching interlaced source made from progressive frames that does not have artifacts (deinterlacing will lower detail), watching field sequential 3d dvd's with a 3d DS filter ... to name a few.
JanWillem32
21st February 2011, 16:08
http://forum.doom9.org/showthread.php?p=1479212#post1479212
There are plans for major revisions for the ffdshow tryouts video "output" tab, so that the defaults should become better in a while.
Microsoft's decoders included in Windows 7 will generally use NV12 if it's an available type for the video card. It will always try to use the hardware deinterlacer, even if it's only a very simple weave or bob.
YUY2 mode usually excludes the more advanced hardware deinterlacing modes, I've heard. The same thing also counts for the pulldown detection and some other filter options in the video settings tab.
adam777
21st February 2011, 17:23
Well, it was even simpler to verify than I suspected.
Enabled split screen demo mode in Catalyst control center - DVB application using Microsoft decoder and EVR - screen is split, MPC-HC using madVR - no split screen.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.