From 553e8203879d163e6fe2f3a8f6b80a44749514c1 Mon Sep 17 00:00:00 2001 From: Christian König Date: Mon, 13 Feb 2012 11:41:23 +0100 Subject: vl: fix low strength denoise filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A filter strength of zero or one doesn't make any sense. Thanks to Andy Furniss for pointing this out. Signed-off-by: Christian König --- src/gallium/auxiliary/vl/vl_median_filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/auxiliary/vl') diff --git a/src/gallium/auxiliary/vl/vl_median_filter.c b/src/gallium/auxiliary/vl/vl_median_filter.c index 0129013f637..6a03f95855b 100644 --- a/src/gallium/auxiliary/vl/vl_median_filter.c +++ b/src/gallium/auxiliary/vl/vl_median_filter.c @@ -165,7 +165,7 @@ generate_offsets(enum vl_median_filter_shape shape, unsigned size, assert(offsets && num_offsets); /* size needs to be odd */ - size = align(size, 2) - 1; + size = align(size + 1, 2) - 1; half_size = size >> 1; switch(shape) { @@ -249,7 +249,7 @@ vl_median_filter_init(struct vl_median_filter *filter, struct pipe_context *pipe assert(filter && pipe); assert(width && height); - assert(size > 0 && size < 20); + assert(size > 1 && size < 20); memset(filter, 0, sizeof(*filter)); filter->pipe = pipe; -- cgit v1.2.3