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

Intel IPP Polyphase Resampling

kevin38
Beginner
2,566 Views

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-signal-and-data-processing/filtering-functions/filtering-functions-1/polyphase-resampling-functions.html ).

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-signal-and-data-processing/filtering-functions/filtering-functions-1/polyphase-resampling-functions/resamplepolyphasegetfixedfilter.html ).

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,

0 Kudos
14 Replies
AbhishekD_Intel
Moderator
2,546 Views

Hi,


Thanks for reaching out to us.

We are forwarding this issue to the SME.


Warm Regards,

Abhishek


0 Kudos
Gennady_F_Intel
Moderator
2,514 Views

Could you give us your test to check the problem and then we will try to recommend something useful?


0 Kudos
kevin38
Beginner
2,483 Views

Dear Gennady,

Thanks for your answers. I attach here the code where I make this test of setting a new fixed filter to a ressampler object and then I recover the impulse response.  Please let me know if something is not clear in my code.

Best regards,

Kevin

0 Kudos
Gennady_F_Intel
Moderator
2,471 Views

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

       ^


0 Kudos
kevin38
Beginner
2,435 Views

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

0 Kudos
Gennady_F_Intel
Moderator
2,414 Views

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?


0 Kudos
kevin38
Beginner
2,388 Views

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,

 

 

0 Kudos
kevin38
Beginner
2,281 Views

Hello,

Didn't receive any messages since 3 or 4 weeks ago.

Do you have any news on this topic?

Do you need something on my side to advance on this topic? 

Regards,

0 Kudos
Gennady_F_Intel
Moderator
2,231 Views

Hi,

yes, we confirmed the problem with IPP and we started to fix the problem on our end. We will keep this thread updated when the problem will be fixed.


0 Kudos
kevin38
Beginner
2,093 Views

Great, thanks.

Do you have a rough estimation of time for having the problem fixed? (weeks? months? years?)

0 Kudos
Gennady_F_Intel
Moderator
2,092 Views

very likely the fix will be available the next ( nearest) update.


Gennady_F_Intel
Moderator
2,016 Views

The documentation ( of IPP v.2021.3 has been updated

ResamplePolyphaseGetFixedFilter, ResamplePolyphaseSetFixedFilter and

esamplePolyphaseGetSize, ResamplePolyphaseFixedGetSize.

the example GetFixedFilter.c is also updated.




0 Kudos
Gennady_F_Intel
Moderator
1,998 Views

The issue is closing and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.


0 Kudos
Reply