From c3d95a5eef97f2762ff83a30fca3c39971b38e87 Mon Sep 17 00:00:00 2001 From: David Reveman Date: Fri, 1 Jul 2005 10:36:49 +0000 Subject: Remove normalization of convolution filters --- ChangeLog | 5 +++++ src/glitz_filter.c | 12 +----------- 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 + + * src/glitz_filter.c (glitz_filter_set_params): Removed normalization + of convolution filters. + 2005-06-29 David Reveman * 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, ¶ms, &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; -- cgit v1.2.3