From: drowe67 Date: Mon, 12 Sep 2016 07:32:11 +0000 (+0000) Subject: about to clen up, renamef from ra_enc.c X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=d1fb319a483eb12b8a5a43bf4a14870d572cf021;p=freetel-svn-tracking.git about to clen up, renamef from ra_enc.c git-svn-id: https://svn.code.sf.net/p/freetel/code@2855 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/src/ldpc_enc.c b/codec2-dev/src/ldpc_enc.c new file mode 100644 index 00000000..c7d03311 --- /dev/null +++ b/codec2-dev/src/ldpc_enc.c @@ -0,0 +1,68 @@ +/* RA encoder program; Bill, March 2016 + Using the elegant back substitution of RA LDPC codes. + This version does not store the data in bytes! */ + + +#include +#include + +#define Nibits 2064 +#define Npbits 516 +#define Nwt 12 + +/* generated by ldpc_fsk_lib.m:ldpc_decode() */ + +#include "ldpc_code.h" + +unsigned char ibits[Nibits]; // info array +unsigned char pbits[Npbits]; // parity array + +void encode() { + unsigned int p, i, tmp, par, prev=0; + int ind; + + for (p=0; p