| Prev Class | Next Class | Frames | No Frames |
| Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Objectorg.xiph.speex.NbCodecorg.xiph.speex.SbCodecorg.xiph.speex.SbEncoderField Summary | |
static int[] |
|
static int[] |
|
static int[] |
|
protected float | |
protected float |
|
protected float | |
protected int |
|
private float[] |
|
private float[] | |
private float[] |
|
private float[] |
|
protected int | |
private float[] | |
private float[] |
|
private float[] |
|
private float[] | |
protected Encoder |
|
private float[] |
|
private float[] |
|
private float[] | |
protected int | |
private float[] |
|
private float[] | |
protected float |
|
private float[] |
|
protected int | |
protected int | |
private float[] | |
private float[] | |
private boolean | |
protected int |
|
protected int |
|
protected float |
|
private float[] | |
private float[] | |
Fields inherited from class org.xiph.speex.SbCodec | |
QMF_ORDER, SB_FRAME_SIZE, SB_SUBMODES, SB_SUBMODE_BITS, foldingGain, fullFrameSize, g0_mem, g1_mem, high, x0d, y0, 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 | |
int | |
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
float |
|
int |
|
boolean |
|
boolean |
|
float |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
Methods inherited from class org.xiph.speex.SbCodec | |
buildUwbSubModes, buildWbSubModes, getDtx, getExc, getFrameSize, getInnov, init, uwbinit, wbinit | |
Methods inherited from class org.xiph.speex.NbCodec | |
buildNbSubModes, getDtx, getExc, getFrameSize, getInnov, getPiGain, init, nbinit | |
public static final int[] NB_QUALITY_MAP
The Narrowband Quality map indicates which narrowband submode to use for the given wideband/ultra-wideband quality setting
public static final int[] UWB_QUALITY_MAP
The Ultra-wideband Quality map indicates which sideband submode to use for the given ultra-wideband quality setting
public static final int[] WB_QUALITY_MAP
The Wideband Quality map indicates which sideband submode to use for the given wideband/ultra-wideband quality setting
protected float abr_count
protected float abr_drift
Relative quality that will be needed by VBR
protected float abr_drift2
protected int abr_enabled
1 for enabling VAD, 0 otherwise
private float[] autocorr
Reflection coefficients
private float[] buf
private float[] bw_lpc1
Interpolated LPCs
private float[] bw_lpc2
LPCs after bandwidth expansion by gamma1 for perceptual weighting
protected int complexity
private float[] h0_mem
private float[] interp_lpc
Interpolated LSPs
private float[] interp_lsp
LSPs for previous frame
private float[] lagWindow
private float[] lsp
auto-correlation
private float[] mem_sp2
LPCs after bandwidth expansion by gamma2 for perceptual weighting
private float[] mem_sw
protected int nb_modes
private float[] old_lsp
LSPs for current frame
private float[] rc
protected float relative_quality
Quality setting for VBR encoding
private float[] res
Weighted signal buffer
protected int sampling_rate
protected int submodeSelect
private float[] swBuf
private float[] target
private boolean uwb
protected int vad_enabled
1 for enabling VBR, 0 otherwise
protected int vbr_enabled
Complexity setting (0-10 from least complex to most complex)
protected float vbr_quality
ABR setting (in bps), 0 if off
private float[] window
private float[] x1d
public int encode(Bits bits, float[] in)
Encode the given input signal.
- Parameters:
bits- - Speex bits buffer.in- - the raw mono audio frame to encode.
- Returns:
- 1 if successful.
public int getAbr()
Returns the Average Bit Rate used (0 if ABR is not turned on).
- Returns:
- the Average Bit Rate used (0 if ABR is not turned on).
public int getBitRate()
Returns the bitrate.
- Specified by:
- getBitRate in interface Encoder
- Returns:
- the bitrate.
public int getComplexity()
Returns the algorthmic complexity.
- Specified by:
- getComplexity in interface Encoder
- Returns:
- the algorthmic complexity.
public int getEncodedFrameSize()
Returns the size in bits of an audio frame encoded with the current mode.
- Specified by:
- getEncodedFrameSize in interface Encoder
- Returns:
- the size in bits of an audio frame encoded with the current mode.
public int getLookAhead()
Return LookAhead.
- Specified by:
- getLookAhead in interface Encoder
- Returns:
- LookAhead.
public int getMode()
Returns the encoding submode currently in use.
- Returns:
- the encoding submode currently in use.
public float getRelativeQuality()
Returns the relative quality.
- Specified by:
- getRelativeQuality in interface Encoder
- Returns:
- the relative quality.
public int getSamplingRate()
Returns the sampling rate.
- Specified by:
- getSamplingRate in interface Encoder
- Returns:
- the sampling rate.
public boolean getVad()
Returns whether or not we are using Voice Activity Detection encoding.
- Returns:
- whether or not we are using Voice Activity Detection encoding.
public boolean getVbr()
Returns whether or not we are using Variable Bit Rate encoding.
- Returns:
- whether or not we are using Variable Bit Rate encoding.
public float getVbrQuality()
Returns the Varible Bit Rate Quality.
- Specified by:
- getVbrQuality in interface Encoder
- Returns:
- the Varible Bit Rate Quality.
public void init(int frameSize,
int subframeSize,
int lpcSize,
int bufSize,
float foldingGain)Initialisation
- Parameters:
frameSize-subframeSize-lpcSize-bufSize-foldingGain-
public void setAbr(int abr)
Sets the Average Bit Rate.
- Parameters:
abr-
public void setBitRate(int bitrate)
Sets the bitrate.
- Specified by:
- setBitRate in interface Encoder
- Parameters:
bitrate-
public void setComplexity(int complexity)
Sets the algorthmic complexity.
- Specified by:
- setComplexity in interface Encoder
- Parameters:
complexity-
public void setDtx(boolean dtx)
Sets whether or not to use Discontinuous Transmission encoding.
- Parameters:
dtx-
public void setMode(int mode)
Sets the encoding submode.
- Parameters:
mode-
public void setQuality(int quality)
Sets the Quality.
- Specified by:
- setQuality in interface Encoder
- Parameters:
quality-
public void setSamplingRate(int rate)
Sets the sampling rate.
- Specified by:
- setSamplingRate in interface Encoder
- Parameters:
rate-
public void setVad(boolean vad)
Sets whether or not to use Voice Activity Detection encoding.
- Parameters:
vad-
public void setVbr(boolean vbr)
Sets whether or not to use Variable Bit Rate encoding.
- Parameters:
vbr-
public void setVbrQuality(float quality)
Sets the Varible Bit Rate Quality.
- Specified by:
- setVbrQuality in interface Encoder
- Parameters:
quality-