vf_scale_vulkan: make sure that pixfmts are different when using swscale

The swscale internals currently have a quirk which causes the memcpy
backend to be called when the pixfmts match. Obviously, this doesn't do
what is expected, as hardware frames cannot just be copied.
Check for this.

Sponsored-by: Sovereign Tech Fund
This commit is contained in:
Lynne
2026-03-31 17:40:35 +02:00
parent 990768080e
commit 554dcc2885

View File

@@ -447,7 +447,8 @@ static int scale_vulkan_config_output(AVFilterLink *outlink)
av_log(avctx, AV_LOG_ERROR, "Scaling is not supported with debayering\n");
return AVERROR_PATCHWELCOME;
}
} else if (inlink->w == outlink->w || inlink->h == outlink->h) {
} else if ((inlink->w == outlink->w || inlink->h == outlink->h) &&
(s->vkctx.input_format != s->vkctx.output_format)) {
s->sws = sws_alloc_context();
if (!s->sws)
return AVERROR(ENOMEM);