[MN-dev] [mndiff]: r104 - trunk/noe/mina.c

michael subversion at mplayerhq.hu
Wed Oct 22 12:56:54 CEST 2008


Author: michael
Date: Wed Oct 22 12:56:54 2008
New Revision: 104

Log:
Do not recalculate locator polynomes unless they changed.


Modified:
   trunk/noe/mina.c

Modified: trunk/noe/mina.c
==============================================================================
--- trunk/noe/mina.c	(original)
+++ trunk/noe/mina.c	Wed Oct 22 12:56:54 2008
@@ -129,6 +129,10 @@ int main(int argc, char* argv[]){
     int64_t (*erasure_list)[2]= NULL;
     int erasure_list_len=0;
     int verbose= 0;
+    GFF4Element  parityLocator[SIZE+2];
+    GFF4Element erasureLocator[SIZE+2];
+    GFF4Element tPoly[SIZE];
+    int parityCount=-1;
 
     noe_init_10001();
 
@@ -236,14 +240,14 @@ int main(int argc, char* argv[]){
             int n= SIZE - 1;
             int k= (i2 < n10_pos) + n0 + 1;
             GFF4Element code[n];
-            GFF4Element  parityLocator[n-k+2];
-            GFF4Element erasureLocator[n-k+2];
-            GFF4Element tPoly[n-k];
             int erased[n-k];
 
-             parityLocator[0]= 0;
+            if(parityCount != n-k){
+                parityLocator[0]= 0;
+                tPoly[0]= 0;
+                parityCount = n-k;
+            }
             erasureLocator[0]= 0;
-            tPoly[0]= 0;
 
             for(j=0; j<n; j++)
                 code[j]= (buffer[2*(j*buffersize + i2 - i)  ]<<8)



More information about the Mndiff-dev mailing list