Class Ltp3Tap

java.lang.Object
org.xiph.speex.Ltp
org.xiph.speex.Ltp3Tap

public class Ltp3Tap extends Ltp
Long Term Prediction Quantisation and Unquantisation (3Tap)
Version:
$Revision: 1.2 $
Author:
Jim Lawrence, helloNetwork.com, Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private float[][]
     
    private float[]
     
    private int
     
    private int[]
     
    private int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Ltp3Tap(int[] gain_cdbk, int gain_bits, int pitch_bits)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    private float
    pitch_gain_search_3tap(float[] target, float[] ak, float[] awk1, float[] awk2, float[] exc, int es, int pitch, int p, int nsf, Bits bits, float[] exc2, int e2s, float[] r, int[] cdbk_index)
    Finds the best quantized 3-tap pitch predictor by analysis by synthesis.
    final 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 (3Tap).
    final 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 (3Tap).

    Methods inherited from class org.xiph.speex.Ltp

    inner_prod, open_loop_nbest_pitch

    Methods inherited from class java.lang.Object

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

    • gain

      private float[] gain
    • gain_cdbk

      private int[] gain_cdbk
    • gain_bits

      private int gain_bits
    • pitch_bits

      private int pitch_bits
    • e

      private float[][] e
  • Constructor Details

    • Ltp3Tap

      public Ltp3Tap(int[] gain_cdbk, int gain_bits, int pitch_bits)
      Constructor
      Parameters:
      gain_cdbk -
      gain_bits -
      pitch_bits -
  • Method Details

    • quant

      public final 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 (3Tap).
      Specified by:
      quant in class Ltp
      Returns:
      pitch
    • unquant

      public final 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 (3Tap).
      Specified by:
      unquant in class Ltp
      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
    • pitch_gain_search_3tap

      private float pitch_gain_search_3tap(float[] target, float[] ak, float[] awk1, float[] awk2, float[] exc, int es, int pitch, int p, int nsf, Bits bits, float[] exc2, int e2s, float[] r, int[] cdbk_index)
      Finds the best quantized 3-tap pitch predictor by analysis by synthesis.
      Parameters:
      target - Target vector
      ak - LPCs for this subframe
      awk1 - Weighted LPCs #1 for this subframe
      awk2 - Weighted LPCs #2 for this subframe
      exc - Excitation
      es -
      pitch - Pitch value
      p - Number of LPC coeffs
      nsf - Number of samples in subframe
      bits -
      exc2 -
      e2s -
      r -
      cdbk_index -
      Returns:
      the best quantized 3-tap pitch predictor by analysis by synthesis.