I have a question.
There are two functions of 2D convolution in attached cpp-file.
The first one is a standard convolution on floating-point data.
The second is a function, that use ippiConvValid_32f_C1R() for convolution.
When I use data of this example (https://software.intel.com/sites/products/documentation/doclib/ipp_sa/80/ipp_manual/GUID-DB033BE0-5621-4C7A-AA34-B8E0BCA74B0C.htm) with integer numbers for source matrix and kernel, everything is ok, results of two functions are equal, but when i use generator of random integer or floating-point numbers, ippiConvValid_32f_C1R() returns wrong result.
What's the problem?
I have downloaded last demo version IPP two weeks ago.
I would like to buy the license if it will work properly.
Now, I have tried to use the function ippiConv_32f_C1R(...) instead ippiConvValid_32f_C1R(...), but i get the same result.
I noticed, when i am using the kernel and src1 from example(https://software.intel.com/sites/products/documentation/doclib/ipp_sa/80/ipp_manual/GUID-F26546FF-2F62-4CC2-888E-9849C8D0DE78.htm), both functions are working properly, but if I try to change at least one number in the kernel, thus disrupting its "symmetry", I get absolutely wrong result. What else can i do?
I guess you've implemented correlation instead of convolution - Ii think that if you perform a mirroring of your generated kernel (so that right bottom pixel becomes the left top) for your function (or for IPP) - you'll get the expected and comparable result.
In the documentation for the function I see the formula
I need the exactly this formula for convolution, not for correlation. In documentation I don't see any limitation that kernel should be mirrored (symmetric).
I've said nothing about symmetry. It's seen from the formula that kernel (g in the formula) is applied from the top index to bottom. So for your implementation of convolution (I guess) you should perform kernel transposition in the next manner: