#ifndef _GALOIS_H #define _GALOIS_H #include #include #ifdef __cplusplus extern "C" { #endif /*** *** galois.c *** * This is currently the hardcoded GF(2**8). * int32_t gives abundant space for the GF. * Squeezing it down to uint8 won't probably gain much, * so we implement this defensively here. * * Note that some performance critical stuff needs to * be #included from galois-inlines.h */ /* Galois field parameters for 8bit symbol Reed-Solomon code */ #define GF_SYMBOLSIZE 8 #define GF_FIELDSIZE (1<= GF_FIELDMAX) { x -= GF_FIELDMAX; x = (x >> GF_SYMBOLSIZE) + (x & GF_FIELDMAX); } return x; } GaloisTables* CreateGaloisTables(int32_t a); void FreeGaloisTables(GaloisTables *a); ReedSolomonTables *CreateReedSolomonTables(GaloisTables *a, int32_t b, int32_t c, int d); void FreeReedSolomonTables(ReedSolomonTables *a); #ifdef __cplusplus } #endif #endif