From 17c4ce2e393af597db3c04295c21afc7ce34aa22 Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Tue, 30 Aug 2016 22:03:15 -0700 Subject: [PATCH] pixman-filter: Made Gaussian a bit wider MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Expanded the size slightly (from ~4.25 to 5) to make the cutoff less noticable. Previouly the value at the cutoff was gaussian_filter(sqrt(2)*3/2) = 0.00626 which is larger than the difference between 8-bit pixels (1/255 = 0.003921). New cutoff is gaussian_filter(2.5) = 0.001089 which is smaller. v11: added some math to commit message v14: left SIGMA in there Signed-off-by: Bill Spitzak Acked-by: Oded Gabbay Reviewed-by: Søren Sandmann --- pixman/pixman-filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c index 3318893..5f3b752 100644 --- a/pixman/pixman-filter.c +++ b/pixman/pixman-filter.c @@ -143,7 +143,7 @@ static const filter_info_t filters[] = { PIXMAN_KERNEL_BOX, box_kernel, 1.0 }, { PIXMAN_KERNEL_LINEAR, linear_kernel, 2.0 }, { PIXMAN_KERNEL_CUBIC, cubic_kernel, 4.0 }, - { PIXMAN_KERNEL_GAUSSIAN, gaussian_kernel, 6 * SIGMA }, + { PIXMAN_KERNEL_GAUSSIAN, gaussian_kernel, 5.0 }, { PIXMAN_KERNEL_LANCZOS2, lanczos2_kernel, 4.0 }, { PIXMAN_KERNEL_LANCZOS3, lanczos3_kernel, 6.0 }, { PIXMAN_KERNEL_LANCZOS3_STRETCHED, nice_kernel, 8.0 }, -- 2.34.1