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

net.java.sip.communicator.impl.neomedia.codec.audio.g729
Class Filter

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.codec.audio.g729.Filter

 class Filter
extends Object

General filter routines.

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

Constructor Summary
Filter()
           
 
Method Summary
(package private) static void convolve(float[] x, int x_offset, float[] h, float[] y, int l)
          Convolve vectors x and h and put result in y.
(package private) static void residu(float[] a, int a_offset, float[] x, int x_offset, float[] y, int y_offset, int l)
          Filter input vector with all-zero filter A(Z).
(package private) static void syn_filt(float[] a, int a_offset, float[] x, int x_offset, float[] y, int y_offset, int l, float[] mem, int mem_offset, int update)
          Filter with synthesis filter 1/A(z).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Filter

Filter()
Method Detail

convolve

static void convolve(float[] x,
                     int x_offset,
                     float[] h,
                     float[] y,
                     int l)
Convolve vectors x and h and put result in y.

Parameters:
x - input : input vector x[0:l]
x_offset - input : input vector offset
h - input : impulse response or second input h[0:l]
y - output: x convolved with h , y[0:l]
l - input : dimension of all vectors

syn_filt

static void syn_filt(float[] a,
                     int a_offset,
                     float[] x,
                     int x_offset,
                     float[] y,
                     int y_offset,
                     int l,
                     float[] mem,
                     int mem_offset,
                     int update)
Filter with synthesis filter 1/A(z).

Parameters:
a - input : predictor coefficients a[0:m]
a_offset - input : predictor coefficients a offset
x - input : excitation signal
x_offset - input : excitation signal offset
y - output: filtered output signal
y_offset - output: filtered output signal offset
l - input : vector dimension
mem - in/out: filter memory
mem_offset - input : filter memory ofset
update - input : 0 = no memory update, 1 = update

residu

static void residu(float[] a,
                   int a_offset,
                   float[] x,
                   int x_offset,
                   float[] y,
                   int y_offset,
                   int l)
Filter input vector with all-zero filter A(Z).

Parameters:
a - input : prediction coefficients a[0:m+1], a[0]=1.
a_offset - input : prediction coefficients a offset
x - input : input signal x[0:l-1], x[-1:m] are needed
x_offset - input : input signal x offset
y - output: output signal y[0:l-1]. NOTE: x[] and y[] cannot point to same array
y_offset - input : output signal y offset
l - input : dimension of x and y

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

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