V4.0 -> V4.1 performace degradation

V4.0 -> V4.1 performace degradation

My application links to static Ipp libraries ( merged.lib + emerged.lib + IppStaticInitBest()).When I upgraded libraryfrom V4.0 to V4.1 I noticed a huge performance degradation.Ippmpeg4 codecruns about 2x slower.I didn't change anything but simplychanged ipp*.lib and *h files to newer versions.Everything is ok whenI revert to the previous version.
What could be a reason ?
Processortype detected correctly as "Pentium4HT2 2800MHz". mpeg codec is put in separate static library, butIppStaticInitBest() is called from my main exe.

Thanks in advance,

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

Hi Kamil,

Actually it looks very strange, because our own tests shows performance improvement for new IPP version, because there was additional optimization work done. Well, let us understand wherethe problem is. Could you describe your application in more details. What MPEG4 codec do you use? Is itIPP MPEG4 codec sample? Can you also insert output for IPP version? I mean simple piece of code (after call of ippStaticInit func) like this:

const IppLibraryVersion ver = ippvcGetLibVersion()
printf("name: %s, version: %s, build date: %s
",ver->Name,ver->Version, ver->BuildDate);


Thank you for the answer,

When I link to ipp4.0 I get the following message:
ippvct7l.lib, version v4.0, buld date: Oct 23 2003

but in ipp4.1 I get:
ippvca6l.lib version v4.1, build date: Jul 20 2004

This is my init code:

#pragma comment( lib, "ippiemerged.lib" )
#pragma comment( lib, "ippjemerged.lib" )
#pragma comment( lib, "ippsemerged.lib" )
#pragma comment( lib, "ippvcemerged.lib" )

#pragma comment( lib, "ippimerged.lib" )
#pragma comment( lib, "ippjmerged.lib" )
#pragma comment( lib, "ippsmerged.lib" )
#pragma comment( lib, "ippvcmerged.lib" )

#pragma comment( lib, "ippcorel.lib" )

void CIppLibrary::Init()
VERIFY( ::ippStaticInitBest() == ippStsNoErr ); // no error
nCpuType = ::ippCoderGetCpuType(); // returns ippCpuP4HT2

I noticed the ipp*i7l.lib files under ./lib subdirectory, so Iadded them to my source-tree andinsertedfollowing lines:

#pragma comment( lib, "ippii7l.lib" )
#pragma comment( lib, "ippji7l.lib" )
#pragma comment( lib, "ippsi7l.lib" )
#pragma comment( lib, "ippvci7l.lib" )

// and the rest of the file
#pragma comment( lib, "ippiemerged.lib" )

but I stillget "ippvca6l.lib". I use VC++7.1. The codec is derived IPP sample.



ippStaticInitCpu(ippCpuP4HT2) works with no problem under Ipp4.1, but I'd prefer to use auto-detection.


We are verified your case, you are right. Unfortunately, there is bug in IPP static dispatcher mechanizm, which cause A6 code selection in caseyou haveT7 processor. Both variants of static dispatcher (ippStaticInit and ippStaticInitBest) have this bug. Dynamic dispatcher (DLLs) do not have this bug. So, you havethree choices to workaround this:

  1. You can link your application with IPP DLLs
  2. You can emulate static dispatcher in your code. Just replace call of ippStaticInitBest with
  3. You can link your application with ippcorel.lib from IPP v4.0 which do not have this bug.

By the way, you need to remove ippxxi7l.lib libraries from your project if you developing for IA32 platform. The I7 code is for Intel Itaniumspecific libraries.


Thanks, I use:


it looks like it is exactly the same function.

What do you mean? No effect?
I tested this, it helps becauseafter thatI got T7code instead of A6 before.
Could you verify that after this call you do not callippStaticInit somewhere?


Of course it is not the same function but works the same andyes, everything is ok now.

Leave a Comment

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