Files
rk35xx-android14/external/fec/encode_rs_ccsds.c
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

25 lines
676 B
C

/* 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<NN-NROOTS-pad;i++)
cdata[i] = Tal1tab[data[i]];
encode_rs_8(cdata,parity,pad);
/* Convert parity from conventional to dual basis */
for(i=0;i<NROOTS;i++)
parity[i] = Taltab[parity[i]];
}