Asterisk - The Open Source Telephony Project  18.5.0
Functions
hpInput.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void hpInput (float *In, int len, float *Out, float *mem)
 

Function Documentation

◆ hpInput()

void hpInput ( float *  In,
int  len,
float *  Out,
float *  mem 
)

Definition at line 23 of file hpInput.c.

References hpi_pole_coefsTbl, hpi_zero_coefsTbl, and len().

Referenced by iLBC_encode().

28  {
29  int i;
30  float *pi, *po;
31 
32  /* all-zero section*/
33 
34  pi = &In[0];
35  po = &Out[0];
36  for (i=0; i<len; i++) {
37  *po = hpi_zero_coefsTbl[0] * (*pi);
38  *po += hpi_zero_coefsTbl[1] * mem[0];
39  *po += hpi_zero_coefsTbl[2] * mem[1];
40 
41  mem[1] = mem[0];
42  mem[0] = *pi;
43  po++;
44  pi++;
45 
46  }
47 
48  /* all-pole section*/
49 
50  po = &Out[0];
51  for (i=0; i<len; i++) {
52  *po -= hpi_pole_coefsTbl[1] * mem[2];
53  *po -= hpi_pole_coefsTbl[2] * mem[3];
54 
55  mem[3] = mem[2];
56  mem[2] = *po;
57  po++;
58 
59 
60 
61 
62 
63  }
64  }
float hpi_pole_coefsTbl[3]
Definition: constants.c:77
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
float hpi_zero_coefsTbl[3]
Definition: constants.c:74