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

## The difference of IPP results and my native C code Beginner
394 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 - v) << 1) + 5 * (v - v))/8.0);

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

1 Solution Employee
394 Views
IPP implement this as

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

3 Replies Employee
395 Views
IPP implement this as

if (a30 >= 0)
a30 = (a30 + (1 << (3 - 1))) >> 3;
else
a30 = (a30 + (1 << (3 - 1)) - 1) >> 3; Beginner
394 Views
IPP implement this as

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

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. Employee
394 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, 