X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=fec.c;h=fe02487dee71c405e69892deb2e601a518e00bdc;hp=043a1f21869617869d2c6d0573bf71777611e2a3;hb=11f3700b4d2e932a31f953e1590ad5d64d1aa2d6;hpb=c19a0921ea3a8cd9d0e35cb2b09748c3f9f607ef diff --git a/fec.c b/fec.c index 043a1f21..fe02487d 100644 --- a/fec.c +++ b/fec.c @@ -214,7 +214,7 @@ static void matmul(unsigned char *a, unsigned char *b, unsigned char *c, * Compute the inverse of a matrix. * * k is the size of the matrix 'src' (Gauss-Jordan, adapted from Numerical - * Recipes in C). Returns -1 if 'src' is singular. + * Recipes in C). Returns negative on errors. */ static int invert_mat(unsigned char *src, int k) { @@ -394,8 +394,13 @@ static void init_fec(void) fec_initialized = 1; } +/** Internal FEC parameters. */ struct fec_parms { - int k, n; /* parameters of the code */ + /** Number of data slices. */ + int k; + /** Number of slices (including redundant slices). */ + int n; + /** The encoding matrix, computed by init_fec(). */ unsigned char *enc_matrix; };