Fix: VSE scopes crash on float images

Regression since a904db3ee7 ("skip no-op colorspace transforms for
float images"), the newly added do_display_buffer_apply_no_processor
function did not handle case of both source and destination being
float images. This happens when VSE produces a float image, and
you turn on a Waveform scope.

Pull Request: https://projects.blender.org/blender/blender/pulls/129293
This commit is contained in:
Aras Pranckevicius
2024-10-21 14:43:56 +02:00
committed by Aras Pranckevicius
parent d7368e0068
commit 28ea1d2f7b

View File

@@ -1746,15 +1746,29 @@ static void do_display_buffer_apply_no_processor(DisplayBufferThread *handle)
}
if (handle->display_buffer) {
IMB_buffer_float_from_byte(handle->display_buffer,
handle->byte_buffer,
IB_PROFILE_SRGB,
IB_PROFILE_SRGB,
false,
width,
height,
width,
width);
if (handle->byte_buffer) {
IMB_buffer_float_from_byte(handle->display_buffer,
handle->byte_buffer,
IB_PROFILE_SRGB,
IB_PROFILE_SRGB,
false,
width,
height,
width,
width);
}
else if (handle->buffer) {
IMB_buffer_float_from_float(handle->display_buffer,
handle->buffer,
handle->channels,
IB_PROFILE_SRGB,
IB_PROFILE_SRGB,
handle->predivide,
width,
height,
width,
width);
}
}
}