AVS Forum banner

Intel QuickSync Decoder - HW accelerated FFDShow decoder with video processing

72K views 294 replies 63 participants last post by  J_Palmer_Cass 
#1 ·
Updated Jone 22nd 2013
Hi,
My name is Eric Gur and I've taken upon myself a side project at my Intel position to make the Intel SandyBridge (or newer) hardware accelerated video decoding technology freely accessible to everyone.
The project name is Intel QuickSync Decoder.
 
To do so, I decided to embed the Intel QuickSync technology introduced in SandyBridge into the widely popular FFDShow video decoder filter.
Nowadays, the Intel QuickSync Decoder is officially integrated in FFDShow, LAV Video Decoder and PotPlayer.
 
Main features
* HW decode using Intel's high performance QuickSync engine.
* Decodes H264, MPEG2, VC-1, WMV9. DVD playback not supported.
* HW deinterlacing -auto or forced, with half or full (50/60p) output rate
* HW denoise and detail filters
* Soft 3:2 pulldown on marked streams.
 
* Support variable frame rate streams.
* Support headless iGPU (Intel GPU disconnected from display) on Windows 8 and newer.
 
If your system meets the requirements, I'd appreciate stability feedback with assorted quality and sources of video content.
To report a bug report or feature request, please post in this thread.
 
If something is broken, please provide me with a detailed report including (after reading the known issues section below) :
1. Hardware (CPU, GPUs)
2. Software (OS, driver version, player, splitter, etc.)
3. Access to the offending content. Share via your favorite file share sites. Limit content to
 
See less See more
#78 ·

Quote:
Originally Posted by Mrkazador /forum/post/21141509

http://www.demo-world.eu/trailers/hi...n-trailers.php


Search for truehd and you'll find a few trailers.

The links in the page don't work...

I Google's one of the clips (bit harvest truehd) and found it.

32 bit plays fine with ffdshow-quicksync as both video and audio decoder.

Shark

BTW, did you check out the latest SVN builds? I use ffmpeg from there.

Any specific clip that causes the crash - please share.
 
#79 ·
My issues(s) may have been specific to your .17 release.


I have since moved on from those binaries. If you have a testbuild that you can hook me up with that is not using the .17 binaries I'd be interested in giving that a shot for testing purposes (both x64 and x64). If you're close to releasing .18, I'll test them and report back to this thread.


Here is the TrueHD sample that crashed on ffdshow.ax

When I installed a sourceforge build, It no longer crashed.

The DXVA problem MAY exists in the trunk - I need to test further when I have the time.
 
#80 ·

Quote:
Originally Posted by Shark007 /forum/post/21142641


My issues(s) may have been specific to your .17 release.


I have since moved on from those binaries. If you have a testbuild that you can hook me up with that is not using the .17 binaries I'd be interested in giving that a shot for testing purposes (both x64 and x64). If you're close to releasing .18, I'll test them and report back to this thread.


Here is the TrueHD sample that crashed on ffdshow.ax

When I installed a sourceforge build, It no longer crashed.

The DXVA problem MAY exists in the trunk - I need to test further when I have the time.

OK got it to crash.

Good news - TrueHD is not the problem, just a coincidence. My code isn't crashing as well.

Bad news - the crash is a known broken part of ffdshow - parsing the H264 sequence headers. The crash is caused by reading too much from buffer. Sometimes it works and sometimes you get a crash. Usually when the loading the file second it will not crash, as the process's memory is better allocated.

The bug is very persistent bug the but crash is not. Usually recompiling the code solves this.

Maybe the problem is not with code but the the broken SPS header, I'll make it more robust for the next build.
 
#81 ·
New and improved version. Zip files contains installer and documentation, please read.

Download version 0.18 alpha:

32 bit http://www.multiupload.com/VWSVG172HQ

64 bit http://www.multiupload.com/AR3VDNBA6P

Source code http://www.multiupload.com/UQEUJB4WST

Revision highlights:

v1.18:

* Fixed FFDShow's H264 sequence header parsing crash. A lot of users reported crashes with the last build. This was a long standing FFDShow issue that affected specific clips.

* Added black borders to images with non 16 modulo width. Retaining non standard width can cause downstream filters to crash (dvobsub/vsfilter).
 
#83 ·

Quote:
Originally Posted by Shark007 /forum/post/21146735


nice work ericgur. my ffdshow issues with your builds are resolved.

I have only tested 32bit so far, but it does look good.

Great!

Let me know if other issues arise.
 
