fec - Forward error correction for SDR, space, and satellite applications
Show HN: SIMD Viterbi Decoder in Rust
fec is a Rust crate that implements two essential error-correcting codes for software-defined radio and spacecraft links: convolutional codes with a Viterbi decoder (hard and soft decision) and Reed-Solomon codes over GF(2⁸). It supports a wide range of rates and orders, including the common rate-1/2 k=7 and CCSDS (255,223) codes. With the optional `simd` feature on nightly Rust, the Viterbi decoder accelerates on SSE/AVX2/AVX512, making it more performant than C libraries like libcorrect and libfec. The crate is bit-compatible with libfec, and a shim crate provides a drop-in C ABI. Ideal for developers working on SDR, satellite communications, or any system requiring robust error correction.
With the `simd` feature enabled (requires nightly), this crate is more performant than either libcorrect or libfec on x86.
- nickcw
I was looking at the reed Solomon implementation. I've done a few of those in the past! I note that you are using logs for multiplication. I always used to use a 64kb table for direct lookup, though maybe that isn't faster on modern processors?
Next LDPC codes?
- eminence32
Could this library be used decode signals from a GOES satellite downlink? goestools uses libcorrect for this and building a rust version might be fun.
- ChadNauseam
I thought this might have something to do with sentencepiece's unigram (which uses viterbi). But they seem to be totally different domains. What an amazing algorithm, to show up in so many different places.