diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-19 00:19:29 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-01-19 00:19:29 +0000 |
commit | f8247040e6231c4b3b5099ea3a526348b7941566 (patch) | |
tree | 0cc92ad6ebf6ae49a62f6e7ef8ec819121d63630 /trunk/codecs/ilbc/hpOutput.c | |
parent | d88e56c61ce2042544c1a8a71c93b69ab2e6ffba (diff) |
Creating tag for the release of asterisk-1.6.0-beta1v1.6.0-beta1
git-svn-id: http://svn.digium.com/svn/asterisk/tags/1.6.0-beta1@99163 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'trunk/codecs/ilbc/hpOutput.c')
-rw-r--r-- | trunk/codecs/ilbc/hpOutput.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/trunk/codecs/ilbc/hpOutput.c b/trunk/codecs/ilbc/hpOutput.c new file mode 100644 index 000000000..fdc0f6db9 --- /dev/null +++ b/trunk/codecs/ilbc/hpOutput.c @@ -0,0 +1,59 @@ + +/****************************************************************** + + iLBC Speech Coder ANSI-C Source Code + + hpOutput.c + + Copyright (C) The Internet Society (2004). + All Rights Reserved. + + + +******************************************************************/ + +#include "constants.h" +#include "hpOutput.h" +/*----------------------------------------------------------------* + * Output high-pass filter + *---------------------------------------------------------------*/ + +void hpOutput( + float *In, /* (i) vector to filter */ + int len,/* (i) length of vector to filter */ + float *Out, /* (o) the resulting filtered vector */ + float *mem /* (i/o) the filter state */ +){ + int i; + float *pi, *po; + + /* all-zero section*/ + + pi = &In[0]; + po = &Out[0]; + for (i=0; i<len; i++) { + *po = hpo_zero_coefsTbl[0] * (*pi); + *po += hpo_zero_coefsTbl[1] * mem[0]; + *po += hpo_zero_coefsTbl[2] * mem[1]; + + mem[1] = mem[0]; + mem[0] = *pi; + po++; + pi++; + + } + + /* all-pole section*/ + + po = &Out[0]; + for (i=0; i<len; i++) { + *po -= hpo_pole_coefsTbl[1] * mem[2]; + *po -= hpo_pole_coefsTbl[2] * mem[3]; + + mem[3] = mem[2]; + mem[2] = *po; + po++; + } +} + + |