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

Go to the source code of this file.

Functions

int hp100_ (real *speech, integer *start, integer *end, struct lpc10_encoder_state *st)
 
int inithp100_ (void)
 

Function Documentation

◆ hp100_()

int hp100_ ( real speech,
integer start,
integer end,
struct lpc10_encoder_state st 
)

Definition at line 113 of file hp100.c.

References end, lpc10_encoder_state::z11, lpc10_encoder_state::z12, lpc10_encoder_state::z21, and lpc10_encoder_state::z22.

Referenced by prepro_().

115 {
116  /* Temporary local copies of variables in lpc10_encoder_state.
117  I've only created these because it might cause the loop below
118  to execute a bit faster to access local variables, rather than
119  variables in the lpc10_encoder_state structure. It is just a
120  guess that it will be faster. */
121 
122  real z11;
123  real z21;
124  real z12;
125  real z22;
126 
127  /* System generated locals */
128  integer i__1;
129 
130  /* Local variables */
131  integer i__;
132  real si, err;
133 
134 /* Arguments */
135 /* Local variables that need not be saved */
136 /* Local state */
137  /* Parameter adjustments */
138  if (speech) {
139  --speech;
140  }
141 
142  /* Function Body */
143 
144  z11 = st->z11;
145  z21 = st->z21;
146  z12 = st->z12;
147  z22 = st->z22;
148 
149  i__1 = *end;
150  for (i__ = *start; i__ <= i__1; ++i__) {
151  si = speech[i__];
152  err = si + z11 * 1.859076f - z21 * .8648249f;
153  si = err - z11 * 2.f + z21;
154  z21 = z11;
155  z11 = err;
156  err = si + z12 * 1.935715f - z22 * .9417004f;
157  si = err - z12 * 2.f + z22;
158  z22 = z12;
159  z12 = err;
160  speech[i__] = si * .902428f;
161  }
162 
163  st->z11 = z11;
164  st->z21 = z21;
165  st->z12 = z12;
166  st->z22 = z22;
167 
168  return 0;
169 } /* hp100_ */
char * end
Definition: eagi_proxy.c:73
float real
Definition: lpc10.h:79
INT32 integer
Definition: lpc10.h:80

◆ inithp100_()

int inithp100_ ( void  )