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.

Intel QuickSync encode from DX11 ARGB textures

Calvo__Ivan
Beginner
839 Views

Hi, 

I am trying to encode DX11 render target with MFX Encoder and my doubt is, can I feed it directly with MFX_FOURCC_RGB4 or do I have to pass it through VPP to convert to NV12?

Becouse now get no error when setting it up this way and pushing frames in this format but i get 41 bytes constant frame sizes even when i move the image so i guess it is reading empty frames.

Thanks and best regards,

0 Kudos
3 Replies
Mark_L_Intel1
Moderator
839 Views

Hi Ivan,

Yes, if you want to use our hardware encoder, you have to convert the raw video input to NV12. But if you use software encoder, you might use the other format but I have to check which format we support.

Also see the following document for reference:

https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/samples/readme-encode_linux.pdf

It requires input of YUV420 or NV12.

Mark

0 Kudos
RR_
Beginner
839 Views

The answer above from Intel does not seem to be accurate. NV12 input is supported in all versions of the MSDK, however recent versions or platforms received capability for internal conversion, so that clients could feed MFX_FOURCC_RGB4 directly without VPP.

I don't see this change documented in revision history, I believe it's been changed since around version 1.15. And this post suggests it depends not on version but rather on platform.

It's not only MFX_FOURCC_RGB4 support was added, it's also MFX_FOURCC_YUY2 and in most recent versions it is further extended to offer MFX_FOURCC_BGR4 as well.

Unfortunately there is no clear way to discover the capabilities. Both NVIDIA and AMD in their similar APIs offer much more friendly ways to query the environment for availability of certain capabilities. With Intel MSDK I seem to need to set up the context and attempt to initialize it in order to identify whether specific mode of operation is supported or not.

0 Kudos
Calvo__Ivan
Beginner
839 Views

Thank you so much for the answers! I suspect this support has been added also as it does not say nothing about input parameters being wrong. 

0 Kudos
Reply