I am using Polyphase resampling function of IPP libraries ( https://software.intel.com/content/www/us/en/develop/documentation/ipp-dev-reference/top/volume-1-si... ).
For the moment I am just testing for upsampling a signal by a factor of 2. I am using the Fixed_32f family of functions and specifically the GetFilter and SetFilter functions. SetFilter allows to set a precomputed FIR filter to the resampling object.
I have a problem when I am resampling using a filter imported with the SetFilter: I see a bad value for the first sample of the impulse response. When I check the impulse response, I see that its first sample is the coefficient of the filter created with the Init function instead of the first sample that corresponds to the filter set with SetFilter method.
Has anyone been able to make it working properly with these GetFilter and SetFilter functions? The IPP documentation is not of great help with this since it sets the same filter as the one set by default with the init method ( see https://software.intel.com/content/www/us/en/develop/documentation/ipp-dev-reference/top/volume-1-si... ).
It's also not detailed in the documentation how one has to organise the coefficients when using the SetFilter method, so i had to to deduce this by getting the filter coefficients created upon calling the Init function (but i think i get this right). Anyone had a similar problem?
Thanks in advance for your feedback,
Link Copied
Hi,
Thanks for reaching out to us.
We are forwarding this issue to the SME.
Warm Regards,
Abhishek
IPP Image Processing Developer Reference contains several examples
Did You check it to see how properly use this filter?
Could you give us your test to check the problem and then we will try to recommend something useful?
Kevin,
Could You please show how did you compile this case? We will transfer this case to the developer of this filter and hope he will help but we have to have an example that could be compilable.
I tried to build the case but here what I see:
test.cpp
test.cpp(21): error: variable "sdiracinput" may not be initialized
float sdiracinput[kInL] = { };
^
test.cpp(25): error: variable "sOut1" may not be initialized
float sOut1[kInL * upSampFactor] = {}; //buffer where put the output resampled signal for first resampler
^
test.cpp(26): error: variable "sOut2" may not be initialized
float sOut2[kInL * upSampFactor] = {}; //buffer where put the output resampled signal for second resampler
^
Hello,
I use Visual Studio 2019.
Seeing the errors you mention, I modified the file to be more standard C compatible . I run it in c++. So please found attached new version of the file that should be more compatible with standard C. I do not know why, I have to change the extension to .c to be able to upload the file on this forum (extension cpp gives an error when I try to upload, but the original extension of my file is cpp).
Best regards,
Kevin
ok, it is compatible for now.
I linked this test against the IPP 2020 u3 and printed out the 10 first coefficients of sOut1 and sOut2.
0, sOut1 = 0.000000, sOut2 = 0.000000
1, sOut1 = 0.000000, sOut2 = 0.000000
2, sOut1 = -0.001803, sOut2 = -0.000046
3, sOut1 = -0.047503, sOut2 = -0.047503
4, sOut1 = 0.027489, sOut2 = 0.027489
5, sOut1 = 0.550097, sOut2 = 0.550097
6, sOut1 = 0.948627, sOut2 = 0.948627
7, sOut1 = 0.550097, sOut2 = 0.550097
8, sOut1 = 0.027489, sOut2 = 0.027489
9, sOut1 = -0.047503, sOut2 = -0.047503
ippIP AVX2 (l9 threaded),2020.0.3 (r0x3390eac5),2020,0
Do you see the same results?
Hello,
Yes, I see the same results.
The problem I see on these results (that are the same as mines) is the difference on the index 2 of the results in botch cases, that should be the same to my understand of the getfilter and setfilter methods ( sOut1 = -0.001803, sOut2 = -0.000046)
Best regards,
For more complete information about compiler optimizations, see our Optimization Notice.