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
Notes: blender-bot 2023-11-30 20:28:51 +01:00
Referenced by issue #51002, Scene strip with Alpha over not working as expected
Referenced by issue #50882, VSE: Blend Modes on Scenes do not layer properly
Referenced by pull request #115628, Color management: multi-thread IMB_colormanagement_transform_from_byte_threaded simple case
1 changed files with 7 additions and 2 deletions

View File

@ -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);