traverser: fixed regression regarding converting generated frames

This commit is contained in:
itsmattkc
2022-05-03 20:49:44 -07:00
parent d8a944c8c4
commit a3c52cafaa
4 changed files with 25 additions and 16 deletions
+13 -2
View File
@@ -317,15 +317,26 @@ void NodeTraverser::ResolveJobs(NodeValue &val, const TimeRange &range)
VideoParams tex_params = GetCacheVideoParams();
tex_params.set_channel_count(GetChannelCountFromJob(job));
VideoParams upload_params = tex_params;
if (job.GetRequestedFormat() != VideoParams::kFormatInvalid) {
tex_params.set_format(job.GetRequestedFormat());
upload_params.set_format(job.GetRequestedFormat());
}
TexturePtr tex = CreateTexture(tex_params);
TexturePtr tex = CreateTexture(upload_params);
PreProcessRow(range, job.GetValues());
ProcessFrameGeneration(tex, val.source(), job);
if (!job.GetColorspace().isEmpty()) {
// Convert to reference space
TexturePtr dest = CreateTexture(tex_params);
ConvertToReferenceSpace(dest, tex, job.GetColorspace());
tex = dest;
}
val.set_data(QVariant::fromValue(tex));
} else if (v.canConvert<FootageJob>()) {