1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
/*C
(c) 2005 bl0rg.net
**/
#ifndef FEC_H__
#define FEC_H__
#include "galois.h"
/*M
\emph{FEC parameter structure.}
Contains the $n, k$ parameters for FEC, as well as the generator
matrix.
**/
typedef struct fec_s {
/*M
FEC parameters.
**/
unsigned int k, n;
/*M
Linear block code generator matrix.
**/
gf *gen_matrix;
} fec_t;
void fec_free(fec_t *fec);
fec_t *fec_new(unsigned int k, unsigned int n);
void fec_encode(fec_t *fec,
gf *src[], gf *dst,
unsigned int idx, unsigned int len);
int fec_decode(fec_t *fec,
gf *buf,
unsigned int idxs[], unsigned len);
/*C
**/
#endif /* FEC_H__ */
|