The difference of IPP results and my native C code

The difference of IPP results and my native C code

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));
}

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

IPP implement this as

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

Vladimir

Quoting - Vladimir Dudnik (Intel)
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.

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

Leave a Comment

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