Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Seongjun_Kim
Beginner
47 Views

Print wrong info in sample_encode on multiple graphic adapters environment

* 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
47 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

Seongjun_Kim
Beginner
47 Views

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

thank you!

Surbhi_M_Intel
Employee
47 Views

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

Thanks,
Surbhi

Reply