Fix byte-to-float conversion when using scene strips in sequencer with identical color spaces

Fix T50882: VSE: Blend Modes on Scenes do not layer properly
Fix T51002: Scene strip with Alpha over not working as expected

The byte-to-float conversion was being skipped if the color spaces of the sequence and the scene
are the same, which is the default, resulting in any non-float strips becoming invisible.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D2635
This commit is contained in:
Olly Funkster 2017-05-16 09:44:20 +02:00 committed by Sergey Sharybin
parent f6afd1b73c
commit 06ac6ded66

@ -1759,9 +1759,14 @@ void IMB_colormanagement_transform_from_byte_threaded(float *float_buffer, unsig
return;
}
if (STREQ(from_colorspace, to_colorspace)) {
/* If source and destination color spaces are identical, skip
* threading overhead and simply do nothing
/* Because this function always takes a byte buffer and returns a float buffer, it must
* always do byte-to-float conversion of some kind. To avoid threading overhead
* IMB_buffer_float_from_byte is used when color spaces are identical. See T51002.
*/
IMB_buffer_float_from_byte(float_buffer, byte_buffer,
IB_PROFILE_SRGB, IB_PROFILE_SRGB,
true,
width, height, width, width);
return;
}
cm_processor = IMB_colormanagement_colorspace_processor_new(from_colorspace, to_colorspace);