Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.

MPEG-4 & OpenMP threads

mmoussa
Beginner
127 Views

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
Vladimir_Dudnik
Employee
127 Views

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

Regards,
Vladimir

mmoussa
Beginner
127 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.

Reply