Asterisk - The Open Source Telephony Project  18.5.0
Functions
hpOutput.c File Reference
#include "constants.h"
Include dependency graph for hpOutput.c:

Go to the source code of this file.

Functions

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

Function Documentation

◆ hpOutput()

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

Definition at line 19 of file hpOutput.c.

References hpo_pole_coefsTbl, hpo_zero_coefsTbl, and len().

Referenced by iLBC_decode().

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