Transition Guide
Introducing MFXLoad in place of MFXInit
Intel® Media SDK and oneVPL are initialized via their dispatcher:
The dispatcher provides the API interface symbol lookup tables, which are filled in when the implementation library is loaded. Implementation libraries enable oneVPL operations for specific devices as described in oneVPL Architecture.
Initialization in Intel® Media SDK
In Intel® Media SDK, there were two initialization functions: MFXInit was used in basic cases, while MFXInitEx provided extended parameters. These functions are deprecated starting from API 2.0. They are currently available in oneVPL but marked with deprecation pragmas that cause compiler warnings. In future versions these functions will be completely removed from oneVPL.
Initialization in oneVPL
MFXLoad replaces MFXInit/MFXInitEx in oneVPL as the entry point function for the dispatcher. This function enumerates and initializes all available runtimes.
This upgrade to the initialization process means that runtimes are able to report capabilities so that applications can choose implementations providing capabilities needed. Transitioning to MFXLoad is the first step towards using the new 2.x enhanced API features, as this allows the use of capability queries.
For example, in the code below, the capabilities for all available runtimes are filtered so that only implementations providing HEVC decode will be considered. The session is created with the highest-ranking implementation able to decode HEVC.
mfxLoader loader = MFXLoad(); mfxConfig cfg = MFXCreateConfig(loader); // Implementation must provide an HEVC decoder inCodec.Type = MFX_VARIANT_TYPE_U32; inCodec.Data.U32 = MFX_CODEC_HEVC; MFXSetConfigFilterProperty( cfg, (mfxU8 *)"mfxImplDescription.mfxDecoderDescription.decoder.CodecID", inCodec); MFXCreateSession(loader, 0, &session);
MFXLoad and MFXInit: Hardware Support
The following tables map the use of MFXLoad and MFXInit to hardware for applications that use either oneVPL or Intel® Media SDK.
For applications that use oneVPL:
Implementation |
MFXLoad supported for apps using only Core API |
MFXLoad supported for 2.x enhanced API |
---|---|---|
CPU vplswref64 |
Yes |
Yes |
GPU (Intel® Media SDK) mfxhw64 |
Yes |
No |
GPU (oneVPL) mfx-gen |
Yes |
Yes |
For applications that use Intel® Media SDK:
Implementation |
MFXInit supported (Including features removed in oneVPL) |
MFXInit supported with Core API |
MFXLoad supported |
---|---|---|---|
GPU (Intel® Media SDK) mfxhw64 |
Yes |
Yes |
No |
GPU (oneVPL) mfx-gen |
No |
Yes |
No |