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

Polyphase Filter Length

pq7
Beginner
1,420 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
Moderator
1,143 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

0 Kudos
5 Replies
ShivaniK_Intel
Moderator
1,388 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


0 Kudos
Ruqiu_C_Intel
Moderator
1,337 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


0 Kudos
pq7
Beginner
1,300 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)

 

0 Kudos
Andrey_B_Intel
Employee
1,195 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.

 

 

0 Kudos
Ruqiu_C_Intel
Moderator
1,144 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. 


0 Kudos
Reply