[Pixman] [PATCH 11/15] pixman-filter: made IMPULSE.IMPULSE not produce a zero-wide filter
Oded Gabbay
oded.gabbay at gmail.com
Tue Dec 22 04:21:16 PST 2015
On Sat, Dec 12, 2015 at 8:06 PM, <spitzak at gmail.com> wrote:
> From: Bill Spitzak <spitzak at gmail.com>
>
> With the other patch to put error on the center pixel, this produces
> the same result as BOX.IMPULSE filter.
> ---
> pixman/pixman-filter.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
> index 00126cd..64981cd 100644
> --- a/pixman/pixman-filter.c
> +++ b/pixman/pixman-filter.c
> @@ -327,7 +327,9 @@ pixman_filter_create_separable_convolution (int *n_values,
> subsample_y = (1 << subsample_bits_y);
>
> width = filter_width (reconstruct_x, sample_x, sx);
> + if (width < 1) width = 1;
Please put the assignment in a new line
> height = filter_width (reconstruct_y, sample_y, sy);
> + if (height < 1) height = 1;
Same comment
>
> *n_values = 4 + width * subsample_x + height * subsample_y;
>
> --
> 1.9.1
>
> _______________________________________________
> Pixman mailing list
> Pixman at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pixman
I have the same request as with the other patch (center pixel). I can
see the visual difference - the picture in scale demo doesn't
disappear when reconstruct & sample are IMPLUSE - but I would like
some additional explanation to better understand.
In which cases width/height are smaller than 1 ? How does that happen
? How this patch solves it ?
Oded
More information about the Pixman
mailing list