4 Revision 1.5 2000/01/05 08:20:39 markster
7 Revision 1.2 2000/01/05 08:20:39 markster
8 Some OSS fixes and a few lpc changes to make it actually work
10 * Revision 1.2 1996/08/20 20:28:05 jaf
11 * Removed all static local variables that were SAVE'd in the Fortran
12 * code, and put them in struct lpc10_encoder_state that is passed as an
15 * Removed init function, since all initialization is now done in
16 * init_lpc10_encoder_state().
18 * Revision 1.1 1996/08/19 22:32:04 jaf
24 #ifdef P_R_O_T_O_T_Y_P_E_S
25 extern int hp100_(real *speech, integer *start, integer *end,
26 struct lpc10_encoder_state *st);
27 extern int inithp100_(void);
30 /* -- translated by f2c (version 19951025).
31 You must link the resulting object file with the libraries:
32 -lf2c -lm (in that order)
37 /* ********************************************************************* */
39 /* HP100 Version 55 */
42 * Revision 1.5 2000/01/05 08:20:39 markster
43 * Version 0.1.6 from FTP
45 /* Revision 1.2 2000/01/05 08:20:39 markster
46 /* Some OSS fixes and a few lpc changes to make it actually work
48 * Revision 1.2 1996/08/20 20:28:05 jaf
49 * Removed all static local variables that were SAVE'd in the Fortran
50 * code, and put them in struct lpc10_encoder_state that is passed as an
53 * Removed init function, since all initialization is now done in
54 * init_lpc10_encoder_state().
56 * Revision 1.1 1996/08/19 22:32:04 jaf
59 /* Revision 1.6 1996/03/15 16:45:25 jaf */
60 /* Rearranged a few comments. */
62 /* Revision 1.5 1996/03/14 23:20:54 jaf */
63 /* Added comments about when INITHP100 should be used. */
65 /* Revision 1.4 1996/03/14 23:08:08 jaf */
66 /* Added an entry named INITHP100 that initializes the local state of */
67 /* subroutine HP100. */
69 /* Revision 1.3 1996/03/14 22:09:20 jaf */
70 /* Comments added explaining which of the local variables of this */
71 /* subroutine need to be saved from one invocation to the next, and which */
74 /* Revision 1.2 1996/02/12 15:05:54 jaf */
75 /* Added lots of comments explaining why I changed one line, which was a */
76 /* declaration with initializations. */
78 /* Revision 1.1 1996/02/07 14:47:12 jaf */
79 /* Initial revision */
82 /* ********************************************************************* */
84 /* 100 Hz High Pass Filter */
86 /* Jan 92 - corrected typo (1.937148 to 1.935715), */
87 /* rounded coefficients to 7 places, */
88 /* corrected and merged gain (.97466**4), */
89 /* merged numerator into first two sections. */
92 /* start, end - Range of samples to filter */
94 /* speech(end) - Speech data. */
95 /* Indices start through end are read and modified. */
97 /* This subroutine maintains local state from one call to the next. If */
98 /* you want to switch to using a new audio stream for this filter, or */
99 /* reinitialize its state for any other reason, call the ENTRY */
101 /* Subroutine */ int hp100_(real *speech, integer *start, integer *end,
102 struct lpc10_encoder_state *st)
104 /* Temporary local copies of variables in lpc10_encoder_state.
105 I've only created these because it might cause the loop below
106 to execute a bit faster to access local variables, rather than
107 variables in the lpc10_encoder_state structure. It is just a
108 guess that it will be faster. */
115 /* System generated locals */
118 /* Local variables */
123 /* Local variables that need not be saved */
125 /* Parameter adjustments */
138 for (i__ = *start; i__ <= i__1; ++i__) {
140 err = si + z11 * 1.859076f - z21 * .8648249f;
141 si = err - z11 * 2.f + z21;
144 err = si + z12 * 1.935715f - z22 * .9417004f;
145 si = err - z12 * 2.f + z22;
148 speech[i__] = si * .902428f;