Home | History | Annotate | Download | only in fec
      1 /* This function wraps around the fixed 8-bit encoder, performing the
      2  * basis transformations necessary to meet the CCSDS standard
      3  *
      4  * Copyright 2002, Phil Karn, KA9Q
      5  * fixed bug Aug 2007
      6  * May be used under the terms of the GNU Lesser General Public License (LGPL)
      7  */
      8 #include "ccsds.h"
      9 #include "fec.h"
     10 
     11 void encode_rs_ccsds(data_t *data,data_t *parity,int pad){
     12   int i;
     13   data_t cdata[NN-NROOTS];
     14 
     15   /* Convert data from dual basis to conventional */
     16   for(i=0;i<NN-NROOTS-pad;i++)
     17     cdata[i] = Tal1tab[data[i]];
     18 
     19   encode_rs_8(cdata,parity,pad);
     20 
     21   /* Convert parity from conventional to dual basis */
     22   for(i=0;i<NROOTS;i++)
     23     parity[i] = Taltab[parity[i]];
     24 }
     25