changeset 18030:ec68026bc1d0

move 12k from data to bss (reduce binary size by 12k)
author rfelker
date Mon, 03 Apr 2006 06:25:30 +0000
parents 9850cdb149f4
children 6cf40de0bd39
files libmpcodecs/vf_noise.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_noise.c	Mon Apr 03 04:58:34 2006 +0000
+++ b/libmpcodecs/vf_noise.c	Mon Apr 03 06:25:30 2006 +0000
@@ -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;