Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2020-06-18 06:41:19 +0300
committerRichard Antalik <richardantalik@gmail.com>2020-06-18 06:53:25 +0300
commit229ed078d1d0de27e8bc7d4665e560069463b7f8 (patch)
tree48f2806e962185655047830d6d0f94b8ad4534da /source/blender/blenkernel
parentf7f3b2d31823ac3f45b04d97cbed209eafbba15d (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.c4
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)