[Pixman] [PATCH v10 12/15] pixman-filter: Made reconstruct==impulse and scale < 1 set scale to 1

Bill Spitzak spitzak at gmail.com
Thu Feb 4 19:59:05 PST 2016


On 02/04/2016 02:39 AM, Oded Gabbay wrote:
> On Tue, Feb 2, 2016 at 8:28 AM,  <spitzak at gmail.com> wrote:
>> From: Bill Spitzak <spitzak at gmail.com>
>>
>> This replaces settings that don't work (because the filter cannot be normalized)
>> with something that produces an image.
>>
>> v7: First version with this. Previously you got lots of strange garbage filters
>>   that depended on the implementation.
>>
>> v10: Moved code to filter_width function
>>
>> Signed-off-by: Bill Spitzak <spitzak at gmail.com>
>> ---
>>   pixman/pixman-filter.c | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c
>> index 520ce92..f28cc29 100644
>> --- a/pixman/pixman-filter.c
>> +++ b/pixman/pixman-filter.c
>> @@ -341,7 +341,10 @@ static int
>>   filter_width(pixman_kernel_t reconstruct, pixman_kernel_t sample,
>>               double* size, int* subsample_bits)
>>   {
>> -    int width = ceil (filters[reconstruct].width + *size * filters[sample].width);
>> +    int width;
>> +    if (reconstruct == PIXMAN_KERNEL_IMPULSE && *size < 1.0)
>> +       *size = 1.0;
>> +    width = ceil (filters[reconstruct].width + *size * filters[sample].width);
>>       if (width <= 1)
>>       {
>>          width = 1;
>> --
>> 1.9.1
>>
>> _______________________________________________
>> Pixman mailing list
>> Pixman at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/pixman
>
> I would need to see some form of test/example that is affected by this
> patch, as I don't have the knowledge to even ACK it.
>
> Otherwise, you will need to get someone else to review this (Soren ?).

This is just replacing useless output with less useless output. The 
caller can restrict the size to >= 1.0 to get the same thing, and I can 
just leave this producing garbage.




More information about the Pixman mailing list