Optimize mixer using XOR
Signed-off-by: Jan Hamal Dvořák <mordae@anilinux.org>
This commit is contained in:
parent
8ca3a3d2bf
commit
d19d4ebc87
1 changed files with 5 additions and 2 deletions
|
@ -486,8 +486,8 @@ static void rf_rx(void)
|
||||||
pos = (pos + 1) & (LO_WORDS - 1);
|
pos = (pos + 1) & (LO_WORDS - 1);
|
||||||
|
|
||||||
#if SPEED == 3
|
#if SPEED == 3
|
||||||
I += popcount(rx_word & cos_word) - popcount(rx_word & ~cos_word);
|
I += popcount(rx_word ^ cos_word);
|
||||||
Q += popcount(rx_word & sin_word) - popcount(rx_word & ~sin_word);
|
Q += popcount(rx_word ^ sin_word);
|
||||||
#elif SPEED == 2
|
#elif SPEED == 2
|
||||||
interp0->accum[0] = rx_word;
|
interp0->accum[0] = rx_word;
|
||||||
interp0->accum[1] = rx_word;
|
interp0->accum[1] = rx_word;
|
||||||
|
@ -546,6 +546,9 @@ static void rf_rx(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
I -= 16 * NUM_SAMPLES;
|
||||||
|
Q -= 16 * NUM_SAMPLES;
|
||||||
|
|
||||||
#if EXTRA_BITS
|
#if EXTRA_BITS
|
||||||
I <<= EXTRA_BITS;
|
I <<= EXTRA_BITS;
|
||||||
Q <<= EXTRA_BITS;
|
Q <<= EXTRA_BITS;
|
||||||
|
|
Loading…
Reference in a new issue