projects
/
paraslash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
catblob: Fix "no matches" message.
[paraslash.git]
/
fec.c
diff --git
a/fec.c
b/fec.c
index dc6e75209473c3eb14c9d52324707f5329d398d0..2301cc8d2d4653b8bc82a8bcc46b5867b5d7af14 100644
(file)
--- a/
fec.c
+++ b/
fec.c
@@
-74,7
+74,7
@@
static unsigned char gf_mul_table[GF_SIZE + 1][GF_SIZE + 1];
#define gf_mul(x,y) gf_mul_table[x][y]
/* Compute x % GF_SIZE without a slow divide. */
#define gf_mul(x,y) gf_mul_table[x][y]
/* Compute x % GF_SIZE without a slow divide. */
-static inline unsigned char modnn(int x)
+
__a_const
static inline unsigned char modnn(int x)
{
while (x >= GF_SIZE) {
x -= GF_SIZE;
{
while (x >= GF_SIZE) {
x -= GF_SIZE;
@@
-179,14
+179,18
@@
static void generate_gf(void)
* This is used often, so better optimize it! Currently the loop is unrolled 16
* times. The case c=0 is also optimized, whereas c=1 is not.
*/
* This is used often, so better optimize it! Currently the loop is unrolled 16
* times. The case c=0 is also optimized, whereas c=1 is not.
*/
-static void addmul(unsigned char *dst1, const unsigned char
const
*src1,
+static void addmul(unsigned char *dst1, const unsigned char *src1,
unsigned char c, int sz)
{
unsigned char c, int sz)
{
+ unsigned char *dst, *lim, *col;
+ const unsigned char *src = src1;
+
if (c == 0)
return;
if (c == 0)
return;
- unsigned char *dst = dst1, *lim = &dst[sz - UNROLL + 1],
- *col = gf_mul_table[c];
- const unsigned char const *src = src1;
+
+ dst = dst1;
+ lim = &dst[sz - UNROLL + 1];
+ col = gf_mul_table[c];
for (; dst < lim; dst += UNROLL, src += UNROLL) {
dst[0] ^= col[src[0]];
for (; dst < lim; dst += UNROLL, src += UNROLL) {
dst[0] ^= col[src[0]];