fix: Add optimization if there is no correction to apply

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2013-03-03 15:04:27 +01:00
parent 201f296b1c
commit ace3a50716
1 changed files with 5 additions and 0 deletions

View File

@ -72,6 +72,11 @@ iqbalance_fix_cc::work (int noutput_items,
gr_complex *out = (gr_complex *) output_items[0];
int i;
if (this->d_mag == 0.0f && this->d_phase == 0.0f) {
memcpy(out, in, noutput_items * sizeof(gr_complex));
return noutput_items;
}
const float magp1 = 1.0f + this->d_mag;
const float phase = this->d_phase;