The Media SDK version 2.0 Gold download package only contains the software implementation libraries. The hardware implementation is installed by the graphics driver.
Can you check \program files\Common\Intel\MediaSDK\s1\2.0 to ensure the hardware implementation libraries are on your system? Also, if you are building a 32bit app and running 64bit check the same dir structure under \program files (x86)\.. If they are not present, then simply update your video driver.
The h.264 DirectShow filter supports hw encoding however its a sample and is not production quality.
Yes, libmfxhw32-s1.dll is the Sandy Bridge hardware implementation library. If the file is present and cant be loaded, then there could be a few things that can be going on.
- Theres a discrete card in your system thats set as the primary video card. This will turn off QSV, and prevent the HW DLL from loading
- The registry values are incorrect which prevents the MSDK dispatcher from finding libmfxhw32-s1.dll
Theres a document in the SDK under \docs\ called mediasdk-distrib that describes how the dispatcher loads the hardware implementation. In the doc you will find that if the dispatcher cant find the platform specific implementation (because the registry is incorrect), it will fall back to the reserved hardware libs. Assuming that QSV is active, you should be able to copy libmfxhw32-s1.dll to libmfxhw32.dll and co-locate that renamed DLL in the same working dir as sample_encode to bypass the dispatcher search. Try that.
Also, sample_encode comes with code. Can you recompile in debug mode and let me know where its returning MFX_ERR_UNSUPPORTED?
Good news that you got it working. The dispatcher uses HKLM\Software\Intel\MediaSDK\Dispatch\hw64-s1-1 key to find the right DLL to load. Can you verify that you have that key? If its there, then what are the values?
The file sizes are not guaranteed to be identical for SW and HW. They use different algorithms and implementation methods.
About the playback problem Sample_encode creates an elementary video stream. I used to use VLC to playback .264 elementary streams, but as of late Ive noticed that that player doesnt work as well as it used to with elementary streams. Try and mux the file using FFMpeg or XMuxer Pro. Then try playback.
Those registry keys look ok to me. With the exception of a different merit value, ours are identical.
Ive got 0x8000023 for my merit. Try removing that key and reinstalling the driver.
About DShow Encoder, the filter initializes with the MFX_IMPL_AUTO which means use the HW if the DLL is available.
Its in base_encoder.cpp @ line 38. You are free to change it, but theres no property page interface for that.
Another way is to make the DLL fall back to SW by removing the HW DLL.
If you want to use the software implementation with MFX_IMPL_SOFTWARE , then you should includethe libmfxsw(32/64).dll into your installer.This will allow you to run MSDK on non-Intel integrated graphics clients.
The Intel graphics driver will install the HW lib. If you use MFX_IMPL_HARDWARE or MFX_IMPL_AUTO, thenyou dont need to include anything. There's a SW fallback path in the HW DLL. Just make sure you statically link with mfxlib - the dispatcher layer.