1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
-
- #include "constants.h"
-
- void hpInput(
- float *In,
- int len,
- float *Out,
- float *mem
- ){
- int i;
- float *pi, *po;
-
- pi = &In[0];
- po = &Out[0];
- for (i=0; i<len; i++) {
- *po = hpi_zero_coefsTbl[0] * (*pi);
- *po += hpi_zero_coefsTbl[1] * mem[0];
- *po += hpi_zero_coefsTbl[2] * mem[1];
- mem[1] = mem[0];
- mem[0] = *pi;
- po++;
- pi++;
- }
-
- po = &Out[0];
- for (i=0; i<len; i++) {
- *po -= hpi_pole_coefsTbl[1] * mem[2];
- *po -= hpi_pole_coefsTbl[2] * mem[3];
- mem[3] = mem[2];
- mem[2] = *po;
- po++;
- }
- }
|