gnuradio: update to 3.10.5.1.

This commit is contained in:
Evgeny Ermakov 2022-09-17 22:34:08 +11:00 committed by Andrew Benson
parent c7cef9d515
commit 501735c72d
5 changed files with 25 additions and 396 deletions

View File

@ -3241,28 +3241,28 @@ libarcan_a12.so.0.1 arcan-0.6.1.1_1
liblwipv6.so.2 lwipv6-1.5a_1
libpipewire-0.3.so.0 libpipewire-0.3.6_1
libvolk.so.3.0 volk-3.0.0_1
libgnuradio-runtime.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-pmt.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-blocks.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-audio.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-fec.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-fft.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-filter.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-analog.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-digital.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-dtv.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-channels.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-trellis.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-video-sdl.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-vocoder.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-wavelet.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-uhd.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-network.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-soapy.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-qtgui.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-zeromq.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-iio.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-pdu.so.3.10.3 gnuradio-3.10.3.0_1
libgnuradio-runtime.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-pmt.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-blocks.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-audio.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-fec.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-fft.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-filter.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-analog.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-digital.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-dtv.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-channels.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-trellis.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-video-sdl.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-vocoder.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-wavelet.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-uhd.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-network.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-soapy.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-qtgui.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-zeromq.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-iio.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-pdu.so.3.10.5 gnuradio-3.10.5.0_1
libgnuradio-osmosdr.so.0.2.0 gnuradio-osmosdr-0.2.0_1
libflann_cpp.so.1.9 flann-1.9.1_1
libflann.so.1.9 flann-1.9.1_1

View File

@ -1,79 +0,0 @@
Upstream: no
Honestly, I don't care much. I tries to print as much as it makes sense
--- a/gnuradio-runtime/include/gnuradio/logger.h
+++ b/gnuradio-runtime/include/gnuradio/logger.h
@@ -37,6 +37,9 @@ using logger_ptr = std::shared_ptr<void>
#include <spdlog/fmt/fmt.h>
#include <spdlog/fmt/ostr.h>
#include <memory>
+#include <string>
+#include <type_traits>
+#include <utility>
#include <spdlog/spdlog.h>
@@ -285,6 +288,52 @@ struct fmt::formatter<boost::format> : f
}
};
+namespace fmt {
+template <typename T>
+struct formatter<
+ T,
+ typename std::enable_if<
+ std::is_convertible<
+ decltype(std::declval<T>().identifier()),
+ std::string
+ >::value,
+ char
+ >::type > : fmt::formatter<std::string> {
+ template <typename FormatCtx>
+ auto format(const T& value, FormatCtx& ctx)
+ -> decltype(fmt::formatter<std::string>::format(value.identifier(), ctx))
+ {
+ return fmt::formatter<std::string>::format(value.identifier(), ctx);
+ }
+};
+template <typename T, typename Ch>
+struct formatter<std::shared_ptr<T>, Ch> : fmt::formatter<const void *, Ch> {
+ template <typename FormatCtx>
+ auto format(const std::shared_ptr<T>& ptr, FormatCtx& ctx)
+ -> decltype(fmt::formatter<const void *, Ch>::format(fmt::ptr(ptr), ctx))
+ {
+ return fmt::formatter<const void *, Ch>::format(fmt::ptr(ptr), ctx);
+ }
+};
+template <typename T>
+struct formatter<
+ std::shared_ptr<T>,
+ typename std::enable_if<
+ std::is_convertible<
+ decltype(std::declval<T>().identifier()),
+ std::string
+ >::value,
+ char
+ >::type > : fmt::formatter<std::string> {
+ template <typename FormatCtx>
+ auto format(const std::shared_ptr<T>& ptr, FormatCtx& ctx)
+ -> decltype(fmt::formatter<std::string>::format(ptr->identifier(), ctx))
+ {
+ return fmt::formatter<std::string>::format(ptr->identifier(), ctx);
+ }
+};
+}
+
#endif
#endif /* INCLUDED_GR_LOGGER_H */
--- a/gnuradio-runtime/python/gnuradio/gr/bindings/logger_python.cc
+++ b/gnuradio-runtime/python/gnuradio/gr/bindings/logger_python.cc
@@ -15,7 +15,7 @@
/* BINDTOOL_GEN_AUTOMATIC(0) */
/* BINDTOOL_USE_PYGCCXML(0) */
/* BINDTOOL_HEADER_FILE(logger.h) */
-/* BINDTOOL_HEADER_FILE_HASH(a76c325b045da079c83e294cc4abb8c6) */
+/* BINDTOOL_HEADER_FILE_HASH(0e6a6ba08242e117ab4407ef3bf7afdf) */
/***********************************************************************************/
#include <pybind11/complex.h>