#84 ·
Celeron/Pentium SNB are too weak to use with AMD GPU under madVR because of the lack of a hardware video decoder equivalent to CUDA Video Decoder (there exists an API, however, called OpenVideo Decode (OVD) ). Now ericgur's hybrid HW accelerated system instantly fixes the problem.
This method can be also used with a GeForce card, in particular, that does not have enough CUDA cores (e.g. 48) to do deinterlacing and post-processing simultaneously under CUDA Video Decoder.
 DecodeDeinterlacingPost-Processing
libavcodec+yadif+madVRCPUCPUShader Engine
Intel QuickSync+yadif+madVRIntel MFXCPUShader Engine
CUVID+madVR (NVIDIA only)Video ProcessorCUDA coresCUDA cores
(Shader engine = CUDA cores [NVIDIA's term])

System used


- Processor: Celeron G530

- Motherboard: H67 chipset mb (GIGABYTE GA-H67MA-UD2H-B3)

- Memory: DDR3-1066 2 x 2GB (actually DDR3-1600, but it runs only at 1066 under G530+H67)

- Graphics: Radeon HD 5570 DDR3-1800 1GB


- Player: MPC HomeCinema

- Source/Splitter: LAV Source Splitter

- Video decoder: ffdshow video decoder (libavcodec or Intel QuickSync)

- Deinterlacer: ffdshow video decoder (yadif)

- Video Renderer: madVR with HQ (SoftCubic 100/Lanczos 4 taps/Lanczos 4 taps)

- Test clips: the same as this post

libavcodec+yadif+madVR
 SD filmSD videoHD filmHD i videoHD p video
Dropped frames00027743616
CPU usage (average)22%27%56%95%99%
GPU usage (average)27%53%25%5%6%
Rendering time (average)7.47 ms7.30 ms4.11 ms6.15 ms7.77 ms
Power consumption (average)66W73W73W81W81W
CPU is completely taxed for HD i video and HD p video, resulting in lots of dropped frames:


- HD i video: 1080i60 decode + deinterlacing

- HD p video: 1080p60 decode

Intel QuickSync+yadif+madVR
 SD filmSD videoHD filmHD i videoHD p video
Dropped frames00000
CPU usage (average)23%28%33%77%57%
GPU usage (average)27%53%25%46%48%
Rendering time (average)7.53 ms7.44 ms4.57 ms4.33 ms4.16 ms
Power consumption (average)66W73W68W81W79W
Decode is now done by Intel MFX (Multi-Format Codec) fixed function in Intel HD Graphics, that offloads CPU considerably.

Remarks


1. This is basically the discrete GPU version of this post , where Intel HD Graphics + madVR MQ is used instead of dGPU + madVR HQ.


2. CyberLink Video Decoder (HAM) + yadif won't work for interlaced contents because CyberLink Video Decoder (HAM) outputs video as progressive.
 
#85 ·
Can you test using EVR on this system for comparison (no DI in ffdshow)?

With EVR you'll get all the HW video processing with much less power/cpu utilization.

EVR will use HW deintercaing as well as the very powerful AVS scaler.

To make the ground more even, you can turn off or lower the other video processing features (sharpening, noise reduction, total color control, auto contrast, etc).
 
#86 ·
Yes, Intel QS + EVR works and all AMD's post-processors will work (well, AMD [or NVIDIA or Intel]'s post-processors will work under *any* video decoder [NV12 output] + EVR
). But if you use EVR, why not use AMD UVD + EVR under DXVA API? This is even processor-independent (i.e. works with any processor, AMD or Intel). Is there any significant advantage of Intel MFX over AMD UVD?


Personally I see Intel QS or CUVID is useful only under a non-EVR video decoder, in particular madVR (or if I want to insert a filter between decoder and EVR, such as subtitle filter).
 
#87 ·

Quote:
Originally Posted by renethx /forum/post/21149667


Yes, Intel QS + EVR works and all AMD's post-processors will work (well, AMD [or NVIDIA or Intel]'s post-processors will work under *any* video decoder [NV12 output] + EVR
). But if you use EVR, why not use AMD UVD + EVR under DXVA API? This is even processor-independent (i.e. works with any processor, AMD or Intel). Is there any significant advantage of Intel MFX over AMD UVD?


Personally I see Intel QS or CUVID is useful only under a non-EVR video decoder, in particular madVR (or if I want to insert a filter between decoder and EVR, such as subtitle filter).

I was speaking on the Intel based EVR...

Why not DXVA?

If it works the way you it, use it. I'm just offering a wider usage for the Intel decoder ATM.

