* [FFmpeg-devel] [PATCH v3 0/3] consider chroma subsampling for bwdif (including CUDA and Vulkan)
[not found] <20231202201655.40450-1-cosmin@cosmin.at>
@ 2023-12-02 20:16 ` Cosmin Stejerean via ffmpeg-devel
[not found] ` <20231202201655.40450-3-cosmin@cosmin.at>
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Cosmin Stejerean via ffmpeg-devel @ 2023-12-02 20:16 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Cosmin Stejerean
From: Cosmin Stejerean <cosmin@cosmin.at>
This fixes the issue reported in #10688. In v3 only the chroma planes
are checked based on feedback for v2, since the chroma planes are
going to have the minimum dimension.
Cosmin Stejerean (3):
avfilter/vf_bwdif: consider chroma subsampling when enforcing minimum
dimensions
avfilter/vf_bwdif_cuda: consider chroma subsampling when enforcing
minimum dimensions
avfilter/vf_bwdif_vulkan: consider chroma subsampling when enforcing
minimum dimensions
libavfilter/vf_bwdif.c | 13 ++++++++++---
libavfilter/vf_bwdif_cuda.c | 13 ++++++++++---
libavfilter/vf_bwdif_vulkan.c | 14 ++++++++++----
3 files changed, 30 insertions(+), 10 deletions(-)
--
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".
^ permalink raw reply [flat|nested] 8+ messages in thread
* [FFmpeg-devel] [PATCH v3 2/3] avfilter/vf_bwdif_cuda: consider chroma subsampling when enforcing minimum dimensions
[not found] ` <20231202201655.40450-3-cosmin@cosmin.at>
@ 2023-12-02 20:16 ` Cosmin Stejerean via ffmpeg-devel
0 siblings, 0 replies; 8+ messages in thread
From: Cosmin Stejerean via ffmpeg-devel @ 2023-12-02 20:16 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Cosmin Stejerean
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".
^ permalink raw reply [flat|nested] 8+ messages in thread
* [FFmpeg-devel] [PATCH v3 3/3] avfilter/vf_bwdif_vulkan: consider chroma subsampling when enforcing minimum dimensions
[not found] ` <20231202201655.40450-4-cosmin@cosmin.at>
@ 2023-12-02 20:17 ` Cosmin Stejerean via ffmpeg-devel
0 siblings, 0 replies; 8+ messages in thread
From: Cosmin Stejerean via ffmpeg-devel @ 2023-12-02 20:17 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Cosmin Stejerean
From: Cosmin Stejerean <cosmin@cosmin.at>
Signed-off-by: Cosmin Stejerean <cosmin@cosmin.at>
---
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
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".
^ permalink raw reply [flat|nested] 8+ messages in thread
* [FFmpeg-devel] [PATCH v3 1/3] avfilter/vf_bwdif: consider chroma subsampling when enforcing minimum dimensions
[not found] ` <20231202201655.40450-2-cosmin@cosmin.at>
@ 2023-12-02 20:17 ` Cosmin Stejerean via ffmpeg-devel
2023-12-02 22:02 ` Thomas Mundt
0 siblings, 1 reply; 8+ messages in thread
From: Cosmin Stejerean via ffmpeg-devel @ 2023-12-02 20:17 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Cosmin Stejerean
From: Cosmin Stejerean <cosmin@cosmin.at>
Fixes #10688
Signed-off-by: Cosmin Stejerean <cosmin@cosmin.at>
---
libavfilter/vf_bwdif.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c
index 137cd5ef13..353cd0b61a 100644
--- a/libavfilter/vf_bwdif.c
+++ b/libavfilter/vf_bwdif.c
@@ -191,13 +191,14 @@ static int config_props(AVFilterLink *link)
return ret;
}
- if (link->w < 3 || link->h < 4) {
- av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or 4 lines is not supported\n");
+ yadif->csp = av_pix_fmt_desc_get(link->format);
+ yadif->filter = filter;
+
+ if (AV_CEIL_RSHIFT(link->w, yadif->csp->log2_chroma_w) < 3 || AV_CEIL_RSHIFT(link->h, yadif->csp->log2_chroma_h) < 4) {
+ av_log(ctx, AV_LOG_ERROR, "Video with planes less than 3 columns or 4 lines is not supported\n");
return AVERROR(EINVAL);
}
- yadif->csp = av_pix_fmt_desc_get(link->format);
- yadif->filter = filter;
ff_bwdif_init_filter_line(&s->dsp, yadif->csp->comp[0].depth);
return 0;
--
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".
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH v3 1/3] avfilter/vf_bwdif: consider chroma subsampling when enforcing minimum dimensions
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
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Mundt @ 2023-12-02 22:02 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Cosmin Stejerean
Cosmin Stejerean via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> schrieb am Sa.,
2. Dez. 2023, 21:17:
> From: Cosmin Stejerean <cosmin@cosmin.at>
>
> Fixes #10688
>
> Signed-off-by: Cosmin Stejerean <cosmin@cosmin.at>
> ---
> libavfilter/vf_bwdif.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c
> index 137cd5ef13..353cd0b61a 100644
> --- a/libavfilter/vf_bwdif.c
> +++ b/libavfilter/vf_bwdif.c
> @@ -191,13 +191,14 @@ static int config_props(AVFilterLink *link)
> return ret;
> }
>
> - if (link->w < 3 || link->h < 4) {
> - av_log(ctx, AV_LOG_ERROR, "Video of less than 3 columns or 4
> lines is not supported\n");
> + yadif->csp = av_pix_fmt_desc_get(link->format);
> + yadif->filter = filter;
> +
> + if (AV_CEIL_RSHIFT(link->w, yadif->csp->log2_chroma_w) < 3 ||
> AV_CEIL_RSHIFT(link->h, yadif->csp->log2_chroma_h) < 4) {
> + av_log(ctx, AV_LOG_ERROR, "Video with planes less than 3 columns
> or 4 lines is not supported\n");
> return AVERROR(EINVAL);
> }
>
> - yadif->csp = av_pix_fmt_desc_get(link->format);
> - yadif->filter = filter;
> ff_bwdif_init_filter_line(&s->dsp, yadif->csp->comp[0].depth);
>
> return 0;
> --
> 2.42.1
>
LGTM, thanks.
>
_______________________________________________
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".
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH v3 1/3] avfilter/vf_bwdif: consider chroma subsampling when enforcing minimum dimensions
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-24 20:06 ` Michael Niedermayer
0 siblings, 2 replies; 8+ messages in thread
From: Philip Langdale via ffmpeg-devel @ 2023-12-06 10:43 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Philip Langdale
On Sat, 2 Dec 2023 23:02:36 +0100
Thomas Mundt <tmundt75@gmail.com> wrote:
>
> LGTM, thanks.
>
I am going to squash the three commits and push. There's no real need
to put each filter in a separate diff when the logical change is
identical in all three.
Thanks,
--phil
_______________________________________________
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".
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH v3 1/3] avfilter/vf_bwdif: consider chroma subsampling when enforcing minimum dimensions
[not found] ` <A6614C73-6D61-4E02-85E1-8696FD99266A@cosmin.at>
@ 2023-12-06 16:23 ` Cosmin Stejerean via ffmpeg-devel
0 siblings, 0 replies; 8+ messages in thread
From: Cosmin Stejerean via ffmpeg-devel @ 2023-12-06 16:23 UTC (permalink / raw)
To: FFmpeg development discussions and patches; +Cc: Cosmin Stejerean
> On Dec 6, 2023, at 02:44, Philip Langdale via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> wrote:
>
> On Sat, 2 Dec 2023 23:02:36 +0100
> Thomas Mundt <tmundt75@gmail.com> wrote:
>
>>
>> LGTM, thanks.
>>
>
> I am going to squash the three commits and push. There's no real need
> to put each filter in a separate diff when the logical change is
> identical in all three.
>
Squashing sounds good to me.
- Cosmin
_______________________________________________
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".
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [FFmpeg-devel] [PATCH v3 1/3] avfilter/vf_bwdif: consider chroma subsampling when enforcing minimum dimensions
2023-12-06 10:43 ` Philip Langdale via ffmpeg-devel
[not found] ` <A6614C73-6D61-4E02-85E1-8696FD99266A@cosmin.at>
@ 2023-12-24 20:06 ` Michael Niedermayer
1 sibling, 0 replies; 8+ messages in thread
From: Michael Niedermayer @ 2023-12-24 20:06 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1.1: Type: text/plain, Size: 630 bytes --]
On Wed, Dec 06, 2023 at 06:43:50PM +0800, Philip Langdale via ffmpeg-devel wrote:
> On Sat, 2 Dec 2023 23:02:36 +0100
> Thomas Mundt <tmundt75@gmail.com> wrote:
>
> >
> > LGTM, thanks.
> >
>
> I am going to squash the three commits and push. There's no real need
> to put each filter in a separate diff when the logical change is
> identical in all three.
Did this fix "https://trac.ffmpeg.org/ticket/10688"
?
if so, please close it
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
There will always be a question for which you do not know the correct answer.
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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".
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-12-24 20:06 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[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 ` [FFmpeg-devel] [PATCH v3 2/3] avfilter/vf_bwdif_cuda: consider chroma subsampling when enforcing minimum dimensions Cosmin Stejerean via ffmpeg-devel
[not found] ` <20231202201655.40450-4-cosmin@cosmin.at>
2023-12-02 20:17 ` [FFmpeg-devel] [PATCH v3 3/3] avfilter/vf_bwdif_vulkan: " 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
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