org.xiph.speex
Class Ltp

java.lang.Object
  extended byorg.xiph.speex.Ltp
Direct Known Subclasses:
Ltp3Tap, LtpForcedPitch

public abstract class Ltp
extends java.lang.Object

Abstract class that is the base for the various LTP (Long Term Prediction) Quantisation and Unquantisation methods.

Version:
$Revision: 1.4 $
Author:
Jim Lawrence, helloNetwork.com, Marc Gimpel, Wimba S.A. (marc@wimba.com)

Constructor Summary
Ltp()
           
 
Method Summary
protected static float inner_prod(float[] x, int xs, float[] y, int ys, int len)
          Calculates the inner product of the given vectors.
protected static void open_loop_nbest_pitch(float[] sw, int swIdx, int start, int end, int len, int[] pitch, float[] gain, int N)
          Find the n-best pitch in Open Loop.
abstract  int quant(float[] target, float[] sw, int sws, float[] ak, float[] awk1, float[] awk2, float[] exc, int es, int start, int end, float pitch_coef, int p, int nsf, Bits bits, float[] exc2, int e2s, float[] r, int complexity)
          Long Term Prediction Quantification.
abstract  int unquant(float[] exc, int es, int start, float pitch_coef, int nsf, float[] gain_val, Bits bits, int count_lost, int subframe_offset, float last_pitch_gain)
          Long Term Prediction Unquantification.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Ltp

public Ltp()
Method Detail

quant

public abstract int quant(float[] target,
                          float[] sw,
                          int sws,
                          float[] ak,
                          float[] awk1,
                          float[] awk2,
                          float[] exc,
                          int es,
                          int start,
                          int end,
                          float pitch_coef,
                          int p,
                          int nsf,
                          Bits bits,
                          float[] exc2,
                          int e2s,
                          float[] r,
                          int complexity)
Long Term Prediction Quantification.

Returns:

unquant

public abstract int unquant(float[] exc,
                            int es,
                            int start,
                            float pitch_coef,
                            int nsf,
                            float[] gain_val,
                            Bits bits,
                            int count_lost,
                            int subframe_offset,
                            float last_pitch_gain)
Long Term Prediction Unquantification.

Parameters:
exc - - Excitation
es - - Excitation offset
start - - Smallest pitch value allowed
pitch_coef - - Voicing (pitch) coefficient
nsf - - Number of samples in subframe
gain_val -
bits - - Speex bits buffer.
count_lost -
subframe_offset -
last_pitch_gain -
Returns:
pitch

inner_prod

protected static float inner_prod(float[] x,
                                  int xs,
                                  float[] y,
                                  int ys,
                                  int len)
Calculates the inner product of the given vectors.

Parameters:
x - - first vector.
xs - - offset of the first vector.
y - - second vector.
ys - - offset of the second vector.
len - - length of the vectors.
Returns:
the inner product of the given vectors.

open_loop_nbest_pitch

protected static void open_loop_nbest_pitch(float[] sw,
                                            int swIdx,
                                            int start,
                                            int end,
                                            int len,
                                            int[] pitch,
                                            float[] gain,
                                            int N)
Find the n-best pitch in Open Loop.

Parameters:
sw -
swIdx -
start -
end -
len -
pitch -
gain -
N -


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