Package org.xiph.speex
Class Lpc
- java.lang.Object
-
- org.xiph.speex.Lpc
-
public class Lpc extends java.lang.Object
LPC - and Reflection Coefficients.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.
- Version:
- $Revision: 1.2 $
- Author:
- Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)
-
-
Constructor Summary
Constructors Constructor Description Lpc()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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-1static float
wld(float[] lpc, float[] ac, float[] ref, int p)
Returns minimum mean square error.
-
-
-
Method Detail
-
wld
public static float wld(float[] lpc, float[] ac, float[] ref, int p)
Returns minimum mean square error.- Parameters:
lpc
- - float[0...p-1] LPC coefficientsac
- - in: float[0...p] autocorrelation valuesref
- - out: float[0...p-1] reflection coef'sp
-- Returns:
- minimum mean square error.
-
autocorr
public 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- Parameters:
x
- - in: float[0...n-1] samples xac
- - out: float[0...lag-1] ac valueslag
-n
-
-
-