Asterisk - The Open Source Telephony Project  18.5.0
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
Functions
anaFilter.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void anaFilter (float *In, float *a, int len, float *Out, float *mem)
 

Function Documentation

◆ anaFilter()

void anaFilter ( float *  In,
float *  a,
int  len,
float *  Out,
float *  mem 
)

Definition at line 20 of file anaFilter.c.

References a, len(), and LPC_FILTERORDER.

Referenced by iLBC_encode().

26  {
27  int i, j;
28  float *po, *pi, *pm, *pa;
29 
30  po = Out;
31 
32  /* Filter first part using memory from past */
33 
34  for (i=0; i<LPC_FILTERORDER; i++) {
35  pi = &In[i];
36  pm = &mem[LPC_FILTERORDER-1];
37  pa = a;
38  *po=0.0;
39 
40 
41 
42 
43 
44  for (j=0; j<=i; j++) {
45  *po+=(*pa++)*(*pi--);
46  }
47  for (j=i+1; j<LPC_FILTERORDER+1; j++) {
48 
49  *po+=(*pa++)*(*pm--);
50  }
51  po++;
52  }
53 
54  /* Filter last part where the state is entirely
55  in the input vector */
56 
57  for (i=LPC_FILTERORDER; i<len; i++) {
58  pi = &In[i];
59  pa = a;
60  *po=0.0;
61  for (j=0; j<LPC_FILTERORDER+1; j++) {
62  *po+=(*pa++)*(*pi--);
63  }
64  po++;
65  }
66 
67  /* Update state vector */
68 
69  memcpy(mem, &In[len-LPC_FILTERORDER],
70  LPC_FILTERORDER*sizeof(float));
71  }
#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