[Bf-blender-cvs] [229ed078d1d] master: Fix T75414: Incorrect masking in Color Balance modifier
Richard Antalik
noreply at git.blender.org
Thu Jun 18 05:54:01 CEST 2020
Commit: 229ed078d1d0de27e8bc7d4665e560069463b7f8
Author: Richard Antalik
Date: Thu Jun 18 05:41:19 2020 +0200
Branches: master
https://developer.blender.org/rB229ed078d1d0de27e8bc7d4665e560069463b7f8
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
===================================================================
M source/blender/blenkernel/intern/sequencer.c
===================================================================
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)
More information about the Bf-blender-cvs
mailing list