Hello, I am getting started with the Intel Media SDK. I wish to use the QuickSync acceleration to offload decoding from the CPU in a custom decoder.
My first question is about the MFX_IMPL enum passed to MFXVideoSession init. Namely, there is:
Which of these modes will use the actual QuickSync hardware on the CPU?
My machine is a Xeon E5-1607 and I am using a discrete NVIDIA card to drive my display. When I pass "-hw" to the program, which causes it to use MFX_IMPL_HARDWARE_ANY instead of software, the MFXInit method returns -3 (unsupported). Must a display be connected to the integrated GPU for this to work?
Finally, what's the story for d3d9 interop? Is it only available in hardware mode (or with the flag VIA_D3D9)? Is it faster render into a d3d surface and render that, or does it depend on the MFX_IMPL parameter passed?
Thanks a lot.
MFX_IMPL_HARDWARE will use hardware acceleration (aka. QSV) on adapter 0 if available otherwise fail. MFX_IMPL_HARDWARE_ANY will utilize HW acceleration even if Intel HD Graphics device is not associated with primary adapter. There are also threads on this forum discussing the difference between DX9 and DX11 and the requirements on having monitor attached.
Intel Xeon E5-1607 processor does not have support for QSV. I suggest you find an alternate processor. You can find processor details on ark.intel.com to help you find a processor that supports QSV.
Media SDK supports both input/output to system memory and D3D memory surfaces. For HW acceleration it is preferred to use D3D surfaces as much as possible for optimal performance.
Overall, you can also find more details on many of your questions in the Media SDK reference manual and the Developer Guide.
Thanks a lot for your support! I've searched the forum for a while but can't seem to find exactly what I'm looking for.
Basically this is for a media player that's currently using AvCodec for decoding, and we'd like to take advantage of QS hardware where available. I assume the software implementation shouldn't provide significant gains over AvCodec - although we'll have to test that out - so it's really all about offloading it to hardware.
I must not be in luck because although my CPU at home is an i5-2500k, the motherboard is a P67 chipset which doesn't support integrated graphics. I tried running the decode sample with hardware acceleration and it failed with the same error.
So, from reading the developers guide I gather that hardware acceleration is supported if running a QuickSync capable CPU on a chipset with integrated graphics like H67 or Z77. What's not clear is whether it's possible to take advantage of this even if the display is connected on a discrete video card, and if so whether there's a performance penalty associated with that. I would assume trying to display a d3d surface allocated on a different device should incur quite a bit of overhead, if supported at all in D3D9Ex.
The primary benefit of using Intel Media SDK is to harness the power of HW acceleration via a simple API. Other SW codecs may provide better performance than the Media SDK SW codecs.
Let me clarify the some aspects about Intel 2nd generation Core (and following generations) architecture. The Processor (such as i5-2500k) includes both the CPU (traditional processor) and Intel HD Graphics (the GPU). The chipset does not host any GPU parts.
To ensure access to HW acceleration, make sure you use a recent graphics driver and that you have a monitor physically attached to the Intel graphics device (this assumes DX9. Not required for DX11). Also, if you have a discrete graphics card installed, make sure that both graphics devices are enabled in your BIOS.
If you want to encode a surface from a non Intel HD graphics device using Intel Media SDK there will be a performance hit since the surface needs to be copied between device contexts.