Media SDK2.0 do have support for multi-threaded?

If you can

Will there be data loss caused by the implementation of failure?


6 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


Yes, Intel Media SDK is multi-threaded and also supports writing multi-threaded applications using the SDK.

I do not understand what you mean by "Will there be data loss caused by the implementation of failure?". Can you please elaborate?


Hi Petter

I use multi-threaded implementation of media SDK2.0 sample_decode.

I would like to decode the different files at the same time.

However, the implementation will generate an error

The error is a memory to be modified

Could you give more details?
At first moment, seems that you have a problem with your multithread implementation, not with SDK...
Please give us more details, like where you got this error, what filters are you using, how they are connected...


1.Multi-threading can be implemented
2.It is normal for a thread.(The size of any resolutions)
3.8 threads about executable in a small resolutions(ex. 352x288).More than 8 threads will produce memory errors
4.2 threads about executable in a large resolutions(ex. 1280x1024).More than2 threads will produce memory errors
5.m_mfxBS.DataLength and m_mfxBS.Data dataare valid, but m_mfxBS.DataLength will be changed in the implementation of m_pmfxDEC->DecodeHeader

mfxStatus CDecodingPipeline::InitMfxParams(mfxU32 &numViews)



mfxStatus sts = MFX_ERR_NONE;



sts = m_pmfxDEC->DecodeHeader(&m_mfxBS, &m_mfxVideoParams);


Since I do not have insight into what your application does it's unclear what is causing the issues.

Are your threads using completely separate resources? To eliminate race conditions or resource trashing I would suggest you try to separate the resources for each decode session. However, if you would like to use Media SDK SW decode to perform parallel decode operation I also suggest you use the Media SDK Session Join feature.Also, make sure you're not running out of memory. Decoding multiple streams (depending on the content resolution) may consume considerable amounts of memory.

Multi-threaded workloads are part of our Media SDK validation process. Just as a sanity check, I did create a threaded decode workload decoding 32 1280x1024 H264 streams in parallel. It works fine.

I suggest trying to debug your application further to explore the source of the issue.


Leave a Comment

Please sign in to add a comment. Not a member? Join today