SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.media.codec.audio.g729
Class Lpc

java.lang.Object
  extended by net.java.sip.communicator.impl.media.codec.audio.g729.Lpc

 class Lpc
extends Object

Lpc analysis routines. NOTE: these routines are assuming that the order is defined as M and that NC is defined as M/2. M has to be even

Author:
Lubomir Marinov (translation of ITU-T C source code to Java)

Constructor Summary
Lpc()
           
 
Method Summary
(package private) static void autocorr(float[] x, int x_offset, int m, float[] r)
          Compute the auto-correlations of windowed speech signal
(package private) static void az_lsp(float[] a, int a_offset, float[] lsp, float[] old_lsp)
          Compute the LSPs from the LP coefficients a[] using Chebyshev polynomials.
(package private) static void lag_window(int m, float[] r)
          Lag windowing of the autocorrelations
(package private) static float levinson(float[] r, float[] a, int a_offset, float[] rc)
          Levinson-Durbin recursion to compute LPC parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Lpc

Lpc()
Method Detail

autocorr

static void autocorr(float[] x,
                     int x_offset,
                     int m,
                     float[] r)
Compute the auto-correlations of windowed speech signal

Parameters:
x - (i) input signal x[0:L_WINDOW]
x_offset - (i) input signal offset
m - (i) LPC order
r - (o) auto-correlation vector r[0:M]

lag_window

static void lag_window(int m,
                       float[] r)
Lag windowing of the autocorrelations

Parameters:
m - (i) LPC order
r - (i/o) correlation

levinson

static float levinson(float[] r,
                      float[] a,
                      int a_offset,
                      float[] rc)
Levinson-Durbin recursion to compute LPC parameters.

Parameters:
r - (i) auto correlation coefficients r[0:M]
a - (o) lpc coefficients a[0] = 1
a_offset - (i) lpc coefficients offset
rc - (o) reflection coefficients rc[0:M-1]
Returns:
prediction error (energy)

az_lsp

static void az_lsp(float[] a,
                   int a_offset,
                   float[] lsp,
                   float[] old_lsp)
Compute the LSPs from the LP coefficients a[] using Chebyshev polynomials. The found LSPs are in the cosine domain with values in the range from 1 down to -1. The table grid[] contains the points (in the cosine domain) at which the polynomials are evaluated. The table corresponds to NO_POINTS frequencies uniformly spaced between 0 and pi.

Parameters:
a - (i) LP filter coefficients
a_offset - (i) LP filter coefficients offset
lsp - (o) Line spectral pairs (in the cosine domain)
old_lsp - (i) LSP vector from past frame

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.