I use media sdk for decode and encode with multiple video streams.My code was modified slightly from sample_decode and sample_encode.I did encode work in system memory while decode in video memory.It worked good when the number of video streams to decode or encode is not too big.In my test,When openning 16 sessions,2 for encode and 14 for decode,some odd problems occurred.Sometimes MFX_ERR_UNSUPPORTED returned when calling MFXVideoDECODE_Init() or got MFX_ERR_MEMORY_ALLOC when allocating surfaces (system memory is used here) for encode and even program crashed.However,I didn't see GPU were overloaded or memory exhausted.I have tried on I3 4330,I5 4460 and I7 4770,and it is strange that i3 worked better than i5,while i7 is the worst one.
So I want to know did my application reached the performance limitation of media sdk.Any suggestion are really appreciated.
First, check and confirm if you have latest drivers installed on machines from:https://downloadcenter.intel.com/. To transcode multiple video streams we recommend using sample_multi_trancode ( https://software.intel.com/sites/default/files/managed/b7/7e/MediaSamples_Windows_2016.msi), take a look at this article to https://software.intel.com/en-us/articles/aync-and-join-operation-in-media-sdk-multi-transcoding, which describes how you can optimize to achieve better performance during multi-transcoding. If, issue still persists after following the article attached a log from system analyzer tool(https://software.intel.com/en-us/articles/media-sdk-tools) also with your reproducer code.
Thanks for your reply.
I've read the two articles.There are a few problems here:
1.In my app,every decode session and encode session work separately,it's not multi-transcoding.So I wonder whether joined session would improve performance.
2.What I have forgotten to mention is that no matter it is decode or encode,resolution of every video stream is 1080p.
3.I'm using Directx3D 9.Will Direct3D 11 achieve performance?
Thank for sharing more information, this helps understand you test environment better. Join operation allows Media SDK to reuse resources for different sessions, therefore reducing resource allocation for each session which helps improve performance. I do not see information about Windows OS you are using, but if you are using Win 8 and above, recommendation is use DirectX 11 to achieve better performance.
Thanks for your suggestions.I'll try joined session in my code.And my app runs on Windows 7,so I'm afraid DirectX 11 is not usable unless changing OS version.
Thanks a lot