~ubuntu-branches/ubuntu/wily/sflphone/wily

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.0.1/third_party/ilbc/hpOutput.c

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2014-01-28 18:23:36 UTC
  • mfrom: (1.1.11)
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: package-import@ubuntu.com-20140128182336-3xenud1kbnwmf3mz
* New upstream release 
  - Fixes "New Upstream Release" (Closes: #735846)
  - Fixes "Ringtone does not stop" (Closes: #727164)
  - Fixes "[sflphone-kde] crash on startup" (Closes: #718178)
  - Fixes "sflphone GUI crashes when call is hung up" (Closes: #736583)
* Build-Depends: ensure GnuTLS 2.6
  - libucommon-dev (>= 6.0.7-1.1), libccrtp-dev (>= 2.0.6-3)
  - Fixes "FTBFS Build-Depends libgnutls{26,28}-dev" (Closes: #722040)
* Fix "boost 1.49 is going away" unversioned Build-Depends: (Closes: #736746)
* Add Build-Depends: libsndfile-dev, nepomuk-core-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
   /******************************************************************
3
 
 
4
 
       iLBC Speech Coder ANSI-C Source Code
5
 
 
6
 
       hpOutput.c
7
 
 
8
 
       Copyright (C) The Internet Society (2004).
9
 
       All Rights Reserved.
10
 
 
11
 
   ******************************************************************/
12
 
 
13
 
   #include "constants.h"
14
 
 
15
 
   /*----------------------------------------------------------------*
16
 
    *  Output high-pass filter
17
 
    *---------------------------------------------------------------*/
18
 
 
19
 
   void hpOutput(
20
 
 
21
 
 
22
 
 
23
 
 
24
 
 
25
 
       float *In,  /* (i) vector to filter */
26
 
       int len,/* (i) length of vector to filter */
27
 
       float *Out, /* (o) the resulting filtered vector */
28
 
       float *mem  /* (i/o) the filter state */
29
 
   ){
30
 
       int i;
31
 
       float *pi, *po;
32
 
 
33
 
       /* all-zero section*/
34
 
 
35
 
       pi = &In[0];
36
 
       po = &Out[0];
37
 
       for (i=0; i<len; i++) {
38
 
           *po = hpo_zero_coefsTbl[0] * (*pi);
39
 
           *po += hpo_zero_coefsTbl[1] * mem[0];
40
 
           *po += hpo_zero_coefsTbl[2] * mem[1];
41
 
 
42
 
           mem[1] = mem[0];
43
 
           mem[0] = *pi;
44
 
           po++;
45
 
           pi++;
46
 
 
47
 
       }
48
 
 
49
 
       /* all-pole section*/
50
 
 
51
 
       po = &Out[0];
52
 
       for (i=0; i<len; i++) {
53
 
           *po -= hpo_pole_coefsTbl[1] * mem[2];
54
 
           *po -= hpo_pole_coefsTbl[2] * mem[3];
55
 
 
56
 
           mem[3] = mem[2];
57
 
           mem[2] = *po;
58
 
           po++;
59
 
       }
60
 
   }