View Full Version : Intel QuickSync Decoder - HW accelerated FFDShow decoder with video processing
kalehrl
9th March 2014, 12:01
Thank you NikosD but I don't intend to use handbrake because it doesn't use avisynth and I'm much more familiar with MeGUI.
It was never my intention to use hardware Quick Sync encoding because the quality leaves a lot to be desired when compared to software x264.
All I want is to get rid of QTGMC and have HW deinterlacing which is of great quality, at least I've read so.
@egur
I can share my source file if you need it.
NikosD
9th March 2014, 12:06
It was never my intention to use hardware Quick Sync encoding because the quality leaves a lot to be desired when compared to software x264.
True, but the gap especially with Haswell is getting smaller.
And the speed of QS encoding is amazing.
All I want is to get rid of QTGMC and have HW deinterlacing which is of great quality, at least I've read so.
Definitely true.
andyvt
9th March 2014, 12:27
I tried it and it really works on my cheap Celeron g1820 processor.
The encoding is extremely fast but the quality is bad even with the highest quality preset.
I wound prefer to use MeGUI and software x264 encoder but just do deinterlacing with a tool which supports hardware Quick Sync deinterlacing.
I currently use QTGMC but it is very slow.
What arguments are you using? QSTranscode was originally intended for creating files suitable for mobile devices so many of the defaults target that use case.
I tested (http://missingremote.com/review/intel-quick-sync-examining-haswell-performance) QS quality against Handbrake x264 a while back and it was comparable at the same bitrate.
kalehrl
9th March 2014, 15:57
I used the GUI version with Mobile480p and Quality presets but I was comparing the quality with a software x264 encoder, not handbrake qsv encoder.
Here is the sample file:
https://mega.co.nz/#!4tpyWYrZ!kpQ130vf8FQsjPmBhEnNWA5LHrq7yjkkhUdOm6P49yY
It is decoded and deinterlaced fine during playback.
However, when I encode it using this script:
DirectShowSource("D:\Dreambox\movie\test.mkv")
crop(2, 74, -2, -74)
LoadPlugin("D:\Programs\MeGUI\tools\avisynth_plugin\UnDot.dll")
Undot() # Minimal Noise
Spline36Resize(704,394) # Spline36 (Neutral)
I get a lot of combing as if the deinterlacing was botched:
http://i61.tinypic.com/ic45fb.jpg
egur
15th March 2014, 10:03
@kalehrl, you can select HW deinterlacing in LAV Video Decoder settings (from start menu->LAV). You can also choose 25/30fps or 50/60fps output.
If this doesn't go well, you try using ffdshow. You can it's priority (merit) with GraphStudioNext.
MeteorRain
16th March 2014, 10:14
Hi egur
I'm new to this thread. Although I had a brief search I couldn't find the reason why decoding using QS doesn't work here.
I'm on i7 4770 + GT640, both graphics core works in standalone. I have 3 monitors, 2 on dGPU, 1 on iGPU. Windows 8.1.
When playing proper h.264 contents, LAV displays QS as available, but not using it, falling back to avcodec.
Tried ffdshow (the qsdecoder version) but it's same problem, falling back to libavcodec.
Tried both 32bit and 64bit player, tried initialize player on different monitors, no luck.
Player: MPC-HC + EVR CP
I was able to use DGDecodeIM to decode the video files properly, however.
Did I miss something?
NikosD
16th March 2014, 10:22
Why don't you try the 3rd option, PotPlayer, too ?
Are you sure that those H.264 clips are HW decoding compliant ?
Did you try to decode them in DXVA mode ?
MeteorRain
16th March 2014, 11:28
Why don't you try the 3rd option, PotPlayer, too ?
Are you sure that those H.264 clips are HW decoding compliant ?
Did you try to decode them in DXVA mode ?
Well, with potplayer it seems uses QS decoder. (I'm new to pot but I can see the different decoder used when playing 8-bit file and 10-bit file)
And yes these h.264 clips are 8-bit and HW decoding compliant and can be decoded in DXVA properly.
So my question is why LAV and FFD doesn't work here? Any clue?
wanezhiling
16th March 2014, 12:35
It really indicated QuickSync Decoder in PotPlayer's OSD(Press Tab during playback)?
MeteorRain
16th March 2014, 13:00
It really indicated QuickSync Decoder in PotPlayer's OSD(Press Tab during playback)?
Yes it did. It clearly shows QS Decoder on 8-bit files and FF Decoder on 10-bit files.
egur
17th March 2014, 12:55
Could be that PotPlayer is using QS decoder in SW mode. Check performance of very high bitrate clips. If ffmpeg has better performance, than QS is in SW mode.
As a simple fix, try connecting one of your monitors to the Intel GPU ans see if that works.
If it fails, you need to install your driver.
MeteorRain
17th March 2014, 19:56
Could be that PotPlayer is using QS decoder in SW mode. Check performance of very high bitrate clips. If ffmpeg has better performance, than QS is in SW mode.
As a simple fix, try connecting one of your monitors to the Intel GPU ans see if that works.
If it fails, you need to install your driver.
3-4% when playing original blu-ray content.
I do have one monitor connecting to the iGPU, and with proper drivers installed (10.18.10.3412).
GTPVHD
18th March 2014, 10:53
http://www.phoronix.com/scan.php?page=news_item&px=MTYzNDA
Looks like Intel Broadwell supports VP8 hardware decoding.
egur
18th March 2014, 12:33
When this feature is available in the Media SDK, I'll add it to the IQS decoder.
Maybe I should start building a VP8 video clip collection...
Please share your files. High bitrate is preferred :)
NikosD
18th March 2014, 16:01
Eric hi.
I had posted to another forum the files below and it's been two months since then!
Have you done any progress on resolving the issues below ?
It's been a long time since your latest update and I had some time to test again QuickSync decoder with both Sandy and Haswell processors using latest Intel drivers for Win 8.1
I tested the implementation of QuickSync decoder inside LAV Video (external filter) and MPC-HC (internal filter), both latest versions.
I found out a lot of problems using Haswell and less or equal problems with Sandy.
The problems mainly are a lot of artifacts after seeking in progressive or interlaced H.264 and VC-1 files, especially AVCHD files
Examples:
Heavy artifacts after seeking
http://www.sendspace.com/file/9t7s3d
http://www.sendspace.com/file/kpy0a0
ftp://helpedia.com/pub/multimedia/x264/testvideos/2011%20-%2002%20-%20H.264%20CPU%20DXVA%20codec%20comparison%20-%20Core2Duo%20vs%20UVD%202.2/6.Cat-1080p60fpsRef4-25Mbps.m2ts
http://www.techpowerup.com/downloads/530/hd-dvd-demo-1080p-vc-1-ddplus-5-1/mirrors
http://www.sendspace.com/file/72ype8
http://www.sendspace.com/file/9p8xa0
Green images- image distortion
http://www.sendspace.com/file/p5f4j3
Looses video sync (stops decoding for a few seconds) after seeking
http://www.sendspace.com/file/xbzbp4
I have more than 50 files with similar problems.
Guest
18th March 2014, 16:39
Some of your links are dead. Please check them all.
EDIT: I tried the third one (cat) and seeking works just fine with DGDecodeIM(), so if you are transcoding that is an option. If you need the DirectShow filter for playing in a media player, then disregard this.
EDIT2: That cat stream is awesome 59.94 progressive HD! May I know where it comes from? Not for rule 6 purposes but because such streams are great for testing. Thank you.
NikosD
18th March 2014, 17:52
Most of the sendspace links are indeed dead because I uploaded them two months ago for the original post in another forum.
I haven't tested them since then, because I saw no update from Eric during the last two months.
If he doesn't have them from the first time and wants to get involved in resolving those many issues that unfortunately still exist with QS decoder, I would upload them again.
The cat sample is an AVCHD sample and it's one of many of my collection of such clips.
A few years ago (!) I have posted a link with a huge collection of AVCHD samples :)
NikosD
18th March 2014, 20:26
http://www.phoronix.com/scan.php?page=news_item&px=MTYzNDA
Looks like Intel Broadwell supports VP8 hardware decoding.
Bay Trail already has VP8 HW decoding support.
Look at the picture here:
http://www.anandtech.com/show/7314/intel-baytrail-preview-intel-atom-z3770-tested
Maybe I should start building a VP8 video clip collection...
Please share your files. High bitrate is preferred :)
VP8 is not a popular video format.
It has clearly lost the war with H.264 in terms of popularity, although is close in quality with H.264 (most of the people find H.264 a little better in PQ)
VP9 vs H.265 will be a more interesting battle because both these codecs are available at the same time and some companies like Imagination have already announced OpenCL assisted GPU decoding support.
http://www.imgtec.com/news/Release/index.asp?NewsID=844
UPDATE:
HW acceleration of VP8 in Bay Trail processors, comes from an Imagination processor VXD392.
egur
18th March 2014, 22:12
@NikosD,
I've looked at the clips 2 months ago and probably forgot to reply, busy times for me lately. Hence no updates on the decoder.
These seeking issues are not new. It is related to the splitter somehow, giving packets that break the HW decoder somehow.
Using the Matroska splitter removes most or all of seek issues (also faster TS seeking). I've asked for this smoother seeking via LAV splitter (a much better product all around) but I guess it's not so simple to implement.
I don't have a quick solution for this and I don't plan to parse the various stream for analysis as it will lower performance.
If I'd know what the problem was, I'd fix it.
GTPVHD
18th March 2014, 23:03
http://vr-zone.com/articles/first-look-new-features-cherry-trails-gpu/64068.html
Broadwell and Cherry Trail doesn't use Imagination IP, it's built into the Intel hardware decoder in their Gen8 GPUs.
NikosD
19th March 2014, 07:16
@NikosD,
These seeking issues are not new. It is related to the splitter somehow, giving packets that break the HW decoder somehow.
Using the Matroska splitter removes most or all of seek issues (also faster TS seeking). I've asked for this smoother seeking via LAV splitter (a much better product all around) but I guess it's not so simple to implement.
If I'd know what the problem was, I'd fix it.
I tried PotPlayer's internal splitter and all of the problems with seeking disappeared.
So it's LAV splitter's problem.
BTW, this (http://www.sendspace.com/file/pa59zq) clip has a small artifact just after the initial black screen (without seeking, in normal playback)
The artifacts are around the sun.
egur
19th March 2014, 08:48
Broadwell and Cherry Trail doesn't use Imagination IP, it's built into the Intel hardware decoder in their Gen8 GPUs.
You probably meant BayTrail not Broadwell. Broadwell is Haswell's successor and has new version of the GEN iGPU (faster of course :) ). Broadwell isn't sold yet.
The Atom family has a smaller version of the GEN processor if I remember correctly.
The video capabilities (not performance) of BayTrail and Haswell (or Broadwell, don't remember) are the same since they share a lot of logic. The drivers are not 100% compatible though. They are separate for these 2 products.
@NikosD - I checked the clip. I have like 5 clips with the same behavior, which I've reported. All of them are TS. Somehow they start corrupt. I'm open for ideas as to how to fix these. FFMPEG is very resilient to these cases, but not always.
NikosD
19th March 2014, 14:06
Cherry Trail is the successor of Bay Trail just as Broadwell is the successor of Haswell.
Bay Trail uses Imagination's decoder - VXD392 - for HW acceleration of VP8, while Cherry Trail and Broadwell will have Intel's Gen8 engine for HW accelerated VP8 codec.
Bay Trail has an IvyBridge GPU with only 4 EUs and lower clocks + VXD392 video decoder.
As for those clips with artifacts, I don't know if this helps, but SandyBridge has exactly the same artifact when using Intel's DXVA.
In Haswell, this has been fixed for DXVA.
Maybe if you could look what Intel did to fix this for DXVA between those GPU generations , you could fix it for QS too.
GTPVHD
20th March 2014, 02:18
http://www.anandtech.com/show/7875/new-unlocked-iris-pro-cpu-broadwell
Broadwell will have Iris Pro graphics and 128MB eDRAM for socketed chips, probably the -K SKUs.
ryrynz
20th March 2014, 02:20
Broadwell will have Iris Pro graphics and 128MB eDRAM for socketed chips, probably the -K SKUs.
That news has been about for awhile and this really isn't the place to be posting about it.
NikosD
20th March 2014, 12:15
@egur
I have gathered together all of my samples that don't look OK with QS decoder in PotPlayer's implementation (probably the best)
Please download and test them before expiration.
No decoding
H.264 timestamp issues (http://www.sendspace.com/file/w77xgs)
Image distortion
H.264 4096x4096 (http://www.sendspace.com/file/yzk97i)
Artifacts after seeking or during playback
VC-1 file (1st) (http://www.sendspace.com/file/znvf1r)
VC-1 file (2nd) (http://www.techpowerup.com/downloads/530/hd-dvd-demo-1080p-vc-1-ddplus-5-1/mirrors)
Artifacts after 1st second (same as previous post)
H.264 interlaced (http://www.sendspace.com/file/pa59zq)
nevcairiel
20th March 2014, 12:34
I have gathered together all of my samples that don't look OK with QS decoder in PotPlayer's implementation (probably the best)
You do realize that this thread is about Erics implementation of the QS decoder, as used in ffdshow and LAV, so why would he be interested in results of some other (closed) implementation?
Even if he did care, he can't debug someone elses closed-source implementation to see whats going on or to fix it.
NikosD
20th March 2014, 13:11
The issues reported by me at the above post, are not issues of QS implementation like PotPlayer's or yours, but issues of the QS decoder itself.
If some other implementation can play those files using QS decoder, I'm ready to test it.
On the other hand, I have dozens of files playing fine with QS decoder in PotPlayer that have problem with MPC-HC(LAV video+splitter).
So, I think he is interested in those files and you should also.
Can you decode with MPC-HC those files without problems ?
Yups
22nd March 2014, 22:22
The drivers are not 100% compatible though. They are separate for these 2 products.
This is not correct. Latest drivers support IVB, HSW and Bay Trail Pentium/Celeron in one driver.
kalehrl
23rd March 2014, 08:49
I installed that driver just fine on my Windows 7 64bit.
It reads that it supports Windows 7.
STaRGaZeR
26th March 2014, 00:29
Do you guys know any solution to the top left cursor issue with Intel drivers? Since I upgraded from Sandy Bridge to Haswell and did the fake screen trick, I have this freaking issue. Using lastest drivers.
http://thumbnails109.imagebam.com/31668/1f30ad316679194.jpg (http://www.imagebam.com/image/1f30ad316679194)
egur
26th March 2014, 08:48
Do you guys know any solution to the top left cursor issue with Intel drivers? Since I upgraded from Sandy Bridge to Haswell and did the fake screen trick, I have this freaking issue. Using lastest drivers.
Not really the place to discuss driver issues, but what is the problem here? The snapshot looks fine. Note the player isn't fullscreen so it's upper left corner is round not rectangular.
STaRGaZeR
26th March 2014, 12:36
There are two cursors: the one at the top left corner of the monitor and the one inside LAV, which is the correct one. The top left one is always there, regardless of where the real one is. At all times, not only playing video. I remember reading about other people suffering this too. I'd go to the Intel forums, but this kind of issue with fake screens would get zero attention.
egur
26th March 2014, 13:42
I'll try to reproduce this and also use newer (than released) drivers.
It will take a few days. Very busy lately.
STaRGaZeR
27th March 2014, 17:58
Thanks! Ask if you need any details. Screen res is 2560x1440, fake screen doesn't let me select anything other than 1280x720. The discrete GPU is an HD7870 (now called R9 270X).
egur
4th April 2014, 18:34
I don't have the exact same HW as you but I couldn't reproduce. Since the screen is on AMD, try asking for support with them or try a different AMD driver.
Not much I can do.
jkauff
6th April 2014, 01:35
Eric, I ran into a couple of interlaced SD files that I ran through LAV with QS HW deinterlace enabled, and the playback audio was 3-4 seconds behind the video playback. The video actually seemed to be getting ahead of the audio, instead of the audio lagging.
Not a big problem, since I can play them using software deinterlace, but I wondered if you've seen this before.
egur
6th April 2014, 07:38
Eric, I ran into a couple of interlaced SD files that I ran through LAV with QS HW deinterlace enabled, and the playback audio was 3-4 seconds behind the video playback. The video actually seemed to be getting ahead of the audio, instead of the audio lagging.
Not a big problem, since I can play them using software deinterlace, but I wondered if you've seen this before.
Please share a clip that demonstrate the issue. Without this I can't test/fix.
jkauff
9th April 2014, 02:19
Please share a clip that demonstrate the issue. Without this I can't test/fix.
More info. Deinterlacing is not involved. The problem with providing samples is that the movie will play for 20 minutes or more before getting out of sync. The madVR OSD shows dropping frames once the problem starts, but not before.
Environment is latest versions of nightly MPC-HC, external LAV filters, and madVR. Problem instantly goes away if I switch to software decoding, and also goes away temporarily if I exit and restart.
I'm not asking you to fix anything, just making you aware that I'm having an issue. I'll keep experimenting to see if I can get some more information about the circumstances.
BTW, this is with Win 8.1, the HD4000 set as primary in the BIOS, but secondary in Windows. Both GPUs are connected to a display, but not the same display. This allows me to use QuickSync without a fake screen.
theoneofgod
9th April 2014, 06:49
More info. Deinterlacing is not involved. The problem with providing samples is that the movie will play for 20 minutes or more before getting out of sync. The madVR OSD shows dropping frames once the problem starts, but not before.
Environment is latest versions of nightly MPC-HC, external LAV filters, and madVR. Problem instantly goes away if I switch to software decoding, and also goes away temporarily if I exit and restart.
I'm not asking you to fix anything, just making you aware that I'm having an issue. I'll keep experimenting to see if I can get some more information about the circumstances.
BTW, this is with Win 8.1, the HD4000 set as primary in the BIOS, but secondary in Windows. Both GPUs are connected to a display, but not the same display. This allows me to use QuickSync without a fake screen.
Give him the file that suffers the issue.
You don't need a fake screen on Windows 8+.
NikosD
11th April 2014, 11:12
Intel updated their SandyBridge drivers to 15.28.22.3517
32 bit (https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=3319&DwnldID=23763&ProductFamily=Graphics&ProductLine=Desktop+graphics+drivers&ProductProduct=2nd+Generation+Intel%c2%ae+Core%e2%84%a2+Processors+with+Intel%c2%ae+HD+Graphics+3000%2f2000&DownloadType=Drivers&lang=eng) & 64 bit (https://downloadcenter.intel.com/Detail_Desc.aspx?agr=Y&ProdId=3319&DwnldID=23764&ProductFamily=Graphics&ProductLine=Desktop+graphics+drivers&ProductProduct=2nd+Generation+Intel%c2%ae+Core%e2%84%a2+Processors+with+Intel%c2%ae+HD+Graphics+3000%2f2000&DownloadType=Drivers&lang=eng)
I don't have access right now to my SandyBridge system, but I would like to know if someone has such system, if Intel finally added the VC1_VLD2010 device driver for Sandybridge and if they added/ fixed OpenGL driver
GTPVHD
16th April 2014, 06:38
http://www.phoronix.com/scan.php?page=news_item&px=MTY2NTQ
Going back to Intel G45 and newer graphics has been a "BSD ring buffer" for H.264 and VC1 VLD decoding. All hardware up to now has had one "Bit Stream Decoder" ring for video decoding, but with the high-end "GT3" graphics of Intel's upcoming Broadwell hardware will be two rings. Broadwell GT3 (the highest-end graphics) will have two independent decoder rings for processing video commands. For the upcoming CPUs featuring GT3 graphics, this should mean a faster and more pleasant video experience, particularly when dealing with multiple video decoding streams.
http://lists.freedesktop.org/archives/intel-gfx/2014-April/043797.html
This is the patch set that tries to add the support of dual BSD rings on BDW
GT3. Based on hardware spec, the BDW GT3 has two independent BSD rings, which
can be used to process the video commands. To be simpler, it is transparent
to user-space driver/middleware. In such case the kernel driver will decide
which ring is to dispatch the BSD video command.
As every BSD ring is powerful, it is enough to dispatch the BSD video command
based on the drm fd. In such case the different BSD ring is used for video playing
back and encoding.
QuickSync gonna get even more obscenely fast at least on Broadwell GT3.
ionutm80
29th April 2014, 07:48
Hello Egur,
I have encountered lately a strange problem. I have been using LAV filters with QS activated on SB Pentium G620 and lately on a IB Core I3 3320t w/o a problem, h/w decoding drives CPU usage at merely 5-10%. However I have decided to buy a satelite HTPC and opted for something very small, not so powerfull but I considered sufficient enough to run any Full HD movie with H/W decoding. The PC I have opted for is an Intel NUC Kit DN2820FYKH (CPU: Intel® Celeron® processor N2820, GPU: Intel® HD Graphics, 756 MHz), 4GB RAM and a 60 GB SSD Agility 3. I have installed Windows 8.1 Pro + Media Center Pack. Then I connected a 2TB WD MyPassport with my collection of movies to this PC and I have reached the following results for both 1080p or 720p movies played with MPC-HC with LAV Filters:
- with QS activated as H/W decoding the CPU usage was insane for the little baby Atom (I understood that the Celeron 2820 is jus a rebranded Atom), around 70-80%. With WMP + Shark007 codecs with LAV Filters it even peaked all the time at 90-95%
- with DXVA native as H/W decoding the CPU usage was in average between 11-20% and only for very high bitrate movies it went to 30% (not too much to worry though).
I know that the graphics inside this Bay Trail NUC are in fact based on IB not Haswell, but with the Core I3 3220t (almost same graphic) with QS I never went above 5% CPU usage.
Is there a problem between your QS decoder and the graphic drivers for this NUC?
I think you have done an excellent job with this decoder and I would really like to use it since with native DXVA on SB I had some jerky playback on some movies in the past. Did not check it with the NUC.
Thanks for your help.
egur
29th April 2014, 08:03
The BayTrail processor has a single memory channel if I remember correctly. If you have slow memory + a slow CPU that may lead to a high CPU utilization (CPU is bottlenecked by memory).
There might be something I can do - have the driver copy the images back instead of my code doing it.
I'll try to find a similar system and check it out.
ionutm80
29th April 2014, 08:45
There might be something I can do - have the driver copy the images back instead of my code doing it.
I'll try to find a similar system and check it out.
Thanks a lot! If you need me to do something just let me know.
Kind Regards.
NikosD
29th April 2014, 09:41
Using LAV DXVA native with Haswell, the decoding is perfect in all formats supported (H. 264, VC-1/WMV3, MPEG2)
The drivers for Ivy are the same as Haswell, so I think you won't have any problems using DXVA with NUC.
About Sandy's jerky playback, have you tried latest drivers posted above ?
ionutm80
29th April 2014, 13:40
Using LAV DXVA native with Haswell, the decoding is perfect in all formats supported (H. 264, VC-1/WMV3, MPEG2)
Thanks for confirming that. However if I remember well on G620 with native DXVA the CPU was also at 20-30% while with QS never went above 5%. But 30% load on the baby Atom is bearable since I do not plan multi-tasking. :)
About Sandy's jerky playback, have you tried latest drivers posted above ?
Already replaced it with an I3 3220t (35w vs. 65w, QS for transcoding, 1080p even in S/W) so no more SB Pentium for me.
NikosD
29th April 2014, 14:24
Thanks for confirming that. However if I remember well on G620 with native DXVA the CPU was also at 20-30% while with QS never went above 5%.
That's impossible!
DXVA always uses as low CPU as possible, in every configuration.
Try it again.
theoneofgod
29th April 2014, 15:43
That's impossible!
DXVA always uses as low CPU as possible, in every configuration.
Try it again.
DXVA 1.50%
QS 2.00%
Not much difference but you're right. 1080p mkv.
ionutm80
29th April 2014, 16:19
That's impossible!
DXVA always uses as low CPU as possible, in every configuration.
Try it again.
I usually check it in Task Manager, Performance tab. Maybe the drivers were old but QS was țhe champ for me with SB in terms of CPU load and headless playback. Otherwise what would be its advantage from a user perspèctive vs native DXVA?
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.