/third_party/pulseaudio/speex/libspeexdsp/ |
H A D | pseudofloat.h | 228 return EXTRACT16((EXTEND32(a.m)+(EXTEND32(1)<<(-a.e-1)))>>-a.e); in FLOAT_EXTRACT16() 236 return (EXTEND32(a.m)+(EXTEND32(1)<<(-a.e-1)))>>-a.e; in FLOAT_EXTRACT32() 238 return EXTEND32(a.m)<<a.e; in FLOAT_EXTRACT32() 274 if (ABS32(a)>=SHL32(EXTEND32(b.m-1),15)) in FLOAT_DIV32_FLOAT() 302 if (ABS32(a)>=SHL32(EXTEND32(b-1),15)) in FLOAT_DIV32() 341 m = SHL32(EXTEND32(a.m), 14); in FLOAT_SQRT()
|
H A D | math_approx.h | 174 ret = spx_sqrt(SHL32(EXTEND32(sq),13)); in spx_acos() 219 if (x>SHL32(EXTEND32(1), 16)) in spx_cos_norm() 220 x = SUB32(SHL32(EXTEND32(1), 17),x); in spx_cos_norm() 223 if (x<SHL32(EXTEND32(1), 15)) in spx_cos_norm() 261 return VSHR32(EXTEND32(frac), -integer-2); in spx_exp2() 299 x = DIV32_16(SHL32(EXTEND32(32767),29-e), EXTRACT16(SHR32(x, e-14))); in spx_atan()
|
H A D | kiss_fftr.c | 225 /*f1k.r = PSHR32(ADD32(EXTEND32(st->tmpbuf[k].r), EXTEND32(st->tmpbuf[ncfft-k].r)),1); in kiss_fftr2() 226 f1k.i = PSHR32(SUB32(EXTEND32(st->tmpbuf[k].i), EXTEND32(st->tmpbuf[ncfft-k].i)),1); in kiss_fftr2() 227 f2k.r = PSHR32(SUB32(EXTEND32(st->tmpbuf[k].r), EXTEND32(st->tmpbuf[ncfft-k].r)),1); in kiss_fftr2() 228 f2k.i = SHR32(ADD32(EXTEND32(st->tmpbuf[k].i), EXTEND32(st->tmpbuf[ncfft-k].i)),1); in kiss_fftr2() 237 f2k.r = SHR32(SUB32(EXTEND32(st->tmpbuf[k].r), EXTEND32(s in kiss_fftr2() [all...] |
H A D | mdf.c | 200 spx_word32_t vout = mem[0] + SHL32(EXTEND32(vin),15); in filter_dc_notch16() 202 mem[0] = mem[1] + SHL32(SHL32(-EXTEND32(vin),15) + MULT16_32_Q15(radius,vout),1); in filter_dc_notch16() 206 mem[1] = SHL32(EXTEND32(vin),15) - MULT16_32_Q15(den2,vout); in filter_dc_notch16() 369 prop_sum += EXTEND32(prop[i]); in mdf_adjust_prop() 428 st->spec_average = DIV32_16(SHL32(EXTEND32(st->frame_size), 15), st->sampling_rate); in speex_echo_state_init_mc() 430 st->beta0 = DIV32_16(SHL32(EXTEND32(st->frame_size), 16), st->sampling_rate); in speex_echo_state_init_mc() 431 st->beta_max = DIV32_16(SHL32(EXTEND32(st->frame_size), 14), st->sampling_rate); in speex_echo_state_init_mc() 484 sum = EXTEND32(st->prop[0]); in speex_echo_state_init_mc() 488 sum = ADD32(sum, EXTEND32(st->prop[i])); in speex_echo_state_init_mc() 726 tmp32 = SUB32(EXTEND32(s in speex_echo_cancellation() [all...] |
H A D | preprocess.c | 277 tmp = SQR16_Q15(QCONST16(.5f,15)-MULT16_16_P15(QCONST16(.5f,15),spx_cos_norm(SHL32(EXTEND32(x),2)))); in conj_window() 280 w[i]=spx_sqrt(SHL32(EXTEND32(tmp),15)); in conj_window() 305 return ADD32(EXTEND32(Q15_ONE),EXTEND32(DIV32_16(QCONST32(.1296,23), SHR32(xx,EXPIN_SHIFT-SNR_SHIFT)))); in hypergeom_gain() 313 return DIV32_16(SHL32(EXTEND32(32767),9),ADD16(512,MULT16_16_Q15(QCONST16(.60f,15),DIV32_16(32767,x)))); in qcurve() 330 spx_sqrt(SHL32(EXTEND32(DIV32_16_Q15(PSHR32(noise[i],NOISE_SHIFT) + MULT16_32_Q15(gain_ratio,echo[i]), in compute_gain_floor() 340 spx_sqrt(SHL32(EXTEND32(DIV32_16_Q15(MULT16_32_Q15(gain_ratio,PSHR32(noise[i],NOISE_SHIFT)) + echo[i], in compute_gain_floor() 641 st->frame_shift = 14-spx_ilog2(EXTEND32(max_val)); in preprocess_analysis() 778 st->noise[i] = MAX32(EXTEND32(0),MULT16_32_Q15(beta_1,st->noise[i]) + MULT16_32_Q15(beta,SHL32(st->ps[i],NOISE_SHIFT))); in speex_preprocess_run() 793 spx_word32_t tot_noise = ADD32(ADD32(ADD32(EXTEND32( in speex_preprocess_run() [all...] |
H A D | fixed_generic.h | 44 #define EXTEND32(x) ((spx_word32_t)(x)) macro 50 #define PSHR32(a,shift) (SHR32((a)+((EXTEND32(1)<<((shift))>>1)),shift)) 61 #define PSHR(a,shift) (SHR((a)+((EXTEND32(1)<<((shift))>>1)),shift))
|
H A D | fixed_debug.h | 90 #define EXTEND32(x) _EXTEND32(x, __FILE__, __LINE__) macro 96 fprintf (stderr, "EXTEND32: input is not short: %d in %s: line %d\n", x, file, line); in _EXTEND32() 164 #define PSHR32(a,shift) (SHR32(ADD32((a),((EXTEND32(1)<<((shift))>>1))),shift)) 282 if (ABS32(b)>=(EXTEND32(1)<<(15+Q))) in _MULT16_32_QX() 298 if (ABS32(b)>=(EXTEND32(1)<<(15+Q))) in MULT16_32_PX() 300 res = ((((long long)a)*(long long)b) + ((EXTEND32(1)<<Q)>>1))>> Q; in MULT16_32_PX()
|
H A D | kiss_fft.c | 57 Fout2->r = PSHR32(SUB32(SHL32(EXTEND32(Fout->r), 14), tr), 15); in kf_bfly2() 58 Fout2->i = PSHR32(SUB32(SHL32(EXTEND32(Fout->i), 14), ti), 15); in kf_bfly2() 59 Fout->r = PSHR32(ADD32(SHL32(EXTEND32(Fout->r), 14), tr), 15); in kf_bfly2() 60 Fout->i = PSHR32(ADD32(SHL32(EXTEND32(Fout->i), 14), ti), 15); in kf_bfly2()
|
H A D | arch.h | 160 #define EXTEND32(x) (x) macro
|
H A D | resample.c | 312 interp[1] = EXTRACT16(EXTEND32(x) + SHR32(SUB32(EXTEND32(x2),EXTEND32(x3)),1)); in cubic_coef()
|
/third_party/pulseaudio/speex/tmv/ |
H A D | mdf_tm.h | 368 tmp32 = SUB32(EXTEND32(far_endi), EXTEND32(MULT16_16_P15(preemph,memX))); in mdf_preemph() 377 tmp32 = SUB32(EXTEND32(inputi), EXTEND32(MULT16_16_P15(preemph, memD))); in mdf_preemph() 568 { W[i] -= SHL32(EXTEND32(wtmp2[i]),16+NORMALIZE_SCALEDOWN-NORMALIZE_SCALEUP-1); in mdf_update_weight() 723 tmp_out = SUB32(EXTEND32(input[i]), EXTEND32(ee[i])); in mdf_compute_error_signal() 726 tmp_out = SUB32(EXTEND32(input[i]), EXTEND32(y[i])); in mdf_compute_error_signal() 732 tmp_out = SUB32(EXTEND32(inpu in mdf_compute_error_signal() [all...] |
H A D | preprocess_tm.h | 642 { noise[i] = MAX32(EXTEND32(0),MULT16_32_Q15(beta_1,ni) + in preprocess_update_noise() 679 tot_noise = ADD32(ADD32(ADD32(EXTEND32(1), PSHR32(noise[i],NOISE_SHIFT)), echo[i]) , reverb[i]); in preprocess_compute_SNR() 748 { Zframe = ADD32(Zframe, EXTEND32(zeta[i])); in preprocess_smooth_SNR() 787 prior_ratio = PDIV32_16(SHL32(EXTEND32(priori), 15), ADD16(priori, SHL32(1,SNR_SHIFT))); in preprocess_compute_emgain() 788 theta = MULT16_32_P15(prior_ratio, QCONST32(1.f,EXPIN_SHIFT)+SHL32(EXTEND32(post[i]),EXPIN_SHIFT-SNR_SHIFT)); in preprocess_compute_emgain() 798 theta = MIN32(theta, EXTEND32(32767)); in preprocess_compute_emgain() 801 tmp = EXTRACT16(PSHR32(MULT16_16(PDIV32_16(SHL32(EXTEND32(q),8),(Q15_ONE-q)),tmp),8)); in preprocess_compute_emgain() 802 gain2[i]=DIV32_16(SHL32(EXTEND32(32767),SNR_SHIFT), ADD16(256,tmp)); in preprocess_compute_emgain() 842 prior_ratio = PDIV32_16(SHL32(EXTEND32(st->prior[i]), 15), ADD16(prior[i], SHL32(1,SNR_SHIFT))); in preprocess_compute_linear_gain() 843 theta = MULT16_32_P15(prior_ratio, QCONST32(1.f,EXPIN_SHIFT)+SHL32(EXTEND32(pos in preprocess_compute_linear_gain() [all...] |
H A D | fixed_tm.h | 48 #undef EXTEND32 macro 49 #define EXTEND32(x) sex16(x) macro
|