Go to the documentation of this file.
61 #define NN ((1 << MM) - 1)
66 typedef unsigned int dtype;
102 #define min(a,b) (((a) < (b)) ? (a) : (b))
gf Index_of[NN+1]
Definition: rs.c:152
void generate_gf(void)
These two functions must be called in this order (e.g., by init_rs()) before any encoding/decoding.
Definition: rs.c:242
int encode_rs(dtype data[], dtype bb[])
Reed-Solomon encoding data[] is the input block, parity symbols are placed in bb[] bb[] may lie past ...
#define A0
Definition: rs.c:157
static gf modnn(int x)
Definition: rs.c:170
int eras_dec_rs(dtype *data, int *eras_pos, int no_eras)
Definition: rs.c:367
int encode_rs(dtype *data, dtype *bb)
Definition: rs.c:324
#define NN
Definition: rs.h:61
void gen_poly(void)
Definition: rs.c:289
#define COPYDOWN(a, b, n)
Definition: rs.c:192
#define COPY(a, b, n)
Definition: rs.c:187
#define MM
Global definitions for Reed-Solomon encoder/decoder Phil Karn KA9Q, September 1996.
Definition: rs.h:57
int gf
Reed-Solomon coding and decoding Phil Karn (karn@ka9q.ampr.org) September 1996.
Definition: rs.c:74
void generate_gf(void)
These two functions must be called in this order (e.g., by init_rs()) before any encoding/decoding.
Definition: rs.c:242
gf Alpha_to[NN+1]
Definition: rs.c:149
#define CLEAR(a, n)
Definition: rs.c:181
void init_rs(int k)
Initialization function.
Definition: rs.c:198
void init_rs(int)
Initialization function.
Definition: rs.c:198
#define B0
Definition: rs.c:146
gf Gg[NN - 1]
Definition: rs.c:164
unsigned char dtype
Definition: rs.h:64
static int KK
Definition: rs.c:77
int eras_dec_rs(dtype data[], int eras_pos[], int no_eras)
Reed-Solomon erasures-and-errors decoding The received block goes into data[], and a list of zero-ori...
Functions used to compute Reed-Solomon parity and check of byte arrays.
#define min(a, b)
Computes the minimum between two integers.
Definition: rs.h:102
int Pp[MM+1]
Definition: rs.c:107
void gen_poly(void)
Definition: rs.c:289