~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/helpfun.h

  • 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
       helpfun.h
 
7
 
 
8
       Copyright (C) The Internet Society (2004).
 
9
       All Rights Reserved.
 
10
 
 
11
   ******************************************************************/
 
12
 
 
13
   #ifndef __iLBC_HELPFUN_H
 
14
   #define __iLBC_HELPFUN_H
 
15
 
 
16
   void autocorr(
 
17
       float *r,       /* (o) autocorrelation vector */
 
18
       const float *x, /* (i) data vector */
 
19
       int N,          /* (i) length of data vector */
 
20
       int order       /* largest lag for calculated
 
21
                          autocorrelations */
 
22
   );
 
23
 
 
24
   void window(
 
25
       float *z,       /* (o) the windowed data */
 
26
       const float *x, /* (i) the original data vector */
 
27
       const float *y, /* (i) the window */
 
28
       int N           /* (i) length of all vectors */
 
29
   );
 
30
 
 
31
   void levdurb(
 
32
       float *a,       /* (o) lpc coefficient vector starting
 
33
                              with 1.0 */
 
34
       float *k,       /* (o) reflection coefficients */
 
35
       float *r,       /* (i) autocorrelation vector */
 
36
       int order       /* (i) order of lpc filter */
 
37
   );
 
38
 
 
39
   void interpolate(
 
40
 
 
41
 
 
42
 
 
43
 
 
44
 
 
45
       float *out,     /* (o) the interpolated vector */
 
46
       float *in1,     /* (i) the first vector for the
 
47
                              interpolation */
 
48
       float *in2,     /* (i) the second vector for the
 
49
                              interpolation */
 
50
       float coef,     /* (i) interpolation weights */
 
51
       int length      /* (i) length of all vectors */
 
52
   );
 
53
 
 
54
   void bwexpand(
 
55
       float *out,     /* (o) the bandwidth expanded lpc
 
56
                              coefficients */
 
57
       float *in,      /* (i) the lpc coefficients before bandwidth
 
58
                              expansion */
 
59
       float coef,     /* (i) the bandwidth expansion factor */
 
60
       int length      /* (i) the length of lpc coefficient vectors */
 
61
   );
 
62
 
 
63
   void vq(
 
64
       float *Xq,      /* (o) the quantized vector */
 
65
       int *index,     /* (o) the quantization index */
 
66
       const float *CB,/* (i) the vector quantization codebook */
 
67
       float *X,       /* (i) the vector to quantize */
 
68
       int n_cb,       /* (i) the number of vectors in the codebook */
 
69
       int dim         /* (i) the dimension of all vectors */
 
70
   );
 
71
 
 
72
   void SplitVQ(
 
73
       float *qX,      /* (o) the quantized vector */
 
74
       int *index,     /* (o) a vector of indexes for all vector
 
75
                              codebooks in the split */
 
76
       float *X,       /* (i) the vector to quantize */
 
77
       const float *CB,/* (i) the quantizer codebook */
 
78
       int nsplit,     /* the number of vector splits */
 
79
       const int *dim, /* the dimension of X and qX */
 
80
       const int *cbsize /* the number of vectors in the codebook */
 
81
   );
 
82
 
 
83
 
 
84
   void sort_sq(
 
85
       float *xq,      /* (o) the quantized value */
 
86
       int *index,     /* (o) the quantization index */
 
87
       float x,    /* (i) the value to quantize */
 
88
       const float *cb,/* (i) the quantization codebook */
 
89
       int cb_size     /* (i) the size of the quantization codebook */
 
90
   );
 
91
 
 
92
   int LSF_check(      /* (o) 1 for stable lsf vectors and 0 for
 
93
 
 
94
 
 
95
 
 
96
 
 
97
 
 
98
                              nonstable ones */
 
99
       float *lsf,     /* (i) a table of lsf vectors */
 
100
       int dim,    /* (i) the dimension of each lsf vector */
 
101
       int NoAn    /* (i) the number of lsf vectors in the
 
102
                              table */
 
103
   );
 
104
 
 
105
   #endif
 
106