Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6709 Discussions

The difference of IPP results and my native C code

egg126
Beginner
514 Views
Hi, I use the IPP 5.3, but the result of "FilterDeblocking8x8HorEdge_MPEG4" is different of mine, Who can help me?

I found the difference is how to round the "Integer division". How does Ipp implement this?

According the MPEG4 Video Verification Model, "//" means integer division and round to infinite, perhaps this isthe reason why my result is different from IPP. I think the a30 is different.

This is my code

int a30 = roundInfinite((((v[3] - v[6]) << 1) + 5 * (v[5] - v[4]))/8.0);

inline int roundInfinite(float v)
{
return ((v>=0) ? (int)(v + 0.5) : (int)(v - 0.5));
}

0 Kudos
1 Solution
Vladimir_Dudnik
Employee
514 Views
IPP implement this as

if (a30 >= 0)
a30 = (a30 + (1 << (3 - 1))) >> 3;
else
a30 = (a30 + (1 << (3 - 1)) - 1) >> 3;

Vladimir

View solution in original post

0 Kudos
3 Replies
Vladimir_Dudnik
Employee
515 Views
IPP implement this as

if (a30 >= 0)
a30 = (a30 + (1 << (3 - 1))) >> 3;
else
a30 = (a30 + (1 << (3 - 1)) - 1) >> 3;

Vladimir
0 Kudos
egg126
Beginner
514 Views
IPP implement this as

if (a30 >= 0)
a30 = (a30 + (1 << (3 - 1))) >> 3;
else
a30 = (a30 + (1 << (3 - 1)) - 1) >> 3;

Vladimir

Thanks for your reply...

However, I think this result is the same as my function. But at present,there are some point to do the filter and other do not. This is the reason why different, I don't know why my program do filter in some point and IPP dont', I guessthe a30 < QP is different. If Possible, Do you give me some more advise...

Thanks very much.
0 Kudos
Vladimir_Dudnik
Employee
514 Views
Could you please check if PX version of IPP will give the same result as V8 (assuming you are running on Core 2 system)?

It would be useful to know that behaviour of optimized IPP code (V8) is the same as general code branch (PX) on your test data. In our internal testing we do not see a difference.

Regards,
Vladimir
0 Kudos
Reply