From b641d016e1ba5fa4c1608d8655dae9d66b92fadc Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 7 Feb 2017 17:45:28 +0100 Subject: [PATCH] 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. --- source/blender/blenkernel/intern/sequencer.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index f77893db1cf..6a491ba5ec4 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); }