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.

MFXVideoENCODE_Query returns MFX_ERR_NULL_PTR

l0st
Beginner
777 Views

I am using Windows 11 on 8700K (UHD 630 AFAIK)

 

Via oneVPL I am able to create a session using MFXLoad and setting the following filters: MFX_IMPL_TYPE_HARDWARE, MFX_CODEC_HEVC, API version 1.35.

 

I then create simple mfxVideoParam for HEVC and call MFXVideoENCODE_Query to validate them.

 

The issue is that this call returns MFX_ERR_NULL_PTR. I am sure none of the parameters of the call is a null pointer.

 

P.S. I wanted to get mediasdk_sys_analyzer to see if anything was amiss, but I am not able to download MediaSDK installer anymore. Using this tool from Microsoft Store: https://apps.microsoft.com/detail/media-codec-info/9N3HFG51QT1D?hl=en-US I can see that Intel Hardware H265 Encoder MFT is registered.

0 Kudos
1 Solution
l0st
Beginner
729 Views

I figured out the issue.

MFXLoad had nothing to do with it, because "is available since API version 2.0" applies to the dispatcher API version not the MFX API version.

Turns out 1.35 does not like when the last parameter of MFXVideoENCODE_Query is a reference to a zeroed out struct. So instead I pass a copy of my original parameters there.

E.g. this does not work in 1.35:

mfxVideoParam encodeParams = {};

... // configure encodeParams

mfxVideoParam correctedParams = {};

sts = MFXVideoENCODE_Query(session, &encodeParams, &correctedParams);

// sts is now MFX_ERR_NULL_PTR


But this does:

mfxVideoParam encodeParams = {};

... // configure encodeParams

mfxVideoParam correctedParams = encodeParams; // make a copy

sts = MFXVideoENCODE_Query(session, &encodeParams, &correctedParams);

View solution in original post

0 Kudos
3 Replies
SreedeviK_Intel
Moderator
751 Views

Hi,

 

Thank you for posting in Intel communities.

We could observe that MFXLoad function under oneVPL is available since API version 2.0. Please refer to below link:

https://spec.oneapi.io/versions/1.1-rev-1/elements/oneVPL/source/API_ref/VPL_disp_api_func.html#id5

 So, can you please try upgrading your API version from 1.35 to 2.0 and try out the validation again.

 

If the issue still persists, kindly share us the sample reproducer code so that we can try to reproduce the same from our end.

 

Regarding MediaSDk installer download, post official migration of MediaSDK to oneVPL, oneVPL has legacy samples i.e. the samples of MediaSDK included in it.

You could follow the below steps to do so:

 

  1. You could clone oneVPL GitHub repository
  2. Follow the instructions provided in Install.md 
  3. Look out for MediaSDK samples in legacy folder.

 

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issue. Kindly let us know if you need further help.

 

Regards,

Sreedevi

 

0 Kudos
l0st
Beginner
730 Views

I figured out the issue.

MFXLoad had nothing to do with it, because "is available since API version 2.0" applies to the dispatcher API version not the MFX API version.

Turns out 1.35 does not like when the last parameter of MFXVideoENCODE_Query is a reference to a zeroed out struct. So instead I pass a copy of my original parameters there.

E.g. this does not work in 1.35:

mfxVideoParam encodeParams = {};

... // configure encodeParams

mfxVideoParam correctedParams = {};

sts = MFXVideoENCODE_Query(session, &encodeParams, &correctedParams);

// sts is now MFX_ERR_NULL_PTR


But this does:

mfxVideoParam encodeParams = {};

... // configure encodeParams

mfxVideoParam correctedParams = encodeParams; // make a copy

sts = MFXVideoENCODE_Query(session, &encodeParams, &correctedParams);

0 Kudos
SreedeviK_Intel
Moderator
713 Views

Hi,


Glad to know your issue is resolved. Thanks for sharing the solution with us.

If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Regards,

Sreedevi


0 Kudos
Reply