Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
For the latest information on Intel’s response to the Log4j/Log4Shell vulnerability, please see Intel-SA-00646

Polyphase Filter Length

pq7
Beginner
548 Views

In the example for ResamplePolyphaseGetFixedFilter

int inRate=16000; // input frequency
int outRate=8000; // output frequency
int history; // half of filter length
char fname[]="filter.flt\0";
// coefficient file name
{
int size,len,height;
FILE *file; short *pFilter;
IppsresamplingPolyphaseFixed_16s *state;
history=(int)(64.0f*0.5*IPP_MAX(1.0,1.0/(double)outRate/(double)inRate))+1;
...

What is the point of this expression on line 10? How does it ever result in anything other than 1.0?

IPP_MAX(1.0,1.0/(double)outRate/(double)inRate)

Since in C, x/y/z == x/(y*z)

0 Kudos
1 Solution
Ruqiu_C_Intel
Employee
271 Views

Thank you for teaching us. This 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. 


View solution in original post

5 Replies
ShivaniK_Intel
Moderator
516 Views

Hi,


Thanks for reaching out to us.


Thanks for bringing up this to our notice. We will get back to you soon.


Regards

Shivani


Ruqiu_C_Intel
Employee
465 Views

Hi,


I am afraid not fully understood your question.

For the line 10 in the example, it calculates the filter length for fixed factor resampling. IPP developer reference guide mentioned that for general description of the polyphase resampling, please see "Multirate Digital Signal Processing" by R. Crochine and L. Rabier


Thanks


pq7
Beginner
428 Views

Thanks Ruqiu. Let me try to simplify the question for you:

 

Can you provide sample values for inRate and outRate such that the following expression does not give 1.0?

 

IPP_MAX(1.0,1.0/(double)outRate/(double)inRate)

 

Andrey_B_Intel
Employee
323 Views

Hi

I agree that result is 1.0 and this equation contains ambiguity. 

The "outRate/inRate" ration  in denominator more appropriate.

IPP_MAX(1.0,   1.0/( (double)outRate/(double)inRate)  )

to increase filter length for decimation only.

 

 

Ruqiu_C_Intel
Employee
272 Views

Thank you for teaching us. This 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. 


View solution in original post

Reply