From: Cosmin Stejerean <[email protected]>
Signed-off-by: Cosmin Stejerean <[email protected]>
---
libavfilter/vf_bwdif_vulkan.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/libavfilter/vf_bwdif_vulkan.c b/libavfilter/vf_bwdif_vulkan.c
index 690a89c4ba..c51df9aa26 100644
--- a/libavfilter/vf_bwdif_vulkan.c
+++ b/libavfilter/vf_bwdif_vulkan.c
@@ -362,15 +362,14 @@ static int bwdif_vulkan_config_output(AVFilterLink
*outlink)
outlink->frame_rate = av_mul_q(avctx->inputs[0]->frame_rate,
(AVRational){2, 1});
- if (outlink->w < 4 || outlink->h < 4) {
- av_log(avctx, AV_LOG_ERROR, "Video of less than 4 columns or lines is
not "
- "supported\n");
- return AVERROR(EINVAL);
- }
-
y->csp = av_pix_fmt_desc_get(vkctx->frames->sw_format);
y->filter = bwdif_vulkan_filter_frame;
+ if (AV_CEIL_RSHIFT(outlink->w, y->csp->log2_chroma_w) < 4 ||
AV_CEIL_RSHIFT(outlink->h, y->csp->log2_chroma_h) < 4) {
+ av_log(avctx, AV_LOG_ERROR, "Video with planes less than 4 columns or
lines is not supported\n");
+ return AVERROR(EINVAL);
+ }
+
return init_filter(avctx);
}
--
2.42.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".