Skip to content
Commit 6ae281fb authored by Bill Spitzak's avatar Bill Spitzak Committed by Søren Sandmann Pedersen
Browse files

pixman-filter: Correct Simpsons integration



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,0,6,0,6...,2,1.

With this fix the integration is accurate enough that the number of
samples could be reduced a lot. Multiples of 12 seem to work best.

v7: Merged with patch to reduce from 128 samples to 16
v9: Changed samples from 16 to 12
v10: Fixed rebase error that made it not compile
v11: minor whitespace change
v14: more whitespace changes

Signed-off-by: default avatarBill Spitzak <spitzak@gmail.com>
Reviewed-by: default avatarOded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: default avatarSøren Sandmann <soren.sandmann@gmail.com>
parent 6acaf2bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment