diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2013-03-03 15:04:27 +0100 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2013-03-03 15:04:27 +0100 |
commit | ace3a50716646bd6ce8942d8e3eee665fcae96e8 (patch) | |
tree | 383f23c5a5e42296d644a3f1824d07aea5efedc9 | |
parent | 201f296b1caa728618d49fa531efa74f5fadd639 (diff) |
fix: Add optimization if there is no correction to apply
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r-- | lib/iqbalance_fix_cc.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/iqbalance_fix_cc.cc b/lib/iqbalance_fix_cc.cc index 04389cc..cecdf09 100644 --- a/lib/iqbalance_fix_cc.cc +++ b/lib/iqbalance_fix_cc.cc @@ -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; |