DXVA is so complex, hardly anyone gets it to work well. I guess every HW vendor's decoder has it's own behavior, that's why the Microsoft DXVA decoder is practically unusable.
 
#88 ·
Whatever-based EVR, whichever GPU's post-processors will work with whatever video decoder outputting NV12 + EVR (I have been testing throughly).


Quote:
Originally Posted by ericgur /forum/post/21150060


DXVA is so complex, hardly anyone gets it to work well. I guess every HW vendor's decoder has it's own behavior, that's why the Microsoft DXVA decoder is practically unusable.
Nowadays DXVA works pretty well, in particular with TMT, PowerDVD and any DirectShow media player with Microsoft DTV-DVD Video Decode/ArcSoft Video Decoder/CyberLink Video Decoder, even if you limit yourself to Intel HD Graphics (let alone AMD and NVIDIA). When was your last experience with DXVA?


In my experience, Microsoft DTV-DVD Video Decoder (from the latest build of Windows 7) works pretty well with any GPU (AMD, NVIDIA or Intel) under DXVA+EVR, that's my favorite DXVA video decoder (for AVC and MPEG-2). What problem do you see in Microsoft DTV-DVD Video Decoder?
 
#89 ·

Quote:
Originally Posted by renethx /forum/post/21150125


What problem do you see in Microsoft DTV-DVD Video Decoder?

It doesn't decode a lot of my test clips. Seeking isn't working as good. It may work 90-95% but it's not stable as SW playback.

This is one of the reasons I started integrating the QuickSync technology - I wanted a fully functional decoder.

What people see in the forums are my public efforts - the code the I've released. I also spend quite some time trying raise the SW level of the QuickSync infrastructure internally.
 
#90 ·

Quote:
Originally Posted by ericgur /forum/post/21152318


It doesn't decode a lot of my test clips. Seeking isn't working as good. It may work 90-95% but it's not stable as SW playback.

This is one of the reasons I started integrating the QuickSync technology - I wanted a fully functional decoder.

What people see in the forums are my public efforts - the code the I've released. I also spend quite some time trying raise the SW level of the QuickSync infrastructure internally.

Hmm, if you don't mind, will you post a couple of your lots of test clips that can't be decoded by Intel HD Graphics + Microsoft DTV-DVD Video Decoder somewhere? (You say "a lot". How many such clips do you find?) I would like to see them myself (out of curiosity).
 
#91 ·
Gday Eric


Very interested in this thread.


Can you assist?


Recently have had a HTPC built. Am using Intel i3-2100T and AsRock H61M-ITX motherboard.


Using HDMI to connect to Sony Bravia LED 3D HD TV - refresh rate for PAL I think is 50hz (Australia)


Im using MEdia Portal 1.2.1 and have a quad tuner (digitalnow.com.au).


Have been having problems with picture quality - appears 'soft' and not quite full HD.


I recently changed the decoder settings in the MP config to the MPEG 2 - Microsoft DTV DVD Video and TV decoder settings and the picture improved dramatically BUT still not perfect HD.


Would your FFDShow decoder help in this situation???


Any thoughts??


Go easy; Im new to all this.


Cheers

JCKOOKA
 
#92 ·

Quote:
Originally Posted by jckooka /forum/post/21156372


Gday Eric


Very interested in this thread.


Can you assist?


Recently have had a HTPC built. Am using Intel i3-2100T and AsRock H61M-ITX motherboard.


Using HDMI to connect to Sony Bravia LED 3D HD TV - refresh rate for PAL I think is 50hz (Australia)


Im using MEdia Portal 1.2.1 and have a quad tuner (digitalnow.com.au).


Have been having problems with picture quality - appears 'soft' and not quite full HD.


I recently changed the decoder settings in the MP config to the MPEG 2 - Microsoft DTV DVD Video and TV decoder settings and the picture improved dramatically BUT still not perfect HD.


Would your FFDShow decoder help in this situation???


Any thoughts??


Go easy; Im new to all this.


Cheers

JCKOOKA

The image quality is usually determined by the renderer.

Some decoders have some video processing capabilites that can affect the quality.

Microsoft's DTV DVD decoder uses DXVA to connect to the renderer. Unfortunately it's far from perfect. So give my decoder a try.


If you can force the player to use EVR you'll probably get the best quality for this setup.

My ffdshow-quicksync will be of use if you want to add subtitles or use ffdshow's internal image processing.

EVR should take care of the rest (should connect using NV12 for bext performance).

If the player doesn't allow specifying the renderer, you can consider using a different player (do it anyway for quality check). Many players exist that allow selecting decoders and renderers (ZoomPlayer, MPC-HC).
 
