Apply export color transform in render worker
The export color transform was passed to RenderTask as a ColorProcessor, but the worker IPC render_frame message never carried it. The worker always set the ticket's coloroutput to null, so frames were returned in the project's reference space and encoded without the chosen output transform (e.g. Rec.709 / sRGB), causing the exported video to look wrongly tinted. Serialize the ColorTransform through the render_frame control message and reconstruct the ColorProcessor on the worker side before rendering. Also expose ColorTransform as a Qt metatype so it can be stored in a ticket QVariant.
This commit is contained in:
@@ -941,6 +941,13 @@ RenderWorkerPool::JobResult RenderWorkerPool::ProcessJobAttempt(
|
||||
render.input_slot = input_slots.isEmpty() ? -1 : input_slots.front();
|
||||
render.input_slots = input_slots;
|
||||
|
||||
const ColorTransform &ct = job.params.force_color_transform;
|
||||
render.has_color_transform = !ct.output().isEmpty();
|
||||
render.color_is_display = ct.is_display();
|
||||
render.color_output = ct.output();
|
||||
render.color_view = ct.view();
|
||||
render.color_look = ct.look();
|
||||
|
||||
if (!WriteControlMessage(worker->process, render.ToJson())) {
|
||||
if (!job.ticket->IsCancelled()) {
|
||||
qWarning() << "RenderWorkerPool failed to send render_frame";
|
||||
|
||||
Reference in New Issue
Block a user