Remove DC offset
This commit is contained in:
parent
b31fc626e3
commit
a61748c6b5
|
@ -290,6 +290,14 @@ inline static struct IQ next_sample()
|
||||||
I -= nextQ();
|
I -= nextQ();
|
||||||
Q -= nextQ();
|
Q -= nextQ();
|
||||||
|
|
||||||
|
static int dcI, dcQ;
|
||||||
|
|
||||||
|
I = ((I << 12) - dcI) >> 12;
|
||||||
|
dcI += I;
|
||||||
|
|
||||||
|
Q = ((Q << 12) - dcQ) >> 12;
|
||||||
|
dcQ += Q;
|
||||||
|
|
||||||
I += 127.4 * 512;
|
I += 127.4 * 512;
|
||||||
I /= 512;
|
I /= 512;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue