int i;
int mask = (1 << bits) - 1;
+ fixed_sparse->no_repeat_mask = 0;
fixed_sparse->n = 2 * half_pulse_count;
for (i = 0; i < half_pulse_count; i++) {
const int pos1 = gray_decode[fixed_index[2*i+1] & mask] + i;
+ weight_coeff_b * in_b[i];
}
-void ff_adaptative_gain_control(float *buf_out, float speech_energ,
- int size, float alpha, float *gain_mem)
+void ff_adaptive_gain_control(float *buf_out, float speech_energ,
+ int size, float alpha, float *gain_mem)
{
int i;
float postfilter_energ = ff_dot_productf(buf_out, buf_out, size);
int i;
for (i=0; i < in->n; i++) {
- int x = in->x[i];
+ int x = in->x[i], repeats = !((in->no_repeat_mask >> i) & 1);
float y = in->y[i] * scale;
- out[x] += y;
- x += in->pitch_lag;
- while (x < size) {
- y *= in->pitch_fac;
+ do {
out[x] += y;
+ y *= in->pitch_fac;
x += in->pitch_lag;
- }
+ } while (x < size && repeats);
}
}
int i;
for (i=0; i < in->n; i++) {
- int x = in->x[i];
- out[x] = 0.0;
+ int x = in->x[i], repeats = !((in->no_repeat_mask >> i) & 1);
- x += in->pitch_lag;
- while (x < size) {
+ do {
out[x] = 0.0;
x += in->pitch_lag;
- }
+ } while (x < size && repeats);
}
}