Utilise new MergeSym feature to no longer overwrite the source .DEF file when buildin...
[openh323.git] / src / iLBC / hpOutput.c
blob87dcb8ff3f9c09397aedbea439d778b60d67f3b7
2 /******************************************************************
4 iLBC Speech Coder ANSI-C Source Code
6 hpOutput.c
8 Copyright (c) 2001,
9 Global IP Sound AB.
10 All rights reserved.
12 ******************************************************************/
14 #include "constants.h"
16 /*----------------------------------------------------------------*
17 * Output high-pass filter
18 *---------------------------------------------------------------*/
20 void hpOutput(
21 float *In, /* (i) vector to filter */
22 int len,/* (i) length of vector to filter */
23 float *Out, /* (o) the resulting filtered vector */
24 float *mem /* (i/o) the filter state */
25 ){
26 int i;
27 float *pi, *po;
29 /* all-zero section*/
31 pi = &In[0];
32 po = &Out[0];
33 for (i=0; i<len; i++) {
34 *po = hpo_zero_coefsTbl[0] * (*pi);
35 *po += hpo_zero_coefsTbl[1] * mem[0];
36 *po += hpo_zero_coefsTbl[2] * mem[1];
38 mem[1] = mem[0];
39 mem[0] = *pi;
40 po++;
41 pi++;
45 /* all-pole section*/
50 po = &Out[0];
51 for (i=0; i<len; i++) {
52 *po -= hpo_pole_coefsTbl[1] * mem[2];
53 *po -= hpo_pole_coefsTbl[2] * mem[3];
55 mem[3] = mem[2];
56 mem[2] = *po;
57 po++;