public class Lpc
extends java.lang.Object
The next two functions calculate linear prediction coefficients and/or the related reflection coefficients from the first P_MAX+1 values of the autocorrelation function.
Invented by N. Levinson in 1947, modified by J. Durbin in 1959.
Constructor and Description |
---|
Lpc() |
Modifier and Type | Method and Description |
---|---|
static void |
autocorr(float[] x,
float[] ac,
int lag,
int n)
Compute the autocorrelation
,--,
ac(i) = > x(n) * x(n-i) for all n
`--'
for lags between 0 and lag-1, and x == 0 outside 0...n-1
|
static float |
wld(float[] lpc,
float[] ac,
float[] ref,
int p)
Returns minimum mean square error.
|
public static float wld(float[] lpc, float[] ac, float[] ref, int p)
lpc
- - float[0...p-1] LPC coefficientsac
- - in: float[0...p] autocorrelation valuesref
- - out: float[0...p-1] reflection coef'sp
- public static void autocorr(float[] x, float[] ac, int lag, int n)
x
- - in: float[0...n-1] samples xac
- - out: float[0...lag-1] ac valueslag
- n
- Copyright © 1999-2004 Wimba S.A. All Rights Reserved.