29#ifdef P_R_O_T_O_T_Y_P_E_S
30extern int vparms_(
integer *vwin,
real *
inbuf,
real *lpbuf,
integer *buflim,
integer *half,
real *dither,
integer *mintau,
integer *zc,
integer *lbe,
integer *fbe,
real *qs,
real *rc1,
real *ar_b__,
real *ar_f__);
140 integer inbuf_offset, lpbuf_offset, i__1;
151 real ap_rms__, e_0__, oldsgn, lp_rms__, e_b__, e_f__, r_b__, r_f__, e0ap;
162 lpbuf_offset = buflim[3];
163 lpbuf -= lpbuf_offset;
164 inbuf_offset = buflim[1];
165 inbuf -= inbuf_offset;
179 vlen = vwin[2] - vwin[1] + 1;
180 start = vwin[1] + (*half - 1) * vlen / 2 + 1;
181 stop = start + vlen / 2 - 1;
196 r__1 =
inbuf[start - 1] - *dither;
199 for (i__ = start; i__ <= i__1; ++i__) {
200 lp_rms__ += (r__1 = lpbuf[i__],
abs(r__1));
201 ap_rms__ += (r__1 =
inbuf[i__],
abs(r__1));
209 e_0__ += r__1 * r__1;
211 r__1 = lpbuf[i__ - *mintau];
212 e_b__ += r__1 * r__1;
214 r__1 = lpbuf[i__ + *mintau];
215 e_f__ += r__1 * r__1;
216 r_f__ += lpbuf[i__] * lpbuf[i__ + *mintau];
217 r_b__ += lpbuf[i__] * lpbuf[i__ - *mintau];
218 r__1 =
inbuf[i__] + *dither;
223 *dither = -(*dither);
227 *rc1 /=
max(e0ap,1.f);
232 r__1 = ap_rms__ * 2.f;
233 *qs = e_pre__ /
max(r__1,1.f);
236 *ar_b__ = r_b__ /
max(e_b__,1.f) * (r_b__ /
max(e_0__,1.f));
239 *ar_f__ = r_f__ /
max(e_f__,1.f) * (r_f__ /
max(e_0__,1.f));
242 r__2 = (
real) (*zc << 1);
243 r__1 = r__2 * (90.f / vlen);
246 r__1 = lp_rms__ / 4 * (90.f / vlen);
248 *lbe =
min(i__1,32767);
250 r__1 = ap_rms__ / 4 * (90.f / vlen);
252 *fbe =
min(i__1,32767);
double r_sign(real *a, real *b)
static int inbuf(struct baseio *bio, FILE *fi)
utility used by inchar(), for base_encode()
int vparms_(integer *vwin, real *inbuf, real *lpbuf, integer *buflim, integer *half, real *dither, integer *mintau, integer *zc, integer *lbe, integer *fbe, real *qs, real *rc1, real *ar_b__, real *ar_f__)