/third_party/ffmpeg/libavfilter/ |
H A D | af_afade.c | 73 double gain; in fade_gain() local 75 gain = av_clipd(1.0 * index / range, 0, 1.0); in fade_gain() 79 gain = sin(gain * M_PI / 2.0); in fade_gain() 83 gain = 0.6366197723675814 * asin(gain); in fade_gain() 86 gain = 1.0 - cos(M_PI / 4.0 * (CUBE(2.0*gain - 1) + 1)); in fade_gain() 89 gain = (1.0 - cos(gain * M_P in fade_gain() [all...] |
H A D | af_pan.c | 46 double gain[MAX_CHANNELS][MAX_CHANNELS]; member 100 double gain; in init() local 167 gain = 1; in init() 168 if (sscanf(arg, "%lf%n *%n", &gain, &len, &len)) in init() 190 pan->gain[out_ch_id][in_ch_id] = sign * gain; in init() 222 double gain = pan->gain[i][j]; in are_gains_pure() local 226 if (gain != 0. && gain ! in are_gains_pure() [all...] |
H A D | af_anequalizer.c | 54 double gain; member 84 { "mgain", "set max gain", OFFSET(mag), AV_OPT_TYPE_DOUBLE, {.dbl=60}, -900, 900, V|F }, 480 static double butterworth_compute_bw_gain_db(double gain) in butterworth_compute_bw_gain_db() argument 484 if (gain <= -6) in butterworth_compute_bw_gain_db() 485 bw_gain = gain + 3; in butterworth_compute_bw_gain_db() 486 else if(gain > -6 && gain < 6) in butterworth_compute_bw_gain_db() 487 bw_gain = gain * 0.5; in butterworth_compute_bw_gain_db() 488 else if(gain >= 6) in butterworth_compute_bw_gain_db() 489 bw_gain = gain in butterworth_compute_bw_gain_db() 494 chebyshev1_compute_bw_gain_db(double gain) chebyshev1_compute_bw_gain_db() argument 508 chebyshev2_compute_bw_gain_db(double gain) chebyshev2_compute_bw_gain_db() argument 635 double freq, width, gain; process_command() local [all...] |
H A D | af_asoftclip.c | 83 { "output", "set softclip output gain", OFFSET(output), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.000001, 16, A }, 147 float gain = s->output * threshold; in filter_flt() local 170 dst[n] *= gain; in filter_flt() 176 dst[n] *= gain; in filter_flt() 182 dst[n] *= gain; in filter_flt() 193 dst[n] *= gain; in filter_flt() 199 dst[n] *= gain; in filter_flt() 207 dst[n] *= gain; in filter_flt() 218 dst[n] *= gain; in filter_flt() 229 dst[n] *= gain; in filter_flt() 272 double gain = s->output * threshold; filter_dbl() local [all...] |
H A D | af_adynamicequalizer.c | 188 double detect, gain, v, listen; in filter_channels() local 195 gain = get_gain(detect, sample_rate, makeup, in filter_channels() 201 k = 1. / (tqfactor * gain); in filter_channels() 208 fm[1] = k * (gain * gain - 1.); in filter_channels() 213 g = fg / sqrt(gain); in filter_channels() 220 fm[1] = k * (gain - 1.); in filter_channels() 221 fm[2] = gain * gain - 1.; in filter_channels() 225 g = fg / sqrt(gain); in filter_channels() [all...] |
H A D | af_firequalizer.c | 58 double gain; member 95 const char *gain; member 119 { "gain", "set gain curve", OFFSET(gain), AV_OPT_TYPE_STRING, { .str = "gain_interpolate(f)" }, 0, 0, TFLAGS }, 120 { "gain_entry", "set gain entry", OFFSET(gain_entry), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, TFLAGS }, 137 { "scale", "set gain scale", OFFSET(scale), AV_OPT_TYPE_INT, { .i64 = SCALE_LINLOG }, 0, NB_SCALE-1, FLAGS, "scale" }, 138 { "linlin", "linear-freq linear-gain", 0, AV_OPT_TYPE_CONST, { .i64 = SCALE_LINLIN }, 0, 0, FLAGS, "scale" }, 139 { "linlog", "linear-freq logarithmic-gain", 0, AV_OPT_TYPE_CONST, { .i64 = SCALE_LINLOG }, 0, 0, FLAGS, "scale" }, 140 { "loglin", "logarithmic-freq linear-gain", 384 entry_func(void *p, double freq, double gain) entry_func() argument 573 generate_kernel(AVFilterContext *ctx, const char *gain, const char *gain_entry) generate_kernel() argument [all...] |
H A D | af_sidechaincompress.c | 77 { "level_in", "set input gain", OFFSET(level_in), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.015625, 64, A|F|R }, 85 { "makeup", "set make up gain", OFFSET(makeup), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 1, 64, A|F|R }, 93 { "level_sc", "set sidechain gain", OFFSET(level_sc), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.015625, 64, A|F|R }, 115 double gain = 0.0; in output_gain() local 122 gain = thres; in output_gain() 125 gain = (slope - thres) / ratio + thres; in output_gain() 131 gain = hermite_interpolation(slope, knee_stop, knee_start, in output_gain() 136 gain = hermite_interpolation(slope, knee_start, knee_stop, in output_gain() 141 return exp(gain - slope); in output_gain() 175 double abs_sample, gain in compressor() local [all...] |
/third_party/ffmpeg/libavcodec/ |
H A D | qcelpdec.c | 192 * @param gain array holding the decoded gain 196 static void decode_gain_and_index(QCELPContext *q, float *gain) in decode_gain_and_index() argument 213 gain[i] = qcelp_g12ga[g1[i]]; in decode_gain_and_index() 216 gain[i] = -gain[i]; in decode_gain_and_index() 227 gain[7] = gain[4]; in decode_gain_and_index() 228 gain[6] = 0.4 * gain[ in decode_gain_and_index() 310 compute_svector(QCELPContext *q, const float *gain, float *cdn_vector) compute_svector() argument 424 do_pitchfilter(float memory[303], const float v_in[160], const float gain[4], const uint8_t *lag, const uint8_t pfrac[4]) do_pitchfilter() argument 696 float gain[16]; qcelp_decode_frame() local [all...] |
H A D | ra144enc.c | 124 * Calculate match score and gain of an LPC-filtered vector with respect to 134 * @param gain pointer to variable where gain is returned 138 const float *data, float *score, float *gain) in get_match_score() 157 *gain = c / g; in get_match_score() 158 *score = *gain * c; in get_match_score() 183 * Search the adaptive codebook for the best entry and gain and remove its 196 float score, gain, best_score, av_uninit(best_gain); in adaptive_cb_search() local 199 gain = best_score = 0; in adaptive_cb_search() 202 get_match_score(work, coefs, exc, NULL, NULL, data, &score, &gain); in adaptive_cb_search() 136 get_match_score(float *work, const float *coefs, float *vect, const float *ortho1, const float *ortho2, const float *data, float *score, float *gain) get_match_score() argument 240 find_best_vect(float *work, const float *coefs, const int8_t cb[][BLOCKSIZE], const float *ortho1, const float *ortho2, float *data, int *idx, float *gain) find_best_vect() argument 279 float gain; fixed_cb_search() local 332 int cba_idx, cb1_idx, cb2_idx, gain; ra144_encode_subblock() local [all...] |
H A D | iirfilter.c | 39 float gain; member 108 c->gain = p[order][0]; in butterworth_init_coeffs() 110 c->gain += p[i][0]; in butterworth_init_coeffs() 114 c->gain /= 1 << order; in butterworth_init_coeffs() 143 c->gain = ((1.0 + cos_w0) / 2.0) / a0; in biquad_init_coeffs() 147 c->gain = ((1.0 - cos_w0) / 2.0) / a0; in biquad_init_coeffs() 154 // divide by gain to make the x coeffs integers. in biquad_init_coeffs() 155 // during filtering, the delay state will include the gain multiplication in biquad_init_coeffs() 156 c->cx[0] = lrintf(x0 / c->gain); in biquad_init_coeffs() 157 c->cx[1] = lrintf(x1 / c->gain); in biquad_init_coeffs() [all...] |
H A D | g729postfilter.c | 111 * \return 0 if long-term prediction gain is less than 3dB, 1 - otherwise 129 int16_t gain_num,gain_den; //selected signal's gain numerator and denominator in long_term_filter() 133 int16_t gain_long_num,gain_long_den; //filtered through long interpolation filter signal's gain numerator and denominator in long_term_filter() 306 /* Long-term prediction gain is less than 3dB. Long-term postfilter is disabled. */ in long_term_filter() 411 // Long-term prediction gain is larger than 3dB. in long_term_filter() 425 * \remark The routine also calculates the gain term for the short-term 548 /* long-term filter. If long-term prediction gain is larger than 3dB (returned value is in ff_g729_postfilter() 572 * \brief Adaptive gain control (4.2.4) 573 * \param gain_before gain of speech before applying postfilters 574 * \param gain_after gain o 584 unsigned gain; // (3.12) ff_g729_adaptive_gain_control() local [all...] |
H A D | opus_pvq.c | 115 float gain, theta; in celt_exp_rotation() local 121 gain = (float)len / (len + (20 - 5*spread) * K); in celt_exp_rotation() 122 theta = M_PI * gain * gain / 4; in celt_exp_rotation() 169 float gain[2]; in celt_stereo_merge() local 188 gain[0] = 1.0f / sqrtf(E[0]); in celt_stereo_merge() 189 gain[1] = 1.0f / sqrtf(E[1]); in celt_stereo_merge() 196 X[i] = gain[0] * (value[0] - value[1]); in celt_stereo_merge() 197 Y[i] = gain[1] * (value[0] + value[1]); in celt_stereo_merge() 418 enum CeltSpread spread, uint32_t blocks, float gain, in celt_alg_quant() 417 celt_alg_quant(OpusRangeCoder *rc, float *X, uint32_t N, uint32_t K, enum CeltSpread spread, uint32_t blocks, float gain, CeltPVQ *pvq) celt_alg_quant() argument 433 celt_alg_unquant(OpusRangeCoder *rc, float *X, uint32_t N, uint32_t K, enum CeltSpread spread, uint32_t blocks, float gain, CeltPVQ *pvq) celt_alg_unquant() argument 483 quant_band_template(CeltPVQ *pvq, CeltFrame *f, OpusRangeCoder *rc, const int band, float *X, float *Y, int N, int b, uint32_t blocks, float *lowband, int duration, float *lowband_out, int level, float gain, float *lowband_scratch, int fill, int quant) quant_band_template() argument [all...] |
H A D | aacdec_fixed.c | 354 * @param index index into coupling gain array 373 const int gain = cce->coup.gain[index][idx]; in apply_dependent_coupling_fixed() local 376 if (gain < 0) { in apply_dependent_coupling_fixed() 377 c = -cce_scale_fixed[-gain & 7]; in apply_dependent_coupling_fixed() 378 shift = (-gain-1024) >> 3; in apply_dependent_coupling_fixed() 381 c = cce_scale_fixed[gain & 7]; in apply_dependent_coupling_fixed() 382 shift = (gain-1024) >> 3; in apply_dependent_coupling_fixed() 418 * @param index index into coupling gain array 425 const int gain in apply_independent_coupling_fixed() local [all...] |
H A D | aacsbr.c | 217 * and Calculation of gain (14496-3 sp04 p219) 223 // max gain limits : -3dB, 0dB, 3dB, inf dB (limiter off) in sbr_gain_calc() 236 sbr->gain[e][m] = sqrtf(sbr->e_origmapped[e][m] / in sbr_gain_calc() 240 sbr->gain[e][m] = sqrtf(sbr->e_origmapped[e][m] * sbr->q_mapped[e][m] / in sbr_gain_calc() 244 sbr->gain[e][m] += FLT_MIN; in sbr_gain_calc() 253 float q_m_max = sbr->q_m[e][m] * gain_max / sbr->gain[e][m]; in sbr_gain_calc() 255 sbr->gain[e][m] = FFMIN(sbr->gain[e][m], gain_max); in sbr_gain_calc() 260 sum[1] += sbr->e_curr[e][m] * sbr->gain[e][m] * sbr->gain[ in sbr_gain_calc() [all...] |
H A D | opus_metadata_bsf.c | 26 int gain; member 36 AV_WL16(bsfc->par_out->extradata + 16, s->gain); in opus_metadata_init() 44 { "gain", "Gain, actual amplification is pow(10, gain/(20.0*256))", OFFSET(gain),
|
H A D | aacsbr_fixed.c | 397 * and Calculation of gain (14496-3 sp04 p219) 403 // max gain limits : -3dB, 0dB, 3dB, inf dB (limiter off) in sbr_gain_calc() 420 sbr->gain[e][m] = av_sqrt_sf(av_div_sf(sbr->e_origmapped[e][m], in sbr_gain_calc() 424 sbr->gain[e][m] = av_sqrt_sf(av_div_sf(sbr->e_origmapped[e][m], in sbr_gain_calc() 428 sbr->gain[e][m] = av_sqrt_sf( in sbr_gain_calc() 435 sbr->gain[e][m] = av_add_sf(sbr->gain[e][m], FLOAT_MIN); in sbr_gain_calc() 451 sbr->gain[e][m]); in sbr_gain_calc() 454 if (av_gt_sf(sbr->gain[e][m], gain_max)) in sbr_gain_calc() 455 sbr->gain[ in sbr_gain_calc() [all...] |
/third_party/ffmpeg/libavcodec/mips/ |
H A D | iirfilter_mips.c | 62 float gain; member 80 float in = *src0 * c->gain + s->x[0] * c->cy[0] + s->x[1] * c->cy[1]; in iir_filter_flt_mips() 98 float gain = c->gain; in iir_filter_flt_mips() local 110 "mul.s %[in1], %[src0_0], %[gain] \n\t" in iir_filter_flt_mips() 111 "mul.s %[in2], %[src0_1], %[gain] \n\t" in iir_filter_flt_mips() 112 "mul.s %[in3], %[src0_2], %[gain] \n\t" in iir_filter_flt_mips() 113 "mul.s %[in4], %[src0_3], %[gain] \n\t" in iir_filter_flt_mips() 162 [gain]"f"(gain), [ in iir_filter_flt_mips() [all...] |
H A D | acelp_filters_mips.c | 110 float gain, float mem[2], int n) in ff_acelp_apply_order_2_transfer_function_mips() 130 "msub.s $f7, $f7, %[gain], $f6 \n\t" in ff_acelp_apply_order_2_transfer_function_mips() 137 "msub.s $f13, $f13, %[gain], $f11 \n\t" in ff_acelp_apply_order_2_transfer_function_mips() 145 "msub.s $f15, $f15, %[gain], $f6 \n\t" in ff_acelp_apply_order_2_transfer_function_mips() 153 "msub.s $f16, $f16, %[gain], $f11 \n\t" in ff_acelp_apply_order_2_transfer_function_mips() 161 "msub.s $f7, $f7, %[gain], $f6 \n\t" in ff_acelp_apply_order_2_transfer_function_mips() 169 "msub.s $f13, $f13, %[gain], $f11 \n\t" in ff_acelp_apply_order_2_transfer_function_mips() 177 "msub.s $f15, $f15, %[gain], $f6 \n\t" in ff_acelp_apply_order_2_transfer_function_mips() 185 "msub.s $f16, $f16, %[gain], $f11 \n\t" in ff_acelp_apply_order_2_transfer_function_mips() 201 [in] "+r" (in), [gain] " in ff_acelp_apply_order_2_transfer_function_mips() 107 ff_acelp_apply_order_2_transfer_function_mips(float *out, const float *in, const float zero_coeffs[2], const float pole_coeffs[2], float gain, float mem[2], int n) ff_acelp_apply_order_2_transfer_function_mips() argument [all...] |
/drivers/peripheral/audio/test/systemtest/hdi_service/common/render/src/ |
H A D | audio_idl_hdirender_volume_test.cpp | 129 * @tc.desc Test RenderSetGain interface,return 0 if Set gain to normal value, maximum or minimum and get success 136 float gain = 10.8; in HWTEST_F() local 137 ret = render->SetGain(render, gain); in HWTEST_F() 139 ret = render->GetGain(render, &gain); in HWTEST_F() 143 EXPECT_LE(gainExpc, gain); in HWTEST_F() 168 * @tc.desc Test RenderSetGain interface,return -3 if Set gain to exceed the boundary value 191 * @tc.desc Test RenderSetGain interface,return -1 if set gain to exception type 197 char gain = 'a'; in HWTEST_F() local 200 ret = render->SetGain(render, gain); in HWTEST_F() 212 float gain in HWTEST_F() local 234 float gain = min + 1; HWTEST_F() local 250 float gain = 0; HWTEST_F() local 265 float gain = GAIN_MAX - 1; HWTEST_F() local [all...] |
/third_party/nghttp2/lib/ |
H A D | nghttp2_ratelim.c | 35 uint64_t d, gain; in nghttp2_ratelim_update() local 55 gain = rl->rate * d; in nghttp2_ratelim_update() 57 if (UINT64_MAX - gain < rl->val) { in nghttp2_ratelim_update() 63 rl->val += gain; in nghttp2_ratelim_update()
|
/third_party/node/deps/nghttp2/lib/ |
H A D | nghttp2_ratelim.c | 35 uint64_t d, gain; in nghttp2_ratelim_update() local 55 gain = rl->rate * d; in nghttp2_ratelim_update() 57 if (UINT64_MAX - gain < rl->val) { in nghttp2_ratelim_update() 63 rl->val += gain; in nghttp2_ratelim_update()
|
/drivers/peripheral/audio/test/systemtest/hdi_service/common/capture/src/ |
H A D | audio_idl_hdicapture_volume_test.cpp | 397 float gain = max - 1; in HWTEST_F() local 415 ret = capture->SetGain(capture, gain); in HWTEST_F() 417 ret = capture->GetGain(capture, &gain); in HWTEST_F() 419 EXPECT_EQ(gainExpc, gain); in HWTEST_F() 424 * @tc.desc test AudioCaptureSetGain interface, return -3 if gain greater than the maximum and less than the minimum 453 float gain = 0; in HWTEST_F() local 457 ret = capture->SetGain(captureNull, gain); in HWTEST_F() 474 float gain = min + 1; in HWTEST_F() local 476 ret = capture->SetGain(capture, gain); in HWTEST_F() 478 ret = capture->GetGain(capture, &gain); in HWTEST_F() 504 float gain = GAIN_MAX - 1; HWTEST_F() local [all...] |
/drivers/peripheral/audio/test/systemtest/supportlibs/hardwaredependence/capture/src/ |
H A D | audio_libcapture_hardwaredependence_test.cpp | 327 hwCapture->captureParam.captureMode.ctlParam.audioGain.gain = gainThresholdValueMax - 1;
in HWTEST_F() 332 gainValue = hwCapture->captureParam.captureMode.ctlParam.audioGain.gain;
in HWTEST_F() 334 hwCapture->captureParam.captureMode.ctlParam.audioGain.gain = gainThresholdValueMin + 1;
in HWTEST_F() 339 gainValue = hwCapture->captureParam.captureMode.ctlParam.audioGain.gain;
in HWTEST_F() 341 hwCapture->captureParam.captureMode.ctlParam.audioGain.gain = 2.3;
in HWTEST_F() 346 gainValue = hwCapture->captureParam.captureMode.ctlParam.audioGain.gain;
in HWTEST_F() 376 hwCapture->captureParam.captureMode.ctlParam.audioGain.gain = gainThresholdValueMax;
in HWTEST_F() 381 gainValue = hwCapture->captureParam.captureMode.ctlParam.audioGain.gain;
in HWTEST_F() 383 hwCapture->captureParam.captureMode.ctlParam.audioGain.gain = gainThresholdValueMin;
in HWTEST_F() 388 gainValue = hwCapture->captureParam.captureMode.ctlParam.audioGain.gain;
in HWTEST_F() [all...] |
/third_party/pulseaudio/src/modules/bluetooth/ |
H A D | backend-native.c | 138 static pa_volume_t hsp_gain_to_volume(uint16_t gain) { in hsp_gain_to_volume() argument 140 gain * PA_VOLUME_NORM in hsp_gain_to_volume() 152 uint16_t gain = volume * HSP_MAX_GAIN / PA_VOLUME_NORM; in volume_to_hsp_gain() local 154 if (gain > HSP_MAX_GAIN) in volume_to_hsp_gain() 155 gain = HSP_MAX_GAIN; in volume_to_hsp_gain() 157 return gain; in volume_to_hsp_gain() 760 int gain, dummy; in rfcomm_io_callback() local 774 * AT+VGS=value: value between 0 and 15, sent by the HS to AG to set the speaker gain. in rfcomm_io_callback() 775 * +VGS=value is sent by AG to HS as a response to an AT+VGS command or when the gain in rfcomm_io_callback() 777 * AT+VGM=value: value between 0 and 15, sent by the HS to AG to set the microphone gain in rfcomm_io_callback() 885 uint16_t gain = volume_to_hsp_gain(volume); set_sink_volume() local 910 uint16_t gain = volume_to_hsp_gain(volume); set_source_volume() local [all...] |
/third_party/skia/bench/ |
H A D | MatrixConvolutionBench.cpp | 31 SkScalar gain = 0.3f, bias = SkIntToScalar(100); in MatrixConvolutionBench() local 33 fFilter = SkImageFilters::MatrixConvolution(kernelSize, kernel, gain, bias, in MatrixConvolutionBench() 43 SkScalar gain = 0.3f, bias = SkIntToScalar(100); in MatrixConvolutionBench() local 45 fFilter = SkImageFilters::MatrixConvolution(kernelSize, kernel, gain, bias, in MatrixConvolutionBench()
|