diff options
author | Richard Antalik <richardantalik@gmail.com> | 2020-06-18 06:41:19 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-06-25 10:32:27 +0300 |
commit | 5f01048dcb9a146f2ffc6273f18c5d0553b3f6f1 (patch) | |
tree | 50057a5fbf4c922a3ea83c395f5acef6a36b9f0b /source/blender/blenkernel | |
parent | 945e18f037108c2767617ddba339e0f7938329d8 (diff) |
Fix T75414: Incorrect masking in Color Balance modifier
Color balance factor was infinity. Clamp to +/- `FLT_MAX`
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7884
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index d0527a2635a..dc27ca9e6cb 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -2342,7 +2342,9 @@ MINLINE float color_balance_fl( x = 0.f; } - return powf(x, gamma) * mul; + x = powf(x, gamma) * mul; + CLAMP(x, FLT_MIN, FLT_MAX); + return x; } static void make_cb_table_float(float lift, float gain, float gamma, float *table, float mul) |