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:
2026-07-13 10:19:30 +08:00
parent 43599dba9e
commit d66779d281
10 changed files with 73 additions and 9 deletions
+7
View File
@@ -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";