org.xiph.speex

Class SbCodec

Implemented Interfaces:
Codebook
Known Direct Subclasses:
SbDecoder, SbEncoder

public class SbCodec
extends NbCodec

Sideband Codec. This class contains all the basic structures needed by the Sideband encoder and decoder.
Version:
$Revision: 1.2 $
Author:
Marc Gimpel, Wimba S.A. (mgimpel@horizonwimba.com)

Field Summary

static int
QMF_ORDER
Quadratic Mirror Filter Order
static int[]
SB_FRAME_SIZE
The Sideband Frame Size gives the size in bits of a Sideband frame for a given sideband submode.
static int
SB_SUBMODES
The Sideband Submodes gives the number of submodes possible for the Sideband codec.
static int
SB_SUBMODE_BITS
The Sideband Submodes Bits gives the number bits used to encode the Sideband Submode
protected float
foldingGain
protected int
fullFrameSize
protected float[]
g0_mem
protected float[]
g1_mem
protected float[]
high
protected float[]
x0d
protected float[]
y0
protected float[]
y1

Fields inherited from class org.xiph.speex.NbCodec

NB_FRAME_SIZE, NB_SUBMODES, NB_SUBMODE_BITS, VERY_SMALL, awk1, awk2, awk3, bufSize, dtx_enabled, excBuf, excIdx, exc_gain_quant_scal1, exc_gain_quant_scal3, filters, first, frameSize, frmBuf, frmIdx, gamma1, gamma2, innov, interp_qlpc, interp_qlsp, lag_factor, lpc, lpcSize, lpc_floor, m_lsp, max_pitch, mem_sp, min_pitch, nbSubframes, old_qlsp, pi_gain, pre_mem, preemph, qlsp, subframeSize, submodeID, submodes, voc_m1, voc_m2, voc_mean, voc_offset, windowSize

Fields inherited from interface org.xiph.speex.Codebook

NB_CDBK_SIZE, NB_CDBK_SIZE_HIGH1, NB_CDBK_SIZE_HIGH2, NB_CDBK_SIZE_LOW1, NB_CDBK_SIZE_LOW2, cdbk_nb, cdbk_nb_high1, cdbk_nb_high2, cdbk_nb_low1, cdbk_nb_low2, exc_10_16_table, exc_10_32_table, exc_20_32_table, exc_5_256_table, exc_5_64_table, exc_8_128_table, gain_cdbk_lbr, gain_cdbk_nb, h0, h1, hexc_10_32_table, hexc_table, high_lsp_cdbk, high_lsp_cdbk2

Method Summary

protected static SubMode[]
buildUwbSubModes()
Build ultra-wideband submodes.
protected static SubMode[]
buildWbSubModes()
Build wideband submodes.
boolean
getDtx()
Returns whether or not we are using Discontinuous Transmission encoding.
float[]
getExc()
Returns the excitation array.
int
getFrameSize()
Returns the size of a frame (ex: 160 samples for a narrowband frame, 320 for wideband and 640 for ultra-wideband).
float[]
getInnov()
Returns the innovation array.
protected void
init(int frameSize, int subframeSize, int lpcSize, int bufSize, float foldingGain)
Initialisation
void
uwbinit()
Ultra-wideband initialisation
void
wbinit()
Wideband initialisation

Methods inherited from class org.xiph.speex.NbCodec

buildNbSubModes, getDtx, getExc, getFrameSize, getInnov, getPiGain, init, nbinit

Field Details

QMF_ORDER

public static final int QMF_ORDER
Quadratic Mirror Filter Order
Field Value:
64

SB_FRAME_SIZE

public static final int[] SB_FRAME_SIZE
The Sideband Frame Size gives the size in bits of a Sideband frame for a given sideband submode.

SB_SUBMODES

public static final int SB_SUBMODES
The Sideband Submodes gives the number of submodes possible for the Sideband codec.
Field Value:
8

SB_SUBMODE_BITS

public static final int SB_SUBMODE_BITS
The Sideband Submodes Bits gives the number bits used to encode the Sideband Submode
Field Value:
3

foldingGain

protected float foldingGain

fullFrameSize

protected int fullFrameSize

g0_mem

protected float[] g0_mem

g1_mem

protected float[] g1_mem

high

protected float[] high

x0d

protected float[] x0d

y0

protected float[] y0

y1

protected float[] y1

Method Details

buildUwbSubModes

protected static SubMode[] buildUwbSubModes()
Build ultra-wideband submodes.
Returns:
the ultra-wideband submodes.

buildWbSubModes

protected static SubMode[] buildWbSubModes()
Build wideband submodes.
Returns:
the wideband submodes.

getDtx

public boolean getDtx()
Returns whether or not we are using Discontinuous Transmission encoding.
Overrides:
getDtx in interface NbCodec
Returns:
whether or not we are using Discontinuous Transmission encoding.

getExc

public float[] getExc()
Returns the excitation array.
Overrides:
getExc in interface NbCodec
Returns:
the excitation array.

getFrameSize

public int getFrameSize()
Returns the size of a frame (ex: 160 samples for a narrowband frame, 320 for wideband and 640 for ultra-wideband).
Overrides:
getFrameSize in interface NbCodec
Returns:
the size of a frame (number of audio samples in a frame).

getInnov

public float[] getInnov()
Returns the innovation array.
Overrides:
getInnov in interface NbCodec
Returns:
the innovation array.

init

protected void init(int frameSize,
                    int subframeSize,
                    int lpcSize,
                    int bufSize,
                    float foldingGain)
Initialisation
Parameters:
frameSize -
subframeSize -
lpcSize -
bufSize -
foldingGain -

uwbinit

public void uwbinit()
Ultra-wideband initialisation

wbinit

public void wbinit()
Wideband initialisation

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