[MPlayer-cvslog] r19961 - trunk/libass/ass_bitmap.c

eugeni subversion at mplayerhq.hu
Sat Sep 23 19:54:25 CEST 2006


Author: eugeni
Date: Sat Sep 23 19:54:24 2006
New Revision: 19961

Modified:
   trunk/libass/ass_bitmap.c

Log:
Cosmetics. Change indentation of block of code to make it consistent with
the rest of the file.


Modified: trunk/libass/ass_bitmap.c
==============================================================================
--- trunk/libass/ass_bitmap.c	(original)
+++ trunk/libass/ass_bitmap.c	Sat Sep 23 19:54:24 2006
@@ -26,48 +26,48 @@
 
 static int generate_tables(ass_synth_priv_t* priv, double radius)
 {
-    double A = log(1.0/base)/(radius*radius*2);
-    int mx, i;
-    double volume_diff, volume_factor = 0;
-    unsigned volume;
-    
-    priv->g_r = ceil(radius);
-    priv->g_w = 2*priv->g_r+1;
-
-    if (priv->g_r) {
-	priv->g = malloc(priv->g_w * sizeof(unsigned));
-	priv->gt2 = malloc(256 * priv->g_w * sizeof(unsigned));
-	if (priv->g==NULL || priv->gt2==NULL) {
-	    return -1;
-	}
-    }
-
-    if (priv->g_r) {
-	// gaussian curve with volume = 256
-	for (volume_diff=10000000; volume_diff>0.0000001; volume_diff*=0.5){
-	    volume_factor+= volume_diff;
-	    volume=0;
-	    for (i = 0; i<priv->g_w; ++i) {
-		priv->g[i] = (unsigned)(exp(A * (i-priv->g_r)*(i-priv->g_r)) * volume_factor + .5);
-		volume+= priv->g[i];
-	    }
-	    if(volume>256) volume_factor-= volume_diff;
-	}
-	volume=0;
-	for (i = 0; i<priv->g_w; ++i) {
-	    priv->g[i] = (unsigned)(exp(A * (i-priv->g_r)*(i-priv->g_r)) * volume_factor + .5);
-	    volume+= priv->g[i];
-	}
-
-	// gauss table:
-	for(mx=0;mx<priv->g_w;mx++){
-	    for(i=0;i<256;i++){
-		priv->gt2[mx+i*priv->g_w] = i*priv->g[mx];
-	    }
-	}
-    }
-    
-    return 0;
+	double A = log(1.0/base)/(radius*radius*2);
+	int mx, i;
+	double volume_diff, volume_factor = 0;
+	unsigned volume;
+
+	priv->g_r = ceil(radius);
+	priv->g_w = 2*priv->g_r+1;
+
+	if (priv->g_r) {
+		priv->g = malloc(priv->g_w * sizeof(unsigned));
+		priv->gt2 = malloc(256 * priv->g_w * sizeof(unsigned));
+		if (priv->g==NULL || priv->gt2==NULL) {
+			return -1;
+		}
+	}
+
+	if (priv->g_r) {
+		// gaussian curve with volume = 256
+		for (volume_diff=10000000; volume_diff>0.0000001; volume_diff*=0.5){
+			volume_factor+= volume_diff;
+			volume=0;
+			for (i = 0; i<priv->g_w; ++i) {
+				priv->g[i] = (unsigned)(exp(A * (i-priv->g_r)*(i-priv->g_r)) * volume_factor + .5);
+				volume+= priv->g[i];
+			}
+			if(volume>256) volume_factor-= volume_diff;
+		}
+		volume=0;
+		for (i = 0; i<priv->g_w; ++i) {
+			priv->g[i] = (unsigned)(exp(A * (i-priv->g_r)*(i-priv->g_r)) * volume_factor + .5);
+			volume+= priv->g[i];
+		}
+
+		// gauss table:
+		for(mx=0;mx<priv->g_w;mx++){
+			for(i=0;i<256;i++){
+				priv->gt2[mx+i*priv->g_w] = i*priv->g[mx];
+			}
+		}
+	}
+
+	return 0;
 }
 
 static void resize_tmp(ass_synth_priv_t* priv, int w, int h)



More information about the MPlayer-cvslog mailing list