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

« back to all changes in this revision

Viewing changes to daemon/libs/pjproject-2.1.0/third_party/ilbc/anaFilter.c

  • Committer: Package Import Robot
  • Author(s): Francois Marier, Francois Marier, Mark Purcell
  • Date: 2014-10-18 15:08:50 UTC
  • mfrom: (1.1.12)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20141018150850-2exfk34ckb15pcwi
Tags: 1.4.1-0.1
[ Francois Marier ]
* Non-maintainer upload
* New upstream release (closes: #759576, #741130)
  - debian/rules +PJPROJECT_VERSION := 2.2.1
  - add upstream patch to fix broken TLS support
  - add patch to fix pjproject regression

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