Asterisk - The Open Source Telephony Project  18.5.0
Functions
lpfilt.c File Reference
#include "f2c.h"
Include dependency graph for lpfilt.c:

Go to the source code of this file.

Functions

int lpfilt_ (real *inbuf, real *lpbuf, integer *len, integer *nsamp)
 

Function Documentation

◆ lpfilt_()

int lpfilt_ ( real inbuf,
real lpbuf,
integer len,
integer nsamp 
)

Definition at line 83 of file lpfilt.c.

References inbuf(), lpc10_decoder_state::j, and len().

Referenced by analys_().

85 {
86  /* System generated locals */
87  integer i__1;
88 
89  /* Local variables */
90  integer j;
91  real t;
92 
93 /* Arguments */
94 /* Parameters/constants */
95 /* Local variables that need not be saved */
96 /* Local state */
97 /* None */
98  /* Parameter adjustments */
99  --lpbuf;
100  --inbuf;
101 
102  /* Function Body */
103  i__1 = *len;
104  for (j = *len + 1 - *nsamp; j <= i__1; ++j) {
105  t = (inbuf[j] + inbuf[j - 30]) * -.0097201988f;
106  t += (inbuf[j - 1] + inbuf[j - 29]) * -.0105179986f;
107  t += (inbuf[j - 2] + inbuf[j - 28]) * -.0083479648f;
108  t += (inbuf[j - 3] + inbuf[j - 27]) * 5.860774e-4f;
109  t += (inbuf[j - 4] + inbuf[j - 26]) * .0130892089f;
110  t += (inbuf[j - 5] + inbuf[j - 25]) * .0217052232f;
111  t += (inbuf[j - 6] + inbuf[j - 24]) * .0184161253f;
112  t += (inbuf[j - 7] + inbuf[j - 23]) * 3.39723e-4f;
113  t += (inbuf[j - 8] + inbuf[j - 22]) * -.0260797087f;
114  t += (inbuf[j - 9] + inbuf[j - 21]) * -.0455563702f;
115  t += (inbuf[j - 10] + inbuf[j - 20]) * -.040306855f;
116  t += (inbuf[j - 11] + inbuf[j - 19]) * 5.029835e-4f;
117  t += (inbuf[j - 12] + inbuf[j - 18]) * .0729262903f;
118  t += (inbuf[j - 13] + inbuf[j - 17]) * .1572008878f;
119  t += (inbuf[j - 14] + inbuf[j - 16]) * .2247288674f;
120  t += inbuf[j - 15] * .250535965f;
121  lpbuf[j] = t;
122  }
123  return 0;
124 } /* lpfilt_ */
real lpbuf[696]
Definition: lpc10.h:93
static int inbuf(struct baseio *bio, FILE *fi)
utility used by inchar(), for base_encode()
static int len(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t buflen)
float real
Definition: lpc10.h:79
INT32 integer
Definition: lpc10.h:80