Class Lpc

java.lang.Object
org.xiph.speex.Lpc

public class Lpc extends 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

    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-1
    static float
    wld(float[] lpc, float[] ac, float[] ref, int p)
    Returns minimum mean square error.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Lpc

      public Lpc()
  • Method Details

    • 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.
    • 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 -