31 #error "NROOTS not defined"
35 #error "NN not defined"
39 #error "PAD not defined"
42 #if !defined(ALPHA_TO)
43 #error "ALPHA_TO not defined"
46 #if !defined(INDEX_OF)
47 #error "INDEX_OF not defined"
51 #error "MODNN not defined"
55 #error "FCR not defined"
59 #error "PRIM not defined"
63 #define NULL ((void *)0)
67 #define MIN(a,b) ((a) < (b) ? (a) : (b))
115 for (
i = 1;
i < no_eras;
i++) {
117 for (
j =
i+1;
j > 0;
j--) {
129 for(
i=1;
i<=no_eras;
i++)
135 for (
j = 1;
j <= no_eras;
j++)
147 if (
count != no_eras) {
148 fprintf(stderr,
"count = %d no_eras = %d\n lambda(x) is WRONG\n",
count,no_eras);
153 fprintf(stderr,
"\n Erasure positions as determined by roots of Eras Loc Poly:\n");
155 fprintf(stderr,
"%d ",
loc[
i]);
156 fprintf(stderr,
"\n");
172 for (
i = 0;
i <
r;
i++){
191 if (2 *
el <=
r + no_eras - 1) {
192 el =
r + no_eras -
el;
230 fprintf(stderr,
"count %d root %d loc %d\n",
count,
i,
k);
255 for(
j=
i;
j >= 0;
j--){
282 fprintf(stderr,
"\n ERROR: denominator = 0\n");
293 if(eras_pos !=
NULL){
295 eras_pos[
i] =
loc[
i];
#define NN
Definition: char.h:11
#define FCR
Definition: char.h:16
#define PAD
Definition: char.h:19
#define MODNN(x)
Definition: char.h:8
#define NROOTS
Definition: char.h:15
#define INDEX_OF
Definition: char.h:13
#define PRIM
Definition: char.h:17
#define IPRIM
Definition: char.h:18
unsigned char data_t
Definition: char.h:6
#define ALPHA_TO
Definition: char.h:12
data_t q
Definition: decode_rs.h:74
#define NULL
Definition: decode_rs.h:63
data_t num2
Definition: decode_rs.h:74
#define A0
Definition: decode_rs.h:69
data_t lambda[NROOTS+1]
Definition: decode_rs.h:75
data_t num1
Definition: decode_rs.h:74
data_t reg[NROOTS+1]
Definition: decode_rs.h:78
data_t loc[NROOTS]
Definition: decode_rs.h:78
int j
Definition: decode_rs.h:73
#define MIN(a, b)
Definition: decode_rs.h:67
int syn_error
Definition: decode_rs.h:79
int r
Definition: decode_rs.h:73
data_t den
Definition: decode_rs.h:74
deg_omega
Definition: decode_rs.h:252
data_t discr_r
Definition: decode_rs.h:74
el
Definition: decode_rs.h:168
data_t s[NROOTS]
Definition: decode_rs.h:75
data_t u
Definition: decode_rs.h:74
data_t tmp
Definition: decode_rs.h:74
data_t t[NROOTS+1]
Definition: decode_rs.h:77
int k
Definition: decode_rs.h:73
int i
Definition: decode_rs.h:71
data_t omega[NROOTS+1]
Definition: decode_rs.h:77
data_t root[NROOTS]
Definition: decode_rs.h:78
int count
Definition: decode_rs.h:79
deg_lambda
Definition: decode_rs.h:209
data_t b[NROOTS+1]
Definition: decode_rs.h:77