From 4f99c23e7a49606aaee9293d2fda99c7ba545b09 Mon Sep 17 00:00:00 2001 From: Stan Grams Date: Sun, 1 Mar 2026 09:47:13 +0100 Subject: [PATCH] [perf](trx-backend-soapysdr): reduce polyphase resampler phases from 128 to 64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Halves the coefficient bank from 128×32 to 64×32 (16 KB → 8 KB) for better L1 cache utilization while maintaining sufficient fractional sample resolution. Co-Authored-By: Claude Opus 4.6 Signed-off-by: Stan Grams --- src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs b/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs index 72fd723..31b93c3 100644 --- a/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs +++ b/src/trx-server/trx-backend/trx-backend-soapysdr/src/demod.rs @@ -43,7 +43,7 @@ const STEREO_DIFF_DC_R: f32 = 0.9995; /// Fractional-resampler FIR taps for WFM audio reconstruction. const WFM_RESAMP_TAPS: usize = 32; /// Polyphase slots for the WFM fractional FIR resampler. -const WFM_RESAMP_PHASES: usize = 128; +const WFM_RESAMP_PHASES: usize = 64; fn build_wfm_resample_bank(cutoff: f32) -> [[f32; WFM_RESAMP_TAPS]; WFM_RESAMP_PHASES] { let mut bank = [[0.0; WFM_RESAMP_TAPS]; WFM_RESAMP_PHASES]; let anchor = (WFM_RESAMP_TAPS / 2 - 1) as f32;