diff options
author | Richard Antalik <richardantalik@gmail.com> | 2020-06-18 06:41:19 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2020-06-18 06:53:25 +0300 |
commit | 229ed078d1d0de27e8bc7d4665e560069463b7f8 (patch) | |
tree | 48f2806e962185655047830d6d0f94b8ad4534da /source | |
parent | f7f3b2d31823ac3f45b04d97cbed209eafbba15d (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')
-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 d2f31241f01..1f5662eef21 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -2315,7 +2315,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) |