Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

Polyphase Filter Length

pq7
Beginner
842 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
565 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
810 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
759 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
722 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
617 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
566 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. 


Reply