[Bf-blender-cvs] [b641d016e1] master: Sequencer: Some extra speedup in color space conversion

Sergey Sharybin noreply at git.blender.org
Tue Feb 7 17:50:30 CET 2017


Commit: b641d016e1ba5fa4c1608d8655dae9d66b92fadc
Author: Sergey Sharybin
Date:   Tue Feb 7 17:45:28 2017 +0100
Branches: master
https://developer.blender.org/rBb641d016e1ba5fa4c1608d8655dae9d66b92fadc

Sequencer: Some extra speedup in color space conversion

Use the new utility from coloranagement which multi-threads byte to
float conversion.

Gives extra 10% speedup from quick tests.

===================================================================

M	source/blender/blenkernel/intern/sequencer.c

===================================================================

diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index f77893db1c..6a491ba5ec 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -522,15 +522,10 @@ void BKE_sequencer_imbuf_to_sequencer_space(Scene *scene, ImBuf *ibuf, bool make
 			 * precision loss.
 			 */
 			imb_addrectfloatImBuf(ibuf);
-			/* TODO(sergey): Can convert byte to float from thread as well. */
-			IMB_buffer_float_from_byte(ibuf->rect_float, (unsigned char*)ibuf->rect,
-			                           IB_PROFILE_SRGB, IB_PROFILE_SRGB,
-			                           true,
-			                           ibuf->x, ibuf->y, ibuf->x, ibuf->x);
-			IMB_colormanagement_transform_threaded(ibuf->rect_float,
-			                                       ibuf->x, ibuf->y, ibuf->channels,
-			                                       from_colorspace, to_colorspace,
-			                                       true);
+			IMB_colormanagement_transform_from_byte_threaded(
+			        ibuf->rect_float, (unsigned char*)ibuf->rect,
+			        ibuf->x, ibuf->y, ibuf->channels,
+			        from_colorspace, to_colorspace);
 			/* We don't need byte buffer anymore. */
 			imb_freerectImBuf(ibuf);
 		}




More information about the Bf-blender-cvs mailing list