summaryrefslogtreecommitdiff
path: root/gr-fec/lib
Commit message (Collapse)AuthorAgeFilesLines
* logging core: replace log4cpp by spdlogMarcus Müller2021-11-192-4/+5
| | | | | | | | also: enable formerly disabled qa_logger tests This replaces log4cpp with spdlog. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: Replace stdio logging with loggerDavid Winter2021-10-211-5/+7
| | | | | | | This commit replaces many uses of std::c{out,err} and printf with the appropriate GR_LOG_* directives. Signed-off-by: David Winter <david.winter@analog.com>
* modules: include boost/format where usedMarcus Müller2021-09-0718-2/+22
| | | | | | | | | | | | | | | | | | | in the classic modules: audio blocks digital dtv fec fft filter qtgui trellis/fsm uhd video-sdl vocoder/freedv_rx Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* classic modules: use common precompiled headersMarcus Müller2021-07-191-0/+4
| | | | | | | This commit contains all the additions to gr-*/lib/CMakeLists.txt applicable to modules already present in 3.8. Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* fec: generic_{en,de}coder: Use logger_get_configured_logger helperDavid Winter2021-07-022-44/+2
| | | | | | | | This commit uses the new logger_get_configured_logger helper to replace the duplicated logger retrieval code in the constructor of generic_decoder and generic_encoder. Signed-off-by: David Winter <david.winter@analog.com>
* global: remove boost/assign/list_of, obsoleted by C++11Marcus Müller2021-06-227-9/+2
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: automatically remove unused boost includesMarcus Müller2021-06-223-3/+0
| | | | | | | | used command: sed -i '/^#include.*boost.*$/d' $(ag -L '(boost::|BOOST)' $(ag --cpp -l '#include <boost')) Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* logging: remove <iostream> from logger.h, add where consequently missingMarcus Müller2021-06-171-0/+2
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* fec: add <iostream> to alist, cldpc where it was missingMarcus Müller2021-06-172-0/+6
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* global: remove iostream from all files not use cout|cerr|cin|clogMarcus Müller2021-06-172-2/+0
| | | | Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* cmake: add compiler version statementsJosh Morman2021-03-131-0/+3
| | | | | | | Where std::filesystem is used to allow linking properly on Debian and Centos 8 Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* Replace boost::filesystem with std::filesystemZackery Spytz2021-03-132-2/+4
| | | | Signed-off-by: Zackery Spytz <zspytz@gmail.com>
* cmake: remove custom FindGSL moduleJosh Morman2021-03-041-1/+1
| | | | | | | | | | The in-tree FindGSL.cmake module differs from the standard cmake FindGSL in the target names that are output. (gsl::gsl vs GSL::gsl). This makes linking an OOT to something that links to gsl cause issues and requires copying in FindGSL.cmake into the OOT. Since CMake 3.8 (current project minimum) installs FindGSL, use that instead Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* Remove unneeded boost includes and avoid boost depreciated warningsVolker Schroer2021-02-073-3/+0
| | | | Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
* clang-tidy: run full .clang-tidy on C++17 codebaseMarcus Müller2021-01-1926-40/+40
| | | | | | | | | | | | | | | | | | | | run /usr/share/clang/run-clang-tidy.py -checks=file '-header-filter=.*' -fix .. from build directory. Then, clang-format -i $(git diff --name-only origin/master) to clang-format changed files. Then, refresh all header hashes in pybind bindings (*/python/bindings/*.cc) Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* C++14: Use std::make_unique instead of boost::make_uniqueMarcus Müller2021-01-041-2/+2
| | | | | | Also, clean up includes Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
* fec: lib: Remove use of FEC_API for function definitions.Ryan Volz2020-12-184-12/+4
| | | | | | | | | | This fixes building with MSVC. Since these files first get built into an object that is *not* a shared library, FEC_API was resolving to __declspec(dllimport), which should never be used for function definitions. Warnings still occur about inconsistent dll linkage because the gr_fec_rs target is built into an object library that doesn't define "gnuradio_fec_EXPORTS", but the end result works. These warnings have always existed previously.
* modernization: `override` instead of virtual in all compilation unitsMarcus Müller2020-11-0325-117/+117
|
* Add `override` for common virtual function overridesThomas Habets2020-11-0313-18/+18
| | | | | | | | | | Mostly done with: ``` find -name "*_impl.h" | xargs sed -i -r '/(void forecast|int work|int general_work|bool check_topology)\(/{:back /\)/b nxt;N;b back;:nxt s/\)$|\)(;)/) override\1/g}' ``` Then I removed an incorrect `work` that this found.
* lib, include: Include missing headers.Ryan Volz2020-10-021-0/+1
| | | | | This fixes compilation with MSVC on conda-forge, although why this wasn't needed earlier is a mystery.
* gr-fec: fix MSVC workaround for libfec Reed-Solomon decoderDaniel Estévez2020-10-011-1/+1
| | | | | | | | | | | | | | MSVC does not support variable length arrays in C, so under MSVC the Reed-Solmon decoder from libfec is built using a maximum array size instead of variable length arrays. This workaround only affects the generic decode_rs_char() function. The CCSDS functions decode_rs_8() and decode_rs_ccsds() use fixed length arrays. In f762dc637b3b954c4521fd83829c531371d1f87f the generic decode_rs_char() function was moved from decode_rs.c to char.c, so the CMakeLists.txt workaround needs to be updated accordingly.
* gr-fec: build and export (en|de)code_rs_8() and (en|de)code_rs_ccsds()Daniel Estévez2020-10-019-22/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | These functions implement the CCSDS Reed-Solomon code in the conventional and dual basis respectively. The code for them was already included in gr-fec, but they weren't built. While these functions are currently not used in GNU Radio, they might be used by other OOT modules, as discussed in #3637. The behaviour of the functions (en|de)code_rs_8() could actually be achieved with the currently available (en|de)code_rs_char(), by passing the correct parameters to init_rs_char(), but since the CCSDS code is so popular, having the specific functions is handy. On the other hand, it is not possible to obtain (en|de)code_rs_ccsds() by using (en|de)code_rs_char(), since there is an additional change of basis involved (see decode_rs_ccsds.c). Some reorganization of the code has been needed. The different encode and decode functions use some kind of templating using the C preprocessor. The implmementation uses several symbols that should be defined by the preprocessor before including the implementation. The implementation can be included several times to instance the different functions. The code in (en|de)code_rs.c has been moved to (en|de)code_rs.h, since now it is included and compiled twice instead of being compiled directly. The files char.c and ccsds.c include the appropriate preprocessor definitions from char.h and fixed.h respectively and these are what is built.
* fec: Remove manual memory managementThomas Habets2020-09-077-94/+62
| | | | | This removes almost all manual memory management in gr-fec/. `scl_list` is a bit of magic, so requires more thinking.
* blocks/polar: Remove manual memory managementThomas Habets2020-08-142-32/+22
|
* fec/cc_decoder: Remove manual memory managementThomas Habets2020-08-142-45/+31
|
* fec/async_encoder: Remove manual memory managementThomas Habets2020-08-142-36/+19
|
* fec/async_decoder: Remove manual memory managementThomas Habets2020-08-142-33/+20
|
* Replace all calls to `get_initial_sptr` with `make_block_sptr`Thomas Habets2020-07-3013-22/+21
| | | | | | | | | | | | | | First batch of changes: ``` find […] -print0 | xargs -0 sed -i -r '/get_initial_sptr/{:nxt N;/;/!b nxt;s/get_initial_sptr\(\s*new ([^(]+)(.*)\)\)/make_block_sptr<\1>\2)/}' ``` Then: * Back out `sptr_magic.h` edits * Change some `friend` clauses * clang-format the whole thing * Update checksums in the pybind11 bindings files
* msg_handler: Use lambdas in most componentsJohannes Demel2020-06-045-9/+7
| | | | | With this commit, all components except gr-qtgui use lambdas instead of `boost::bind` to register msg handlers.
* pybind: run clang-formatJosh Morman2020-06-042-3/+8
|
* fec: replace char with uint8_tJosh Morman2020-06-0416-42/+42
| | | | | pybind gets confused with char arguments and tries to interpret them as strings. uint8_t is more consistent across the gr codebase as well
* fec: replace stderr logging by calls to GR's logging faciltiesMarcus Müller2020-04-131-5/+5
|
* Switch from boost pointers to std C++11 pointersThomas Habets2020-04-011-0/+1
| | | | | | | | | | | | | | | | | | | Most of this code is automated code changes: ``` set -e SUB="s/dummy/dummy/" for i in shared_ptr make_shared dynamic_pointer_cast weak_ptr enable_shared_from_this get_deleter; do SUB="$SUB;s/boost::$i/std::$i/g" done SUB="$SUB;s^#include <boost/shared_ptr.hpp>^#include <memory>^g" SUB="$SUB;s^namespace boost^namespace std^g" find . \( -name "*.cc" -o -name "*.h" -o -name "*.i" -o -name "*.cxx" -o -name "*.py" \) -print0 | xargs -0 sed -i "$SUB" ``` Only one manual change. In `./gr-fec/lib/fec_mtrx_impl.cc`, add `#include <algorithm>`.
* runtime/viterbi: get rid of GR_M_LOG2E constantMarcus Müller2020-02-141-9/+6
| | | | | | | | | Constant was only used to emulate log_2 from ln. Which is a strange thing to do on a computer with binary floating point numbers. Which is a superfluous thing to do when you have ::log2 in C++11.
* gr-fec: fix compiler warningClayton Smith2020-02-102-2/+2
|
* fixup! gr-fec/cc_encoder: Fix and improve documentationMartin Braun2020-02-021-3/+6
| | | | This fixes the formatting in cc_encoder_impl.cc.
* gr-fec/cc_encoder: Add checks for parametersrear10192020-02-011-0/+20
|
* gr-fec/cc_encoder: Fix constraint length K > 8rear10192020-02-011-1/+1
| | | | | | | | The convolutional encoder produces wrong output for codes with a constraint length larger than 8. Fix this by using a variable of appropriate size. Fixes #2344.
* Update license header to SPDX formatdevnulling2020-01-2782-1066/+82
|
* gr-fec: reed-solomon: check for null callocValerii Zapodovnikov2020-01-241-0/+2
| | | calloc() can return NULL too
* Fix all formatting issuesMartin Braun2020-01-102-3/+4
| | | | | This fixes every leftover file in the GNU Radio source tree to match our clang-format definition.
* Fix heap corruption bug in async_decoderDaniel Estévez2020-01-051-1/+1
| | | | | | When using async_decoder with a CC decoder with k = 7 and no input byte packing, the frame size of the underlying FEC decoder is set incorrectly to a too large value. This causes out of bounds accesses which corrupt the heap.
* Remove newlines from exception messagesThomas Habets2020-01-012-8/+8
|
* Use C++11 ranged for and ranged insert instead of manual loopsThomas Habets2019-12-041-5/+4
|
* change rounding method to `lround`Mathias Rasmussen2019-11-175-21/+21
|
* fec: do not use deprecated register specifierBastian Bloessl2019-09-051-1/+1
|
* clang-tidy in gnuradio-runtime: use empty() instead of size()!=0Marcus Müller2019-08-223-3/+3
|
* clang-format: Ordering all the includesMarcus Müller2019-08-0948-92/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang-format: ordering includes in gnuradio-runtime clang-format: ordering includes in gr-filter clang-format: ordering includes in gr-fft clang-format: ordering includes in gr-audio clang-format: ordering includes in gr-analog clang-format: ordering includes in gr-fec clang-format: ordering includes in gr-wavelet clang-format: ordering includes in gr-zeromq clang-format: ordering includes in gr-vocoder clang-format: ordering includes in gr-video-sdl clang-format: ordering includes in gr-trellis clang-format: ordering includes in gr-blocks clang-format: ordering includes in gr-digital clang-format: ordering includes in gr-uhd clang-format: ordering includes in gr-dtv clang-format: ordering includes in gr-channels clang-format: ordering includes in gr-qtgui clang_format.py: re-enable include reordering
* Tree: clang-format without the include sortingMarcus Müller2019-08-0992-7492/+7193
|
* cmake: Update to modern CMake usageAndrej Rode2019-03-046-129/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes using target based setting of includes and link libraries. This will transitively add the includes and linking flags to dependent targets. This is still a work in progress since only the dynamic libraries have been touched and not all of include_directories directives are gone yet. cmake: remove GR_INCLUDE_SUBDIRECTORY macro Previously this macro was used to inject subdirectories in the current CMake namespace. This is generally undesired and pollutes the current context. previously GNU Radio CMake had a non-default option ENABLE_STATIC_LIBS to build both, shared libraries and static libraries. This seems to be a construction taken over from autotools and serves no purpuose in CMake and complicates the library building. cmake: remove GR_LIBTOOL and la generation support This looks like it was primarily used to support projects using autotools, but comments state that the generated .la files aren't compatible with autotools anyway. cmake: Bump required CMake version to 3.8 UseSWIG cmake uses syntax which requires at least CMake 3.8 and is non-trivial to change