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

Go to the source code of this file.

Functions

void syntFilter (float *Out, float *a, int len, float *mem)
 

Function Documentation

◆ syntFilter()

void syntFilter ( float *  Out,
float *  a,
int  len,
float *  mem 
)

Definition at line 19 of file syntFilter.c.

References len(), and LPC_FILTERORDER.

Referenced by iLBC_decode().

29  {
30  int i, j;
31  float *po, *pi, *pa, *pm;
32 
33  po=Out;
34 
35  /* Filter first part using memory from past */
36 
37  for (i=0; i<LPC_FILTERORDER; i++) {
38  pi=&Out[i-1];
39  pa=&a[1];
40  pm=&mem[LPC_FILTERORDER-1];
41  for (j=1; j<=i; j++) {
42  *po-=(*pa++)*(*pi--);
43  }
44  for (j=i+1; j<LPC_FILTERORDER+1; j++) {
45  *po-=(*pa++)*(*pm--);
46  }
47  po++;
48  }
49 
50  /* Filter last part where the state is entirely in
51  the output vector */
52 
53  for (i=LPC_FILTERORDER; i<len; i++) {
54  pi=&Out[i-1];
55  pa=&a[1];
56  for (j=1; j<LPC_FILTERORDER+1; j++) {
57  *po-=(*pa++)*(*pi--);
58  }
59  po++;
60  }
61 
62  /* Update state vector */
63 
64  memcpy(mem, &Out[len-LPC_FILTERORDER],
65  LPC_FILTERORDER*sizeof(float));
66  }
#define LPC_FILTERORDER
Definition: iLBC_define.h:40
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
static struct test_val a