[MN-dev] [mndiff]: r181 - trunk/noe/rs.c

michael subversion at mplayerhq.hu
Wed Jun 23 12:35:02 CEST 2010


Author: michael
Date: Wed Jun 23 12:35:01 2010
New Revision: 181

Log:
A memcpy or 2 less if there are no errors.

Modified:
   trunk/noe/rs.c

Modified: trunk/noe/rs.c
==============================================================================
--- trunk/noe/rs.c	Wed Apr 14 20:26:30 2010	(r180)
+++ trunk/noe/rs.c	Wed Jun 23 12:35:01 2010	(r181)
@@ -424,11 +424,12 @@ for(i=0; i<erasureCount; i++){
     else if(errorCount + erasureCount > codeCount/64) gfftEval= 2;
     else                                    gfftEval= errorCount>20;
 
-    if(erasureCount)
+    if(erasureCount && errorCount){
         EXT(prodPoly)(psi, errorLocator, erasureLocator);
-    else
-        memcpy(psi, errorLocator, (errorLocator[0]+2)*sizeof(GFF4Element));
-    EXT(getDerivative)(psi, psi);
+        EXT(getDerivative)(psi, psi);
+    }else{
+        EXT(getDerivative)(psi, erasureCount ? erasureLocator : errorLocator);
+    }
 
     if(elfft){
         memset(errorLocator + errorCount+2, 0, (codeCount - errorCount - 1)*sizeof(GFF4Element));


More information about the Mndiff-dev mailing list