sb_celp.c File Reference

#include <math.h>
#include "sb_celp.h"
#include "stdlib.h"
#include "filters.h"
#include "lpc.h"
#include "lsp.h"
#include "stack_alloc.h"
#include "cb_search.h"
#include "quant_lsp.h"
#include "vq.h"
#include "ltp.h"
#include "misc.h"

Include dependency graph for sb_celp.c:


Defines

#define SB_ENC_STACK   (10000*sizeof(spx_sig_t))
#define SB_DEC_STACK   (6000*sizeof(spx_sig_t))
#define M_PI   3.14159265358979323846
#define sqr(x)   ((x)*(x))
#define SUBMODE(x)   st->submodes[st->submodeID]->x
#define LSP_MARGIN   .05
#define LSP_DELTA1   .2
#define LSP_DELTA2   .05
#define QMF_ORDER   64

Functions

void * sb_encoder_init (const SpeexMode *m)
void sb_encoder_destroy (void *state)
int sb_encode (void *state, void *vin, SpeexBits *bits)
void * sb_decoder_init (const SpeexMode *m)
void sb_decoder_destroy (void *state)
int sb_decode (void *state, SpeexBits *bits, void *vout)
int sb_encoder_ctl (void *state, int request, void *ptr)
int sb_decoder_ctl (void *state, int request, void *ptr)

Define Documentation

#define LSP_DELTA1   .2

#define LSP_DELTA2   .05

#define LSP_MARGIN   .05

#define M_PI   3.14159265358979323846

#define QMF_ORDER   64

#define SB_DEC_STACK   (6000*sizeof(spx_sig_t))

Referenced by sb_decoder_init().

#define SB_ENC_STACK   (10000*sizeof(spx_sig_t))

Referenced by sb_encoder_init().

#define sqr (  )     ((x)*(x))

#define SUBMODE (  )     st->submodes[st->submodeID]->x


Function Documentation

int sb_decode ( void *  state,
SpeexBits *  bits,
void *  out 
)

int sb_decoder_ctl ( void *  state,
int  request,
void *  ptr 
)

void sb_decoder_destroy ( void *  state  ) 

void* sb_decoder_init ( const SpeexMode *  m  ) 

int sb_encode ( void *  state,
void *  in,
SpeexBits *  bits 
)

Encodes one frame

References _spx_autocorr(), _spx_lpc(), SBEncState::abr_count, SBEncState::abr_drift, SBEncState::abr_drift2, SBEncState::abr_enabled, ADD16, ADD32, ALLOC, SBEncState::autocorr, SBEncState::bufSize, bw_lpc(), SBEncState::bw_lpc1, SBEncState::bw_lpc2, SBEncState::complexity, compute_impulse_response(), compute_rms(), DIV32_16, SBEncState::encode_submode, SBEncState::exc, SBEncState::excBuf, filter_mem2(), fir_mem2(), fir_mem_up(), SBEncState::first, SBEncState::frame_size, SBEncState::full_frame_size, SBEncState::g0_mem, SBEncState::g1_mem, SBEncState::gamma1, SBEncState::gamma2, SBEncState::h0_mem, SBEncState::high, iir_mem2(), SBEncState::interp_lpc, SBEncState::interp_lsp, SBEncState::interp_qlpc, SBEncState::interp_qlsp, SBEncState::lagWindow, SBEncState::lpc, SBEncState::lpc_floor, LPC_SCALING, lpc_to_lsp(), SBEncState::lpcSize, SBEncState::lsp, LSP_DELTA1, LSP_DELTA2, lsp_enforce_margin(), lsp_interpolate(), LSP_MARGIN, lsp_to_lpc(), M_PI, SBEncState::mem_sp, SBEncState::mem_sp2, SBEncState::mem_sw, SBEncState::mode, MULT16_16, MULT16_16_Q14, MULT16_16_Q15, MULT16_32_Q15, SpeexSBMode::nb_modes, SBEncState::nbSubframes, NULL, SBEncState::old_lsp, SBEncState::old_qlsp, SBEncState::pi_gain, PSHR, SBEncState::qlsp, qmf_decomp(), QMF_ORDER, SBEncState::relative_quality, SBEncState::res, SATURATE, SB_SUBMODE_BITS, scal_quant(), SHL, SHR, SIG_SCALING, SIG_SHIFT, signal_div(), signal_mul(), speex_bits_pack(), speex_encode_native(), speex_encoder_ctl(), speex_move(), SBEncState::st_low, SBEncState::stack, SBEncState::subframeSize, SUBMODE, SBEncState::submodeID, SBEncState::submodes, SBEncState::submodeSelect, SBEncState::sw, SBEncState::target, SBEncState::vad_enabled, VARDECL, SBEncState::vbr_enabled, SBEncState::vbr_quality, SpeexSBMode::vbr_thresh, VERY_SMALL, SBEncState::window, SBEncState::windowSize, SBEncState::x0d, SBEncState::x1d, SBEncState::y0, and SBEncState::y1.

int sb_encoder_ctl ( void *  state,
int  request,
void *  ptr 
)

void sb_encoder_destroy ( void *  state  ) 

void* sb_encoder_init ( const SpeexMode *  m  ) 

Initializes encoder state

References SBEncState::abr_enabled, SBEncState::autocorr, SpeexSBMode::bufSize, SBEncState::bufSize, SBEncState::bw_lpc1, SBEncState::bw_lpc2, SBEncState::complexity, SpeexSBMode::defaultSubmode, SBEncState::encode_submode, SBEncState::exc, SBEncState::excBuf, SBEncState::first, SBEncState::frame_size, SpeexSBMode::frameSize, SBEncState::full_frame_size, SBEncState::g0_mem, SBEncState::g1_mem, SpeexSBMode::gamma1, SBEncState::gamma1, SpeexSBMode::gamma2, SBEncState::gamma2, SBEncState::h0_mem, SBEncState::h1_mem, SBEncState::high, SBEncState::interp_lpc, SBEncState::interp_lsp, SBEncState::interp_qlpc, SBEncState::interp_qlsp, SpeexSBMode::lag_factor, SBEncState::lag_factor, SBEncState::lagWindow, SBEncState::lpc, SpeexSBMode::lpc_floor, SBEncState::lpc_floor, SpeexSBMode::lpcSize, SBEncState::lpcSize, SBEncState::lsp, M_PI, SBEncState::mem_sp, SBEncState::mem_sp2, SBEncState::mem_sw, SBEncState::mode, SpeexSBMode::nb_mode, SBEncState::nbSubframes, NULL, SBEncState::old_lsp, SBEncState::old_qlsp, SBEncState::pi_gain, SBEncState::qlsp, QMF_ORDER, SBEncState::relative_quality, SBEncState::res, SBEncState::sampling_rate, SB_ENC_STACK, SIG_SCALING, speex_alloc(), speex_alloc_scratch(), speex_encoder_ctl(), speex_encoder_init(), sqr, SBEncState::st_low, SBEncState::stack, SpeexSBMode::subframeSize, SBEncState::subframeSize, SBEncState::submodeID, SpeexSBMode::submodes, SBEncState::submodes, SBEncState::submodeSelect, SBEncState::sw, SBEncState::target, SBEncState::vad_enabled, SBEncState::vbr_enabled, SBEncState::vbr_quality, SBEncState::window, SBEncState::windowSize, SBEncState::x0d, SBEncState::x1d, SBEncState::y0, and SBEncState::y1.


Generated on Wed May 7 21:15:06 2008 for speex by  doxygen 1.5.5