mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user