lib/libfec/decode_rs.h
NULL
((void*)0)
if
if
if
MIN
a
b
((a) < (b) ? (a) : (b))
for
A0
(NN)
int int i i { int deg_lambda, el, deg_omega for for for for for for if while
int int j j for for for for for if
int r r = no_eras while
int int k k for if
data_t data_t u u if
data_t data_t q q for if
data_t data_t tmp tmp for if
data_t data_t num1 num1 for
data_t data_t num2 num2 for
data_t data_t den den for
data_t data_t discr_r discr_r while
data_t lambda[0] [NROOTS+1] lambda = 1 for for if lambda reg while
data_t data_t s[NROOTS] [NROOTS] s for for while
data_t data_t b[NROOTS+1] [NROOTS+1] b while
data_t data_t t[NROOTS+1] [NROOTS+1] t while
data_t data_t omega[NROOTS+1] [NROOTS+1] omega for for
data_t data_t root[NROOTS] [NROOTS] root for for if
data_t data_t reg[NROOTS+1] [NROOTS+1] reg for if reg
data_t data_t loc[NROOTS] [NROOTS] loc for for if
int syn_error syn_error = 0 if
int count count = 0 for for if if if reg
el
el
= no_eras
while
deg_lambda
deg_lambda
= 0
for
for
if
deg_omega
deg_omega
= deg_lambda - 1
for
for
finish finish __pad0__ __pad0__
for
(i=0;i< NROOTS;i++) s[i]
for
= INDEX_OF[lambda[i]]
ALPHA_TO
FCR
i
INDEX_OF
j
MODNN
NN
NROOTS
PAD
PRIM
s
if
(!syn_error)
if
! syn_error
count
syn_error
memset &[1] memset &[1] lambda (lambda[0]) lambda lambda [0] lambda NROOTS
if
(no_eras > 0)
if
no_eras
0
A0
ALPHA_TO
count
i
INDEX_OF
IPRIM
j
k
lambda
loc
MODNN
NN
PRIM
q
reg
root
tmp
u
while
(++r<=NROOTS)
while
++r<= NROOTS
A0
ALPHA_TO
b
discr_r
el
i
INDEX_OF
lambda
MODNN
NN
NROOTS
r
s
t
memcpy &[1][1] memcpy &[1][1] reg (reg[0]) reg reg [0] count lambda NROOTS reg
for
(i=1, k=IPRIM - 1;i<=NN;i++, k=MODNN(k+IPRIM))
for
i 1
k IPRIM - 1;i<=NN;i++
k MODNN(k+IPRIM)
A0
ALPHA_TO
count
deg_lambda
i
IPRIM
j
k
loc
MODNN
NN
q
reg
root
if
(deg_lambda !=count)
if
deg_lambda ! count
count
deg_lambda
for
(i=0;i<=deg_omega;i++)
for
i 0;i<=deg_omega;i++
A0
ALPHA_TO
deg_omega
i
INDEX_OF
j
lambda
MODNN
omega
s
tmp
for
(j=count - 1;j >=0;j--)
for
j count - 1;j >=0;j--
A0
ALPHA_TO
count
deg_lambda
deg_omega
den
FCR
i
INDEX_OF
j
lambda
loc
MIN
MODNN
NN
NROOTS
num1
num2
omega
PAD
root