When combining samples, take fp16 rounding into account.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 21 Feb 2015 01:27:14 +0000 (02:27 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 21 Feb 2015 01:27:14 +0000 (02:27 +0100)
commit42f0fd5ccbb3560a76d55f3e725416a5e0f93523
tree68784678f8f828ddd708aa7b1d298ce94ec26f57
parent3789397e29df3bade367c8963b050d8add510c0f
When combining samples, take fp16 rounding into account.

This makes us somewhat more conservative in combining samples;
when we are near the lower/right edges of the image, we are starting
to get close to 1.0, and fp16 just doesn't have enough precision
to give us the 6 or 8 bits of subpixel precision we want (it is
hardly enough to address individual pixels!). In particular, this
can affect zooming with ResampleEffect, as reported by Christophe
Thommeret.

This does not fix all cases (especially not non-power-of-two cases);
for that, we will probably need to be able to fall back to fp32
when we detect fp16 doesn't work well.
blur_effect.cpp
resample_effect.cpp
resample_effect_test.cpp
util.cpp
util.h