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

## Polyphase Filter Length

Beginner
1,140 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)

1 Solution
Moderator
863 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.

5 Replies
Moderator
1,108 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

Moderator
1,057 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

Beginner
1,020 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)``

Employee
915 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.

Moderator
864 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.