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

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2014-10-05 10:54:45 +02:00
parent cb9371ed09
commit f68f75e8b7
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}