summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Reveman <davidr@novell.com>2005-07-01 10:36:49 +0000
committerDavid Reveman <davidr@novell.com>2005-07-01 10:36:49 +0000
commitc3d95a5eef97f2762ff83a30fca3c39971b38e87 (patch)
tree14cf55a529b4f2fe91852059de79c2b2e11d26bd
parent0f337a68eece15aa4166a1ab707c9905530e3856 (diff)
Remove normalization of convolution filters
-rw-r--r--ChangeLog5
-rw-r--r--src/glitz_filter.c12
2 files changed, 6 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index c497c23..ea7011c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-01 David Reveman <davidr@novell.com>
+
+ * src/glitz_filter.c (glitz_filter_set_params): Removed normalization
+ of convolution filters.
+
2005-06-29 David Reveman <davidr@novell.com>
* src/glx/glitz_glxint.h:
diff --git a/src/glitz_filter.c b/src/glitz_filter.c
index 81f7ff3..4ec4444 100644
--- a/src/glitz_filter.c
+++ b/src/glitz_filter.c
@@ -102,7 +102,7 @@ glitz_filter_set_params (glitz_surface_t *surface,
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, &params, &n_params);
@@ -122,7 +122,6 @@ glitz_filter_set_params (glitz_surface_t *surface,
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 @@ glitz_filter_set_params (glitz_surface_t *surface,
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;