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:
authorCampbell Barton <ideasman42@gmail.com>2010-07-05 18:29:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-05 18:29:16 +0400
commitb1cdc52b30f709848c7f30eb077d6d5c20c43428 (patch)
treee10cef4273add6fcd21cb85ce2726825a30021cb /source/blender/blenkernel
parentd89d1aa09810a95fe2968a76393a102fabe8a146 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/sequencer.c7
1 files changed, 3 insertions, 4 deletions
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)
{