[MN-dev] [mndiff]: r153 - trunk/noe/ldpc.c

michael subversion at mplayerhq.hu
Fri Apr 24 21:32:26 CEST 2009


Author: michael
Date: Fri Apr 24 21:32:26 2009
New Revision: 153

Log:
Rename row to row_weight, the new name is better.

Modified:
   trunk/noe/ldpc.c

Modified: trunk/noe/ldpc.c
==============================================================================
--- trunk/noe/ldpc.c	Fri Apr 24 21:28:48 2009	(r152)
+++ trunk/noe/ldpc.c	Fri Apr 24 21:32:26 2009	(r153)
@@ -119,7 +119,7 @@ static int inverse(ELEM *matrix, int wid
 
 LDPCContext *EXT(initLDPC)(int data_len, int parity_len, uint32_t seed, int nzc){
     LDPCContext *c= malloc(sizeof(LDPCContext));
-    int row[parity_len];
+    int row_weight[parity_len];
     KISSState kiss;
     int i, j, y;
     int code_len= data_len + parity_len;
@@ -147,7 +147,7 @@ LDPCContext *EXT(initLDPC)(int data_len,
     c->   inv_matrix= malloc(parity_len*(parity_len+1) * sizeof(*c->inv_matrix)*2);
 //FIXME could we in theory need more space?
 
-    memset(row, 0, sizeof(row));
+    memset(row_weight, 0, sizeof(row_weight));
     memset(tab, 0, parity_len);
     for(i=0; i<code_len; i++){
         for(j=0; j<nzc; j++){
@@ -155,12 +155,12 @@ LDPCContext *EXT(initLDPC)(int data_len,
 
             if(i<data_len || seed>0){
                 for(y=0; y<parity_len; y++){
-                    if(row[y] < minrow)
-                        minrow= row[y];
+                    if(row_weight[y] < minrow)
+                        minrow= row_weight[y];
                 }
             do{
                 y= get_random(&kiss)%parity_len;
-            }while(tab[y] || (row[y] > minrow + (SIZE == 2)));
+            }while(tab[y] || (row_weight[y] > minrow + (SIZE == 2)));
             }else{
                 y= i + j - data_len;
                 if(y >= parity_len){
@@ -171,7 +171,7 @@ LDPCContext *EXT(initLDPC)(int data_len,
             tab[y]=1;
             c->parity_matrix[i][0][j] = y;
             c->parity_matrix[i][1][j] = EXT(log)[get_random(&kiss)%(SIZE-1)+1];
-            row[y]++;
+            row_weight[y]++;
         }
         for(j=0; j<nzc; j++)
             tab[ c->parity_matrix[i][0][j] ]= 0;



More information about the Mndiff-dev mailing list