cxvec/math: Make sure to use conjf and not conj to avoid double math

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
master
Sylvain Munaut 8 years ago
parent cb9371ed09
commit f68f75e8b7
  1. 4
      src/cxvec_math.c

@ -373,13 +373,13 @@ osmo_cxvec_correlate(const struct osmo_cxvec *f, const struct osmo_cxvec *g,
complex float v = 0.0f;
for (n=0,mn=m; n<f->len; n++,mn+=g_corr_step)
v += f->data[n] * crealf(g->data[mn]);
out->data[m] = conj(v);
out->data[m] = conjf(v);
}
} else {
for (m=0; m<l; m++) {
complex float v = 0.0f;
for (n=0,mn=m; n<f->len; n++,mn+=g_corr_step)
v += conj(f->data[n]) * g->data[mn];
v += conjf(f->data[n]) * g->data[mn];
out->data[m] = v;
}
}

Loading…
Cancel
Save