[MN-dev] [mndiff]: r95 - trunk/noe/galois.c
michael
subversion at mplayerhq.hu
Tue Oct 21 23:39:12 CEST 2008
Author: michael
Date: Tue Oct 21 23:39:11 2008
New Revision: 95
Log:
Avoid log2&fft overflow, fixes RS(65536, 32768).
Modified:
trunk/noe/galois.c
Modified: trunk/noe/galois.c
==============================================================================
--- trunk/noe/galois.c (original)
+++ trunk/noe/galois.c Tue Oct 21 23:39:11 2008
@@ -98,7 +98,7 @@ void EXT(prodPoly)(GFF4Element *dst, GFF
dst[i]= reduce(acc);
}
}else{
- const int logSize= noe_log2(order2 + order1)+1;
+ const int logSize= noe_log2(NOE_MIN(order2 + order1, 1<<(SHIFT-1)))+1;
const int size= 1<<logSize;
GFF4Element temp[2][size]; //FIXME is this fast?
const GFF4Element scale= inv(size);
@@ -218,7 +218,7 @@ void EXT(partialProdPoly)(GFF4Element *d
dst[i]= reduce(acc);
}
}else{
- const int logSize= noe_log2(order2 + order1)+1;
+ const int logSize= noe_log2(NOE_MIN(order2 + order1, 1<<(SHIFT-1)))+1;
const int size= 1<<logSize;
GFF4Element temp[size]; //FIXME is this fast?
const GFF4Element scale= inv(size);
More information about the Mndiff-dev
mailing list