[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30281] trunk/blender/source/blender/ render/intern/source/pipeline.c: fix for rendering sequencer float buffers, need to convert into linear color space for the render buffer.

Campbell Barton ideasman42 at gmail.com
Tue Jul 13 21:52:04 CEST 2010


Revision: 30281
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30281
Author:   campbellbarton
Date:     2010-07-13 21:52:04 +0200 (Tue, 13 Jul 2010)

Log Message:
-----------
fix for rendering sequencer float buffers, need to convert into linear color space for the render buffer.

Modified Paths:
--------------
    trunk/blender/source/blender/render/intern/source/pipeline.c

Modified: trunk/blender/source/blender/render/intern/source/pipeline.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/pipeline.c	2010-07-13 19:24:35 UTC (rev 30280)
+++ trunk/blender/source/blender/render/intern/source/pipeline.c	2010-07-13 19:52:04 UTC (rev 30281)
@@ -2470,8 +2470,21 @@
 		if(ibuf->rect_float) {
 			if (!rr->rectf)
 				rr->rectf= MEM_mallocN(4*sizeof(float)*rr->rectx*rr->recty, "render_seq rectf");
-			
+
 			memcpy(rr->rectf, ibuf->rect_float, 4*sizeof(float)*rr->rectx*rr->recty);
+
+			/* sequencer float buffer is not in linear color space, convert
+			 * should always be true, use a fake ibuf for the colorspace conversion */
+			if(ibuf->profile != IB_PROFILE_LINEAR_RGB) {
+				ImBuf ibuf_dummy;
+				memset(&ibuf_dummy, 0, sizeof(ImBuf));
+				ibuf_dummy.profile= ibuf->profile;
+				ibuf_dummy.x= rr->rectx;
+				ibuf_dummy.y= rr->recty;
+				ibuf_dummy.rect_float= rr->rectf;
+				/* only touch the rr->rectf */
+				IMB_convert_profile(&ibuf_dummy, IB_PROFILE_LINEAR_RGB);
+			}
 			
 			/* TSK! Since sequence render doesn't free the *rr render result, the old rect32
 			   can hang around when sequence render has rendered a 32 bits one before */





More information about the Bf-blender-cvs mailing list