]> git.sesse.net Git - movit/commitdiff
Clip below-zero (out-of-gamut) colors in LiftGammaGainEffect.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 28 Sep 2013 22:16:48 +0000 (00:16 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 28 Sep 2013 22:16:48 +0000 (00:16 +0200)
pow(x, y) for x < 0 is undefined, and behaves differently on nVidia
and Intel. This can reasonably happen when having inputs from a different
gamut, or just a complex chain before the LGG effect; there's nothing
in Movit that prohibits out-of-sRGB-gamut colors. Thus, we need to detect
such inputs and clamp them.

We could in theory check for the special case of y=1 (no gamma change)
and allow negative values through then, but this wouldn't seem like a good
solution, especially if animating gamma.

Found and debugged by Christophe Thommeret.


No differences found