From f1d9a4a28c6c730efc80f1458da94d1e508e1873 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 24 May 2020 03:04:20 +0200 Subject: [PATCH] switch to shift_addfast_cc for better performance --- csdr/csdr.py | 4 ++-- owrx/source/resampler.py | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/csdr/csdr.py b/csdr/csdr.py index 9d23978..260da7a 100644 --- a/csdr/csdr.py +++ b/csdr/csdr.py @@ -241,7 +241,7 @@ class dsp(object): if self.fft_compression == "adpcm": chain += ["csdr compress_fft_adpcm_f_u8 {fft_size}"] return chain - chain += ["csdr shift_addition_cc --fifo {shift_pipe}"] + chain += ["csdr shift_addfast_cc --fifo {shift_pipe}"] if self.decimation > 1: chain += ["csdr fir_decimate_cc {decimation} {ddc_transition_bw} HAMMING"] chain += ["csdr bandpass_fir_fft_cc --fifo {bpf_pipe} {bpf_transition_bw} HAMMING"] @@ -331,7 +331,7 @@ class dsp(object): return chain elif which == "bpsk31" or which == "bpsk63": return chain + [ - "csdr shift_addition_cc --fifo {secondary_shift_pipe}", + "csdr shift_addfast_cc --fifo {secondary_shift_pipe}", "csdr bandpass_fir_fft_cc -{secondary_bpf_cutoff} {secondary_bpf_cutoff} {secondary_bpf_cutoff}", "csdr simple_agc_cc 0.001 0.5", "csdr timing_recovery_cc GARDNER {secondary_samples_per_bits} 0.5 2 --add_q", diff --git a/owrx/source/resampler.py b/owrx/source/resampler.py index 6afe50c..1f6a4e1 100644 --- a/owrx/source/resampler.py +++ b/owrx/source/resampler.py @@ -1,10 +1,4 @@ from .direct import DirectSource -from . import SdrSource -import subprocess -import threading -import os -import socket -import time import logging @@ -29,7 +23,7 @@ class Resampler(DirectSource): def getCommand(self): return [ "nc -v 127.0.0.1 {nc_port}".format(nc_port=self.sdr.getPort()), - "csdr shift_addition_cc {shift}".format(shift=self.shift), + "csdr shift_addfast_cc {shift}".format(shift=self.shift), "csdr fir_decimate_cc {decimation} {ddc_transition_bw} HAMMING".format( decimation=self.decimation, ddc_transition_bw=self.transition_bw ),