[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14680] trunk/blender/source/blender/src/ sequence.c: == Sequencer ==

Peter Schlaile peter at schlaile.de
Sun May 4 17:39:27 CEST 2008


Revision: 14680
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14680
Author:   schlaile
Date:     2008-05-04 17:39:27 +0200 (Sun, 04 May 2008)

Log Message:
-----------
== 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.

Modified Paths:
--------------
    trunk/blender/source/blender/src/sequence.c

Modified: trunk/blender/source/blender/src/sequence.c
===================================================================
--- trunk/blender/source/blender/src/sequence.c	2008-05-04 15:02:48 UTC (rev 14679)
+++ trunk/blender/source/blender/src/sequence.c	2008-05-04 15:39:27 UTC (rev 14680)
@@ -1273,8 +1273,8 @@
 
 	for (y = 0; y < 256; y++) {
 	        float v = 1.0 * y / 255;
+		v *= gain;
 		v += lift; 
-		v *= gain;
 		v = pow(v, gamma);
 		v *= mul;
 		if ( v > 1.0) {
@@ -1294,8 +1294,8 @@
 
 	for (y = 0; y < 256; y++) {
 	        float v = (float) y * 1.0 / 255.0;
+		v *= gain;
 		v += lift;
-		v *= gain;
 		v = pow(v, gamma);
 		v *= mul;
 		table[y] = v;
@@ -1371,7 +1371,7 @@
 	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;





More information about the Bf-blender-cvs mailing list