123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170 |
- #include "f2c.h"
- #ifdef P_R_O_T_O_T_Y_P_E_S
- extern int hp100_(real *speech, integer *start, integer *end,
- struct lpc10_encoder_state *st);
- extern int inithp100_(void);
- #endif
- int hp100_(real *speech, integer *start, integer *end,
- struct lpc10_encoder_state *st)
- {
-
- real z11;
- real z21;
- real z12;
- real z22;
-
- integer i__1;
-
- integer i__;
- real si, err;
-
- if (speech) {
- --speech;
- }
-
- z11 = st->z11;
- z21 = st->z21;
- z12 = st->z12;
- z22 = st->z22;
- i__1 = *end;
- for (i__ = *start; i__ <= i__1; ++i__) {
- si = speech[i__];
- err = si + z11 * 1.859076f - z21 * .8648249f;
- si = err - z11 * 2.f + z21;
- z21 = z11;
- z11 = err;
- err = si + z12 * 1.935715f - z22 * .9417004f;
- si = err - z12 * 2.f + z22;
- z22 = z12;
- z12 = err;
- speech[i__] = si * .902428f;
- }
- st->z11 = z11;
- st->z21 = z21;
- st->z12 = z12;
- st->z22 = z22;
- return 0;
- }
|