Starting the 2.0 version of SDK, we added the GPU pipeline feature. You can process many SDK scenarios with the power of Nvidia, Intel, or AMD GPU cards.
The GPU pipeline works with all Windows versions older than Windows 7. Unfortunately, Windows 7 doesn't support all DirectX 11 features[reference].
What features are processing with GPU pipeline and what with CPU?
SDK features | CPU | GPU | Note | ||
---|---|---|---|---|---|
Nvidia | Intel | AMD | |||
Decoding (file and stream) | ✅ | ✅ | ✅ | 🚫 | |
Converter (format changing, scaling) | ✅ |
✅ |
✅ | ✅ | |
Encoding (file and stream) | ✅ | ✅ | ✅ | ✅ | |
SDI, Web cameras, ScreenCapture, DirectShow devices | ✅ | 🚫 | 🚫 | 🚫 | |
NDI input | ✅ | ✅ | ✅ | ✅ | |
NDI output | ✅ | 🚫 | 🚫 | 🚫 | |
Frame modification (rotate, flip) | ✅ | ✅ | ✅ | ✅ | Rotate a frame at any angle with the MFOverlay in GPU |
Frame on frame overlay / Mixer | ✅ | ✅ | ✅ | ✅ | |
Preview | ✅ | ✅ | ✅ | ✅ | |
Transitions | ✅ | ✅ | ✅ | ✅ | GPU — only default parameters |
CG Plugin | ✅ | 🚫 | 🚫 | 🚫 | |
Chroma key Plugin | 🚫 | ✅ | ✅ | ✅ | |
HTML plugin | ✅ | ✅ | ✅ | ✅ | Works only on the main GPU in the case of two GPUs |
Color correction with matrix transformation | 🚫 | ✅ | ✅ | ✅ | You need to clone frame to GPU if you don't use conversion |
Shader Plugin | 🚫 | ✅ | ✅ | ✅ |
How to turn on GPU pipeline?
With registry:
HKEY_CURRENT_USER\Software\Medialooks\MFormats\MFFactory
gpu_pipeline=true
With code, you need to turn on this property before you create any other SDK objects:
m_objMFactory = new MFFactoryClass();
m_objMFactory.PropsSet("gpu_pipeline", "true");
You can choose the graphic card which will be used for the gpu_pipeline with the gpu.index property, where 0 is an active one.
Starting from 2.7.2.13327 we also added the new way to handle the mp:// link and MFSinkSources in GPU pipeline mode
HKEY_CURRENT_USER\Software\Medialooks\MFormats\MFFactory
gpu.copy_on_external_receive = false
We advise enabling this option if your current app has a lot of mp://links or MFSinkSources, and you are using GPU pipeline with gpu.copy_on_external_receive=true mode we can reduce the GPU memory usage.
GPU pipeline and GPU decoding.
Presently, we need to separately turn on the GPU decoding even if the GPU pipeline feature is active because of architecture aspects. You can read how to do this in this article: GPU-powered decoding