35 #ifdef P_R_O_T_O_T_Y_P_E_S 70 #define contrl_1 contrl_ 211 static integer tau[60] = { 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,
212 35,36,37,38,39,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,
213 74,76,78,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,
214 140,144,148,152,156 };
215 static integer buflim[4] = { 181,720,25,720 };
216 static real precoef = .9375f;
260 real phi[100] , psi[10];
471 inbuf = &(st->
inbuf[0]);
472 pebuf = &(st->
pebuf[0]);
473 lpbuf = &(st->
lpbuf[0]);
474 ivbuf = &(st->
ivbuf[0]);
476 osbuf = &(st->
osbuf[0]);
477 osptr = &(st->
osptr);
478 obound = &(st->
obound[0]);
479 vwin = &(st->
vwin[0]);
480 awin = &(st->
awin[0]);
481 voibuf = &(st->
voibuf[0]);
482 rmsbuf = &(st->
rmsbuf[0]);
483 rcbuf = &(st->
rcbuf[0]);
487 for (i__ = 181; i__ <= i__1; ++i__) {
488 inbuf[i__ - 181] = inbuf[
contrl_1.lframe + i__ - 181];
489 pebuf[i__ - 181] = pebuf[
contrl_1.lframe + i__ - 181];
492 for (i__ = 229; i__ <= i__1; ++i__) {
493 ivbuf[i__ - 229] = ivbuf[
contrl_1.lframe + i__ - 229];
496 for (i__ = 25; i__ <= i__1; ++i__) {
497 lpbuf[i__ - 25] = lpbuf[
contrl_1.lframe + i__ - 25];
501 for (i__ = 1; i__ <= i__1; ++i__) {
502 if (osbuf[i__ - 1] >
contrl_1.lframe) {
503 osbuf[j - 1] = osbuf[i__ - 1] -
contrl_1.lframe;
508 voibuf[0] = voibuf[2];
509 voibuf[1] = voibuf[3];
510 for (i__ = 1; i__ <= 2; ++i__) {
511 vwin[(i__ << 1) - 2] = vwin[((i__ + 1) << 1) - 2] -
contrl_1.lframe;
512 vwin[(i__ << 1) - 1] = vwin[((i__ + 1) << 1) - 1] -
contrl_1.lframe;
513 awin[(i__ << 1) - 2] = awin[((i__ + 1) << 1) - 2] -
contrl_1.lframe;
514 awin[(i__ << 1) - 1] = awin[((i__ + 1) << 1) - 1] -
contrl_1.lframe;
525 obound[i__ - 1] = obound[i__];
526 voibuf[i__ * 2] = voibuf[(i__ + 1) * 2];
527 voibuf[(i__ << 1) + 1] = voibuf[((i__ + 1) << 1) + 1];
528 rmsbuf[i__ - 1] = rmsbuf[i__];
530 for (j = 1; j <= i__1; ++j) {
531 rcbuf[j + i__ * 10 - 11] = rcbuf[j + (i__ + 1) * 10 - 11];
545 for (i__ = 1; i__ <= i__1; ++i__) {
546 inbuf[720 -
contrl_1.lframe + i__ - 181] = speech[i__] * 4096.f -
548 temp += inbuf[720 -
contrl_1.lframe + i__ - 181];
558 preemp_(&inbuf[i__ - 181], &pebuf[i__ - 181], &
contrl_1.lframe, &precoef,
613 for (half = 1; half <= 2; ++half) {
614 voicin_(&vwin[4], inbuf, lpbuf, buflim, &half, &amdf[minptr - 1], &
615 amdf[maxptr - 1], &mintau, ivrc, obound, voibuf, &
c__3, st);
619 dyptrk_(amdf, &
c__60, &minptr, &voibuf[7], pitch, &midx, st);
620 ipitch = tau[midx - 1];
622 placea_(&ipitch, voibuf, &obound[2], &
c__3, vwin, awin, ewin, &
626 lanal = awin[5] + 1 - awin[4];
627 dcbias_(&lanal, &pebuf[awin[4] - 181], abuf);
634 i__1 = ewin[5] - ewin[4] + 1;
635 energy_(&i__1, &abuf[ewin[4] - awin[4]], &rmsbuf[2]);
641 voice[1] = voibuf[2];
642 voice[2] = voibuf[3];
645 for (i__ = 1; i__ <= i__1; ++i__) {
646 rc[i__] = rcbuf[i__ - 1];
int preemp_(real *inbuf, real *pebuf, integer *nsamp, real *coef, real *z__)
int placev_(integer *osbuf, integer *osptr, integer *oslen, integer *obound, integer *vwin, integer *af, integer *lframe, integer *minwin, integer *maxwin, integer *dvwinl, integer *dvwinh)
int tbdm_(real *speech, integer *lpita, integer *tau, integer *ltau, real *amdf, integer *minptr, integer *maxptr, integer *mintau)
int lpfilt_(real *inbuf, real *lpbuf, integer *len, integer *nsamp)
int onset_(real *pebuf, integer *osbuf, integer *osptr, integer *oslen, integer *sbufl, integer *sbufh, integer *lframe, struct lpc10_encoder_state *st)
int placea_(integer *ipitch, integer *voibuf, integer *obound, integer *af, integer *vwin, integer *awin, integer *ewin, integer *lframe, integer *maxwin)
static int inbuf(struct baseio *bio, FILE *fi)
utility used by inchar(), for base_encode()
int voicin_(integer *vwin, real *inbuf, real *lpbuf, integer *buflim, integer *half, real *minamd, real *maxamd, integer *mintau, real *ivrc, integer *obound, integer *voibuf, integer *af, struct lpc10_encoder_state *st)
int rcchk_(integer *order, real *rc1f, real *rc2f)
int energy_(integer *len, real *speech, real *rms)
int invert_(integer *order, real *phi, real *psi, real *rc)
int dyptrk_(real *amdf, integer *ltau, integer *minptr, integer *voice, integer *pitch, integer *midx, struct lpc10_encoder_state *st)
int dcbias_(integer *len, real *speech, real *sigout)
int analys_(real *speech, integer *voice, integer *pitch, real *rms, real *rc, struct lpc10_encoder_state *st)
int ivfilt_(real *lpbuf, real *ivbuf, integer *len, integer *nsamp, real *ivrc)
int mload_(integer *order, integer *awins, integer *awinf, real *speech, real *phi, real *psi)