Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

How to determine the computer hardware decoding capabilities?

Intel_C_
Novice
831 Views

 

I use Intel (R) _Media_SDK_2016.0.2 and directx9 to develop software 
that installs on the client's computer to receive streams from the webcam for hardware decoding.

I currently only use the following code to determine whether to support hardware decoding.
bool IsSupportHWDecode() 
{
    mfxIMPL impl = MFX_IMPL_AUTO;
    mfxSession session;
    mfxVersion ver = { {1, 1 }};
    memset(&session, 0, sizeof(session));
    MFXInit(MFX_IMPL_HARDWARE_ANY | MFX_IMPL_VIA_ANY,&ver,&session);
    MFXQueryIMPL(session, &impl);
    MFXClose(session);
    return MFX_IMPL_BASETYPE(impl) == MFX_IMPL_HARDWARE ? true:false;
}

Because the use of directx9 architecture, so whether the use of hardware decoding depends on whether the intel Graphics adapter is active.
(In Intel_Media_Developers_Guide.pdf, "the Intel Graphics adapter needed to have a monitor associated with the device to be active")

My question is how to know in advance to detect the hardware decoding can be used? Is there any other API can be used?
Including the detection of the above problems, hardware decoding limit ... and so on.

0 Kudos
1 Solution
Mark_L_Intel1
Moderator
831 Views

The UID is defined by the macro MFX_PLUGINID_HEVCD_HW.

Call function MFXVideoUSER_Load(session, &codecUID, ver.Major) to load the plugin

Call function MFXVideoUSER_Unload() to unload the plugin

Mark

View solution in original post

0 Kudos
3 Replies
Mark_L_Intel1
Moderator
831 Views

Your function is very general, and it is not very target to the codec you are going to use. For example, even the function passed, you could still get the failure on a codec with some high resolution.

But you must call this function at the first time. After this, you can call MFXVideoENCODE_Init() or MFXVideoDECODE_Init() to see if the codec you are using is supported or not. Using the MFX_CHECK_RESULT(sts, MFX_ERR_NONE) to check the return status for Pass/Fail

But you should set the Session object to MFX_IMPL_HARDWARE, also noted if you are checking HEVC, you should use MFXVideoUSER_Load() to load the plugin before you call MFXVideoDECODE_Init() since it is not active by default.

Mark

0 Kudos
Intel_C_
Novice
831 Views

Thank you, I will try it.
This takes a long test time ...

Also, where can I get the HEVC Plugin?

0 Kudos
Mark_L_Intel1
Moderator
832 Views

The UID is defined by the macro MFX_PLUGINID_HEVCD_HW.

Call function MFXVideoUSER_Load(session, &codecUID, ver.Major) to load the plugin

Call function MFXVideoUSER_Unload() to unload the plugin

Mark

0 Kudos
Reply