+/** \file fec.c Forward error correction based on Vandermonde matrices. */
+
/*
- * fec.c -- forward error correction based on Vandermonde matrices
* 980624
* (C) 1997-98 Luigi Rizzo (luigi@iet.unipi.it)
*
* OF SUCH DAMAGE.
*/
+#include <regex.h>
+
#include "para.h"
#include "error.h"
#include "portable_io.h"
* 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)
{
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;
};