3 * Revision 1.2 1996/08/20 20:23:46 jaf
4 * Removed all static local variables that were SAVE'd in the Fortran
5 * code, and put them in struct lpc10_decoder_state that is passed as an
8 * Removed init function, since all initialization is now done in
9 * init_lpc10_decoder_state().
11 * Revision 1.1 1996/08/19 22:32:34 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 deemp_(real
*x
, integer
*n
, struct lpc10_decoder_state
*st
);
26 /* ***************************************************************** */
28 /* DEEMP Version 48 */
31 * Revision 1.2 1996/08/20 20:23:46 jaf
32 * Removed all static local variables that were SAVE'd in the Fortran
33 * code, and put them in struct lpc10_decoder_state that is passed as an
36 * Removed init function, since all initialization is now done in
37 * init_lpc10_decoder_state().
39 * Revision 1.1 1996/08/19 22:32:34 jaf
42 /* Revision 1.3 1996/03/20 15:54:37 jaf */
43 /* Added comments about which indices of array arguments are read or */
46 /* Added entry INITDEEMP to reinitialize the local state variables, if */
49 /* Revision 1.2 1996/03/14 22:11:13 jaf */
50 /* Comments added explaining which of the local variables of this */
51 /* subroutine need to be saved from one invocation to the next, and which */
54 /* Revision 1.1 1996/02/07 14:44:53 jaf */
55 /* Initial revision */
58 /* ***************************************************************** */
60 /* De-Emphasize output speech with 1 / ( 1 - .75z**-1 ) */
61 /* cascaded with 200 Hz high pass filter */
62 /* ( 1 - 1.9998z**-1 + z**-2 ) / ( 1 - 1.75z**-1 + .78z**-2 ) */
64 /* WARNING! The coefficients above may be out of date with the code */
65 /* below. Either that, or some kind of transformation was performed */
66 /* on the coefficients above to create the code below. */
69 /* N - Number of samples */
72 /* Indices 1 through N are read before being written. */
74 /* This subroutine maintains local state from one call to the next. If */
75 /* you want to switch to using a new audio stream for this filter, or */
76 /* reinitialize its state for any other reason, call the ENTRY */
79 /* Subroutine */ int deemp_(real
*x
, integer
*n
, struct lpc10_decoder_state
*st
)
81 /* Initialized data */
89 /* System generated locals */
98 /* Local variables that need not be saved */
100 /* All of the locals saved below were not given explicit initial */
101 /* values in the original code. I think 0 is a safe choice. */
102 /* Parameter adjustments */
116 for (k
= 1; k
<= i__1
; ++k
) {
118 r__1
= x
[k
] - *dei1
* 1.9998f
+ *dei2
;
119 x
[k
] = r__1
+ *deo1
* 2.5f
- *deo2
* 2.0925f
+ *deo3
* .585f
;