#93 ·

Quote:
Originally Posted by renethx /forum/post/21152323


Hmm, if you don't mind, will you post a couple of your lots of test clips that can't be decoded by Intel HD Graphics + Microsoft DTV-DVD Video Decoder somewhere? (You say "a lot". How many such clips do you find?) I would like to see them myself (out of curiosity).

Clips types that don't work with DTV-DVD Video Decoder:

All MPEG2 with 4:2:2 profile. Crashes player

A large collection of H264 (AVC1 fourcc):

* Correuption during seeks on some.

* Clips with bad subs might not play at all (black screen).

* Clips with resolution of 720x1280 (transpose 720p).

* One or more clips freeze after a seek, then crash player

* some TS do not play and crash player (black screen).

* 10 bit profiles do not play.


VC1 - not supported by decoder.


My decoder either plays them well or gracefully reverts to another decoder within ffdshow if HW acceleration is not supported. I plan to add support for having ffdshow fail altogether (refuse connection) so another filter can pick up the decoding. Several users requested that 10 bit profiles will be handled by LAV decoder (outputs 10/16 bit).


As for the clips themselves, they are shared on my doom9 forum dev thread by several users. BTW, they were tested on an Intel GPU. I have no idea whether they work or don't on AMD/Nvidia GPUs.

Doom9 thread:
http://forum.doom9.org/showthread.php?t=162442
 
#96 ·

Quote:
Originally Posted by jckooka /forum/post/21159671


Gday Eric


Thanks for this. can you provide a simple explanation of EVR? Where can I download it?


Also, a link to ffdshow?


Regards

jckooka

EVR = Enhanced Video Renderer


It was introduced in Windows Vista and is used with many DirectShow based players including Windows Media Center and Windows Media Player, and optionally with SageTV, J River MC, MPC-HC and some others.
 
#97 ·

Quote:
Originally Posted by jckooka /forum/post/21159671


Gday Eric


Thanks for this. can you provide a simple explanation of EVR? Where can I download it?


Also, a link to ffdshow?


Regards

jckooka

Like people said, EVR is the Enhanced Video Renderer (Microsoft), it ships with Windows vista and Windows 7. This is the most advanced video renderer by Microsoft (that comes with Windows - 3rd party renderers may eclipse it) and uses the DXVA2 interface among others. EVR utilizes advanced HW video processing and usually works OK with most HW configurations.

In order to utilize it well, you should install the latest graphics drivers.

FFDshow (now called ffdshow-tryouts) can be found here:
http://ffdshow-tryout.sourceforge.net/download.php .

I recommend using the latest SVN builds (alpha versions) and not the latest beta as the SVN builds are quite stable and correct a few issues found in the beta.

An alternative to FFDShow is LAV video decoder. Both are based on an open source audio/video decode/encode library called libavcodec http://forum.doom9.org/showthread.php?t=156191 .


This thread is about my own version of ffdshow which utilizes Intel's HW acceleration (QuickSync). It uses the latest ffdshow code base so it's the same as the latest ffdshow + QuickSync. Download links for the latest version are on the first page of this thread.


Regarding 32/64 bit versions. Windwos 7 64 bit supports both 32 and 64 bit playback. You'll need to install both versions. If a player is 64 bit it will use the 64 bit DirectShow filters only (you can see in task manager if an app is 64 or 32 bit). Generally speaking, 32 bit versions are usually more stable and sometimes there's a performance difference (in both directions for various reasons).

Hope this helps.
 
#99 ·

Quote:
Originally Posted by jckooka /forum/post/21166474


So Eric


Would you recommend installing your version instead of the one found at sourceforge.net?


Regards

JCKOOKA

If you want to enjoy HW acceleration on current generation Intel GPU my version is probably the best option. Using SW decoding my version and the one from SourceForge are very similar. My version fixed at least two open issues (crashes) in ffdshow, so I would use that anyway. You can select which internal decoder to use via the codec's tab in ffdshow's configuration (can be accessed from either the start menu entry or from the player itself in many cases).


Also, if you encounter issues, you can help me produce a better product by submitting a report.
 
#100 ·
Many thanks Eric


This is all so new to me! Learning alot but a long way to go before I fully understand the difference between things like decoders, filters blah blah.


Sorry to ask another stupid question but what are the internal decoders that I should select for Video, DVD, Audio etc?? I am of course 'hoping' these will appear in the Media Portal Configuration app!!


Cheers and beers

JCKOOKA
 
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top