- short sei, sezi, se, sez; /* ACCUM */
- short d; /* SUBTA */
- short y; /* MIX */
- short sr; /* ADDB */
- short dqsez; /* ADDC */
- short dq, i;
-
- switch (in_coding) { /* linearize input sample to 14-bit PCM */
- case AUDIO_ENCODING_ALAW:
- sl = alaw2linear(sl) >> 2;
- break;
- case AUDIO_ENCODING_ULAW:
- sl = ulaw2linear(sl) >> 2;
- break;
- case AUDIO_ENCODING_LINEAR:
- sl = ((short) sl) >> 2; /* sl of 14-bit dynamic range */
- break;
- default:
- return (-1);
- }
-
- sezi = predictor_zero(state_ptr);
- sez = sezi >> 1;
- sei = sezi + predictor_pole(state_ptr);
- se = sei >> 1; /* se = estimated signal */
-
- d = sl - se; /* d = estimation difference */
-
- /* quantize prediction difference */
- y = step_size(state_ptr); /* adaptive quantizer step size */
- i = quantize(d, y, qtab_723_40, 15); /* i = ADPCM code */
-
- dq = reconstruct(i & 0x10, _dqlntab[i], y); /* quantized diff */
-
- sr = (dq < 0) ? se - (dq & 0x7FFF) : se + dq; /* reconstructed signal */
-
- dqsez = sr + sez - se; /* dqsez = pole prediction diff. */
-
- update(5, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
-
- return (i);
+ short sei, sezi, se, sez; /* ACCUM */
+ short d; /* SUBTA */
+ short y; /* MIX */
+ short sr; /* ADDB */
+ short dqsez; /* ADDC */
+ short dq, i;
+
+ switch (in_coding) { /* linearize input sample to 14-bit PCM */
+ case AUDIO_ENCODING_ALAW:
+ sl = alaw2linear(sl) >> 2;
+ break;
+ case AUDIO_ENCODING_ULAW:
+ sl = ulaw2linear(sl) >> 2;
+ break;
+ case AUDIO_ENCODING_LINEAR:
+ sl = ((short) sl) >> 2; /* sl of 14-bit dynamic range */
+ break;
+ default:
+ return (-1);
+ }
+
+ sezi = predictor_zero(state_ptr);
+ sez = sezi >> 1;
+ sei = sezi + predictor_pole(state_ptr);
+ se = sei >> 1; /* se = estimated signal */
+
+ d = sl - se; /* d = estimation difference */
+
+ /* quantize prediction difference */
+ y = step_size(state_ptr); /* adaptive quantizer step size */
+ i = quantize(d, y, qtab_723_40, 15); /* i = ADPCM code */
+
+ dq = reconstruct(i & 0x10, _dqlntab[i], y); /* quantized diff */
+
+ sr = (dq < 0) ? se - (dq & 0x7FFF) : se + dq; /* reconstructed signal */
+
+ dqsez = sr + sez - se; /* dqsez = pole prediction diff. */
+
+ update(5, y, _witab[i], _fitab[i], dq, sr, dqsez, state_ptr);
+
+ return (i);