Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Cc: "Cosmin Stejerean" <cosmin@cosmin.at>
Subject: [FFmpeg-devel] [PATCH v3 2/3] avfilter/vf_bwdif_cuda: consider chroma subsampling when enforcing minimum dimensions
Date: Sat, 2 Dec 2023 20:16:59 +0000
Message-ID: <0101018c2c2d5d62-1225137e-a53e-4f7c-beae-6123f9fd9e22-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <20231202201655.40450-1-cosmin@cosmin.at>

From: Cosmin Stejerean <cosmin@cosmin.at>

Signed-off-by: Cosmin Stejerean <cosmin@cosmin.at>
---
 libavfilter/vf_bwdif_cuda.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/libavfilter/vf_bwdif_cuda.c b/libavfilter/vf_bwdif_cuda.c
index a5ecfbadb6..418f15f989 100644
--- a/libavfilter/vf_bwdif_cuda.c
+++ b/libavfilter/vf_bwdif_cuda.c
@@ -296,15 +296,16 @@ static int config_output(AVFilterLink *link)
         link->frame_rate = av_mul_q(ctx->inputs[0]->frame_rate,
                                     (AVRational){2, 1});
 
-    if (link->w < 3 || link->h < 3) {
-        av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or lines is not supported\n");
-        ret = AVERROR(EINVAL);
-        goto exit;
-    }
 
     y->csp = av_pix_fmt_desc_get(output_frames->sw_format);
     y->filter = filter;
 
+    if (AV_CEIL_RSHIFT(link->w, y->csp->log2_chroma_w) < 3 || AV_CEIL_RSHIFT(link->h, y->csp->log2_chroma_h) < 3) {
+        av_log(ctx, AV_LOG_ERROR, "Video with planes less than 3 columns or lines is not supported\n");
+        ret = AVERROR(EINVAL);
+        goto exit;
+    }
+
     ret = CHECK_CU(cu->cuCtxPushCurrent(s->hwctx->cuda_ctx));
     if (ret < 0)
         goto exit;
-- 
2.42.1


_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

  parent reply	other threads:[~2023-12-02 20:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20231202201655.40450-1-cosmin@cosmin.at>
2023-12-02 20:16 ` [FFmpeg-devel] [PATCH v3 0/3] consider chroma subsampling for bwdif (including CUDA and Vulkan) Cosmin Stejerean via ffmpeg-devel
     [not found] ` <20231202201655.40450-3-cosmin@cosmin.at>
2023-12-02 20:16   ` Cosmin Stejerean via ffmpeg-devel [this message]
     [not found] ` <20231202201655.40450-4-cosmin@cosmin.at>
2023-12-02 20:17   ` [FFmpeg-devel] [PATCH v3 3/3] avfilter/vf_bwdif_vulkan: consider chroma subsampling when enforcing minimum dimensions Cosmin Stejerean via ffmpeg-devel
     [not found] ` <20231202201655.40450-2-cosmin@cosmin.at>
2023-12-02 20:17   ` [FFmpeg-devel] [PATCH v3 1/3] avfilter/vf_bwdif: " Cosmin Stejerean via ffmpeg-devel
2023-12-02 22:02     ` Thomas Mundt
2023-12-06 10:43       ` Philip Langdale via ffmpeg-devel
     [not found]         ` <A6614C73-6D61-4E02-85E1-8696FD99266A@cosmin.at>
2023-12-06 16:23           ` Cosmin Stejerean via ffmpeg-devel
2023-12-24 20:06         ` Michael Niedermayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0101018c2c2d5d62-1225137e-a53e-4f7c-beae-6123f9fd9e22-000000@us-west-2.amazonses.com \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=cosmin@cosmin.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git