1 /* This function wraps around the fixed 8-bit encoder, performing the
2 * basis transformations necessary to meet the CCSDS standard
4 * Copyright 2002, Phil Karn, KA9Q
5 * May be used under the terms of the GNU General Public License (GPL)
11 void encode_rs_ccsds(unsigned char *data,unsigned char *parity){
13 unsigned char cdata[NN-NROOTS];
15 /* Convert data from dual basis to conventional */
16 for(i=0;i<NN-NROOTS;i++)
17 cdata[i] = Tal1tab[data[i]];
19 encode_rs_8(cdata,parity);
21 /* Convert parity from conventional to dual basis */
22 for(i=0;i<NN-NROOTS;i++)
23 parity[i] = Taltab[parity[i]];