Class Vbr

java.lang.Object
javaforce.codec.speex.Vbr

public class Vbr extends Object
This class analyses the signal to help determine what bitrate to use when the Varible BitRate option has been selected.
Version:
$Revision$
Author:
Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final float[][]
    Wideband threshhold table.
    static final int
     
    static final float[][]
    Narrowband threshhold table.
    static final float
     
    static final float[][]
    Ultra-wideband threshhold table.
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Vbr()
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    float
    analysis(float[] sig, int len, int pitch, float pitch_coef)
    This function should analyse the signal and decide how critical the coding error will be perceptually.

    Methods inherited from class java.lang.Object

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

    • VBR_MEMORY_SIZE

      public static final int VBR_MEMORY_SIZE
      See Also:
    • MIN_ENERGY

      public static final int MIN_ENERGY
      See Also:
    • NOISE_POW

      public static final float NOISE_POW
      See Also:
    • nb_thresh

      public static final float[][] nb_thresh
      Narrowband threshhold table.
    • hb_thresh

      public static final float[][] hb_thresh
      Wideband threshhold table.
    • uhb_thresh

      public static final float[][] uhb_thresh
      Ultra-wideband threshhold table.
  • Constructor Details

    • Vbr

      public Vbr()
      Constructor
  • Method Details

    • analysis

      public float analysis(float[] sig, int len, int pitch, float pitch_coef)
      This function should analyse the signal and decide how critical the coding error will be perceptually. The following factors should be taken into account:
      • Attacks (positive energy derivative) should be coded with more bits
      • Stationary voiced segments should receive more bits
      • Segments with (very) low absolute energy should receive less bits (maybe only shaped noise?)
      • DTX for near-zero energy?
      • Stationary fricative segments should have less bits
      • Temporal masking: when energy slope is decreasing, decrease the bit-rate
      • Decrease bit-rate for males (low pitch)?
      • (wideband only) less bits in the high-band when signal is very non-stationary (harder to notice high-frequency noise)???
      Parameters:
      sig - - signal.
      len - - signal length.
      pitch - - signal pitch.
      pitch_coef - - pitch coefficient.
      Returns:
      quality