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.
3056 Discussions

Print wrong info in sample_encode on multiple graphic adapters environment

Seongjun_Kim
Beginner
306 Views

* Product version : MediaSamples 6.0.0.142
* Platform you are building on : Windows Server 2008 R2 + Intel HD Graphics 4600

If multiple graphic adapters are existed in PC and Intel graphic adapter is secondary device, sample_encode prints like below,

Media SDK impl : sw

This is wrong information because sample_encode had the success to initialize a mfxSession with MFX_IMPL_HARDWARE_ANY.
Sample_encode program must print like below,

Media SDK imple : hw

Current sample_encode prints 'hw' if only Intel Graphic adapter is default device. So, I would like to submit this patch. :)

MediaSamples_6.0.0.142/sample_encode/src/pipeline_encode.cpp
@@ -1581,7 +1581,10 @@ void CEncodingPipeline::PrintInfo()
     GetFirstSession().QueryIMPL(&impl);

     const msdk_char* sImpl = (MFX_IMPL_VIA_D3D11 == MFX_IMPL_VIA_MASK(impl)) ? MSDK_STRING("hw_d3d11")
-                     : (MFX_IMPL_HARDWARE & impl)  ? MSDK_STRING("hw")
+                     : (MFX_IMPL_HARDWARE  & impl) ? MSDK_STRING("hw1")
+                     : (MFX_IMPL_HARDWARE2 & impl) ? MSDK_STRING("hw2")
+                     : (MFX_IMPL_HARDWARE3 & impl) ? MSDK_STRING("hw3")
+                     : (MFX_IMPL_HARDWARE4 & impl) ? MSDK_STRING("hw4")
                                                    : MSDK_STRING("sw");
     msdk_printf(MSDK_STRING("Media SDK impl\t\t%s\n"), sImpl);

 

0 Kudos
3 Replies
Surbhi_M_Intel
Employee
306 Views

Hi there, 

Thanks for pointing out the issue, with a solution. Our samples are available on GitHub now(link), where you can submit your changes if you like or we can also take in from here and send your change. Let us know if you will like to submit on your own. 

Surbhi

0 Kudos
Seongjun_Kim
Beginner
306 Views

I see. I will create a pull request to submit my patch.

thank you!

0 Kudos
Surbhi_M_Intel
Employee
306 Views

Great, we appreciate your inputs. If you find any issues in future, please don't hesitate to bring it forward. 

Thanks,
Surbhi

0 Kudos
Reply