Revision bb2dd9ef libavcodec/acelp_vectors.c

View differences:

libavcodec/acelp_vectors.c
207 207
               + weight_coeff_b * in_b[i];
208 208
}
209 209

  
210
void ff_adaptive_gain_control(float *buf_out, float speech_energ,
210
void ff_adaptive_gain_control(float *out, const float *in, float speech_energ,
211 211
                              int size, float alpha, float *gain_mem)
212 212
{
213 213
    int i;
214
    float postfilter_energ = ff_dot_productf(buf_out, buf_out, size);
214
    float postfilter_energ = ff_dot_productf(in, in, size);
215 215
    float gain_scale_factor = 1.0;
216 216
    float mem = *gain_mem;
217 217

  
......
222 222

  
223 223
    for (i = 0; i < size; i++) {
224 224
        mem = alpha * mem + gain_scale_factor;
225
        buf_out[i] *= mem;
225
        out[i] = in[i] * mem;
226 226
    }
227 227

  
228 228
    *gain_mem = mem;

Also available in: Unified diff