- memmove(ractx->gain_block, ractx->gain_block - 1,
- 10 * sizeof(*ractx->gain_block));
-
- *ractx->gain_block = 10 * log10(sum) - 32;
-
- for (x=1; x < 5; x++)
- for (y=x-1; y >= 0; y--)
- buffer[x] -= ractx->sp_lpc[x-y-1] * buffer[y];
-
- /* output */
- for (x=0; x < 5; x++)
- ractx->sp_block[4-x] =
- av_clipf(ractx->sp_block[4-x] + buffer[x], -4095, 4095);
-}
-
-/**
- * Converts autocorrelation coefficients to LPC coefficients using the
- * Levinson-Durbin algorithm. See blocks 37 and 50 of the G.728 specification.
- *
- * @return 0 if success, -1 if fail
- */
-static int eval_lpc_coeffs(const float *in, float *tgt, int n)
-{
- int x, y;
- double f0, f1, f2;
-
- if (in[n] == 0)
- return -1;
-
- if ((f0 = *in) <= 0)
- return -1;
-
- in--; // To avoid a -1 subtraction in the inner loop