diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-07-31 15:25:14 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-07-31 15:25:14 +0000 |
commit | 2d507021e3078779c8b48c44c8881558f0ee6242 (patch) | |
tree | a9e27e7543b728242bca923417cdaf527b2d5515 /pjmedia/src/pjmedia-codec/ilbc/hpOutput.c | |
parent | ce9088d8978fdd457158ec0ea4c8e11e10b2960f (diff) |
Really add the iLBC files into SVN now (duh!).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@638 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjmedia/src/pjmedia-codec/ilbc/hpOutput.c')
-rw-r--r-- | pjmedia/src/pjmedia-codec/ilbc/hpOutput.c | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/pjmedia/src/pjmedia-codec/ilbc/hpOutput.c b/pjmedia/src/pjmedia-codec/ilbc/hpOutput.c new file mode 100644 index 00000000..756160a6 --- /dev/null +++ b/pjmedia/src/pjmedia-codec/ilbc/hpOutput.c @@ -0,0 +1,61 @@ + + /****************************************************************** + + 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++; + } + } + |