[MN-dev] [mndiff]: r114 - trunk/noe/galois.c

michael subversion at mplayerhq.hu
Sat Oct 25 19:33:08 CEST 2008


Author: michael
Date: Sat Oct 25 19:33:07 2008
New Revision: 114

Log:
Faster evalPoly()


Modified:
   trunk/noe/galois.c

Modified: trunk/noe/galois.c
==============================================================================
--- trunk/noe/galois.c	(original)
+++ trunk/noe/galois.c	Sat Oct 25 19:33:07 2008
@@ -258,8 +258,13 @@ GFF4Element EXT(evalPoly)(GFF4Element *s
     unsigned int acc=src[ src[0] + 1 ];
     int j;
 
+    if(M || x==MINUS1){
     for(j=src[0]; j>0; j--)
         acc = sum(prod(acc, x), src[j]);
+    }else{
+        for(j=src[0]; j>0; j--)
+            acc = reduce(acc*x + src[j]);
+    }
 
     return acc;
 }



More information about the Mndiff-dev mailing list