|
|||||||||||
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.NbEncoder
Narrowband 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
2nd temporary buffer |
private int |
bounded_pitch
|
private float[] |
buf2
Temporary (Hanning) window |
private float[] |
bw_lpc1
Interpolated LPCs |
private float[] |
bw_lpc2
LPCs after bandwidth expansion by gamma1 for perceptual weighting |
protected int |
complexity
|
private int |
dtx_count
State of the VBR data |
private float[] |
exc2Buf
1-element memory for pre-emphasis |
private int |
exc2Idx
"Pitch enhanced" excitation |
private float[] |
innov2
Number of consecutive DTX frames |
private float[] |
interp_lpc
Interpolated LSPs |
private float[] |
interp_lsp
LSPs for previous frame |
private float[] |
lagWindow
auto-correlation |
private float[] |
lsp
Window applied to auto-correlation |
private float[] |
mem_exc
Filter memory for perceptually-weighted signal (whole frame) |
private float[] |
mem_sw
Reflection coefficients |
private float[] |
mem_sw_whole
Filter memory for perceptually-weighted signal |
static int[] |
NB_QUALITY_MAP
The Narrowband Quality map indicates which narrowband submode to use for the given narrowband quality setting |
private float[] |
old_lsp
LSPs for current frame |
private int[] |
pitch
Next frame should not rely on previous frames for pitch |
private float |
pre_mem2
|
private float[] |
rc
LPCs after bandwidth expansion by gamma2 for perceptual weighting |
protected float |
relative_quality
Quality setting for VBR encoding |
protected int |
sampling_rate
|
protected int |
submodeSelect
|
private float[] |
swBuf
"Pitch enhanced" excitation |
private int |
swIdx
Weighted signal buffer |
protected int |
vad_enabled
1 for enabling VBR, 0 otherwise |
private Vbr |
vbr
Filter memory for excitation (whole frame) |
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
Start of weighted signal frame |
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 | |
NbEncoder()
|
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()
Gets 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)
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. |
Methods inherited from class org.xiph.speex.NbCodec |
getDtx, getExc, getFrameSize, getInnov, getPiGain, 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
private int bounded_pitch
private int[] pitch
private float pre_mem2
private float[] exc2Buf
private int exc2Idx
private float[] swBuf
private int swIdx
private float[] window
private float[] buf2
private float[] autocorr
private float[] lagWindow
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[] rc
private float[] mem_sw
private float[] mem_sw_whole
private float[] mem_exc
private Vbr vbr
private int dtx_count
private float[] innov2
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 NbEncoder()
Method Detail |
public void init(int frameSize, int subframeSize, int lpcSize, int bufSize)
init
in class NbCodec
frameSize
- subframeSize
- lpcSize
- bufSize
- 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 int getBitRate()
getBitRate
in interface Encoder
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 void setVbr(boolean vbr)
setVbr
in interface Encoder
vbr
- 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 void setAbr(int abr)
setAbr
in interface Encoder
abr
- public void setVbrQuality(float quality)
setVbrQuality
in interface Encoder
quality
- 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 void setSamplingRate(int rate)
setSamplingRate
in interface Encoder
rate
- 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 |