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
path: root/source
diff options
context:
space:
mode:
authorPeter Schlaile <peter@schlaile.de>2008-05-04 19:39:27 +0400
committerPeter Schlaile <peter@schlaile.de>2008-05-04 19:39:27 +0400
commit175a0c34f7c4986a2e5b798aa8042f08280bdb2b (patch)
treeead132683b4a1062dfb48387d37d2a7372eee484 /source
parent6c05a92fe189baf82b7de4813d63b7bacf36cab2 (diff)
== Sequencer ==
Fixed order of operation in 3-way color corrector according to http://rebelsguide.com/forum/viewtopic.php?t=810 Thanks to mindrones for pointing this out.
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/sequence.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/src/sequence.c b/source/blender/src/sequence.c
index 9f3be52af1b..0da5775c9e3 100644
--- a/source/blender/src/sequence.c
+++ b/source/blender/src/sequence.c
@@ -1273,8 +1273,8 @@ static void make_cb_table_byte(float lift, float gain, float gamma,
for (y = 0; y < 256; y++) {
float v = 1.0 * y / 255;
- v += lift;
v *= gain;
+ v += lift;
v = pow(v, gamma);
v *= mul;
if ( v > 1.0) {
@@ -1294,8 +1294,8 @@ static void make_cb_table_float(float lift, float gain, float gamma,
for (y = 0; y < 256; y++) {
float v = (float) y * 1.0 / 255.0;
- v += lift;
v *= gain;
+ v += lift;
v = pow(v, gamma);
v *= mul;
table[y] = v;
@@ -1371,7 +1371,7 @@ static void color_balance_float_float(Sequence * seq, TStripElem* se,
while (p < e) {
int c;
for (c = 0; c < 3; c++) {
- p[c] = pow((p[c] + cb.lift[c]) * cb.gain[c],
+ p[c] = pow(p[c] * cb.gain[c] + cb.lift[c],
cb.gamma[c]) * mul;
}
p += 4;