From b1cdc52b30f709848c7f30eb077d6d5c20c43428 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 5 Jul 2010 14:29:16 +0000 Subject: Color Balance Node changes from sequencer applied to compositor mostly noticable is how the lift works. Before & After, http://www.graphicall.org/ftp/ideasman42/color_balance_before_after.png even with lower values these kinds of errors can be seen. --- source/blender/blenkernel/intern/sequencer.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 2f25c24272e..fa2c11f3395 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1525,13 +1525,12 @@ static StripColorBalance calc_cb(StripColorBalance * cb_) return cb; } -/* compiler should inline */ -MINLINE float color_balance_fl(float v, float lift, float gain, float gamma, float mul) +/* pow(p[c] * cb.gain[c] + cb.lift[c], cb.gamma[c]) * mul;*/ +MINLINE float color_balance_fl(const float v, const float lift, const float gain, const float gamma, const float mul) { - return pow(pow(v * gain, lift), gamma) * mul; + return powf(powf(v * gain, lift), gamma) * mul; } - static void make_cb_table_byte(float lift, float gain, float gamma, unsigned char * table, float mul) { -- cgit v1.2.3