Remove DC offset

This commit is contained in:
Jan Hamal Dvořák 2024-08-07 00:19:17 +02:00
parent b31fc626e3
commit a61748c6b5

View file

@ -290,6 +290,14 @@ inline static struct IQ next_sample()
I -= 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 /= 512;