4 Revision 1.15 2004/06/26 03:50:14 markster
5 Merge source cleanups (bug #1911)
7 Revision 1.14 2003/02/12 13:59:15 matteo
8 mer feb 12 14:56:57 CET 2003
10 Revision 1.1.1.1 2003/02/12 13:59:15 matteo
11 mer feb 12 14:56:57 CET 2003
13 Revision 1.2 2000/01/05 08:20:39 markster
14 Some OSS fixes and a few lpc changes to make it actually work
16 * Revision 1.2 1996/08/20 20:28:05 jaf
17 * Removed all static local variables that were SAVE'd in the Fortran
18 * code, and put them in struct lpc10_encoder_state that is passed as an
21 * Removed init function, since all initialization is now done in
22 * init_lpc10_encoder_state().
24 * Revision 1.1 1996/08/19 22:32:04 jaf
30 /* -- translated by f2c (version 19951025).
31 You must link the resulting object file with the libraries:
32 -lf2c -lm (in that order)
37 #ifdef P_R_O_T_O_T_Y_P_E_S
38 extern int hp100_(real
*speech
, integer
*start
, integer
*end
,
39 struct lpc10_encoder_state
*st
);
40 extern int inithp100_(void);
43 /* ********************************************************************* */
45 /* HP100 Version 55 */
48 * Revision 1.15 2004/06/26 03:50:14 markster
49 * Merge source cleanups (bug #1911)
51 * Revision 1.14 2003/02/12 13:59:15 matteo
52 * mer feb 12 14:56:57 CET 2003
54 * Revision 1.1.1.1 2003/02/12 13:59:15 matteo
55 * mer feb 12 14:56:57 CET 2003
57 * Revision 1.2 2000/01/05 08:20:39 markster
58 * Some OSS fixes and a few lpc changes to make it actually work
60 * Revision 1.2 1996/08/20 20:28:05 jaf
61 * Removed all static local variables that were SAVE'd in the Fortran
62 * code, and put them in struct lpc10_encoder_state that is passed as an
65 * Removed init function, since all initialization is now done in
66 * init_lpc10_encoder_state().
68 * Revision 1.1 1996/08/19 22:32:04 jaf
71 /* Revision 1.6 1996/03/15 16:45:25 jaf */
72 /* Rearranged a few comments. */
74 /* Revision 1.5 1996/03/14 23:20:54 jaf */
75 /* Added comments about when INITHP100 should be used. */
77 /* Revision 1.4 1996/03/14 23:08:08 jaf */
78 /* Added an entry named INITHP100 that initializes the local state of */
79 /* subroutine HP100. */
81 /* Revision 1.3 1996/03/14 22:09:20 jaf */
82 /* Comments added explaining which of the local variables of this */
83 /* subroutine need to be saved from one invocation to the next, and which */
86 /* Revision 1.2 1996/02/12 15:05:54 jaf */
87 /* Added lots of comments explaining why I changed one line, which was a */
88 /* declaration with initializations. */
90 /* Revision 1.1 1996/02/07 14:47:12 jaf */
91 /* Initial revision */
94 /* ********************************************************************* */
96 /* 100 Hz High Pass Filter */
98 /* Jan 92 - corrected typo (1.937148 to 1.935715), */
99 /* rounded coefficients to 7 places, */
100 /* corrected and merged gain (.97466**4), */
101 /* merged numerator into first two sections. */
104 /* start, end - Range of samples to filter */
106 /* speech(end) - Speech data. */
107 /* Indices start through end are read and modified. */
109 /* This subroutine maintains local state from one call to the next. If */
110 /* you want to switch to using a new audio stream for this filter, or */
111 /* reinitialize its state for any other reason, call the ENTRY */
113 /* Subroutine */ int hp100_(real
*speech
, integer
*start
, integer
*end
,
114 struct lpc10_encoder_state
*st
)
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. */
127 /* System generated locals */
130 /* Local variables */
135 /* Local variables that need not be saved */
137 /* Parameter adjustments */
150 for (i__
= *start
; i__
<= i__1
; ++i__
) {
152 err
= si
+ z11
* 1.859076f
- z21
* .8648249f
;
153 si
= err
- z11
* 2.f
+ z21
;
156 err
= si
+ z12
* 1.935715f
- z22
* .9417004f
;
157 si
= err
- z12
* 2.f
+ z22
;
160 speech
[i__
] = si
* .902428f
;