Package org.xiph.speex
Class SbCodec
- java.lang.Object
-
- org.xiph.speex.NbCodec
-
- org.xiph.speex.SbCodec
-
-
Field Summary
Fields Modifier and Type Field Description protected floatfoldingGainprotected intfullFrameSizeprotected float[]g0_memprotected float[]g1_memprotected float[]highstatic intQMF_ORDERQuadratic Mirror Filter Orderstatic int[]SB_FRAME_SIZEThe Sideband Frame Size gives the size in bits of a Sideband frame for a given sideband submode.static intSB_SUBMODE_BITSThe Sideband Submodes Bits gives the number bits used to encode the Sideband Submodestatic intSB_SUBMODESThe Sideband Submodes gives the number of submodes possible for the Sideband codec.protected float[]x0dprotected float[]y0protected float[]y1-
Fields inherited from class org.xiph.speex.NbCodec
awk1, awk2, awk3, bufSize, dtx_enabled, exc_gain_quant_scal1, exc_gain_quant_scal3, excBuf, excIdx, filters, first, frameSize, frmBuf, frmIdx, gamma1, gamma2, innov, interp_qlpc, interp_qlsp, lag_factor, lpc, lpc_floor, lpcSize, m_lsp, max_pitch, mem_sp, min_pitch, NB_FRAME_SIZE, NB_SUBMODE_BITS, NB_SUBMODES, nbSubframes, old_qlsp, pi_gain, pre_mem, preemph, qlsp, subframeSize, submodeID, submodes, VERY_SMALL, voc_m1, voc_m2, voc_mean, voc_offset, windowSize
-
Fields inherited from interface org.xiph.speex.Codebook
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, NB_CDBK_SIZE, NB_CDBK_SIZE_HIGH1, NB_CDBK_SIZE_HIGH2, NB_CDBK_SIZE_LOW1, NB_CDBK_SIZE_LOW2
-
-
Constructor Summary
Constructors Constructor Description SbCodec()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static SubMode[]buildUwbSubModes()Build ultra-wideband submodes.protected static SubMode[]buildWbSubModes()Build wideband submodes.booleangetDtx()Returns whether or not we are using Discontinuous Transmission encoding.float[]getExc()Returns the excitation array.intgetFrameSize()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 voidinit(int frameSize, int subframeSize, int lpcSize, int bufSize, float foldingGain)Initialisationvoiduwbinit()Ultra-wideband initialisationvoidwbinit()Wideband initialisation
-
-
-
Field Detail
-
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.- See Also:
- Constant Field Values
-
SB_SUBMODE_BITS
public static final int SB_SUBMODE_BITS
The Sideband Submodes Bits gives the number bits used to encode the Sideband Submode- See Also:
- Constant Field Values
-
QMF_ORDER
public static final int QMF_ORDER
Quadratic Mirror Filter Order- See Also:
- Constant Field Values
-
fullFrameSize
protected int fullFrameSize
-
foldingGain
protected float foldingGain
-
high
protected float[] high
-
y0
protected float[] y0
-
y1
protected float[] y1
-
x0d
protected float[] x0d
-
g0_mem
protected float[] g0_mem
-
g1_mem
protected float[] g1_mem
-
-
Method Detail
-
wbinit
public void wbinit()
Wideband initialisation
-
uwbinit
public void uwbinit()
Ultra-wideband initialisation
-
init
protected void init(int frameSize, int subframeSize, int lpcSize, int bufSize, float foldingGain)Initialisation- Parameters:
frameSize-subframeSize-lpcSize-bufSize-foldingGain-
-
buildWbSubModes
protected static SubMode[] buildWbSubModes()
Build wideband submodes.- Returns:
- the wideband submodes.
-
buildUwbSubModes
protected static SubMode[] buildUwbSubModes()
Build ultra-wideband submodes.- Returns:
- the ultra-wideband submodes.
-
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:
getFrameSizein classNbCodec- Returns:
- the size of a frame (number of audio samples in a frame).
-
getDtx
public boolean getDtx()
Returns whether or not we are using Discontinuous Transmission encoding.
-
getExc
public float[] getExc()
Returns the excitation array.
-
-