diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-10-14 05:15:48 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-10-14 05:15:48 +0000 |
commit | 92a945abe63a2579c66257696ddda848ab5a3ea0 (patch) | |
tree | 0deebbd8647eb5799eef8ddc6f084ec945574299 /codecs/ilbc/hpOutput.c | |
parent | 850b151d70bb9a1dc28edd3c0d737b57b1ab43cc (diff) |
Update to new iLBC codec
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3997 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs/ilbc/hpOutput.c')
-rwxr-xr-x | codecs/ilbc/hpOutput.c | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/codecs/ilbc/hpOutput.c b/codecs/ilbc/hpOutput.c index 60a78d278..7d0eea010 100755 --- a/codecs/ilbc/hpOutput.c +++ b/codecs/ilbc/hpOutput.c @@ -1,59 +1,59 @@ - -/****************************************************************** - - iLBC Speech Coder ANSI-C Source Code - - hpOutput.c - - Copyright (c) 2001, - Global IP Sound AB. - 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++; - } -} - - + +/****************************************************************** + + iLBC Speech Coder ANSI-C Source Code + + hpOutput.c + + Copyright (C) The Internet Society (2004). + All Rights Reserved. + + + +******************************************************************/ + +#include "constants.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++; + } +} + + |