diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-02-27 13:58:40 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-02-27 13:58:40 +0400 |
commit | fefc6840368e60121fad886b05a72776b022a101 (patch) | |
tree | 4f5d26886576760f64cfc5b15a3703efa8a05ade /source/blender/blenkernel/intern/sequencer.c | |
parent | 3468eba71a30b9a2235a9f46e8998117b25c5baf (diff) |
Fix #34439: Strip modifier - Mask multiply failure
Diffstat (limited to 'source/blender/blenkernel/intern/sequencer.c')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 68618287546..b0a65d23d93 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1544,8 +1544,11 @@ static void color_balance_byte_byte(StripColorBalance *cb_, unsigned char *rect, for (c = 0; c < 3; c++) { float t = color_balance_fl(p[c], cb.lift[c], cb.gain[c], cb.gamma[c], mul); - if (m) - p[c] = p[c] * (1.0f - (float)m[c] / 255.0f) + t * m[c]; + if (m) { + float m_normal = (float) m[c] / 255.0f; + + p[c] = p[c] * (1.0f - m_normal) + t * m_normal; + } else p[c] = t; } |