~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/syntFilter.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
 
       syntFilter.c
7
 
 
8
 
       Copyright (C) The Internet Society (2004).
9
 
       All Rights Reserved.
10
 
 
11
 
   ******************************************************************/
12
 
 
13
 
   #include "iLBC_define.h"
14
 
 
15
 
   /*----------------------------------------------------------------*
16
 
    *  LP synthesis filter.
17
 
    *---------------------------------------------------------------*/
18
 
 
19
 
   void syntFilter(
20
 
       float *Out,     /* (i/o) Signal to be filtered */
21
 
       float *a,       /* (i) LP parameters */
22
 
       int len,    /* (i) Length of signal */
23
 
 
24
 
 
25
 
 
26
 
 
27
 
 
28
 
       float *mem      /* (i/o) Filter state */
29
 
   ){
30
 
       int i, j;
31
 
       float *po, *pi, *pa, *pm;
32
 
 
33
 
       po=Out;
34
 
 
35
 
       /* Filter first part using memory from past */
36
 
 
37
 
       for (i=0; i<LPC_FILTERORDER; i++) {
38
 
           pi=&Out[i-1];
39
 
           pa=&a[1];
40
 
           pm=&mem[LPC_FILTERORDER-1];
41
 
           for (j=1; j<=i; j++) {
42
 
               *po-=(*pa++)*(*pi--);
43
 
           }
44
 
           for (j=i+1; j<LPC_FILTERORDER+1; j++) {
45
 
               *po-=(*pa++)*(*pm--);
46
 
           }
47
 
           po++;
48
 
       }
49
 
 
50
 
       /* Filter last part where the state is entirely in
51
 
          the output vector */
52
 
 
53
 
       for (i=LPC_FILTERORDER; i<len; i++) {
54
 
           pi=&Out[i-1];
55
 
           pa=&a[1];
56
 
           for (j=1; j<LPC_FILTERORDER+1; j++) {
57
 
               *po-=(*pa++)*(*pi--);
58
 
           }
59
 
           po++;
60
 
       }
61
 
 
62
 
       /* Update state vector */
63
 
 
64
 
       memcpy(mem, &Out[len-LPC_FILTERORDER],
65
 
           LPC_FILTERORDER*sizeof(float));
66
 
   }