Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
13 Views

MPEG-4 & OpenMP threads

I am using IPP 5.1 media sample to decode MPEG-4 streams. I am linking to the umc libraries statically in my Visual Studio 2005 dll. I noticed on an XP SP2 dual core machine that the threads are not cleaned up right. After further investgation, I concluded that the thread leak is related to OpenMP. Every time I instantiate an MPEG-4 decoder, an extra thread starts and does not get cleaned up after I destroy the decoder. In our application, I can open a multiplexer window that shows MPEG-4 images from up to 64 streams. On closing the window, I notice that the number of leaked theads is exactly equal to the number of decoder instances. I stopped at a break point and noticed the call stack for each of the extra thread is stopped at the call _vcomp NullAPCFunc.

I tried to use ippSetNumThreads(1) right after ippStaticInit when loading the dll to disable IPP internal threading and observe the difference but it made no difference. Any ideas?

0 Kudos
2 Replies
Highlighted
13 Views

Could you please check this on the latest version, which is IPP 6.0 beta?

Regards,
Vladimir

0 Kudos
Highlighted
Beginner
13 Views

I removed the OpenMP support from the media sample version 5.1 and recompiled. It works fine now with no thread leak and without affecting the performance on the dual core machine.

Thanks a lot for your help.

0 Kudos