org.xiph.speex

Class 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)

Method Summary

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.

Method Details

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 x
ac - - out: float[0...lag-1] ac values
lag -
n -

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 coefficients
ac - - in: float[0...p] autocorrelation values
ref - - out: float[0...p-1] reflection coef's
p -
Returns:
minimum mean square error.

Copyright © 1999-2004 Wimba S.A. All Rights Reserved.