mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-21 05:05:38 -05:00
rtl_sdr_fm: consume HB cascade output in-place to avoid the final memcpy. Track the current buffer and assign lowpassed to the last stage’s output, preserving correctness while reducing memory traffic.
This commit is contained in:
@@ -1608,10 +1608,8 @@ void full_demod(struct demod_state *d)
|
|||||||
in_len = out_len_interleaved;
|
in_len = out_len_interleaved;
|
||||||
dst = (src == d->hb_workbuf) ? d->lowpassed : d->hb_workbuf;
|
dst = (src == d->hb_workbuf) ? d->lowpassed : d->hb_workbuf;
|
||||||
}
|
}
|
||||||
/* Final output resides in 'src' with length in_len */
|
/* Final output resides in 'src' with length in_len; consume in-place (no copy) */
|
||||||
if (d->lowpassed != src) {
|
d->lowpassed = src;
|
||||||
memcpy(d->lowpassed, src, (size_t)in_len * sizeof(int16_t));
|
|
||||||
}
|
|
||||||
d->lp_len = in_len;
|
d->lp_len = in_len;
|
||||||
/* No droop compensation for half-band cascade */
|
/* No droop compensation for half-band cascade */
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user