3 * Revision 1.2 1996/08/20 20:28:05 jaf
4 * Removed all static local variables that were SAVE'd in the Fortran
5 * code, and put them in struct lpc10_encoder_state that is passed as an
8 * Removed init function, since all initialization is now done in
9 * init_lpc10_encoder_state().
11 * Revision 1.1 1996/08/19 22:32:04 jaf
17 /* -- translated by f2c (version 19951025).
18 You must link the resulting object file with the libraries:
19 -lf2c -lm (in that order)
24 extern int hp100_(real
*speech
, integer
*start
, integer
*end
,
25 struct lpc10_encoder_state
*st
);
26 extern int inithp100_(void);
28 /* ********************************************************************* */
30 /* HP100 Version 55 */
32 /* ********************************************************************* */
34 /* 100 Hz High Pass Filter */
36 /* Jan 92 - corrected typo (1.937148 to 1.935715), */
37 /* rounded coefficients to 7 places, */
38 /* corrected and merged gain (.97466**4), */
39 /* merged numerator into first two sections. */
42 /* start, end - Range of samples to filter */
44 /* speech(end) - Speech data. */
45 /* Indices start through end are read and modified. */
47 /* This subroutine maintains local state from one call to the next. If */
48 /* you want to switch to using a new audio stream for this filter, or */
49 /* reinitialize its state for any other reason, call the ENTRY */
51 /* Subroutine */ int hp100_(real
*speech
, integer
*start
, integer
*end
,
52 struct lpc10_encoder_state
*st
)
54 /* Temporary local copies of variables in lpc10_encoder_state.
55 I've only created these because it might cause the loop below
56 to execute a bit faster to access local variables, rather than
57 variables in the lpc10_encoder_state structure. It is just a
58 guess that it will be faster. */
65 /* System generated locals */
73 /* Local variables that need not be saved */
75 /* Parameter adjustments */
88 for (i__
= *start
; i__
<= i__1
; ++i__
) {
90 err
= si
+ z11
* 1.859076f
- z21
* .8648249f
;
91 si
= err
- z11
* 2.f
+ z21
;
94 err
= si
+ z12
* 1.935715f
- z22
* .9417004f
;
95 si
= err
- z12
* 2.f
+ z22
;
98 speech
[i__
] = si
* .902428f
;