[MN-dev] [mndiff]: r183 - trunk/noe/galois.c
michael
subversion at mplayerhq.hu
Tue Jun 29 22:15:33 CEST 2010
Author: michael
Date: Tue Jun 29 22:15:33 2010
New Revision: 183
Log:
Improve speed of prodPoly()
Modified:
trunk/noe/galois.c
Modified: trunk/noe/galois.c
==============================================================================
--- trunk/noe/galois.c Thu Jun 24 15:01:06 2010 (r182)
+++ trunk/noe/galois.c Tue Jun 29 22:15:33 2010 (r183)
@@ -98,7 +98,7 @@ void EXT(prodPoly)(GFF4Element *dst, GFF
dst[i]= reduce(acc);
}
}else{
- const int logSize= noe_log2(NOE_MIN(order, 1<<(SHIFT-1)))+1;
+ const int logSize= noe_log2(NOE_MIN(order-1, 1<<(SHIFT-1)))+1;
const int size= 1<<logSize;
GFF4Element temp[2][size]; //FIXME is this fast?
const GFF4Element scale= inv(size);
@@ -117,6 +117,11 @@ void EXT(prodPoly)(GFF4Element *dst, GFF
}
EXT(igfft)(temp[0], temp[0], logSize);
+ if(size == order){
+ temp[0][order]= diff(temp[0][0], prod(src1[0], src2[0]));
+ temp[0][ 0]= diff(temp[0][0], temp[0][order]);
+ }
+
memcpy(dst, temp[0], sizeof(GFF4Element)*(order+1));
}
}
More information about the Mndiff-dev
mailing list