/external/speex/libspeexdsp/ |
D | fixed_generic.h | 77 #define MULT16_16(a,b) (((spx_word32_t)(spx_word16_t)(a))*((spx_word32_t)(spx_word16_t)(b))) macro 79 #define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b)))) 81 #define MULT16_32_P15(a,b) ADD32(MULT16_32_32(a,SHR((b),15)), PSHR(MULT16_16((a),((b)&0x00007fff)),… 82 #define MULT16_32_Q15(a,b) ADD32(MULT16_32_32(a,SHR((b),15)), SHR(MULT16_16((a),((b)&0x00007fff)),1… 86 #define MAC16_16_Q11(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),11))) 87 #define MAC16_16_Q13(c,a,b) (ADD32((c),SHR(MULT16_16((a),(b)),13))) 88 #define MAC16_16_P13(c,a,b) (ADD32((c),SHR(ADD32(4096,MULT16_16((a),(b))),13))) 90 #define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11)) 91 #define MULT16_16_Q13(a,b) (SHR(MULT16_16((a),(b)),13)) 92 #define MULT16_16_Q14(a,b) (SHR(MULT16_16((a),(b)),14)) [all …]
|
D | filterbank.c | 46 … toBARK(n) (MULT16_16(26829,spx_atan(SHR32(MULT16_16(97,n),2))) + MULT16_16(4588,spx_atan(MULT16… 62 df = DIV32(SHL32(sampling,15),MULT16_16(2,len)); in filterbank_new() 165 tmp = MULT16_16(mel[id1],bank->filter_left[i]); in filterbank_compute_psd16() 166 tmp += MULT16_16(mel[id2],bank->filter_right[i]); in filterbank_compute_psd16()
|
D | preprocess.c | 88 #define SQR16(x) (MULT16_16((x),(x))) 258 spx_word16_t x = DIV32_16(MULT16_16(32767,i),len); in conj_window() 260 spx_word16_t x = DIV32_16(MULT16_16(QCONST16(4.f,13),i),len); in conj_window() 307 …return SHL32(DIV32_16(PSHR32(MULT16_16(Q15_ONE-frac,table[ind]) + MULT16_16(frac,table[ind+1]),7),… in hypergeom_gain() 324 …noise_gain = EXTRACT16(MIN32(Q15_ONE,SHR32(spx_exp(MULT16_16(QCONST16(0.11513,11),noise_suppress))… in compute_gain_floor() 325 …gain_ratio = EXTRACT16(MIN32(Q15_ONE,SHR32(spx_exp(MULT16_16(QCONST16(.2302585f,11),effective_echo… in compute_gain_floor() 334 …echo_gain = EXTRACT16(MIN32(Q15_ONE,SHR32(spx_exp(MULT16_16(QCONST16(0.11513,11),effective_echo_su… in compute_gain_floor() 335 …gain_ratio = EXTRACT16(MIN32(Q15_ONE,SHR32(spx_exp(MULT16_16(QCONST16(.2302585f,11),noise_suppress… in compute_gain_floor() 651 ps[0]=MULT16_16(st->ft[0],st->ft[0]); in preprocess_analysis() 653 ps[i]=MULT16_16(st->ft[2*i-1],st->ft[2*i-1]) + MULT16_16(st->ft[2*i],st->ft[2*i]); in preprocess_analysis() [all …]
|
D | mdf.c | 231 ps[0]=MULT16_16(X[0],X[0]); in power_spectrum() 234 ps[j] = MULT16_16(X[i],X[i]) + MULT16_16(X[i+1],X[i+1]); in power_spectrum() 236 ps[j]=MULT16_16(X[i],X[i]); in power_spectrum() 243 ps[0]+=MULT16_16(X[0],X[0]); in power_spectrum_accum() 246 ps[j] += MULT16_16(X[i],X[i]) + MULT16_16(X[i+1],X[i+1]); in power_spectrum_accum() 248 ps[j]+=MULT16_16(X[i],X[i]); in power_spectrum_accum() 267 … tmp1 = SUB32(MAC16_16(tmp1, X[j*N+i],TOP16(Y[j*N+i])), MULT16_16(X[j*N+i+1],TOP16(Y[j*N+i+1]))); in spectral_mul_accum() 294 tmp1 = SUB32(MAC16_16(tmp1, X[j*N+i],Y[j*N+i]), MULT16_16(X[j*N+i+1],Y[j*N+i+1])); in spectral_mul_accum16() 336 prod[0] = FLOAT_MUL32(W,MULT16_16(X[0],Y[0])); in weighted_spectral_mul_conj() 340 prod[i] = FLOAT_MUL32(W,MAC16_16(MULT16_16(X[i],Y[i]), X[i+1],Y[i+1])); in weighted_spectral_mul_conj() [all …]
|
D | fixed_arm5e.h | 38 #undef MULT16_16 39 static inline spx_word32_t MULT16_16(spx_word16_t x, spx_word16_t y) { in MULT16_16() function
|
D | resample.c | 309 …interp[0] = PSHR32(MULT16_16(QCONST16(-0.16667f, 15),x) + MULT16_16(QCONST16(0.16667f, 15),x3),15); in cubic_coef() 311 …interp[3] = PSHR32(MULT16_16(QCONST16(-0.33333f, 15),x) + MULT16_16(QCONST16(.5f,15),x2) - MULT16_… in cubic_coef() 352 for(j=0;j<N;j++) sum += MULT16_16(sinct[j], iptr[j]); in resampler_basic_direct_single() 469 accum[0] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset-2]); in resampler_basic_interpolate_single() 470 accum[1] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset-1]); in resampler_basic_interpolate_single() 471 accum[2] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset]); in resampler_basic_interpolate_single() 472 accum[3] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset+1]); in resampler_basic_interpolate_single() 532 accum[0] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset-2]); in resampler_basic_interpolate_double() 533 accum[1] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset-1]); in resampler_basic_interpolate_double() 534 accum[2] += MULT16_16(curr_in,st->sinc_table[4+(j+1)*st->oversample-offset]); in resampler_basic_interpolate_double() [all …]
|
D | kiss_fftr.c | 243 …twr = SHR32(SUB32(MULT16_16(f2k.r,st->super_twiddles[k].r),MULT16_16(f2k.i,st->super_twiddles[k].i… in kiss_fftr2() 244 …twi = SHR32(ADD32(MULT16_16(f2k.i,st->super_twiddles[k].r),MULT16_16(f2k.r,st->super_twiddles[k].i… in kiss_fftr2()
|
D | fixed_debug.h | 268 #define MULT16_16(a, b) _MULT16_16(a, b, __FILE__, __LINE__) macro 283 #define MAC16_16(c,a,b) (spx_mips--,ADD32((c),MULT16_16((a),(b)))) 284 #define MAC16_16_Q11(c,a,b) (EXTRACT16(ADD16((c),EXTRACT16(SHR32(MULT16_16((a),(b)),11))))) 285 #define MAC16_16_Q13(c,a,b) (EXTRACT16(ADD16((c),EXTRACT16(SHR32(MULT16_16((a),(b)),13))))) 286 #define MAC16_16_P13(c,a,b) (EXTRACT16(ADD32((c),SHR32(ADD32(4096,MULT16_16((a),(b))),13))))
|
D | kiss_fft.c | 54 tr = SHR32(SUB32(MULT16_16(Fout2->r , tw1->r),MULT16_16(Fout2->i , tw1->i)), 1); in kf_bfly2() 55 ti = SHR32(ADD32(MULT16_16(Fout2->i , tw1->r),MULT16_16(Fout2->r , tw1->i)), 1); in kf_bfly2()
|
/external/libopus/celt/ |
D | fixed_generic.h | 43 #define MULT16_32_Q16(a,b) ADD32(MULT16_16((a),SHR((b),16)), SHR(MULT16_16SU((a),((b)&0x0000ffff)),… 50 #define MULT16_32_P16(a,b) ADD32(MULT16_16((a),SHR((b),16)), PSHR(MULT16_16SU((a),((b)&0x0000ffff))… 57 #define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000… 64 …),((b)&0x0000ffff))), MULT16_16SU(SHR32(b,16),((a)&0x0000ffff))), SHL32(MULT16_16(SHR32(a,16),SHR3… 71 #define MULT32_32_Q31(a,b) ADD32(ADD32(SHL(MULT16_16(SHR((a),16),SHR((b),16)),1), SHR(MULT16_16SU(S… 146 #define MULT16_16(a,b) (((opus_val32)(opus_val16)(a))*((opus_val32)(opus_val16)(b))) macro 149 #define MAC16_16(c,a,b) (ADD32((c),MULT16_16((a),(b)))) 153 #define MAC16_32_Q15(c,a,b) ADD32((c),ADD32(MULT16_16((a),SHR((b),15)), SHR(MULT16_16((a),((b)&0x00… 157 #define MAC16_32_Q16(c,a,b) ADD32((c),ADD32(MULT16_16((a),SHR((b),16)), SHR(MULT16_16SU((a),((b)&0x… 159 #define MULT16_16_Q11_32(a,b) (SHR(MULT16_16((a),(b)),11)) [all …]
|
D | vq.c | 59 Xptr[stride] = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x2), s, x1), 15)); in exp_rotation1() 60 *Xptr++ = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x1), ms, x2), 15)); in exp_rotation1() 68 Xptr[stride] = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x2), s, x1), 15)); in exp_rotation1() 69 *Xptr-- = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x1), ms, x2), 15)); in exp_rotation1() 87 gain = celt_div((opus_val32)MULT16_16(Q15_ONE,len),(opus_val32)(len+factor*K)); in exp_rotation() 139 X[i] = EXTRACT16(PSHR32(MULT16_16(g, iy[i]), k+1)); in normalise_residual() 299 if (opus_unlikely(MULT16_16(best_den, Rxy) > MULT16_16(Ryy, best_num))) in op_pvq_search_c() 403 *xptr = EXTRACT16(PSHR32(MULT16_16(g, *xptr), k+1)); in renormalise_vector()
|
D | celt_lpc.c | 193 sum -= MULT16_16(den[j],mem[j]); in celt_iir() 248 sum -= MULT16_16(rden[j],y[i+j]); in celt_iir() 296 if (n&1) ac0 += SHR32(MULT16_16(xptr[0],xptr[0]),9); in _celt_autocorr() 299 ac0 += SHR32(MULT16_16(xptr[i],xptr[i]),9); in _celt_autocorr() 300 ac0 += SHR32(MULT16_16(xptr[i+1],xptr[i+1]),9); in _celt_autocorr()
|
D | pitch.c | 69 Syy = ADD32(Syy, SHR32(MULT16_16(y[j],y[j]), yshift)); in find_best_pitch() 100 Syy += SHR32(MULT16_16(y[i+len],y[i+len]),yshift) - SHR32(MULT16_16(y[i],y[i]),yshift); in find_best_pitch() 368 sum += SHR32(MULT16_16(x_lp[j],y[i+j]), shift); in pitch_search() 416 x2y2 = SHR32(MULT16_16(VSHR32(xx, sx), VSHR32(yy, sy)), 14); in compute_pitch_gain() 471 yy = yy+MULT16_16(x[-i],x[-i])-MULT16_16(x[N-i],x[N-i]); in remove_doubling()
|
D | quant_bands.c | 194 f = SHL32(EXTEND32(x),7) - PSHR32(MULT16_16(coef,oldE), 8) - prev[c]; in quant_coarse_energy_impl() 250 tmp = PSHR32(MULT16_16(coef,oldE),8) + prev[c] + SHL32(q,7); in quant_coarse_energy_impl() 255 prev[c] = prev[c] + SHL32(q,7) - MULT16_16(beta,PSHR32(q,8)); in quant_coarse_energy_impl() 483 tmp = PSHR32(MULT16_16(coef,oldEBands[i+c*m->nbEBands]),8) + prev[c] + SHL32(q,7); in unquant_coarse_energy() 488 prev[c] = prev[c] + SHL32(q,7) - MULT16_16(beta,PSHR32(q,8)); in unquant_coarse_energy()
|
D | bands.c | 254 *f++ = SHL32(MULT16_16(*x++, g), -shift); in denormalise_bands() 260 *f++ = SHR32(MULT16_16(*x++, g), shift); in denormalise_bands() 400 norm = EPSILON + celt_sqrt(EPSILON+MULT16_16(left,left)+MULT16_16(right,right)); in intensity_stereo() 408 X[j] = EXTRACT16(SHR32(MAC16_16(MULT16_16(a1, l), a2, r), 14)); in intensity_stereo() 419 l = MULT16_16(QCONST16(.70710678f, 15), X[j]); in stereo_split() 420 r = MULT16_16(QCONST16(.70710678f, 15), Y[j]); in stereo_split() 443 El = MULT16_16(mid2, mid2) + side - 2*xp; in stereo_merge() 444 Er = MULT16_16(mid2, mid2) + side + 2*xp; in stereo_merge() 473 X[j] = EXTRACT16(PSHR32(MULT16_16(lgain, SUB16(l,r)), kl+1)); in stereo_merge() 474 Y[j] = EXTRACT16(PSHR32(MULT16_16(rgain, ADD16(l,r)), kr+1)); in stereo_merge() [all …]
|
D | celt_encoder.c | 320 opus_val16 x2 = PSHR32(MULT16_16(tmp[2*i],tmp[2*i]) + MULT16_16(tmp[2*i+1],tmp[2*i+1]),16); in transient_analysis() 356 mean = MULT16_16(celt_sqrt(mean), celt_sqrt(MULT16_16(maxE,len2>>1))); in transient_analysis() 400 …*tf_estimate = celt_sqrt(MAX32(0, SHL32(MULT16_16(QCONST16(0.0069,14),MIN16(163,tf_max)),14)-QCONS… in transient_analysis() 516 m = SHR32(MULT16_16(coef0, x), 15-SIG_SHIFT); in celt_preemphasis() 550 tmp = MULT16_16(coef2, x); in celt_preemphasis() 563 m = SHR32(MULT16_16(coef0, x), 15-SIG_SHIFT); in celt_preemphasis() 830 logXC = celt_log2(QCONST32(1.001f, 20)-MULT16_16(sum, sum)); in alloc_trim_analysis() 832 logXC2 = MAX16(HALF16(logXC), celt_log2(QCONST32(1.001f, 20)-MULT16_16(minXC, minXC))); in alloc_trim_analysis() 991 noise_floor[i] = MULT16_16(QCONST16(0.0625f, DB_SHIFT),logN[i]) in dynalloc_analysis() 993 +MULT16_16(QCONST16(.0062,DB_SHIFT),(i+5)*(i+5)); in dynalloc_analysis() [all …]
|
D | fixed_c5x.h | 71 #define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),(b)),15))
|
/external/libopus/celt/mips/ |
D | vq_mipsr1.h | 52 Xptr[stride] = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x2), s, x1), 15)); in exp_rotation1() 53 *Xptr++ = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x1), ms, x2), 15)); in exp_rotation1() 61 Xptr[stride] = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x2), s, x1), 15)); in exp_rotation1() 62 *Xptr-- = EXTRACT16(PSHR32(MAC16_16(MULT16_16(c, x1), ms, x2), 15)); in exp_rotation1() 110 *xptr = EXTRACT16(PSHR32(MULT16_16(g, *xptr), k+1)); in renormalise_vector()
|
/external/speex/tmv/ |
D | fftwrap_tm.h | 176 ps[0] = MULT16_16(X[0],X[0]); in power_spectrum() 210 ps[0]=MULT16_16(xx,xx); in power_spectrum() 220 ps[j] = MULT16_16(xi,xi) + MULT16_16(xii,xii); in power_spectrum() 226 ps[j]=MULT16_16(xx,xx); in power_spectrum()
|
D | preprocess_tm.h | 163 #define _MULT16_32_Q15(a,b,c) ADD32(MULT16_16((a),(b)), SHR(MULT16_16((a),(c)),15)) 689 …priori = EXTRACT16(PSHR32(ADD32(MULT16_16(gamma,MAX16(0,posti)), MULT16_16(Q15_ONE-gamma,DIV32_16_… in preprocess_compute_SNR() 713 …zeta[0] = PSHR32(ADD32(MULT16_16(QCONST16(.7f,15),zeta[0]), MULT16_16(QCONST16(.3f,15),iprior)),15… in preprocess_smooth_SNR() 723 …zeta[i] = PSHR32(ADD32(ADD32(ADD32(MULT16_16(QCONST16(.7f,15),zetai), MULT16_16(QCONST16(.15f,15),… in preprocess_smooth_SNR() 724 MULT16_16(QCONST16(.075f,15),iprior)), MULT16_16(QCONST16(.075f,15),priorii)),15); in preprocess_smooth_SNR() 738 zeta[i] = PSHR32(ADD32(MULT16_16(QCONST16(.7f,15),zetai), MULT16_16(QCONST16(.3f,15),priori)),15); in preprocess_smooth_SNR() 801 tmp = EXTRACT16(PSHR32(MULT16_16(PDIV32_16(SHL32(EXTEND32(q),8),(Q15_ONE-q)),tmp),8)); in preprocess_compute_emgain() 849 g = VMUX( MULT16_16_Q15(QCONST16(.333f,15),g) > gain[i], MULT16_16(3,gain[i]), g); in preprocess_compute_linear_gain() 1072 …effective_echo_suppress = EXTRACT16(PSHR32(ADD32(MULT16_16(SUB16(Q15_ONE,Pframe), st->echo_suppres… in speex_preprocess_run() 1073 MULT16_16(Pframe, st->echo_suppress_active)),15)); in speex_preprocess_run()
|
D | fixed_tm.h | 77 #undef MULT16_16 85 #define MULT16_16(a,b) ((int)(a) * (int)(b)) macro
|
/external/rnnoise/src/ |
D | celt_lpc.c | 138 sum -= MULT16_16(den[j],mem[j]); in celt_iir() 189 sum -= MULT16_16(rden[j],y[i+j]); in celt_iir() 232 if (n&1) ac0 += SHR32(MULT16_16(xptr[0],xptr[0]),9); in _celt_autocorr() 235 ac0 += SHR32(MULT16_16(xptr[i],xptr[i]),9); in _celt_autocorr() 236 ac0 += SHR32(MULT16_16(xptr[i+1],xptr[i+1]),9); in _celt_autocorr()
|
D | pitch.c | 70 Syy = ADD32(Syy, SHR32(MULT16_16(y[j],y[j]), yshift)); in find_best_pitch() 101 Syy += SHR32(MULT16_16(y[i+len],y[i+len]),yshift) - SHR32(MULT16_16(y[i],y[i]),yshift); in find_best_pitch() 353 sum += SHR32(MULT16_16(x_lp[j],y[i+j]), shift); in pitch_search() 399 x2y2 = SHR32(MULT16_16(VSHR32(xx, sx), VSHR32(yy, sy)), 14); in compute_pitch_gain() 452 yy = yy+MULT16_16(x[-i],x[-i])-MULT16_16(x[N-i],x[N-i]); in remove_doubling()
|
/external/libopus/celt/arm/ |
D | fixed_armv5e.h | 119 #undef MULT16_16 131 #define MULT16_16(a, b) (MULT16_16_armv5e(a, b)) macro
|
/external/libopus/src/ |
D | opus_encoder.c | 461 g = SHR32(MAC16_16(MULT16_16(w,g2), in stereo_fade() 493 g = SHR32(MAC16_16(MULT16_16(w,g2), in gain_fade() 502 g = SHR32(MAC16_16(MULT16_16(w,g2), in gain_fade() 647 short_alpha = Q15ONE - MULT16_16(25, Q15ONE)/IMAX(50,frame_rate); in compute_stereo_width() 660 pxx = SHR32(MULT16_16(x,x),2); in compute_stereo_width() 661 pxy = SHR32(MULT16_16(x,y),2); in compute_stereo_width() 662 pyy = SHR32(MULT16_16(y,y),2); in compute_stereo_width() 665 pxx += SHR32(MULT16_16(x,x),2); in compute_stereo_width() 666 pxy += SHR32(MULT16_16(x,y),2); in compute_stereo_width() 667 pyy += SHR32(MULT16_16(y,y),2); in compute_stereo_width() [all …]
|