/external/speex/libspeex/ |
D | preprocess.c | 81 #define SPEECH_PROB_START_DEFAULT QCONST16(0.35f,15) 82 #define SPEECH_PROB_CONTINUE_DEFAULT QCONST16(0.20f,15) 264 spx_word16_t x = DIV32_16(MULT16_16(QCONST16(4.f,13),i),len); in conj_window() 267 if (x<QCONST16(1.f,13)) in conj_window() 269 } else if (x<QCONST16(2.f,13)) in conj_window() 271 x=QCONST16(2.f,13)-x; in conj_window() 273 } else if (x<QCONST16(3.f,13)) in conj_window() 275 x=x-QCONST16(2.f,13); in conj_window() 278 x=QCONST16(2.f,13)-x+QCONST16(2.f,13); /* 4 - x */ in conj_window() 280 x = MULT16_16_Q14(QCONST16(1.271903f,14), x); in conj_window() [all …]
|
D | modes.c | 188 QCONST16(.5,15), 209 QCONST16(.6,15), 230 QCONST16(.55,15), 251 QCONST16(.45,15), 272 QCONST16(.3,15), 293 QCONST16(.2,15), 314 QCONST16(.1,15), 331 QCONST16(.0002,15), /*lpc_floor*/
|
D | stereo.c | 240 … EXTRACT16(PSHR32(MAC16_16(MULT16_16(stereo->smooth_left, QCONST16(0.98, 15)), e_left, QCONST16(0.… in speex_decode_stereo() 241 …XTRACT16(PSHR32(MAC16_16(MULT16_16(stereo->smooth_right, QCONST16(0.98, 15)), e_right, QCONST16(0.… in speex_decode_stereo() 267 … EXTRACT16(PSHR32(MAC16_16(MULT16_16(stereo->smooth_left, QCONST16(0.98, 15)), e_left, QCONST16(0.… in speex_decode_stereo_int() 268 …XTRACT16(PSHR32(MAC16_16(MULT16_16(stereo->smooth_right, QCONST16(0.98, 15)), e_right, QCONST16(0.… in speex_decode_stereo_int()
|
D | modes_wb.c | 190 QCONST16(.0002,15), /*lpc_floor*/ 191 QCONST16(0.9f,15), 236 QCONST16(.0002,15), /*lpc_floor*/ 237 QCONST16(0.7f,15),
|
D | mdf.c | 198 …den2 = MULT16_16_Q15(radius,radius) + MULT16_16_Q15(QCONST16(.7,15),MULT16_16_Q15(32767-radius,327… in filter_dc_notch16() 374 prop[i] += MULT16_16_Q15(QCONST16(.1f,15),max_sum); in mdf_adjust_prop() 379 prop[i] = DIV32(MULT16_16(QCONST16(.99f,15), prop[i]),prop_sum); in mdf_adjust_prop() 488 spx_word16_t decay = SHR32(spx_exp(NEG16(DIV32_16(QCONST16(2.4,11),M))),1); in speex_echo_state_init_mc() 489 st->prop[0] = QCONST16(.7, 15); in speex_echo_state_init_mc() 498 st->prop[i] = DIV32(MULT16_16(QCONST16(.8f,15), st->prop[i]),sum); in speex_echo_state_init_mc() 505 st->preemph = QCONST16(.9,15); in speex_echo_state_init_mc() 507 st->notch_radius = QCONST16(.9, 15); in speex_echo_state_init_mc() 509 st->notch_radius = QCONST16(.982, 15); in speex_echo_state_init_mc() 511 st->notch_radius = QCONST16(.992, 15); in speex_echo_state_init_mc() [all …]
|
D | nb_celp.c | 175 st->old_lsp[i]= DIV32(MULT16_16(QCONST16(3.1415927f, LSP_SHIFT), i+1), st->lpcSize+1); in nb_encoder_init() 406 ol_gain = MULT16_16(g, MULT16_16_Q14(QCONST16(1.1,14), in nb_encode() 407 …spx_sqrt(QCONST32(1.,28)-MULT16_32_Q15(QCONST16(.8,15),SHL32(MULT16_16(ol_pitch_coef,ol_pitch_coef… in nb_encode() 593 ol_pitch_coef = MULT16_16_Q15(QCONST16(.9,15), ol_pitch_coef); in nb_encode() 604 ol_pitch_coef=MULT16_16_P15(QCONST16(0.066667,15),SHL16(quant,GAIN_SHIFT)); in nb_encode() 862 target[i]=MULT16_16_P13(QCONST16(2.2f,13), target[i]); in nb_encode() 866 … signal_mul(innov2, innov2, MULT16_32_Q15(QCONST16(0.454545f,15),ener), st->subframeSize); in nb_encode() 1068 bw_lpc(QCONST16(.98,15), st->interp_qlpc, st->interp_qlpc, st->lpcSize); in nb_decode_lost() 1208 bw_lpc(QCONST16(0.93f,15), st->interp_qlpc, lpc, st->lpcSize); in nb_decode() 1266 ol_pitch_coef=MULT16_16_P15(QCONST16(0.066667,15),SHL16(quant,GAIN_SHIFT)); in nb_decode() [all …]
|
D | filters.c | 752 pgain1 = QCONST16(1., 14); in multicomb() 756 pgain2 = QCONST16(1., 14); in multicomb() 764 c1 = (MULT16_16_Q15(QCONST16(.4,15),comb_gain)+QCONST16(.07,15)); in multicomb() 765 c2 = QCONST16(.5,15)+MULT16_16_Q14(QCONST16(1.72,14),(c1-QCONST16(.07,15))); in multicomb() 789 gain0 = MULT16_16_Q15(QCONST16(.7,15),MULT16_16_Q14(g1,gg1)); in multicomb() 790 gain1 = MULT16_16_Q15(QCONST16(.3,15),MULT16_16_Q14(g2,gg2)); in multicomb() 792 gain0 = MULT16_16_Q15(QCONST16(.6,15),MULT16_16_Q14(g1,gg1)); in multicomb() 793 gain1 = MULT16_16_Q15(QCONST16(.6,15),MULT16_16_Q14(g2,gg2)); in multicomb()
|
D | sb_celp.c | 254 st->old_lsp[i]= DIV32(MULT16_16(QCONST16(3.1415927f, LSP_SHIFT), i+1), st->lpcSize+1); in sb_encoder_init() 651 gc = MULT16_16_P15(QCONST16(0.70711f,15),gc); in sb_encode() 656 gc = MULT16_16_Q15(QCONST16(0.87360,15),gc_quant_bound[qgc]); in sb_encode() 659 gc = MULT16_16_P14(QCONST16(1.4142f,14), gc); in sb_encode() 707 target[i]=MULT16_16_P13(QCONST16(2.5f,13), target[i]); in sb_encode() 712 signal_mul(innov2, innov2, MULT16_32_P15(QCONST16(0.4f,15),scale), st->subframeSize); in sb_encode() 723 …st->innov_rms_save[sub] = MULT16_16_Q15(QCONST16(.70711f, 15), compute_rms(innov, st->subframeSize… in sb_encode() 845 bw_lpc(QCONST16(0.99f,15), st->interp_qlpc, st->interp_qlpc, st->lpcSize); in sb_decode_lost() 854 st->last_ener = MULT16_16_Q15(QCONST16(.9f,15),st->last_ener); in sb_decode_lost() 1032 g= spx_exp(MULT16_16(QCONST16(.125f,11),(quant-10))); in sb_decode() [all …]
|
D | resample.c | 310 …interp[0] = PSHR32(MULT16_16(QCONST16(-0.16667f, 15),x) + MULT16_16(QCONST16(0.16667f, 15),x3),15); in cubic_coef() 312 …interp[3] = PSHR32(MULT16_16(QCONST16(-0.33333f, 15),x) + MULT16_16(QCONST16(.5f,15),x2) - MULT16_… in cubic_coef()
|
D | arch.h | 158 #define QCONST16(x,bits) (x) macro
|
D | fixed_generic.h | 38 #define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits)))) macro
|
D | fixed_debug.h | 43 #define QCONST16(x,bits) ((spx_word16_t)(.5+(x)*(((spx_word32_t)1)<<(bits)))) macro
|
/external/libopus/celt/mips/ |
D | celt_mipsr1.h | 69 {QCONST16(0.3066406250f, 15), QCONST16(0.2170410156f, 15), QCONST16(0.1296386719f, 15)}, in comb_filter() 70 {QCONST16(0.4638671875f, 15), QCONST16(0.2680664062f, 15), QCONST16(0.f, 15)}, in comb_filter() 71 {QCONST16(0.7998046875f, 15), QCONST16(0.1000976562f, 15), QCONST16(0.f, 15)}}; in comb_filter()
|
/external/libopus/celt/ |
D | celt_encoder.c | 304 tmp[i] = mem0 + MULT16_16_P15(QCONST16(.0625f,15),x2-mem0); in transient_analysis() 318 tmp[i] = mem0 + MULT16_16_P15(QCONST16(0.125f,15),tmp[i]-mem0); in transient_analysis() 366 …*tf_estimate = celt_sqrt(MAX32(0, SHL32(MULT16_16(QCONST16(0.0069,14),MIN16(163,tf_max)),14)-QCONS… in transient_analysis() 390 spread_old[i] = MAX16(spread_old[i-1]-QCONST16(1.0f, DB_SHIFT), oldE[i]); in patch_transient_decision() 394 spread_old[i] = MAX16(spread_old[i-1]-QCONST16(1.0f, DB_SHIFT), in patch_transient_decision() 398 spread_old[i] = MAX16(spread_old[i], spread_old[i+1]-QCONST16(1.0f, DB_SHIFT)); in patch_transient_decision() 411 return mean_diff > QCONST16(1.f, DB_SHIFT); in patch_transient_decision() 568 bias = MULT16_16_Q14(QCONST16(.04f,15), MAX16(-QCONST16(.25f,14), QCONST16(.5f,14)-tf_estimate)); in tf_analysis() 763 opus_val16 trim = QCONST16(5.f, 8); in alloc_trim_analysis() 777 sum = MULT16_16_Q15(QCONST16(1.f/8, 15), sum); in alloc_trim_analysis() [all …]
|
D | modes.c | 318 mode->preemph[0] = QCONST16(0.3500061035f, 15); in opus_custom_mode_create() 319 mode->preemph[1] = -QCONST16(0.1799926758f, 15); in opus_custom_mode_create() 320 mode->preemph[2] = QCONST16(0.2719968125f, SIG_SHIFT); /* exact 1/preemph[3] */ in opus_custom_mode_create() 321 mode->preemph[3] = QCONST16(3.6765136719f, 13); in opus_custom_mode_create() 324 mode->preemph[0] = QCONST16(0.6000061035f, 15); in opus_custom_mode_create() 325 mode->preemph[1] = -QCONST16(0.1799926758f, 15); in opus_custom_mode_create() 326 mode->preemph[2] = QCONST16(0.4424998650f, SIG_SHIFT); /* exact 1/preemph[3] */ in opus_custom_mode_create() 327 mode->preemph[3] = QCONST16(2.2598876953f, 13); in opus_custom_mode_create() 330 mode->preemph[0] = QCONST16(0.7799987793f, 15); in opus_custom_mode_create() 331 mode->preemph[1] = -QCONST16(0.1000061035f, 15); in opus_custom_mode_create() [all …]
|
D | celt.c | 192 {QCONST16(0.3066406250f, 15), QCONST16(0.2170410156f, 15), QCONST16(0.1296386719f, 15)}, in comb_filter() 193 {QCONST16(0.4638671875f, 15), QCONST16(0.2680664062f, 15), QCONST16(0.f, 15)}, in comb_filter() 194 {QCONST16(0.7998046875f, 15), QCONST16(0.1000976562f, 15), QCONST16(0.f, 15)}}; in comb_filter()
|
D | quant_bands.c | 192 oldE = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); in quant_coarse_energy_impl() 197 decay_bound = EXTRACT16(MAX32(-QCONST16(28.f,DB_SHIFT), in quant_coarse_energy_impl() 203 decay_bound = MAX16(-QCONST16(28.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]) - max_decay; in quant_coarse_energy_impl() 285 max_decay = QCONST16(16.f,DB_SHIFT); in quant_coarse_energy() 295 max_decay = QCONST16(3.f,DB_SHIFT); in quant_coarse_energy() 377 q2 = (error[i+c*m->nbEBands]+QCONST16(.5f,DB_SHIFT))>>(DB_SHIFT-fine_quant[i]); in quant_fine_energy() 387 …offset = SUB16(SHR32(SHL32(EXTEND32(q2),DB_SHIFT)+QCONST16(.5f,DB_SHIFT),fine_quant[i]),QCONST16(.… in quant_fine_energy() 416 offset = SHR16(SHL16(q2,DB_SHIFT)-QCONST16(.5f,DB_SHIFT),fine_quant[i]+1); in quant_energy_finalise() 481 oldEBands[i+c*m->nbEBands] = MAX16(-QCONST16(9.f,DB_SHIFT), oldEBands[i+c*m->nbEBands]); in unquant_coarse_energy() 506 …offset = SUB16(SHR32(SHL32(EXTEND32(q2),DB_SHIFT)+QCONST16(.5f,DB_SHIFT),fine_quant[i]),QCONST16(.… in unquant_fine_energy() [all …]
|
D | pitch.c | 155 opus_val16 c1 = QCONST16(.8f,15); in pitch_downsample() 205 tmp = MULT16_16_Q15(QCONST16(.9f,15), tmp); in pitch_downsample() 209 lpc2[0] = lpc[0] + QCONST16(.8f,SIG_SHIFT); in pitch_downsample() 401 if ((c-a) > MULT16_32_Q15(QCONST16(.7f,15),b-a)) in pitch_search() 403 else if ((a-c) > MULT16_32_Q15(QCONST16(.7f,15),b-c)) in pitch_search() 520 thresh = MAX16(QCONST16(.3f,15), MULT16_16_Q15(QCONST16(.7f,15),g0)-cont); in remove_doubling() 524 thresh = MAX16(QCONST16(.4f,15), MULT16_16_Q15(QCONST16(.85f,15),g0)-cont); in remove_doubling() 526 thresh = MAX16(QCONST16(.5f,15), MULT16_16_Q15(QCONST16(.9f,15),g0)-cont); in remove_doubling() 543 if ((xcorr[2]-xcorr[0]) > MULT16_32_Q15(QCONST16(.7f,15),xcorr[1]-xcorr[0])) in remove_doubling() 545 else if ((xcorr[0]-xcorr[2]) > MULT16_32_Q15(QCONST16(.7f,15),xcorr[1]-xcorr[2])) in remove_doubling()
|
D | celt_decoder.c | 474 decay = loss_count==0 ? QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT); in celt_decode_lost() 519 fade = QCONST16(.8f,15); in celt_decode_lost() 879 postfilter_gain = QCONST16(.09375f,15)*(qg+1); 999 oldBandE[i] = -QCONST16(28.f,DB_SHIFT); 1043 max_background_increase = M*QCONST16(0.001f,DB_SHIFT); 1045 max_background_increase = QCONST16(1.f,DB_SHIFT); 1057 oldLogE[c*nbEBands+i]=oldLogE2[c*nbEBands+i]=-QCONST16(28.f,DB_SHIFT); 1062 oldLogE[c*nbEBands+i]=oldLogE2[c*nbEBands+i]=-QCONST16(28.f,DB_SHIFT); 1203 oldLogE[i]=oldLogE2[i]=-QCONST16(28.f,DB_SHIFT);
|
D | vq.c | 222 X[0] = QCONST16(1.f,14); in alg_quant() 226 sum = QCONST16(1.f,14); in alg_quant() 402 itheta = MULT16_16_Q15(QCONST16(0.63662f,15),celt_atan2p(side, mid)); in stereo_itheta()
|
D | bands.c | 289 thresh = MULT16_32_Q15(QCONST16(0.5f, 15), MIN32(32767,thresh32)); in anti_collapse() 394 l = MULT16_16(QCONST16(.70710678f, 15), X[j]); in stereo_split() 395 r = MULT16_16(QCONST16(.70710678f, 15), Y[j]); in stereo_split() 485 if (x2N < QCONST16(0.25f,13)) in spreading_decision() 487 if (x2N < QCONST16(0.0625f,13)) in spreading_decision() 489 if (x2N < QCONST16(0.015625f,13)) in spreading_decision() 615 tmp1 = MULT16_16(QCONST16(.70710678f,15), X[stride*2*j+i]); in haar1() 616 tmp2 = MULT16_16(QCONST16(.70710678f,15), X[stride*(2*j+1)+i]); in haar1() 1053 tmp = QCONST16(1.0f/256, 10); in quant_partition()
|
D | fixed_generic.h | 68 #define QCONST16(x,bits) ((opus_val16)(.5+(x)*(((opus_val32)1)<<(bits)))) macro
|
D | arch.h | 184 #define QCONST16(x,bits) (x) macro
|
/external/libopus/src/ |
D | opus_multistream_encoder.c | 202 …QCONST16(0.5000000f, DB_SHIFT), QCONST16(0.2924813f, DB_SHIFT), QCONST16(0.1609640f, DB_SHIFT), QC… in logSum() 203 …QCONST16(0.0437314f, DB_SHIFT), QCONST16(0.0221971f, DB_SHIFT), QCONST16(0.0111839f, DB_SHIFT), QC… in logSum() 204 QCONST16(0.0028123f, DB_SHIFT) in logSum() 215 if (!(diff < QCONST16(8.f, DB_SHIFT))) /* inverted to catch NaNs */ in logSum() 267 maskLogE[c][i] = -QCONST16(28.f, DB_SHIFT); in surround_analysis() 302 bandLogE[21*c+i] = MAX16(bandLogE[21*c+i], bandLogE[21*c+i-1]-QCONST16(1.f, DB_SHIFT)); in surround_analysis() 304 bandLogE[21*c+i] = MAX16(bandLogE[21*c+i], bandLogE[21*c+i+1]-QCONST16(2.f, DB_SHIFT)); in surround_analysis() 317 maskLogE[0][i] = logSum(maskLogE[0][i], bandLogE[21*c+i]-QCONST16(.5f, DB_SHIFT)); in surround_analysis() 318 maskLogE[2][i] = logSum(maskLogE[2][i], bandLogE[21*c+i]-QCONST16(.5f, DB_SHIFT)); in surround_analysis()
|
D | opus_encoder.c | 913 if (MAX32(mem->XX, mem->YY)>QCONST16(8e-4f, 18)) in compute_stereo_width() 931 … mem->max_follower = MAX16(mem->max_follower-QCONST16(.02f,15)/frame_rate, mem->smoothed_width); in compute_stereo_width() 1556 QCONST16(.5f, DB_SHIFT)), -QCONST16(2.0f, DB_SHIFT)); in opus_encode_native() 1564 masking_depth += QCONST16(.2f, DB_SHIFT); in opus_encode_native()
|