From: Steinar H. Gunderson Date: Sat, 28 Sep 2013 22:16:48 +0000 (+0200) Subject: Clip below-zero (out-of-gamut) colors in LiftGammaGainEffect. X-Git-Tag: 1.0~115 X-Git-Url: https://git.sesse.net/?p=movit;a=commitdiff_plain;h=58e7b9a8164bdaad7b0c698b2d0d80db53d79a5c;hp=58e7b9a8164bdaad7b0c698b2d0d80db53d79a5c Clip below-zero (out-of-gamut) colors in LiftGammaGainEffect. 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. ---