M0LTE.FecLdpc 0.1.0

dotnet add package M0LTE.FecLdpc --version 0.1.0
                    
NuGet\Install-Package M0LTE.FecLdpc -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="M0LTE.FecLdpc" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="M0LTE.FecLdpc" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="M0LTE.FecLdpc" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add M0LTE.FecLdpc --version 0.1.0
                    
#r "nuget: M0LTE.FecLdpc, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package M0LTE.FecLdpc@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=M0LTE.FecLdpc&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=M0LTE.FecLdpc&version=0.1.0
                    
Install as a Cake Tool

M0LTE.FecLdpc

The FreeDV/codec2 LDPC codec for .NET, extracted from the pdn-soundmodem packet-radio modem. It is a port of codec2's datac LDPC support: the five parity-check codes, a log-domain sum-product decoder, the repeat-accumulate encoder, and a shortening-aware frame codec covering all six FreeDV datac modes.

Type What it is
LdpcCode An immutable FreeDV/codec2 parity-check code: the sparse H-matrix (HRows/HCols) plus dimensions. All datac codes are RA / dual-diagonal (K == M == N/2).
LdpcCodes The five bound codes: H_128_256_5, H_256_512_4, H_1024_2048_4f, H_4096_8192_3d, HRA_56_56.
LdpcDecoder Log-domain sum-product decoder — a faithful port of codec2's mpdecode_core.c, graph built once per code and cached. Decode(llr, decoded, out parityCheckCount).
LdpcFrameCodec Code-shortening frame codec: stuffs unused data positions with known bits (never transmitted), reindexes parity on decode. Encode / Decode over DataBits payload and CodedBits on-air bits.
DatacMode / DatacLdpc The six FreeDV datac modes (Datac0/1/3/4/13/14) and DatacLdpc.Create(mode) → the right LdpcFrameCodec.

Install

dotnet add package M0LTE.FecLdpc

Quick start

using M0LTE.FecLdpc;

// The datac0 (256,128) frame codec: 128 payload bits → 256 on-air coded bits.
LdpcFrameCodec codec = DatacLdpc.Create(DatacMode.Datac0);

byte[] data = new byte[codec.DataBits];        // your 0/1 payload bits
// ... fill data ...

byte[] codeword = new byte[codec.CodedBits];
codec.Encode(data, codeword);                  // data bits ++ parity bits

// Receive: map the channel to LLRs (positive ⇒ bit 0, negative ⇒ bit 1).
float[] llr = new float[codec.CodedBits];
// ... demodulate into llr ...

byte[] outData = new byte[codec.DataBits];
codec.Decode(llr, outData, out int parityChecks);   // recovers the payload bits

Or drive the raw code directly via LdpcCodes + LdpcDecoder.

(Exact constructor/method signatures are in the XML docs shipped with the package.)

Licence

AGPL-3.0-or-later (see LICENSE). This package is a derivative work of codec2 (David Rowe / Bill Cowley VK5DSP et al.), which is LGPL-2.1; the matrices and oracle vectors are transliterated verbatim from codec2 1.2.0 (git 310777b). The relicensing to AGPL-3.0-or-later is permitted by LGPL-2.1 §3 → GPLv3 → §13. codec2's copyright and origin are preserved in PROVENANCE.md — read it before redistributing.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on M0LTE.FecLdpc:

Package Downloads
pdn-soundmodem

Headless soundcard packet modem core: IL2P/AX.25 framing and FEC now; demodulators, KISS TCP and DCD to follow.

M0LTE.Ofdm

A managed, codec2-compatible FreeDV datac OFDM modem for .NET: the modulator (per-symbol iDFT, cyclic prefix, Hilbert clipper, tx BPF, preamble/postamble, burst assembly), the demodulator with timing/frequency acquisition and streaming + burst sync, LDPC-protected framing and code-shortening for all six datac modes (datac0/1/3/4/13/14), and single-precision complex arithmetic matching the C reference's accumulation order. Ports of codec2 1.2.0 ofdm.c/ofdm_mode.c, validated against codec2-generated vectors and its own CLI. Extracted from the pdn-soundmodem packet-radio modem.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 675 7/17/2026