View File

@ -1,266 +0,0 @@
From b7323c09566416187bad7728c547c336ffa49253 Mon Sep 17 00:00:00 2001
From: Clayton Smith <argilo@gmail.com>
Date: Fri, 14 Oct 2022 15:39:20 -0400
Subject: [PATCH] blocks: Allow for floating point error in moving average test
Signed-off-by: Clayton Smith <argilo@gmail.com>
---
gr-blocks/python/blocks/qa_moving_average.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gr-blocks/python/blocks/qa_moving_average.py b/gr-blocks/python/blocks/qa_moving_average.py
index 8f4169d05cf..6aa3ba3df35 100644
--- a/gr-blocks/python/blocks/qa_moving_average.py
+++ b/gr-blocks/python/blocks/qa_moving_average.py
@@ -147,7 +147,7 @@ def test_vector_complex(self):
ref_data = ref_dst.data()
# make sure result is close to zero
- self.assertEqual(dut_data, ref_data)
+ self.assertListAlmostEqual(dut_data, ref_data, tol=3)
def test_complex_scalar(self):
tb = self.tb
From e3e7b41a1f014ca39ec5d244eed01e1caa7cc4cb Mon Sep 17 00:00:00 2001
From: Clayton Smith <argilo@gmail.com>
Date: Fri, 14 Oct 2022 15:52:54 -0400
Subject: [PATCH] fft: Increase tolerance in qa_window test
Signed-off-by: Clayton Smith <argilo@gmail.com>
---
gr-fft/python/fft/qa_window.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gr-fft/python/fft/qa_window.py b/gr-fft/python/fft/qa_window.py
index 93ab1a9f93f..ec4877f7867 100644
--- a/gr-fft/python/fft/qa_window.py
+++ b/gr-fft/python/fft/qa_window.py
@@ -35,7 +35,7 @@ def test_normwin(self):
21,
normalize=True)
power = numpy.sum([x * x for x in win]) / len(win)
- self.assertAlmostEqual(power, 1.0)
+ self.assertAlmostEqual(power, 1.0, places=6)
if __name__ == '__main__':
From 05b3b5e4689e6c061268c6df1773f10b021125e6 Mon Sep 17 00:00:00 2001
From: Clayton Smith <argilo@gmail.com>
Date: Fri, 14 Oct 2022 17:29:30 -0400
Subject: [PATCH 1/2] digital: Account for floating point error in loop
conditions
Signed-off-by: Clayton Smith <argilo@gmail.com>
---
gr-digital/lib/constellation.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gr-digital/lib/constellation.cc b/gr-digital/lib/constellation.cc
index 609b4546b83..4235d17f202 100644
--- a/gr-digital/lib/constellation.cc
+++ b/gr-digital/lib/constellation.cc
@@ -245,9 +245,9 @@ void constellation::gen_soft_dec_lut(int precision, float npwr)
float maxd = 1.0f;
float step = (2.0f * maxd) / (d_lut_scale - 1);
float y = -maxd;
- while (y < maxd + step) {
+ while (y < maxd + (step / 2)) {
float x = -maxd;
- while (x < maxd + step) {
+ while (x < maxd + (step / 2)) {
gr_complex pt = gr_complex(x, y);
d_soft_dec_lut.push_back(calc_soft_dec(pt, npwr));
x += step;
From 830349bb36706aaf872a8a911ead631c9788c2ac Mon Sep 17 00:00:00 2001
From: Clayton Smith <argilo@gmail.com>
Date: Fri, 14 Oct 2022 17:31:33 -0400
Subject: [PATCH 2/2] digital: Fix slicer implementation in qa_constellation
Signed-off-by: Clayton Smith <argilo@gmail.com>
---
gr-digital/python/digital/qa_constellation.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gr-digital/python/digital/qa_constellation.py b/gr-digital/python/digital/qa_constellation.py
index 7345f782a2c..1ad86a8d263 100644
--- a/gr-digital/python/digital/qa_constellation.py
+++ b/gr-digital/python/digital/qa_constellation.py
@@ -117,10 +117,10 @@ def threed_constell():
def slicer(x):
ret = []
for xi in x:
- if(xi < 0):
+ if xi < 0:
ret.append(0.0)
- else:
- ret.append(1.0)
+ else:
+ ret.append(1.0)
return ret
From 7c24638f9924cdedeb9b2c9c430b3eb63585de3b Mon Sep 17 00:00:00 2001
From: Clayton Smith <argilo@gmail.com>
Date: Sat, 15 Oct 2022 10:44:37 -0400
Subject: [PATCH] fec: Fix LDPC output size calculation
Signed-off-by: Clayton Smith <argilo@gmail.com>
---
gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc | 2 +-
gr-fec/lib/ldpc_par_mtrx_encoder_impl.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc b/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc
index a76bd76bae2..56a7aeab4c5 100644
--- a/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc
+++ b/gr-fec/lib/ldpc_gen_mtrx_encoder_impl.cc
@@ -55,7 +55,7 @@ bool ldpc_gen_mtrx_encoder_impl::set_frame_size(unsigned int frame_size)
d_frame_size = frame_size;
- d_output_size = static_cast<int>(d_rate * d_frame_size);
+ d_output_size = static_cast<int>(round(d_rate * d_frame_size));
return ret;
}
diff --git a/gr-fec/lib/ldpc_par_mtrx_encoder_impl.cc b/gr-fec/lib/ldpc_par_mtrx_encoder_impl.cc
index f9aaa1b65b4..1475aba70d4 100644
--- a/gr-fec/lib/ldpc_par_mtrx_encoder_impl.cc
+++ b/gr-fec/lib/ldpc_par_mtrx_encoder_impl.cc
@@ -75,7 +75,7 @@ bool ldpc_par_mtrx_encoder_impl::set_frame_size(unsigned int frame_size)
d_frame_size = frame_size;
- d_output_size = static_cast<int>(d_rate * d_frame_size);
+ d_output_size = static_cast<int>(round(d_rate * d_frame_size));
return ret;
}
From 543983116771cee5653514f3cd2f260551edc89d Mon Sep 17 00:00:00 2001
From: Clayton Smith <argilo@gmail.com>
Date: Sun, 16 Oct 2022 08:22:48 -0400
Subject: [PATCH] analog: Use realistic signals for CTCSS squelch tests
Signed-off-by: Clayton Smith <argilo@gmail.com>
---
gr-analog/python/analog/qa_ctcss_squelch.py | 62 +++++++++++++++------
1 file changed, 45 insertions(+), 17 deletions(-)
From 543983116771cee5653514f3cd2f260551edc89d Mon Sep 17 00:00:00 2001
From: Clayton Smith <argilo@gmail.com>
Date: Sun, 16 Oct 2022 08:22:48 -0400
Subject: [PATCH] analog: Use realistic signals for CTCSS squelch tests
Signed-off-by: Clayton Smith <argilo@gmail.com>
---
gr-analog/python/analog/qa_ctcss_squelch.py | 62 +++++++++++++++------
1 file changed, 45 insertions(+), 17 deletions(-)
diff --git a/gr-analog/python/analog/qa_ctcss_squelch.py b/gr-analog/python/analog/qa_ctcss_squelch.py
index 6151641aa3c..195e19ab9a3 100644
--- a/gr-analog/python/analog/qa_ctcss_squelch.py
+++ b/gr-analog/python/analog/qa_ctcss_squelch.py
@@ -9,6 +9,8 @@
#
+import math
+import random
from gnuradio import gr, gr_unittest, analog, blocks
@@ -46,16 +48,24 @@ def test_ctcss_squelch_001(self):
def test_ctcss_squelch_002(self):
# Test runtime, gate=True
- rate = 1
+ rate = 8000
freq = 100
- level = 0.0
- length = 1
- ramp = 1
+ other_freq = 103.5
+ level = 0.01
+ length = 0
+ ramp = 0
gate = True
- src_data = [float(x) / 10.0 for x in range(1, 40)]
- expected_result = src_data
- expected_result[0] = 0
+ random.seed(1)
+ src_data = [0.5 * math.sin(2 * math.pi * 1000 * x / rate) + random.gauss(0, 0.1) for x in range(rate)]
+
+ # First half-second has incorrect CTCSS tone
+ for x in range(0, int(rate * 0.500)):
+ src_data[x] += 0.15 * math.sin(2 * math.pi * other_freq * x / rate)
+
+ # Second half-second has correct CTCSS tone
+ for x in range(int(rate * 0.500), rate):
+ src_data[x] += 0.15 * math.sin(2 * math.pi * freq * x / rate)
src = blocks.vector_source_f(src_data)
op = analog.ctcss_squelch_ff(rate, freq, level,
@@ -67,18 +77,34 @@ def test_ctcss_squelch_002(self):
self.tb.run()
result_data = dst.data()
- self.assertFloatTuplesAlmostEqual(expected_result, result_data, 4)
+
+ # Squelch should open ~100 ms after the correct CTCSS tone appears
+ # so ~400 ms of audio should make it past the gate
+ self.assertGreater(len(result_data), rate * 0.390)
+ self.assertLess(len(result_data), rate * 0.410)
+ self.assertFloatTuplesAlmostEqual(src_data[-len(result_data):], result_data, 6)
def test_ctcss_squelch_003(self):
# Test runtime, gate=False
- rate = 1
+ rate = 8000
freq = 100
- level = 0.5
- length = 1
- ramp = 1
+ other_freq = 103.5
+ level = 0.01
+ length = 0
+ ramp = 0
gate = False
- src_data = [float(x) / 10.0 for x in range(1, 40)]
+ random.seed(1)
+ src_data = [0.5 * math.sin(2 * math.pi * 1000 * x / rate) + random.gauss(0, 0.1) for x in range(rate)]
+
+ # First half-second has incorrect CTCSS tone
+ for x in range(0, rate // 2):
+ src_data[x] += 0.15 * math.sin(2 * math.pi * other_freq * x / rate)
+
+ # Second half-second has correct CTCSS tone
+ for x in range(rate // 2, rate):
+ src_data[x] += 0.15 * math.sin(2 * math.pi * freq * x / rate)
+
src = blocks.vector_source_f(src_data)
op = analog.ctcss_squelch_ff(rate, freq, level,
length, ramp, gate)
@@ -88,11 +114,13 @@ def test_ctcss_squelch_003(self):
self.tb.connect(op, dst)
self.tb.run()
- expected_result = src_data
- expected_result[0:5] = [0, 0, 0, 0, 0]
-
result_data = dst.data()
- self.assertFloatTuplesAlmostEqual(expected_result, result_data, 4)
+
+ # Squelch should open ~100 ms after the correct CTCSS tone appears
+ min_zero_samples = int(rate * 0.590)
+ self.assertFloatTuplesAlmostEqual([0] * min_zero_samples, result_data[:min_zero_samples], 6)
+ max_zero_samples = int(rate * 0.610)
+ self.assertFloatTuplesAlmostEqual(src_data[max_zero_samples:], result_data[max_zero_samples:], 6)
if __name__ == '__main__':

View File

@ -1,26 +0,0 @@
Skip one test that hangs forever on 32 bit
See: https://github.com/gnuradio/gnuradio/issues/989
--- a/gr-fec/python/fec/qa_fecapi_ldpc.py 2019-08-09 18:15:36.000000000 -0300
+++ b/gr-fec/python/fec/qa_fecapi_ldpc.py 2021-12-28 12:56:31.635977173 -0300
@@ -98,6 +98,9 @@
self.assertEqual(data_in, data_out)
def test_parallelism0_03(self):
+ from ctypes import sizeof, c_long
+ if sizeof(c_long) <= 4:
+ return
filename = LDPC_ALIST_DIR + "n_0100_k_0058_gen_matrix.alist"
gap = 4
LDPC_matrix_object = fec.ldpc_G_matrix(filename)
@@ -115,6 +118,9 @@
self.assertEqual(data_in, data_out)
def test_parallelism0_03(self):
+ from ctypes import sizeof, c_long
+ if sizeof(c_long) <= 4:
+ return
filename = LDPC_ALIST_DIR + "n_0100_k_0058_gen_matrix.alist"
gap = 4
k = 100 - 58

View File

@ -1,7 +1,7 @@
# Template file for 'gnuradio'
pkgname=gnuradio
version=3.10.3.0
revision=9
version=3.10.5.1
revision=1
build_style=cmake
conf_files="/etc/gnuradio/conf.d/*"
configure_args="-DMATHJAX2_USE_ROOT=/usr/share/mathjax
@ -22,7 +22,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-3.0-or-later"
homepage="https://www.gnuradio.org"
distfiles="https://github.com/gnuradio/gnuradio/archive/v${version}.tar.gz"
checksum=957108a67ec75d99adaad8f3b10be8ae08760a9cef0b659a5c815a4e33898a75
checksum=85d90147f7f28450bff75eeefd2b44adc88b231d29fe8e86cc3a65437dba6d9f
python_version=3
if [ "$CROSS_BUILD" ]; then