/external/speex/libspeex/ |
D | filters.h | 40 spx_word16_t compute_rms(const spx_sig_t *x, int len); 41 spx_word16_t compute_rms16(const spx_word16_t *x, int len); 43 void signal_div(const spx_word16_t *x, spx_word16_t *y, spx_word32_t scale, int len); 47 int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len); 58 void highpass(const spx_word16_t *x, spx_word16_t *y, int len, int filtID, spx_mem_t *mem); 61 void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_word16_t *, spx_word16_t *y2, i… 62 …synth(const spx_word16_t *x1, const spx_word16_t *x2, const spx_word16_t *a, spx_word16_t *y, int … 64 void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t… 65 void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_m… 66 void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_m… [all …]
|
D | ltp.h | 51 spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len); 52 void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int n… 54 void open_loop_nbest_pitch(spx_word16_t *sw, int start, int end, int len, int *pitch, spx_word16_t … 59 spx_word16_t target[], /* Target vector */ 60 spx_word16_t *sw, 68 spx_word16_t pitch_coef, /* Voicing (pitch) coefficient */ 73 spx_word16_t *exc2, 74 spx_word16_t *r, 83 spx_word16_t exc[], /* Input excitation */ 87 spx_word16_t pitch_coef, /* Voicing (pitch) coefficient */ [all …]
|
D | modes.h | 75 typedef int (*ltp_quant_func)(spx_word16_t *, spx_word16_t *, spx_coef_t *, spx_coef_t *, 76 spx_coef_t *, spx_sig_t *, const void *, int, int, spx_word16_t, 77 … int, int, SpeexBits*, char *, spx_word16_t *, spx_word16_t *, int, int, int, spx_word32_t *); 80 typedef void (*ltp_unquant_func)(spx_word16_t *, spx_word32_t *, int, int, spx_word16_t, const void… 81 spx_word16_t *, SpeexBits*, char*, int, int, spx_word16_t, int); 85 typedef void (*innovation_quant_func)(spx_word16_t *, spx_coef_t *, spx_coef_t *, spx_coef_t *, con… 86 spx_sig_t *, spx_word16_t *, SpeexBits *, char *, int, int); 111 spx_word16_t comb_gain; /**< Gain of enhancer comb filter */ 124 spx_word16_t gamma1; /**< Perceptual filter parameter #1 */ 125 spx_word16_t gamma2; /**< Perceptual filter parameter #2 */ [all …]
|
D | nb_celp.h | 74 spx_word16_t gamma1; /**< Perceptual filter: A(z/gamma1) */ 75 spx_word16_t gamma2; /**< Perceptual filter: A(z/gamma2) */ 76 spx_word16_t lpc_floor; /**< Noise floor multiplier for A[0] in LPC analysis*/ 78 spx_word16_t *winBuf; /**< Input buffer (original signal) */ 79 spx_word16_t *excBuf; /**< Excitation buffer */ 80 spx_word16_t *exc; /**< Start of excitation frame */ 81 spx_word16_t *swBuf; /**< Weighted signal buffer */ 82 spx_word16_t *sw; /**< Start of weighted signal frame */ 83 const spx_word16_t *window; /**< Temporary (Hanning) window */ 84 const spx_word16_t *lagWindow; /**< Window applied to auto-correlation */ [all …]
|
D | ltp.c | 59 spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len) in inner_prod() 79 void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int n… 90 const spx_word16_t *y = _y+i; 91 const spx_word16_t *x = _x; 92 spx_word16_t y0, y1, y2, y3; 142 void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int n… in pitch_xcorr() 156 static inline spx_word32_t compute_pitch_error(spx_word16_t *C, spx_word16_t *g, spx_word16_t pitch… in compute_pitch_error() 173 void open_loop_nbest_pitch(spx_word16_t *sw, int start, int end, int len, int *pitch, spx_word16_t … in open_loop_nbest_pitch() 183 VARDECL(spx_word16_t *corr16); in open_loop_nbest_pitch() 184 VARDECL(spx_word16_t *ener16); in open_loop_nbest_pitch() [all …]
|
D | filters.c | 54 void bw_lpc(spx_word16_t gamma, const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order) in bw_lpc() 57 spx_word16_t tmp=gamma; in bw_lpc() 83 void highpass(const spx_word16_t *x, spx_word16_t *y, int len, int filtID, spx_mem_t *mem) in highpass() 87 …const spx_word16_t Pcoef[5][3] = {{16384, -31313, 14991}, {16384, -31569, 15249}, {16384, -31677, … in highpass() 88 …const spx_word16_t Zcoef[5][3] = {{15672, -31344, 15672}, {15802, -31601, 15802}, {15847, -31694, … in highpass() 90 …const spx_word16_t Pcoef[5][3] = {{1.00000f, -1.91120f, 0.91498f}, {1.00000f, -1.92683f, 0.93071f}… in highpass() 91 …const spx_word16_t Zcoef[5][3] = {{0.95654f, -1.91309f, 0.95654f}, {0.96446f, -1.92879f, 0.96446f}… in highpass() 93 const spx_word16_t *den, *num; in highpass() 101 spx_word16_t yi; in highpass() 122 void signal_div(const spx_word16_t *x, spx_word16_t *y, spx_word32_t scale, int len) in signal_div() [all …]
|
D | cb_search.c | 53 …eighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word1… in compute_weighted_codebook() 56 VARDECL(spx_word16_t *shape); in compute_weighted_codebook() 57 ALLOC(shape, subvect_size, spx_word16_t); in compute_weighted_codebook() 60 spx_word16_t *res; in compute_weighted_codebook() 64 shape[k] = (spx_word16_t)shape_cb[i*subvect_size+k]; in compute_weighted_codebook() 71 spx_word16_t res16; in compute_weighted_codebook() 90 static inline void target_update(spx_word16_t *t, spx_word16_t g, spx_word16_t *r, int len) in target_update() 101 spx_word16_t target[], /* target vector */ in split_cb_search_shape_sign_N1() 109 spx_word16_t *r, in split_cb_search_shape_sign_N1() 116 VARDECL(spx_word16_t *resp); in split_cb_search_shape_sign_N1() [all …]
|
D | math_approx.h | 49 static inline spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed) in speex_rand() 122 static inline spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed) in speex_rand() 142 static inline spx_word16_t spx_sqrt(spx_word32_t x) in spx_sqrt() 160 static inline spx_word16_t spx_acos(spx_word16_t x) in spx_acos() 163 spx_word16_t ret; in spx_acos() 164 spx_word16_t sq; in spx_acos() 188 static inline spx_word16_t spx_cos(spx_word16_t x) in spx_cos() 190 spx_word16_t x2; in spx_cos() 208 static inline spx_word16_t _spx_cos_pi_2(spx_word16_t x) in _spx_cos_pi_2() 210 spx_word16_t x2; in _spx_cos_pi_2() [all …]
|
D | ltp_bfin.h | 37 spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len) in inner_prod() 66 void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int n… in pitch_xcorr() 112 static inline spx_word32_t compute_pitch_error(spx_word16_t *C, spx_word16_t *g, spx_word16_t pitch… in compute_pitch_error() 157 void open_loop_nbest_pitch(spx_word16_t *sw, int start, int end, int len, int *pitch, spx_word16_t … in open_loop_nbest_pitch() 214 VARDECL(spx_word16_t *corr16); in open_loop_nbest_pitch() 215 VARDECL(spx_word16_t *ener16); in open_loop_nbest_pitch() 216 ALLOC(corr16, end-start+1, spx_word16_t); in open_loop_nbest_pitch() 217 ALLOC(ener16, end-start+1, spx_word16_t); in open_loop_nbest_pitch() 258 spx_word16_t tmp = MULT16_16_16(corr16[i-start],corr16[i-start]); in open_loop_nbest_pitch() 293 spx_word16_t g; in open_loop_nbest_pitch() [all …]
|
D | sb_celp.h | 54 spx_word16_t lpc_floor; /**< Controls LPC analysis noise floor */ 55 spx_word16_t gamma1; /**< Perceptual weighting coef 1 */ 56 spx_word16_t gamma2; /**< Perceptual weighting coef 2 */ 59 spx_word16_t *high; /**< High-band signal (buffer) */ 60 spx_word16_t *h0_mem, *h1_mem; 62 const spx_word16_t *window; /**< LPC analysis window */ 63 const spx_word16_t *lagWindow; /**< Auto-correlation window */ 72 spx_word16_t *exc_rms; 73 spx_word16_t *innov_rms_save; /**< If non-NULL, innovation is copied here */ 112 spx_word16_t *g0_mem, *g1_mem; [all …]
|
D | filters_bfin.h | 36 int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len) in normalize16() 85 void filter_mem16(const spx_word16_t *_x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_… in filter_mem16() 90 spx_word16_t *numden; in filter_mem16() 96 numden = (spx_word16_t*) numden_a; in filter_mem16() 230 void iir_mem16(const spx_word16_t *_x, const spx_coef_t *den, spx_word16_t *_y, int N, int ord, spx… in iir_mem16() 232 VARDECL(spx_word16_t *y); in iir_mem16() 233 spx_word16_t *yy; in iir_mem16() 235 ALLOC(y, (N+2), spx_word16_t); in iir_mem16() 355 void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_m… in fir_mem16() 368 …const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int … in compute_impulse_response() [all …]
|
D | fftwrap.c | 45 static int maximize_range(spx_word16_t *in, spx_word16_t *out, spx_word16_t bound, int len) in maximize_range() 48 spx_word16_t max_val = 0; in maximize_range() 69 static void renorm_range(spx_word16_t *in, spx_word16_t *out, int shift, int len) in renorm_range() 156 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out) in spx_fft() 162 void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out) in spx_ifft() 204 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out) in spx_fft() 222 void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out) in spx_ifft() 273 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out) in spx_fft() 285 void spx_fft(void *table, spx_word16_t *in, spx_word16_t *out) in spx_fft() 297 void spx_ifft(void *table, spx_word16_t *in, spx_word16_t *out) in spx_ifft() [all …]
|
D | fixed_bfin.h | 40 static inline spx_word16_t PDIV32_16(spx_word32_t a, spx_word16_t b) in PDIV32_16() 65 static inline spx_word16_t DIV32_16(spx_word32_t a, spx_word16_t b) in DIV32_16() 92 static inline spx_word16_t MAX16(spx_word16_t a, spx_word16_t b) in MAX16() 106 static inline spx_word32_t MULT16_32_Q15(spx_word16_t a, spx_word32_t b) in MULT16_32_Q15() 122 static inline spx_word32_t MAC16_32_Q15(spx_word32_t c, spx_word16_t a, spx_word32_t b) in MAC16_32_Q15() 139 static inline spx_word32_t MULT16_32_Q14(spx_word16_t a, spx_word32_t b) in MULT16_32_Q14() 156 static inline spx_word32_t MAC16_32_Q14(spx_word32_t c, spx_word16_t a, spx_word32_t b) in MAC16_32_Q14()
|
D | preprocess.c | 96 static inline spx_word16_t DIV32_16_Q8(spx_word32_t a, spx_word32_t b) in DIV32_16_Q8() 122 static inline spx_word16_t DIV32_16_Q15(spx_word32_t a, spx_word32_t b) in DIV32_16_Q15() 193 spx_word16_t reverb_decay; 194 spx_word16_t reverb_level; 195 spx_word16_t speech_prob_start; 196 spx_word16_t speech_prob_continue; 202 spx_word16_t speech_prob; /**< Probability last frame was speech */ 205 spx_word16_t *frame; /**< Processing frame (2*ps_size) */ 206 spx_word16_t *ft; /**< Processing frame in freq domain (2*ps_size) */ 208 spx_word16_t *gain2; /**< Adjusted gains */ [all …]
|
D | fixed_generic.h | 38 #define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits)))) 43 #define EXTRACT16(x) ((spx_word16_t)(x)) 61 #define ADD16(a,b) ((spx_word16_t)((spx_word16_t)(a)+(spx_word16_t)(b))) 62 #define SUB16(a,b) ((spx_word16_t)(a)-(spx_word16_t)(b)) 68 #define MULT16_16_16(a,b) ((((spx_word16_t)(a))*((spx_word16_t)(b)))) 71 #define MULT16_16(a,b) (((spx_word32_t)(spx_word16_t)(a))*((spx_word32_t)(spx_word16_t)(b))) 101 #define DIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b)))) 102 #define PDIV32_16(a,b) ((spx_word16_t)(((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word16_t)(b… 104 #define PDIV32(a,b) (((spx_word32_t)(a)+((spx_word16_t)(b)>>1))/((spx_word32_t)(b)))
|
D | resample.c | 109 …sic_func)(SpeexResamplerState *, spx_uint32_t , const spx_word16_t *, spx_uint32_t *, spx_word16_t… 134 spx_word16_t *mem; 135 spx_word16_t *sinc_table; 272 static spx_word16_t sinc(float cutoff, float x, int N, struct FuncDef *window_func) in sinc() 285 static spx_word16_t sinc(float cutoff, float x, int N, struct FuncDef *window_func) in sinc() 299 static void cubic_coef(spx_word16_t x, spx_word16_t interp[4]) in cubic_coef() 303 spx_word16_t x2, x3; in cubic_coef() 315 static void cubic_coef(spx_word16_t frac, spx_word16_t interp[4]) in cubic_coef() 328 …mplerState *st, spx_uint32_t channel_index, const spx_word16_t *in, spx_uint32_t *in_len, spx_word… in resampler_basic_direct_single() 334 const spx_word16_t *sinc_table = st->sinc_table; in resampler_basic_direct_single() [all …]
|
D | sb_celp.c | 116 static const spx_word16_t gc_quant_bound[16] = {125, 164, 215, 282, 370, 484, 635, 832, 1090, 1428,… 117 static const spx_word16_t fold_quant_bound[32] = { 128 static const spx_word16_t gc_quant_bound[16] = { 131 static const spx_word16_t fold_quant_bound[32] = { 146 static const spx_word16_t h0[64] = {2, -7, -7, 18, 15, -39, -25, 75, 35, -130, -41, 212, 38, -327, … 186 extern const spx_word16_t lag_window[]; 187 extern const spx_word16_t lpc_window[]; 233 st->high=(spx_word16_t*)speex_alloc((st->windowSize-st->frame_size)*sizeof(spx_word16_t)); in sb_encoder_init() 235 st->h0_mem=(spx_word16_t*)speex_alloc((QMF_ORDER)*sizeof(spx_word16_t)); in sb_encoder_init() 236 st->h1_mem=(spx_word16_t*)speex_alloc((QMF_ORDER)*sizeof(spx_word16_t)); in sb_encoder_init() [all …]
|
D | vq.h | 40 int scal_quant(spx_word16_t in, const spx_word16_t *boundary, int entries); 45 void vq_nbest(spx_word16_t *in, const __m128 *codebook, int len, int entries, __m128 *E, int N, int… 47 void vq_nbest_sign(spx_word16_t *in, const __m128 *codebook, int len, int entries, __m128 *E, int N… 49 void vq_nbest(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E… 51 void vq_nbest_sign(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32…
|
D | mdf.c | 143 spx_word16_t spec_average; 144 spx_word16_t beta0; 145 spx_word16_t beta_max; 147 spx_word16_t leak_estimate; 149 spx_word16_t *e; /* scratch */ 150 spx_word16_t *x; /* Far-end input buffer (2N) */ 151 spx_word16_t *X; /* Far-end buffer (M+1 frames) in frequency domain */ 152 spx_word16_t *input; /* scratch */ 153 spx_word16_t *y; /* scratch */ 154 spx_word16_t *last_y; [all …]
|
D | lsp.c | 141 spx_word16_t *coef, /* P or Q coefs in Q13 format */ in cheb_poly_eva() 142 spx_word16_t x, /* cos of freq (-1.0 to 1.0) in Q14 format */ in cheb_poly_eva() 148 spx_word16_t b0, b1; in cheb_poly_eva() 165 spx_word16_t tmp=b0; in cheb_poly_eva() 177 static float cheb_poly_eva(spx_word32_t *coef, spx_word16_t x, int m, char *stack) in cheb_poly_eva() 219 int lpc_to_lsp (spx_coef_t *a,int lpcrdr,spx_lsp_t *freq,int nb,spx_word16_t delta, char *stack) in lpc_to_lsp() 228 spx_word16_t temp_xr,xl,xr,xm=0; in lpc_to_lsp() 233 VARDECL(spx_word16_t *Q16); /* ptrs for memory allocation */ in lpc_to_lsp() 234 VARDECL(spx_word16_t *P16); in lpc_to_lsp() 239 spx_word16_t *pt; /* ptr used for cheb_poly_eval() in lpc_to_lsp() [all …]
|
D | cb_search_bfin.h | 37 …eighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word1… in compute_weighted_codebook() 88 static inline void target_update(spx_word16_t *t, spx_word16_t g, spx_word16_t *r, int len) in target_update()
|
D | fixed_arm5e.h | 39 static inline spx_word32_t MULT16_16(spx_word16_t x, spx_word16_t y) { in MULT16_16() 48 static inline spx_word32_t MAC16_16(spx_word32_t a, spx_word16_t x, spx_word32_t y) { in MAC16_16() 57 static inline spx_word32_t MULT16_32_Q15(spx_word16_t x, spx_word32_t y) { in MULT16_32_Q15() 66 static inline spx_word32_t MAC16_32_Q15(spx_word32_t a, spx_word16_t x, spx_word32_t y) { in MAC16_32_Q15() 75 static inline spx_word32_t MULT16_32_Q11(spx_word16_t x, spx_word32_t y) { in MULT16_32_Q11() 84 static inline spx_word32_t MAC16_32_Q11(spx_word32_t a, spx_word16_t x, spx_word32_t y) { in MAC16_32_Q11()
|
D | quant_lsp.c | 54 #define LSP_DIV_256(x) (SHL16((spx_word16_t)x, 5)) 55 #define LSP_DIV_512(x) (SHL16((spx_word16_t)x, 4)) 56 #define LSP_DIV_1024(x) (SHL16((spx_word16_t)x, 3)) 71 static void compute_quant_weights(spx_lsp_t *qlsp, spx_word16_t *quant_weight, int order) in compute_quant_weights() 74 spx_word16_t tmp1, tmp2; in compute_quant_weights() 98 static int lsp_quant(spx_word16_t *x, const signed char *cdbk, int nbVec, int nbDim) in lsp_quant() 102 spx_word16_t tmp; in lsp_quant() 111 tmp=SUB16(x[j],SHL16((spx_word16_t)*ptr++,5)); in lsp_quant() 122 x[j] = SUB16(x[j],SHL16((spx_word16_t)cdbk[best_id*nbDim+j],5)); in lsp_quant() 130 static int lsp_weight_quant(spx_word16_t *x, spx_word16_t *weight, const signed char *cdbk, int nbV… in lsp_weight_quant() [all …]
|
D | ltp_arm4.h | 36 spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len) in inner_prod() 39 spx_word16_t *deadx, *deady; in inner_prod() 88 void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int n… in pitch_xcorr() 99 const spx_word16_t *y = _y+i; in pitch_xcorr() 100 const spx_word16_t *x = _x; in pitch_xcorr()
|
D | nb_celp.c | 80 const spx_word16_t exc_gain_quant_scal3_bound[7]={1841, 3883, 6051, 8062, 10444, 13580, 18560}; 81 const spx_word16_t exc_gain_quant_scal3[8]={1002, 2680, 5086, 7016, 9108, 11781, 15380, 21740}; 82 const spx_word16_t exc_gain_quant_scal1_bound[1]={14385}; 83 const spx_word16_t exc_gain_quant_scal1[2]={11546, 17224}; 111 extern const spx_word16_t lag_window[]; 112 extern const spx_word16_t lpc_window[]; 159 st->winBuf = (spx_word16_t*)speex_alloc((st->windowSize-st->frameSize)*sizeof(spx_word16_t)); in nb_encoder_init() 161 st->excBuf = (spx_word16_t*)speex_alloc((mode->frameSize+mode->pitchEnd+2)*sizeof(spx_word16_t)); in nb_encoder_init() 163 st->swBuf = (spx_word16_t*)speex_alloc((mode->frameSize+mode->pitchEnd+2)*sizeof(spx_word16_t)); in nb_encoder_init() 257 spx_word16_t ol_pitch_coef; in nb_encode() [all …]
|