Split the input/output data arguments to ff_adaptive_gain_control().
Originally committed as revision 22932 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@@ -207,11 +207,11 @@ void ff_weighted_vector_sumf(float *out, const float *in_a, const float *in_b,
|
||||
+ weight_coeff_b * in_b[i];
|
||||
}
|
||||
|
||||
void ff_adaptive_gain_control(float *buf_out, float speech_energ,
|
||||
void ff_adaptive_gain_control(float *out, const float *in, float speech_energ,
|
||||
int size, float alpha, float *gain_mem)
|
||||
{
|
||||
int i;
|
||||
float postfilter_energ = ff_dot_productf(buf_out, buf_out, size);
|
||||
float postfilter_energ = ff_dot_productf(in, in, size);
|
||||
float gain_scale_factor = 1.0;
|
||||
float mem = *gain_mem;
|
||||
|
||||
@@ -222,7 +222,7 @@ void ff_adaptive_gain_control(float *buf_out, float speech_energ,
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
mem = alpha * mem + gain_scale_factor;
|
||||
buf_out[i] *= mem;
|
||||
out[i] = in[i] * mem;
|
||||
}
|
||||
|
||||
*gain_mem = mem;
|
||||
|
Reference in New Issue
Block a user