On Fri, Mar 4, 2016 at 3:00 PM, Søren Sandmann
wrote:
> On Wed, Feb 10, 2016 at 1:25 AM, wrote:
>
>> From: Bill Spitzak
>>
>> Simpsons uses cubic curve fitting, with 3 samples defining each cubic.
>> This
>> makes the weights of the samples be in a pattern of 1,4,2,4,2...4,1, and
>> then
>> dividing the result by 3.
>>
>> The previous code was using weights of 1,2,6,6...6,2,1. Since it divided
>> by
>> 3 this produced about 2x the desired value (the normalization fixed this).
>> Also this is effectively a linear interpolation, not Simpsons integration.
>>
>
> It is not true that the previous code used these weights because it only
> ran for half the segments (it had += 2). The intention with the code was to
> do both the 4 and the 2 weight in one loop, but for that to work a1 and a2
> would have to be updated, which the code didn't do. So it was indeed buggy,
> and I think the new code is correct.
>
You are right, the old code did weights of 1,2,0,6,0,6,...,2,1. This would
explain why it worked even when I removed normalization.
There should be spaces before the parentheses in the SAMPLE() macros,
> though.
>
Ok will fix.
___
Pixman mailing list
Pixman@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pixman