MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / apply_gain_ctrl

Function apply_gain_ctrl

libavcodec/qcelpdec.c:423–433  ·  view source on GitHub ↗

* Apply generic gain control. * * @param v_out output vector * @param v_in gain-controlled vector * @param v_ref vector to control gain of * * TIA/EIA/IS-733 2.4.8.3, 2.4.8.6 */

Source from the content-addressed store, hash-verified

421 * TIA/EIA/IS-733 2.4.8.3, 2.4.8.6
422 */
423static void apply_gain_ctrl(float *v_out, const float *v_ref,
424 const float *v_in)
425{
426 int i;
427
428 for (i = 0; i < 160; i += 40)
429 ff_scale_vector_to_given_sum_of_squares(v_out + i, v_in + i,
430 ff_dot_productf(v_ref + i,
431 v_ref + i, 40),
432 40);
433}
434
435/**
436 * Apply filter in pitch-subframe steps.

Callers 1

apply_pitch_filtersFunction · 0.85

Calls 2

ff_dot_productfFunction · 0.85

Tested by

no test coverage detected