[Pixman] [PATCH pixman 04/13] pixman-filter: put error on center of odd-sized filters

Bill Spitzak spitzak at gmail.com
Thu Sep 11 19:16:44 PDT 2014


This fixes the "dots" results you got if the image was scaled larger and 
IMPULSE used as the sampling filter.

On 09/11/2014 07:12 PM, Bill Spitzak wrote:
> ---
>   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 a9af72c..816d085 100644
> --- a/pixman/pixman-filter.c
> +++ b/pixman/pixman-filter.c
> @@ -294,7 +294,7 @@ create_1d_filter (int             *width,
>   	}
>
>   	if (new_total != pixman_fixed_1)
> -	    *(p - *width / 2) += (pixman_fixed_1 - new_total);
> +	    *(p - (*width + 1) / 2) += (pixman_fixed_1 - new_total);
>       }
>
>       return params;
>


More information about the Pixman mailing list