[MPlayer-cvslog] CVS: main/libmpcodecs vf_noise.c,1.17,1.18

Richard Felker CVS syncmail at mplayerhq.hu
Mon Apr 3 08:25:32 CEST 2006


CVS change done by Richard Felker CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv19871

Modified Files:
	vf_noise.c 
Log Message:
move 12k from data to bss (reduce binary size by 12k)

Index: vf_noise.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_noise.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- vf_noise.c	21 Mar 2006 21:26:41 -0000	1.17
+++ vf_noise.c	3 Apr 2006 06:25:30 -0000	1.18
@@ -65,7 +65,8 @@
 	unsigned int outfmt;
 };
 
-static int nonTempRandShift[MAX_RES]= {-1};
+static int nonTempRandShift_init;
+static int nonTempRandShift[MAX_RES];
 
 static int patt[4] = {
     -1,0,1,0
@@ -128,10 +129,11 @@
 	    for (j = 0; j < 3; j++)
 		fp->prev_shift[i][j] = noise + (rand()&(MAX_SHIFT-1));
 
-	if(nonTempRandShift[0]==-1){
+	if(!nonTempRandShift_init){
 		for(i=0; i<MAX_RES; i++){
 			nonTempRandShift[i]= rand()&(MAX_SHIFT-1);
 		}
+		nonTempRandShift_init = 1;
 	}
 
 	fp->noise= noise;




More information about the MPlayer-cvslog mailing list