[cairo-commit] glitz/src glitz_filter.c,1.8,1.9
David Reveman
commit at pdx.freedesktop.org
Fri Jul 1 03:36:51 PDT 2005
Committed by: davidr
Update of /cvs/cairo/glitz/src
In directory gabe:/tmp/cvs-serv30058/src
Modified Files:
glitz_filter.c
Log Message:
Remove normalization of convolution filters
Index: glitz_filter.c
===================================================================
RCS file: /cvs/cairo/glitz/src/glitz_filter.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- glitz_filter.c 25 Jan 2005 19:50:26 -0000 1.8
+++ glitz_filter.c 1 Jul 2005 10:36:49 -0000 1.9
@@ -102,7 +102,7 @@
switch (filter) {
case GLITZ_FILTER_CONVOLUTION: {
- glitz_float_t dm, dn, sum;
+ glitz_float_t dm, dn;
int cx, cy, m, n, j;
_glitz_filter_params_set (&dm, 3.0f, ¶ms, &n_params);
@@ -122,7 +122,6 @@
cx = m / 2;
cy = n / 2;
- sum = 0.0f;
for (i = 0; i < m; i++) {
glitz_vec4_t *vec;
glitz_float_t weight;
@@ -135,18 +134,9 @@
vec->v[1] = (cy - j) * surface->texture.texcoord_height_unit;
vec->v[2] = weight;
vec->v[3] = 0.0f;
- sum += weight;
}
}
}
-
- /* normalize */
- if (sum != 0.0f)
- sum = 1.0f / sum;
-
- for (i = 0; i < surface->filter_params->id; i++)
- vecs[i].v[2] *= sum;
-
} break;
case GLITZ_FILTER_GAUSSIAN: {
glitz_float_t radius, sigma, alpha, scale, xy_scale, sum;
More information about the cairo-commit
mailing list