diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-04-07 12:47:34 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-04-07 12:47:34 +0000 |
commit | 81d1b2797aa3945c529d57f9ddf6179ec2b392a4 (patch) | |
tree | 2ae3b710e8152fb1140653473fbc338a6638178e /third_party/ilbc/hpInput.c | |
parent | 3ade1510e72926d02d7c7d4416257449bc0cd3f3 (diff) |
Moved ilbc to third_party directory
git-svn-id: http://svn.pjsip.org/repos/pjproject/branches/split-3rd-party@1169 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'third_party/ilbc/hpInput.c')
-rw-r--r-- | third_party/ilbc/hpInput.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/third_party/ilbc/hpInput.c b/third_party/ilbc/hpInput.c new file mode 100644 index 00000000..7ceee096 --- /dev/null +++ b/third_party/ilbc/hpInput.c @@ -0,0 +1,65 @@ + + /****************************************************************** + + iLBC Speech Coder ANSI-C Source Code + + + + + + hpInput.c + + Copyright (C) The Internet Society (2004). + All Rights Reserved. + + ******************************************************************/ + + #include "constants.h" + + /*----------------------------------------------------------------* + * Input high-pass filter + *---------------------------------------------------------------*/ + + void hpInput( + 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 = hpi_zero_coefsTbl[0] * (*pi); + *po += hpi_zero_coefsTbl[1] * mem[0]; + *po += hpi_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 -= hpi_pole_coefsTbl[1] * mem[2]; + *po -= hpi_pole_coefsTbl[2] * mem[3]; + + mem[3] = mem[2]; + mem[2] = *po; + po++; + + + + + + } + } + |