Same image Different performance of ippi funtion

Same image Different performance of ippi funtion

Hi everyone . I am trying to implement edge drawing algoritm of Cihan Topal, Cüneyt Akinlar . This is the code of  magnitude calculation:

void CalculateMagnitude(CprImage *sobelVertical,CprImage *sobelHorizantal,CprImage *magImage)
{
ippiAdd_32f_C1R( (Ipp32f *)sobelVertical->DataPtr() + offset , sobelVertical->Step() , (Ipp32f *)sobelHorizantal->DataPtr() + offset , sobelHorizantal->Step() , (Ipp32f *)magImage->DataPtr() + offset , magImage->Step() , roi);

ippiThreshold_LTVal_32f_C1R( (Ipp32f *)magImage->DataPtr() + offset , magImage->Step() , (Ipp32f *)magImage->DataPtr() + offset , magImage->Step() , roi , (Ipp32f)m_gradientThreshold , 0);
}

//offset , roi , m_gradientThreshold defined before

When i measure the performance of functions, this function processes same image sometimes at 2ms , sometimes at 30 ms , 120 ms ...

What do you think the problem is?  

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

>>...When i measure the performance of functions, this function processes same image sometimes at 2ms,
>>sometimes at 30 ms , 120 ms ...
>>
>>What do you think the problem is?

Additional technical details about your development environment, IPP library version and how big is the source image are needed.

i am using ipp verison 7.0.205, image is 512x512 gray scale image, development envoriment visual studio 2008 c++

Do you use 32-bit or 64-bit IPP DLLs?

>>...i am using ipp verison 7.0.205...

I have that version and use ippiAdd_32f_xxx and never had any performance issues. I can't say anything about ippiThreshold_LTVal_32f_C1R.

Consider the following:

- Disable antivirus ( if any )
- Use single-threaded environment for IPP and boost priority for the test process to High or to Realtime
- Repeat tests
- It makes sense to verify two cases, like:

Test #1
...
{
ippiAdd_32f_C1R( ... )
// ippiThreshold_LTVal_32f_C1R( ... ) <- commented!
}

and

Test #2
...
{
// ippiAdd_32f_C1R( ... ) <- commented!
ippiThreshold_LTVal_32f_C1R( ... )
}

in order to identify what IPP function possibly has some issues ( still Not proven ).

- A complete test case will help as well

32-bit . Ok i am trying what you say

>>...32-bit . Ok i am trying what you say...

Use Release Configuration for your test project and if you upload a simple test case I could quickly verify if some performance issues exist.

My environment in that case is: Windows XP 32-bit / IPP v7.0.205 / VS 2005 with MS and ICC ( v12 ) compilers.

 I did what you said It differed a little bit but still have problems 

I added performans outputs of test1, test2 ,respectly

Attachments: 

AttachmentSize
Downloadimage/png ms.png12.23 KB
Downloadimage/png ms2.png9.66 KB

>>Test #1
>>...
>>{
>>ippiAdd_32f_C1R( ... )
>>// ippiThreshold_LTVal_32f_C1R( ... ) <- commented!
>>}

I see that there is a performance issue in the 1st test case:

...
34.1359
29.9709
0.576922
...

but it doesn't give any idea what else is going on in your application and around in OS (!) at the same time, that is during calculation of the magnitude.

Leave a Comment

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