On Wed, Feb 10, 2016 at 1:25 AM, <[email protected]> wrote: > From: Bill Spitzak <[email protected]> > > 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. There should be spaces before the parentheses in the SAMPLE() macros, though. Søren
_______________________________________________ Pixman mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/pixman
