diff mbox series

[FFmpeg-devel,RFC] avfilter/avfilter: add flag to signal filters that support w/h change

Message ID CAPYw7P4AhTrvvosi+e3PtODABMe1O39H6uvkgXy_skz1GnBteA@mail.gmail.com
State New
Headers show
Series [FFmpeg-devel,RFC] avfilter/avfilter: add flag to signal filters that support w/h change | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Paul B Mahol June 13, 2023, 2:47 p.m. UTC
Attached.

Comments

Paul B Mahol June 14, 2023, 4:44 p.m. UTC | #1
Will apply soon.
Nicolas George June 14, 2023, 5:05 p.m. UTC | #2
Paul B Mahol (12023-06-14):
> Will apply soon.

A flag connected with no code at all? What is it supposed to do?
Paul B Mahol June 14, 2023, 5:31 p.m. UTC | #3
On Wed, Jun 14, 2023 at 7:05 PM Nicolas George <george@nsup.org> wrote:

> Paul B Mahol (12023-06-14):
> > Will apply soon.
>
> A flag connected with no code at all? What is it supposed to do?
>

To flag filters that can work with variable frame size changes
all the time in graph. So no rescalers are need to be inserted or
filtergraph reset.

Once all such filters are flaged with such capability then code will be
added so auto inserted rescale filter is inserted where neccesarry to
filters in
filtergraph that do not support dynamic width/height changes.


>
> --
>   Nicolas George
> _______________________________________________
> 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".
>
Nicolas George June 14, 2023, 5:33 p.m. UTC | #4
Paul B Mahol (12023-06-14):
> To flag filters that can work with variable frame size changes
> all the time in graph. So no rescalers are need to be inserted or
> filtergraph reset.
> 
> Once all such filters are flaged with such capability then code will be
> added so auto inserted rescale filter is inserted where neccesarry to
> filters in
> filtergraph that do not support dynamic width/height changes.

If you have a proof-of-concept patch series where this flag is actually
useful, I will review it.

As it is, it is dead code and not for commit.
Paul B Mahol June 17, 2023, 6:52 a.m. UTC | #5
On Wed, Jun 14, 2023 at 7:33 PM Nicolas George <george@nsup.org> wrote:

> Paul B Mahol (12023-06-14):
> > To flag filters that can work with variable frame size changes
> > all the time in graph. So no rescalers are need to be inserted or
> > filtergraph reset.
> >
> > Once all such filters are flaged with such capability then code will be
> > added so auto inserted rescale filter is inserted where neccesarry to
> > filters in
> > filtergraph that do not support dynamic width/height changes.
>
> If you have a proof-of-concept patch series where this flag is actually
> useful, I will review it.
>
> As it is, it is dead code and not for commit.
>

More code will come later, no reasons to block this patch for no valid
reasons.


>
> --
>   Nicolas George
> _______________________________________________
> 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".
>
Anton Khirnov June 17, 2023, 8:27 a.m. UTC | #6
Quoting Paul B Mahol (2023-06-17 08:52:33)
> On Wed, Jun 14, 2023 at 7:33 PM Nicolas George <george@nsup.org> wrote:
> 
> > Paul B Mahol (12023-06-14):
> > > To flag filters that can work with variable frame size changes
> > > all the time in graph. So no rescalers are need to be inserted or
> > > filtergraph reset.
> > >
> > > Once all such filters are flaged with such capability then code will be
> > > added so auto inserted rescale filter is inserted where neccesarry to
> > > filters in
> > > filtergraph that do not support dynamic width/height changes.
> >
> > If you have a proof-of-concept patch series where this flag is actually
> > useful, I will review it.
> >
> > As it is, it is dead code and not for commit.
> >
> 
> More code will come later, no reasons to block this patch for no valid
> reasons.

I agree with Nicolas, we should not add flags that are not used for
anything.
Paul B Mahol June 17, 2023, 8:28 a.m. UTC | #7
On Sat, Jun 17, 2023 at 10:27 AM Anton Khirnov <anton@khirnov.net> wrote:

> Quoting Paul B Mahol (2023-06-17 08:52:33)
> > On Wed, Jun 14, 2023 at 7:33 PM Nicolas George <george@nsup.org> wrote:
> >
> > > Paul B Mahol (12023-06-14):
> > > > To flag filters that can work with variable frame size changes
> > > > all the time in graph. So no rescalers are need to be inserted or
> > > > filtergraph reset.
> > > >
> > > > Once all such filters are flaged with such capability then code will
> be
> > > > added so auto inserted rescale filter is inserted where neccesarry to
> > > > filters in
> > > > filtergraph that do not support dynamic width/height changes.
> > >
> > > If you have a proof-of-concept patch series where this flag is actually
> > > useful, I will review it.
> > >
> > > As it is, it is dead code and not for commit.
> > >
> >
> > More code will come later, no reasons to block this patch for no valid
> > reasons.
>
> I agree with Nicolas, we should not add flags that are not used for
> anything.
>

Does not really matter who agrees to whom.

Patch goes in.


>
> --
> Anton Khirnov
> _______________________________________________
> 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".
>
Gyan Doshi June 17, 2023, 8:42 a.m. UTC | #8
On 2023-06-17 01:58 pm, Paul B Mahol wrote:
> On Sat, Jun 17, 2023 at 10:27 AM Anton Khirnov <anton@khirnov.net> wrote:
>
>> Quoting Paul B Mahol (2023-06-17 08:52:33)
>>> On Wed, Jun 14, 2023 at 7:33 PM Nicolas George <george@nsup.org> wrote:
>>>
>>>> Paul B Mahol (12023-06-14):
>>>>> To flag filters that can work with variable frame size changes
>>>>> all the time in graph. So no rescalers are need to be inserted or
>>>>> filtergraph reset.
>>>>>
>>>>> Once all such filters are flaged with such capability then code will
>> be
>>>>> added so auto inserted rescale filter is inserted where neccesarry to
>>>>> filters in
>>>>> filtergraph that do not support dynamic width/height changes.
>>>> If you have a proof-of-concept patch series where this flag is actually
>>>> useful, I will review it.
>>>>
>>>> As it is, it is dead code and not for commit.
>>>>
>>> More code will come later, no reasons to block this patch for no valid
>>> reasons.
>> I agree with Nicolas, we should not add flags that are not used for
>> anything.
>>
> Does not really matter who agrees to whom.
>
> Patch goes in.

At least patch some of the applicable filters and you could use the flag 
in buffersrc param check.

Regards,
Gyan
diff mbox series

Patch

From 440616b9400d6d6a4705b6feedcd5439cd9e54c2 Mon Sep 17 00:00:00 2001
From: Paul B Mahol <onemda@gmail.com>
Date: Tue, 13 Jun 2023 16:39:12 +0200
Subject: [PATCH] avfilter/avfilter: add flag to signal filters that support
 w/h change

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavfilter/avfilter.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index d69381aed4..f5df36dd65 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -159,6 +159,12 @@  enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);
  */
 #define AVFILTER_FLAG_SUPPORT_TIMELINE (AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL)
 
+/**
+ * The filter supports variable image size processing. This means
+ * input frames width and/or height can change in size.
+ */
+#define AVFILTER_FLAG_SUPPORT_VARIABLE_IMAGE_SIZE (1 << 18)
+
 /**
  * Filter definition. This defines the pads a filter contains, and all the
  * callback functions used to interact with the filter.
-- 
2.39.1