|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xiph.speex.NbCodec org.xiph.speex.SbCodec org.xiph.speex.SbEncoder
Wideband Speex Encoder
Field Summary | |
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
|
protected Encoder |
lowenc
The encoder for the lower half of the Spectrum. |
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
|
static int[] |
NB_QUALITY_MAP
The Narrowband Quality map indicates which narrowband submode to use for the given wideband/ultra-wideband quality setting |
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
|
static int[] |
UWB_QUALITY_MAP
The Ultra-wideband Quality map indicates which sideband submode to use for the given ultra-wideband quality setting |
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 |
static int[] |
WB_QUALITY_MAP
The Wideband Quality map indicates which sideband submode to use for the given wideband/ultra-wideband quality setting |
private float[] |
window
|
private float[] |
x1d
|
Fields inherited from class org.xiph.speex.SbCodec |
foldingGain, fullFrameSize, g0_mem, g1_mem, high, QMF_ORDER, SB_FRAME_SIZE, SB_SUBMODE_BITS, SB_SUBMODES, x0d, y0, 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 | |
SbEncoder()
|
Method Summary | |
int |
encode(Bits bits,
float[] in)
Encode the given input signal. |
int |
getAbr()
Returns the Average Bit Rate used (0 if ABR is not turned on). |
int |
getBitRate()
Returns the bitrate. |
int |
getComplexity()
Returns the algorthmic complexity. |
int |
getEncodedFrameSize()
Returns the size in bits of an audio frame encoded with the current mode. |
int |
getMode()
Returns the encoding submode currently in use. |
float |
getRelativeQuality()
Returns the relative quality. |
int |
getSamplingRate()
Returns the sampling rate. |
boolean |
getVad()
Returns whether or not we are using Voice Activity Detection encoding. |
boolean |
getVbr()
Returns whether or not we are using Variable Bit Rate encoding. |
float |
getVbrQuality()
Returns the Varible Bit Rate Quality. |
void |
init(int frameSize,
int subframeSize,
int lpcSize,
int bufSize,
float foldingGain)
Initialisation |
void |
setAbr(int abr)
Sets the Average Bit Rate. |
void |
setBitRate(int bitrate)
Sets the bitrate. |
void |
setComplexity(int complexity)
Sets the algorthmic complexity. |
void |
setDtx(boolean dtx)
Sets whether or not to use Discontinuous Transmission encoding. |
void |
setMode(int mode)
Sets the encoding submode. |
void |
setQuality(int quality)
Sets the Quality. |
void |
setSamplingRate(int rate)
Sets the sampling rate. |
void |
setVad(boolean vad)
Sets whether or not to use Voice Activity Detection encoding. |
void |
setVbr(boolean vbr)
Sets whether or not to use Variable Bit Rate encoding. |
void |
setVbrQuality(float quality)
Sets the Varible Bit Rate Quality. |
void |
uwbinit()
Ultra-wideband initialisation |
void |
wbinit()
Wideband initialisation |
Methods inherited from class org.xiph.speex.SbCodec |
buildUwbSubModes, buildWbSubModes, getDtx, getExc, getFrameSize, getInnov |
Methods inherited from class org.xiph.speex.NbCodec |
getPiGain, init, nbinit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xiph.speex.Encoder |
getDtx, getExc, getFrameSize, getInnov, getPiGain |
Field Detail |
public static final int[] NB_QUALITY_MAP
public static final int[] WB_QUALITY_MAP
public static final int[] UWB_QUALITY_MAP
protected Encoder lowenc
private float[] x1d
private float[] h0_mem
private float[] buf
private float[] swBuf
private float[] res
private float[] target
private float[] window
private float[] lagWindow
private float[] rc
private float[] autocorr
private float[] lsp
private float[] old_lsp
private float[] interp_lsp
private float[] interp_lpc
private float[] bw_lpc1
private float[] bw_lpc2
private float[] mem_sp2
private float[] mem_sw
protected int nb_modes
private boolean uwb
protected int complexity
protected int vbr_enabled
protected int vad_enabled
protected int abr_enabled
protected float vbr_quality
protected float relative_quality
protected float abr_drift
protected float abr_drift2
protected float abr_count
protected int sampling_rate
protected int submodeSelect
Constructor Detail |
public SbEncoder()
Method Detail |
public void wbinit()
wbinit
in class SbCodec
public void uwbinit()
uwbinit
in class SbCodec
public void init(int frameSize, int subframeSize, int lpcSize, int bufSize, float foldingGain)
init
in class SbCodec
frameSize
- subframeSize
- lpcSize
- bufSize
- foldingGain
- public int encode(Bits bits, float[] in)
encode
in interface Encoder
bits
- - Speex bits buffer.in
- - the raw mono audio frame to encode.
public int getEncodedFrameSize()
getEncodedFrameSize
in interface Encoder
public void setQuality(int quality)
setQuality
in interface Encoder
quality
- public void setVbrQuality(float quality)
setVbrQuality
in interface Encoder
quality
- public void setVbr(boolean vbr)
setVbr
in interface Encoder
vbr
- public void setAbr(int abr)
setAbr
in interface Encoder
abr
- public int getBitRate()
getBitRate
in interface Encoder
public void setSamplingRate(int rate)
setSamplingRate
in interface Encoder
rate
- public void setMode(int mode)
setMode
in interface Encoder
mode
- public int getMode()
getMode
in interface Encoder
public void setBitRate(int bitrate)
setBitRate
in interface Encoder
bitrate
- public boolean getVbr()
getVbr
in interface Encoder
public void setVad(boolean vad)
setVad
in interface Encoder
vad
- public boolean getVad()
getVad
in interface Encoder
public void setDtx(boolean dtx)
setDtx
in interface Encoder
dtx
- public int getAbr()
getAbr
in interface Encoder
public float getVbrQuality()
getVbrQuality
in interface Encoder
public void setComplexity(int complexity)
setComplexity
in interface Encoder
complexity
- public int getComplexity()
getComplexity
in interface Encoder
public int getSamplingRate()
getSamplingRate
in interface Encoder
public float getRelativeQuality()
getRelativeQuality
in interface Encoder
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |