summaryrefslogtreecommitdiffstats
path: root/gst/effectv/gstaging.c
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-03-15 19:32:27 +0000
commit6cc1c73d2baa95c46edc04f57cbe9ed690dc2f21 (patch)
tree82b5546809a42a56a7bc18bacf8ed6e209ad006e /gst/effectv/gstaging.c
parentd07ec45fa47fbd0e36224e11bcd8ba2faee1a78c (diff)
don't mix tabs and spaces
Original commit message from CVS: don't mix tabs and spaces
Diffstat (limited to 'gst/effectv/gstaging.c')
-rw-r--r--gst/effectv/gstaging.c46
1 files changed, 24 insertions, 22 deletions
diff --git a/gst/effectv/gstaging.c b/gst/effectv/gstaging.c
index 44683546..ee264119 100644
--- a/gst/effectv/gstaging.c
+++ b/gst/effectv/gstaging.c
@@ -60,7 +60,8 @@ typedef struct _scratch
gint x;
gint dx;
gint init;
-} scratch;
+}
+scratch;
static int dx[8] = { 1, 1, 0, -1, -1, -1, 0, 1 };
static int dy[8] = { 0, -1, -1, -1, 0, 1, 1, 1 };
@@ -129,8 +130,9 @@ gst_agingtv_get_type (void)
0,
gst_agingtv_init,
};
+
agingtv_type = g_type_register_static (GST_TYPE_VIDEOFILTER,
- "GstAgingTV", &agingtv_info, 0);
+ "GstAgingTV", &agingtv_info, 0);
}
return agingtv_type;
}
@@ -155,7 +157,7 @@ gst_agingtv_base_init (gpointer g_class)
for (i = 0; i < G_N_ELEMENTS (gst_agingtv_formats); i++) {
gst_videofilter_class_add_format (videofilter_class,
- gst_agingtv_formats + i);
+ gst_agingtv_formats + i);
}
gst_videofilter_class_add_pad_templates (GST_VIDEOFILTER_CLASS (g_class));
@@ -173,7 +175,7 @@ gst_agingtv_class_init (gpointer g_class, gpointer class_data)
#if 0
g_object_class_install_property (gobject_class, ARG_METHOD,
g_param_spec_enum ("method", "method", "method",
- GST_TYPE_AGINGTV_METHOD, GST_AGINGTV_METHOD_1, G_PARAM_READWRITE));
+ GST_TYPE_AGINGTV_METHOD, GST_AGINGTV_METHOD_1, G_PARAM_READWRITE));
#endif
gobject_class->set_property = gst_agingtv_set_property;
@@ -249,35 +251,35 @@ scratching (scratch * scratches, gint scratch_lines, guint32 * dest, gint width,
scratch->x = scratch->x + scratch->dx;
if (scratch->x < 0 || scratch->x > width * 256) {
- scratch->life = 0;
- break;
+ scratch->life = 0;
+ break;
}
p = dest + (scratch->x >> 8);
if (scratch->init) {
- y1 = scratch->init;
- scratch->init = 0;
+ y1 = scratch->init;
+ scratch->init = 0;
} else {
- y1 = 0;
+ y1 = 0;
}
scratch->life--;
if (scratch->life) {
- y2 = height;
+ y2 = height;
} else {
- y2 = fastrand () % height;
+ y2 = fastrand () % height;
}
for (y = y1; y < y2; y++) {
- a = *p & 0xfefeff;
- a += 0x202020;
- b = a & 0x1010100;
- *p = a | (b - (b >> 8));
- p += width;
+ a = *p & 0xfefeff;
+ a += 0x202020;
+ b = a & 0x1010100;
+ *p = a | (b - (b >> 8));
+ p += width;
}
} else {
if ((fastrand () & 0xf0000000) == 0) {
- scratch->life = 2 + (fastrand () >> 27);
- scratch->x = fastrand () % (width * 256);
- scratch->dx = ((int) fastrand ()) >> 23;
- scratch->init = (fastrand () % (height - 1)) + 1;
+ scratch->life = 2 + (fastrand () >> 27);
+ scratch->x = fastrand () % (width * 256);
+ scratch->dx = ((int) fastrand ()) >> 23;
+ scratch->init = (fastrand () % (height - 1)) + 1;
}
}
}
@@ -311,7 +313,7 @@ dusts (guint32 * dest, gint width, gint height, gint dust_interval,
x += dx[d];
if (y >= height || x >= width)
- break;
+ break;
d = (d + fastrand () % 3 - 1) & 7;
}
@@ -350,7 +352,7 @@ pits (guint32 * dest, gint width, gint height, gint area_scale,
y = y + fastrand () % 3 - 1;
if (y >= height || x >= width)
- break;
+ break;
dest[y * width + x] = 0xc0c0c0;
}