From a31630e0d5b9880c716d9004ef4154396ba41ebc Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Thu, 2 Jan 2014 21:55:13 +0100 Subject: Extract fec-3.0.1 --- encode_rs_ccsds.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 encode_rs_ccsds.c (limited to 'encode_rs_ccsds.c') diff --git a/encode_rs_ccsds.c b/encode_rs_ccsds.c new file mode 100644 index 0000000..5a2ec70 --- /dev/null +++ b/encode_rs_ccsds.c @@ -0,0 +1,24 @@ +/* This function wraps around the fixed 8-bit encoder, performing the + * basis transformations necessary to meet the CCSDS standard + * + * Copyright 2002, Phil Karn, KA9Q + * fixed bug Aug 2007 + * May be used under the terms of the GNU Lesser General Public License (LGPL) + */ +#include "ccsds.h" +#include "fec.h" + +void encode_rs_ccsds(data_t *data,data_t *parity,int pad){ + int i; + data_t cdata[NN-NROOTS]; + + /* Convert data from dual basis to conventional */ + for(i=0;i