Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
29 Views

How to determine the computer hardware decoding capabilities?

Jump to solution

 

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

Accepted Solutions
Moderator
29 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
Highlighted
Moderator
29 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
Highlighted
Novice
29 Views

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

Also, where can I get the HEVC Plugin?

0 Kudos
Moderator
30 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