Lines Matching +full:half +full:-

17 /*  -- translated by f2c (version 19951025).
19 -lf2c -lm (in that order)
24 extern int voicin_(integer *vwin, real *inbuf, real *lpbuf, integer *buflim, integer *half, real *m…
66 /* VSTATE when HALF .EQ. 1, rather than a garbage value that could change */
117 /* Voicing Detection (VOICIN) makes voicing decisions for each half */
119 /* in the future (2F) for each half frame. These decisions are carried */
122 /* decisions for each half frame. */
126 /* AMDF windowed maximum-to-minimum ratio, the zero crossing rate, energy*/
134 /* (VALUE). The VDC vector is 2-dimensional, each row vector is optimized*/
135 /* for a particular signal-to-noise ratio (SNR). So, before the dot */
142 /* within one half frame. In this case, the voicing decision transition */
150 /* VWIN - Voicing window limits */
153 /* INBUF - Input speech buffer */
154 /* LPBUF - Low-pass filtered speech buffer */
155 /* BUFLIM - INBUF and LPBUF limits */
156 /* HALF - Present analysis half frame number */
157 /* MINAMD - Minimum value of the AMDF */
158 /* MAXAMD - Maximum value of the AMDF */
159 /* MINTAU - Pointer to the lag of the minimum AMDF value */
160 /* IVRC(2) - Inverse filter's RC's */
163 /* OBOUND - Onset boundary descriptions */
164 /* Indices 1 through 3 read if (HALF .NE. 1), otherwise untouched.
166 /* AF - The analysis frame number */
168 /* VOIBUF(2,0:AF) - Buffer of voicing decisions */
169 /* Index (HALF,3) written. */
170 /* If (HALF .EQ. 1), skip down to "Read (HALF,3)" below. */
179 /* Finally, read (HALF,3) */
181 /* QS - Ratio of preemphasized to full-band energies */
182 /* RC1 - First reflection coefficient */
183 /* AR_B - Product of the causal forward and reverse pitch prediction gain
185 /* AR_F - Product of the noncausal forward and rev. pitch prediction gain
187 /* ZC - Zero crossing rate */
188 /* DITHER - Zero crossing threshold level */
189 /* MAXMIN - AMDF's 1 octave windowed maximum-to-minimum ratio */
190 /* MINPTR - Location of minimum AMDF value */
191 /* NVDC - Number of elements in each VDC vector */
192 /* NVDCL - Number of VDC vectors */
193 /* VDCL - SNR values corresponding to the set of VDC's */
194 /* VDC - 2-D voicing decision coefficient vector */
195 /* VALUE(9) - Voicing Parameters */
196 /* VOICE(2,3)- History of LDA results */
197 /* On every call when (HALF .EQ. 1), VOICE(*,I+1) is */
199 /* VOICE(HALF,3) is written on every call. */
202 /* LBE - Ratio of low-band instantaneous to average energies */
203 /* FBE - Ratio of full-band instantaneous to average energies */
204 /* LBVE - Low band voiced energy */
205 /* LBUE - Low band unvoiced energy */
206 /* FBVE - Full band voiced energy */
207 /* FBUE - Full band unvoiced energy */
208 /* OFBUE - Previous full-band unvoiced energy */
209 /* OLBUE - Previous low-band unvoiced energy */
210 /* REF - Reference energy for initialization and DITHER threshold */
211 /* SNR - Estimate of signal-to-noise ratio */
212 /* SNR2 - Estimate of low-band signal-to-noise ratio */
213 /* SNRL - SNR level number */
214 /* OT - Onset transition present */
215 /* VSTATE - Decimal interpretation of binary voicing classifications */
216 /* FIRST - First call flag */
224 lpbuf, integer *buflim, integer *half, real *minamd, real *maxamd, in voicin_() argument
231 static real vdc[100] /* was [10][10] */ = { 0.f,1714.f,-110.f, in voicin_()
232 334.f,-4096.f,-654.f,3752.f,3769.f,0.f,1181.f,0.f,874.f,-97.f, in voicin_()
233 300.f,-4096.f,-1021.f,2451.f,2527.f,0.f,-500.f,0.f,510.f,-70.f, in voicin_()
234 250.f,-4096.f,-1270.f,2194.f,2491.f,0.f,-1500.f,0.f,500.f,-10.f, in voicin_()
235 200.f,-4096.f,-1300.f,2e3f,2e3f,0.f,-2e3f,0.f,500.f,0.f,0.f, in voicin_()
236 -4096.f,-1300.f,2e3f,2e3f,0.f,-2500.f,0.f,0.f,0.f,0.f,0.f,0.f,0.f, in voicin_()
279 /* *** Read-only: initialized in setup */ in voicin_()
315 /* idea, since it does enable some error-correction capability for */ in voicin_()
381 /* begins "IF (HALF .EQ. 1) THEN" below. Also, uninitialized */ in voicin_()
398 /* These guessed initial values should be validated by re-running */ in voicin_()
403 dither = (&st->dither); in voicin_()
404 snr = (&st->snr); in voicin_()
405 maxmin = (&st->maxmin); in voicin_()
406 voice = (&st->voice[0]); in voicin_()
407 lbve = (&st->lbve); in voicin_()
408 lbue = (&st->lbue); in voicin_()
409 fbve = (&st->fbve); in voicin_()
410 fbue = (&st->fbue); in voicin_()
411 ofbue = (&st->ofbue); in voicin_()
412 olbue = (&st->olbue); in voicin_()
413 sfbue = (&st->sfbue); in voicin_()
414 slbue = (&st->slbue); in voicin_()
418 --vwin; in voicin_()
421 --buflim; in voicin_()
425 inbuf -= inbuf_offset; in voicin_()
429 lpbuf -= lpbuf_offset; in voicin_()
432 --ivrc; in voicin_()
435 --obound; in voicin_()
438 --voibuf; in voicin_()
452 /* MAXMIN is initialized on the first call, assuming that HALF */ in voicin_()
467 /* Define 2-D voicing decision coefficient vector according to the voicin in voicin_()
476 /* (analog values). The VOIBUF array contains the hard-limited binary in voicin_()
482 /* (half-frame number, future-frame number) */ in voicin_()
485 /* | 1,0 | 2,0 | 1,1 | 2,1 | 1,2 | 2,2 | 1,3 | 2,3 | ---> time */ in voicin_()
488 if (*half == 1) { in voicin_()
497 half, dither, mintau, &zc, &lbe, &fbe, &qs, &rc1, &ar_b__, & in voicin_()
499 /* Estimate signal-to-noise ratio to select the appropriate VDC vector. in voicin_()
502 /* running average full-band voiced energy to the running average */ in voicin_()
503 /* full-band unvoiced energy. SNR filter has gain of 63. */ in voicin_()
509 i__1 = nvdcl - 1; in voicin_()
511 if (snr2 > vdcl[snrl - 1]) { in voicin_()
527 voice[*half + 3] = vdc[snrl * 10 - 1]; in voicin_()
529 voice[*half + 3] += vdc[i__ + snrl * 10 - 11] * value[i__ - 1]; in voicin_()
532 /* Voicing decision for current half-frame: 1 = Voiced; 0 = Unvoiced */ in voicin_()
533 if (voice[*half + 3] > 0.f) { in voicin_()
534 voibuf[*half + 6] = 1; in voicin_()
536 voibuf[*half + 6] = 0; in voicin_()
538 /* Skip voicing decision smoothing in first half-frame: */ in voicin_()
541 /* a consistent value from one call to the next when HALF .EQ. 1. */ in voicin_()
545 vstate = -1; in voicin_()
546 if (*half == 1) { in voicin_()
551 /* Unvoiced half-frames: At least two in a row. */ in voicin_()
552 /* -------------------- */ in voicin_()
554 /* Voiced half-frames: At least two in a row in one frame. */ in voicin_()
555 /* ------------------- Otherwise at least three in a row. */ in voicin_()
563 /* If a V/UV or UV/V voicing decision transition occurs within one-half in voicin_()
569 /* ----- ----- */ in voicin_()
591 /* Multi-way dispatch on voicing decision history: */ in voicin_()
618 if (voibuf[7] == 0 || voice[2] < -voice[3]) { in voicin_()
628 if (voice[1] < -voice[2]) { in voicin_()
653 if (voice[2] < -voice[1]) { in voicin_()
663 if (voibuf[7] == 0 && voice[3] < -voice[2]) { in voicin_()
676 /* ---------------------- */ in voicin_()
678 /* During unvoiced half-frames, update the low band and full band unvoice in voicin_()
684 /* During voiced half-frames, update the low-pass (LBVE) and all-pass */ in voicin_()
686 if (voibuf[*half + 6] == 0) { in voicin_()