Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] The patch series about premultiplied alpha
@ 2025-08-02 15:18 Nicolas George
  2025-08-02 18:03 ` Nicolas George
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas George @ 2025-08-02 15:18 UTC (permalink / raw)
  To: tc; +Cc: ffmpeg-devel

Hi.

I write this mail to the technical committee to state that since Niklas
Haas has stated intent to stop discussing on the mailing-list, I am
asking the technical committee to make a decision on the subject.

It will take me a little time, at least several hours, maybe a few days,
to properly express my arguments clearly and cross-reference them for
your convenience, but I can already give the gist of them:

- The patch series lacks transverse user documentation.

- The patch series increases the risk of data corruption due to user
  negligence and should include at least some guardrails against that.

I will develop both these points as soon as possible.

In the meantime, it should go without saying but I am afraid it needs to
be said, (1) Niklas Haas cannot be part of the decision, or even private
discussion if there is one, since he is already part of the
disagreement, and (2) the patch series cannot be pushed until the
decision is made.

Regards,

-- 
  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".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FFmpeg-devel] The patch series about premultiplied alpha
  2025-08-02 15:18 [FFmpeg-devel] The patch series about premultiplied alpha Nicolas George
@ 2025-08-02 18:03 ` Nicolas George
  2025-08-03 10:42   ` Niklas Haas
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas George @ 2025-08-02 18:03 UTC (permalink / raw)
  To: tc; +Cc: FFmpeg development discussions and patches

Nicolas George (HE12025-08-02):
> - The patch series lacks transverse user documentation.
> 
> - The patch series increases the risk of data corruption due to user
>   negligence and should include at least some guardrails against that.

Here is the situation before this patch series:

- All alpha is supposed to be straight by default.

- A few niche decoders (EXR, JPEG XL) would silently output
  premultiplied alpha.

- A few niche encoders (the same) would silently assume their input is
  premultiplied alpha.

- There is a pair of filters premultiply / unpremultiply.

- The overlay filter supports premultiplied alpha if enabled with an
  undocumented option.

- There is no protection at all: if a command connects input with one
  kind of alpha with out expecting the other kind at any point, it will
  produce invalid output without so much as a warning.

- There is barely any documentation at all. The filters are documented
  for what they do and that is all.

(IIRC, I would have fought the inclusion of the filters, but with Paul
one must choose one's battles.)

This patch series makes support for premultiplied alpha official.
Ideally, official support should include transparent automatic
conversion, but that would require too much work. But I think that
before inclusion it must fix the two worst problems:

- lack of documentation;

- risk of creating invalid output without any warning,

considering that the work to achieve it is a moderate fraction of the
work already invested in the patch series.

Documentation is easy: just write a few paragraphs to explain what
premultiplied alpha is, where it likely to occur (what did motivate the
writing of this series?) and how to deal with it (links to the
conversion filters).

Protection against creating invalid output, now. As I mentioned above,
full negotiation and automatic conversion, which would be ideal, is too
much work and therefore too much to ask. Niklas agree on that.

On the other hand, protection, i.e. emitting an error and letting the
user deal with it, is not much work:

- add a flag to filters that support premultiplied input;

- add a check for that flag in the framework.

In total, maybe two lines in a header, four lines in framework code and
one line per filter that will not damage the output. Similar work has
already be done for encoders.

Such limited work would make the feature much less dangerous for users,
it should be done before the feature reaches the public.

Regards,

-- 
  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".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FFmpeg-devel] The patch series about premultiplied alpha
  2025-08-02 18:03 ` Nicolas George
@ 2025-08-03 10:42   ` Niklas Haas
  2025-08-03 10:50     ` Niklas Haas
  2025-08-03 14:35     ` Nicolas George
  0 siblings, 2 replies; 9+ messages in thread
From: Niklas Haas @ 2025-08-03 10:42 UTC (permalink / raw)
  To: tc; +Cc: FFmpeg development discussions and patches

Hi all,

For context, this is the patch series being discussed:
https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20031

A description of my position follows.

On Sat, 02 Aug 2025 20:03:23 +0200 Nicolas George <george@nsup.org> wrote:
> Nicolas George (HE12025-08-02):
> > - The patch series lacks transverse user documentation.
> >
> > - The patch series increases the risk of data corruption due to user
> >   negligence and should include at least some guardrails against that.
>
> Here is the situation before this patch series:
>
> - All alpha is supposed to be straight by default.

I would weaken this statement a bit. While I agree that the majority of
files and filters assume straight alpha, the claim that this represents
the *ought* state (and not merely the *is* state) is not supported by the
documentation.

> - A few niche decoders (EXR, JPEG XL) would silently output
>   premultiplied alpha.
>
> - A few niche encoders (the same) would silently assume their input is
>   premultiplied alpha.
>
> - There is a pair of filters premultiply / unpremultiply.
>
> - The overlay filter supports premultiplied alpha if enabled with an
>   undocumented option.
>
> - There is no protection at all: if a command connects input with one
>   kind of alpha with out expecting the other kind at any point, it will
>   produce invalid output without so much as a warning.
>
> - There is barely any documentation at all. The filters are documented
>   for what they do and that is all.

I otherwise agree with this summary of the status quo.

> Documentation is easy: just write a few paragraphs to explain what
> premultiplied alpha is, where it likely to occur (what did motivate the
> writing of this series?) and how to deal with it (links to the
> conversion filters).

I don't think this is the main source of disagreement, so I will be brief.
In a nutshell, I think that it's not generally FFmpeg's job to go beyond a
working explanation of image processing concepts that are already well-
established in the industry. We also don't document in detail how and why
chroma subsampling is used, or how HDR metadata is interpreted, etc.

It's easy enough for any competent engineer to find out this information,
from sources which will surely outlive the FFmpeg project, e.g.:
https://en.wikipedia.org/wiki/Alpha_compositing#Straight_versus_premultiplied

That said, I don't think this is a relevant point of discussion, so as a
compromise I suggest to just expand the doxygen comments above the newly
added `enum AVAlphaMode` to elaborate at least on what the practical
difference is and why you would choose one over the other.

> Protection against creating invalid output, now. As I mentioned above,
> full negotiation and automatic conversion, which would be ideal, is too
> much work and therefore too much to ask. Niklas agree on that.
>
> On the other hand, protection, i.e. emitting an error and letting the
> user deal with it, is not much work:
>
> - add a flag to filters that support premultiplied input;
>
> - add a check for that flag in the framework.
>
> In total, maybe two lines in a header, four lines in framework code and
> one line per filter that will not damage the output. Similar work has
> already be done for encoders.

I think that such a flag will not actually accomplish what Nicolas thinks it
would. When I pointed out that we already have such a flag for encoders and
asked for clarification of what problem Nicolas was trying to solve, he stated:

> That handles it for encoders, I suppose. But I do not see anything
> protecting you from stacking images with different kind of alpha or
> sending this kind of frames to a muxer with uncoded frames.

I argue that a simple flag can not possibly solve this problem in any
meaningful way. The nuance here is that the problem is not one of only
supporting premul vs only supporting straight alpha, but rather the fact that
vf_vstack (e.g.) wants its two inputs to merely *agree* on their alpha type.

What makes this a nontrivial problem to solve is that the libavfilter code has
no way of knowing that two *unrelated* inputs to a filter are supposed to have
a matching alpha mode (and indeed, e.g. vf_overlay explicitly supports any X/Y
combination of blending transparent images onto other transparent images, thus
making it a counterexample to the general assumption that all inputs should be
matching).

The way we solve this normally in libavfilter is by having an AVFilterFormats
list for each property that we want to negotiate, and then filters can (during
query_formats) set both inputs to the same list reference, which in turn allows
the common code to understand that they should be resolved to the same alpha
mode). This is what I have repeatedly explained will involve adding full
format negotiation, which we both agree is out of scope.

----

Furthermore, Nicolas has the situation reversed: it is not the case that some
filters "support premultiplied input", and the rest implicitly do not. Rather,
*all* filters support both alpha modes, with basically no current exceptions
except for a few obscure ones. (vf_overlay_qsv and vf_overlay_cuda in particular
come to mind, though I suppose vf_fade also needs to be updated to support
fading premultiplied input frames - that's a trivial fix and I will add it
to my PR in a bit)

If we really do care about adding extra errors for these remaining filters
specifically, I can of course add it, but I argue that this is completely
orthogonal to the two problems Nicolas mentioned in his objection.

Finally, I do not see an issue with putting uncoded premultiplied frames into
muxers. As far as I'm aware, there is no current expectation that uncoded
muxers only support certain types of inputs; there is no precedent for blocking
e.g. HDR frames, or YCgGo frames, or any other number of very-unlikely-to-be-
handled-correctly inputs.

>
> Such limited work would make the feature much less dangerous for users,
> it should be done before the feature reaches the public.
>
> Regards,
>
> --
>   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".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FFmpeg-devel] The patch series about premultiplied alpha
  2025-08-03 10:42   ` Niklas Haas
@ 2025-08-03 10:50     ` Niklas Haas
  2025-08-03 14:35     ` Nicolas George
  1 sibling, 0 replies; 9+ messages in thread
From: Niklas Haas @ 2025-08-03 10:50 UTC (permalink / raw)
  To: tc; +Cc: FFmpeg development discussions and patches

By the way, just to be clear:

As I am a member of the TC, I believe there to be a conflict of interest
and will recuse myself from any internal discussions on the matter.

P.s. Out of curiosity, what happens if the remaining TC were to vote 2-2 on
the issue? Would my vote be taken as an implicit tiebreaker?
_______________________________________________
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] 9+ messages in thread

* Re: [FFmpeg-devel] The patch series about premultiplied alpha
  2025-08-03 10:42   ` Niklas Haas
  2025-08-03 10:50     ` Niklas Haas
@ 2025-08-03 14:35     ` Nicolas George
  2025-08-03 15:49       ` Nicolas George
  1 sibling, 1 reply; 9+ messages in thread
From: Nicolas George @ 2025-08-03 14:35 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: tc

Thanks for this reply. I suggest we suspend our involvement of the TC
and threat to push as is and resume discussion. Let me stop assuming you
want to push post haste even if it is sloppy, let you stop assuming that
I want to block everything because I am a contrarian or whatever, and
let us both assume we both want to make this patch series as good as
possible.

If you agree, then just leave out Cc:tc when replying.

Niklas Haas (HE12025-08-03):
> I don't think this is the main source of disagreement, so I will be brief.
> In a nutshell, I think that it's not generally FFmpeg's job to go beyond a
> working explanation of image processing concepts that are already well-
> established in the industry. We also don't document in detail how and why
> chroma subsampling is used, or how HDR metadata is interpreted, etc.
> 
> It's easy enough for any competent engineer to find out this information,
> from sources which will surely outlive the FFmpeg project, e.g.:
> https://en.wikipedia.org/wiki/Alpha_compositing#Straight_versus_premultiplied
> 
> That said, I don't think this is a relevant point of discussion, so as a
> compromise I suggest to just expand the doxygen comments above the newly
> added `enum AVAlphaMode` to elaborate at least on what the practical
> difference is and why you would choose one over the other.

I think one or two sentences and that link would be useful for people
who do not know it but get bitten by it.

But more importantly, one or two paragraphs are needed to explain the
specifics of how FFmpeg chose to implement support for it, with in
particular links to the documentation of the various tools at the
disposal of the user to fix or work around errors it might produce: -vf
premultiply, -vf unpremultiply, -vf setparams need to be referenced all
in one place.

> I argue that a simple flag can not possibly solve this problem in any
> meaningful way. The nuance here is that the problem is not one of only
> supporting premul vs only supporting straight alpha, but rather the fact that
> vf_vstack (e.g.) wants its two inputs to merely *agree* on their alpha type.

You could have explained that in the first place. (Granted, I also could
have taken more words to express my recommendations. Let us write
precisely and let us read each other carefully.)

I think it is inaccurate to say that the flag I propose does not solve
the problem, it is more accurate to say that it solves the problem
inefficiently.

If we add the flag like I suggest, we obviously do not set it on the
stack filters. That means they will only accept straight frames and
produce valid output. For me, that means the problem is solved.

But it has the side effect of also rejecting the case where all frames
are premultiplied, a case that would have produced valid output.

I think we can live with that, especially since:

- Users can work around it by adding unpremultiply in front and
  premultiply after: inefficient but it works; of if they know what they
  are doing, setparam.

- Later, if the solution above is deemed too inconvenient, somebody can
  add the ≤5 lines of code in vf_stack.c to check that all frames match.


**In short**, the flag system I propose really kills all situations
where mismatched expectations would cause garbled output, at the cost of
also killing a few valid cases, but we have the means to work around
that issue and we can fix them on a case-by-case basis.


> Furthermore, Nicolas has the situation reversed: it is not the case that some
> filters "support premultiplied input", and the rest implicitly do not. Rather,
> *all* filters support both alpha modes, with basically no current exceptions
> except for a few obscure ones. (vf_overlay_qsv and vf_overlay_cuda in particular
> come to mind, though I suppose vf_fade also needs to be updated to support
> fading premultiplied input frames - that's a trivial fix and I will add it
> to my PR in a bit)

I think you underestimate the number of filters that would cause invalid
output when subjected to premultiplied frames.

Any filter that manipulates the contents of the frame beyond just
copying pixel values should be suspected of causing invalid output. In
particular, every filter listed in `git grep drawutils` should be
suspected: 44 files, including important ones (drawtext, pad,
subtitles) (you mentioned fade: it is on the list). Use of framesync is
also a clue that it might not work correctly, that raises the count to
79 files.

On the other hand, this command can produce a list of filters that will
probably not cause any issue because they do not access frame data and
are candidate to add the flag:

diff -U0 <(ls vf_*.c) <(git grep -lP 'drawutils|framesync|->data' -- 'vf_*.c') | grep '^-'

By the way, I am willing to put aside my reluctance of contributing with
all the bullshit going on in order to help implementing this flag
system. But I suspect it is so simple to implement that it is not worth
it.


Niklas Haas (HE12025-08-03):
> By the way, just to be clear:
> 
> As I am a member of the TC, I believe there to be a conflict of interest
> and will recuse myself from any internal discussions on the matter.

Thanks for your integrity. Not everybody had it.

> P.s. Out of curiosity, what happens if the remaining TC were to vote 2-2 on
> the issue? Would my vote be taken as an implicit tiebreaker?

I say: the leader decides.

Regards,

-- 
  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".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [FFmpeg-devel] The patch series about premultiplied alpha
  2025-08-03 14:35     ` Nicolas George
@ 2025-08-03 15:49       ` Nicolas George
  2025-08-03 18:15         ` [FFmpeg-devel] [PATCH] lavfi: protection against premultiplied alpha (was: The patch series about premultiplied alpha) Nicolas George
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas George @ 2025-08-03 15:49 UTC (permalink / raw)
  To: FFmpeg development discussions and patches; +Cc: tc

Nicolas George (HE12025-08-03):
> By the way, I am willing to put aside my reluctance of contributing with
> all the bullshit going on in order to help implementing this flag
> system. But I suspect it is so simple to implement that it is not worth
> it.

In fact, I have started doing it. I use the following test case:

-vf 'premultiply=inplace=1,drawbox=x=50:y=50:w=800:h=600:c=#808080:t=50,unpremultiply=inplace=1'

(on top of a png produced by testsrc2). Compare the grayness of the box
with the case where premultiply is not applied.

I will send the series here in a few hours.

Regards,

-- 
  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".

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [FFmpeg-devel] [PATCH] lavfi: protection against premultiplied alpha (was: The patch series about premultiplied alpha)
  2025-08-03 15:49       ` Nicolas George
@ 2025-08-03 18:15         ` Nicolas George
  2025-08-03 20:04           ` Michael Niedermayer
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas George @ 2025-08-03 18:15 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

Nicolas George (HE12025-08-03):
> I will send the series here in a few hours.

Here is a series of patch. I am absolutely not sure I found all the
filters that could be flagged, but the rest can be done as the need
arises.

Not tested every filter, but it is pretty straightforward.

I could not find how to download your patch series in a format suitable
for git am from the monster, I used the v2 series, but it should not
change anything.

Regards,

-- 
  Nicolas George

[-- Attachment #2: 0001-lavfi-add-a-flag-for-filters-that-support-premultipl.patch --]
[-- Type: text/x-diff, Size: 1707 bytes --]

From e7867075c4dc4bb244798c096e484d3cfaf10254 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:34:08 +0200
Subject: [PATCH 01/39] lavfi: add a flag for filters that support
 premultiplied alpha

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/avfilter.c | 7 +++++++
 libavfilter/filters.h  | 6 ++++++
 2 files changed, 13 insertions(+)

diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index 5bcf0b4ef7..2f425b529c 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -1097,6 +1097,13 @@ int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
                                        link->time_base);
     }
 
+    if ((frame->alpha_mode == AVALPHA_MODE_PREMULTIPLIED) &&
+        !(link->dstpad->flags & AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED)) {
+        av_log(link->dst, AV_LOG_ERROR, "Frames with premultiplied alpha are not supported by this filter.\n");
+        av_frame_free(&frame);
+        return AVERROR_PATCHWELCOME;
+    }
+
     li->frame_blocked_in = li->frame_wanted_out = 0;
     li->l.frame_count_in++;
     li->l.sample_count_in += frame->nb_samples;
diff --git a/libavfilter/filters.h b/libavfilter/filters.h
index 11152cfabf..8b431bd457 100644
--- a/libavfilter/filters.h
+++ b/libavfilter/filters.h
@@ -62,6 +62,12 @@ struct AVFilterPad {
      */
 #define AVFILTERPAD_FLAG_FREE_NAME                       (1 << 1)
 
+    /**
+     * The filter is capable of handling frame with premultiplied alpha
+     * without producing garbled output
+     */
+#define AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED            (1 << 2)
+
     /**
      * A combination of AVFILTERPAD_FLAG_* flags.
      */
-- 
2.47.2


[-- Attachment #3: 0002-lavfi-vf_stack-check-alp-a-mode-consistency.patch --]
[-- Type: text/x-diff, Size: 1900 bytes --]

From e48d82211e62cb9199d722f7218cfccbd0c77741 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:41:02 +0200
Subject: [PATCH 02/39] =?UTF-8?q?lavfi/vf=5Fstack:=20check=20alp=C4=A5a=20?=
 =?UTF-8?q?mode=20consistency?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_stack.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c
index fa202ee0cc..981f644cd2 100644
--- a/libavfilter/vf_stack.c
+++ b/libavfilter/vf_stack.c
@@ -135,6 +135,7 @@ static av_cold int init(AVFilterContext *ctx)
         pad.name = av_asprintf("input%d", i);
         if (!pad.name)
             return AVERROR(ENOMEM);
+        pad.flags |= AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED;
 
         if ((ret = ff_append_inpad_free_name(ctx, &pad)) < 0)
             return ret;
@@ -166,6 +167,17 @@ static int process_slice(AVFilterContext *ctx, void *arg, int job, int nb_jobs)
     return 0;
 }
 
+static int check_premult_consistent(AVFrame * const *frames, unsigned nb_frames)
+{
+    unsigned m = 0, i;
+    for (i = 0; i < nb_frames; i++) {
+        m |= frames[i]->alpha_mode == AVALPHA_MODE_PREMULTIPLIED ? 2 : 1;
+        if (m == 3)
+            return 0;
+    }
+    return 1;
+}
+
 static int process_frame(FFFrameSync *fs)
 {
     AVFilterContext *ctx = fs->parent;
@@ -179,6 +191,10 @@ static int process_frame(FFFrameSync *fs)
         if ((ret = ff_framesync_get_frame(&s->fs, i, &in[i], 0)) < 0)
             return ret;
     }
+    if (!check_premult_consistent(in, s->nb_inputs)) {
+        av_log(ctx, AV_LOG_ERROR, "All frames must have the same alpha mode.\n");
+        return AVERROR(EINVAL);
+    }
 
     out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
     if (!out)
-- 
2.47.2


[-- Attachment #4: 0003-lavfi-video-add-ff_video_default_filterpad_premult_o.patch --]
[-- Type: text/x-diff, Size: 1658 bytes --]

From 84549c11729027093c0fc974a24631e7e3c22ae9 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:35:08 +0200
Subject: [PATCH 03/39] lavfi/video: add ff_video_default_filterpad_premult_ok
 helper

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/video.c | 8 ++++++++
 libavfilter/video.h | 7 +++++++
 2 files changed, 15 insertions(+)

diff --git a/libavfilter/video.c b/libavfilter/video.c
index 1de7f2ef59..462160846f 100644
--- a/libavfilter/video.c
+++ b/libavfilter/video.c
@@ -41,6 +41,14 @@ const AVFilterPad ff_video_default_filterpad[1] = {
     }
 };
 
+const AVFilterPad ff_video_default_filterpad_premult_ok[1] = {
+    {
+        .name = "default",
+        .type = AVMEDIA_TYPE_VIDEO,
+        .flags = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
+    }
+};
+
 AVFrame *ff_null_get_video_buffer(AVFilterLink *link, int w, int h)
 {
     return ff_get_video_buffer(link->dst->outputs[0], w, h);
diff --git a/libavfilter/video.h b/libavfilter/video.h
index f44d3445dc..2292fe1caf 100644
--- a/libavfilter/video.h
+++ b/libavfilter/video.h
@@ -30,6 +30,13 @@
  */
 extern const AVFilterPad ff_video_default_filterpad[1];
 
+/**
+ * An AVFilterPad array whose only entry has name "default"
+ * and is of type AVMEDIA_TYPE_VIDEO, with the
+ * AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED flag
+ */
+extern const AVFilterPad ff_video_default_filterpad_premult_ok[1];
+
 AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int w, int h);
 AVFrame *ff_default_get_video_buffer2(AVFilterLink *link, int w, int h, int align);
 AVFrame *ff_null_get_video_buffer(AVFilterLink *link, int w, int h);
-- 
2.47.2


[-- Attachment #5: 0004-lavfi-vf_null-use-ff_video_default_filterpad_premult.patch --]
[-- Type: text/x-diff, Size: 899 bytes --]

From 61ba67d98e26140f9bcd12b1f5dfdb430cfb77c3 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:37:43 +0200
Subject: [PATCH 04/39] lavfi/vf_null: use
 ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_null.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_null.c b/libavfilter/vf_null.c
index 7071cc959f..676b81e346 100644
--- a/libavfilter/vf_null.c
+++ b/libavfilter/vf_null.c
@@ -30,6 +30,6 @@ const FFFilter ff_vf_null = {
     .p.name        = "null",
     .p.description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."),
     .p.flags       = AVFILTER_FLAG_METADATA_ONLY,
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
     FILTER_OUTPUTS(ff_video_default_filterpad),
 };
-- 
2.47.2


[-- Attachment #6: 0005-lavfi-vf_fps-use-ff_video_default_filterpad_premult_.patch --]
[-- Type: text/x-diff, Size: 819 bytes --]

From a8d9f0af1601a9eb28721694a74169f36b483d8c Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:37:55 +0200
Subject: [PATCH 05/39] lavfi/vf_fps: use ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_fps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c
index 0257a8ef78..443dc0ee1e 100644
--- a/libavfilter/vf_fps.c
+++ b/libavfilter/vf_fps.c
@@ -395,6 +395,6 @@ const FFFilter ff_vf_fps = {
     .uninit      = uninit,
     .priv_size   = sizeof(FPSContext),
     .activate    = activate,
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
     FILTER_OUTPUTS(avfilter_vf_fps_outputs),
 };
-- 
2.47.2


[-- Attachment #7: 0006-lavfi-buffersink-use-ff_video_default_filterpad_prem.patch --]
[-- Type: text/x-diff, Size: 850 bytes --]

From f5df1d7b7c0a71f2d9d68b459254f44a83cc3e63 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:38:10 +0200
Subject: [PATCH 06/39] lavfi/buffersink: use
 ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/buffersink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c
index 50a7da2756..1033bf76d2 100644
--- a/libavfilter/buffersink.c
+++ b/libavfilter/buffersink.c
@@ -553,7 +553,7 @@ const FFFilter ff_vsink_buffer = {
     .init          = init_video,
     .uninit        = uninit,
     .activate      = activate,
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
     FILTER_QUERY_FUNC2(vsink_query_formats),
 };
 
-- 
2.47.2


[-- Attachment #8: 0007-lavfi-settb-use-ff_video_default_filterpad_premult_o.patch --]
[-- Type: text/x-diff, Size: 878 bytes --]

From c5f62c126faab2840c41a1f0dba467d6ba21193a Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:38:25 +0200
Subject: [PATCH 07/39] lavfi/settb: use ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/settb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/settb.c b/libavfilter/settb.c
index 6000c9c5a6..a68b0c1f80 100644
--- a/libavfilter/settb.c
+++ b/libavfilter/settb.c
@@ -178,7 +178,7 @@ const FFFilter ff_vf_settb = {
     .p.priv_class  = &settb_class,
     .p.flags       = AVFILTER_FLAG_METADATA_ONLY,
     .priv_size   = sizeof(SetTBContext),
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
     FILTER_OUTPUTS(avfilter_vf_settb_outputs),
     .activate    = activate,
 };
-- 
2.47.2


[-- Attachment #9: 0008-lavfi-vf_untile-use-ff_video_default_filterpad_premu.patch --]
[-- Type: text/x-diff, Size: 881 bytes --]

From 06d243dfce61c99d22f6d157b55a0ae18d2f9cf5 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:39:15 +0200
Subject: [PATCH 08/39] lavfi/vf_untile: use
 ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_untile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_untile.c b/libavfilter/vf_untile.c
index 6c1bfbabdc..655c05acc8 100644
--- a/libavfilter/vf_untile.c
+++ b/libavfilter/vf_untile.c
@@ -184,7 +184,7 @@ const FFFilter ff_vf_untile = {
     .uninit        = uninit,
     .activate      = activate,
     .priv_size     = sizeof(UntileContext),
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
     FILTER_OUTPUTS(untile_outputs),
     FILTER_QUERY_FUNC2(query_formats),
 };
-- 
2.47.2


[-- Attachment #10: 0009-lavfi-vf_fsync-use-ff_video_default_filterpad_premul.patch --]
[-- Type: text/x-diff, Size: 855 bytes --]

From f2ca298afbae767bcd0fbd7e7ceca0aafb2a200f Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:39:47 +0200
Subject: [PATCH 09/39] lavfi/vf_fsync: use
 ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_fsync.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_fsync.c b/libavfilter/vf_fsync.c
index 02f10a9bd8..f5cd202975 100644
--- a/libavfilter/vf_fsync.c
+++ b/libavfilter/vf_fsync.c
@@ -298,6 +298,6 @@ const FFFilter ff_vf_fsync = {
     .priv_size     = sizeof(FsyncContext),
     .activate      = activate,
     .formats_state = FF_FILTER_FORMATS_PASSTHROUGH,
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
     FILTER_OUTPUTS(fsync_outputs),
 };
-- 
2.47.2


[-- Attachment #11: 0010-lavfi-vf_separatefields-use-ff_video_default_filterp.patch --]
[-- Type: text/x-diff, Size: 907 bytes --]

From b7fbbcc2cce6c344b750eefb8f9b1c9c30d8d017 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:40:38 +0200
Subject: [PATCH 10/39] lavfi/vf_separatefields: use
 ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_separatefields.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_separatefields.c b/libavfilter/vf_separatefields.c
index c0c0640dcc..f32a147b96 100644
--- a/libavfilter/vf_separatefields.c
+++ b/libavfilter/vf_separatefields.c
@@ -172,6 +172,6 @@ const FFFilter ff_vf_separatefields = {
     .priv_size   = sizeof(SeparateFieldsContext),
     .activate    = activate,
     .uninit      = uninit,
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
     FILTER_OUTPUTS(separatefields_outputs),
 };
-- 
2.47.2


[-- Attachment #12: 0011-lavfi-f_cue-use-ff_video_default_filterpad_premult_o.patch --]
[-- Type: text/x-diff, Size: 906 bytes --]

From 43e1dfce32217775cc3fba8da14adb61761c69b2 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:41:28 +0200
Subject: [PATCH 11/39] lavfi/f_cue: use ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/f_cue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/f_cue.c b/libavfilter/f_cue.c
index 63027c7c2e..d38f83e6a5 100644
--- a/libavfilter/f_cue.c
+++ b/libavfilter/f_cue.c
@@ -105,7 +105,7 @@ const FFFilter ff_vf_cue = {
     .p.description = NULL_IF_CONFIG_SMALL("Delay filtering to match a cue."),
     .p.priv_class  = &cue_acue_class,
     .priv_size   = sizeof(CueContext),
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
     FILTER_OUTPUTS(ff_video_default_filterpad),
     .activate    = activate,
 };
-- 
2.47.2


[-- Attachment #13: 0012-lavfi-f_latency-use-ff_video_default_filterpad_premu.patch --]
[-- Type: text/x-diff, Size: 839 bytes --]

From c2189e67e03767ee872792a6782dcb3ec057d779 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:41:36 +0200
Subject: [PATCH 12/39] lavfi/f_latency: use
 ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/f_latency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/f_latency.c b/libavfilter/f_latency.c
index 00b55ddb4b..e82ac316ee 100644
--- a/libavfilter/f_latency.c
+++ b/libavfilter/f_latency.c
@@ -109,7 +109,7 @@ const FFFilter ff_vf_latency = {
     .init          = init,
     .uninit        = uninit,
     .activate      = activate,
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
     FILTER_OUTPUTS(ff_video_default_filterpad),
 };
 
-- 
2.47.2


[-- Attachment #14: 0013-lavfi-f_loop-use-ff_video_default_filterpad_premult_.patch --]
[-- Type: text/x-diff, Size: 842 bytes --]

From ae04f4daa340e9f7094580278671014f5539d774 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:41:45 +0200
Subject: [PATCH 13/39] lavfi/f_loop: use ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/f_loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/f_loop.c b/libavfilter/f_loop.c
index 1984fad70d..d437d4ad54 100644
--- a/libavfilter/f_loop.c
+++ b/libavfilter/f_loop.c
@@ -464,7 +464,7 @@ const FFFilter ff_vf_loop = {
     .init        = init,
     .uninit      = uninit,
     .activate    = activate,
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
     FILTER_OUTPUTS(ff_video_default_filterpad),
 };
 #endif /* CONFIG_LOOP_FILTER */
-- 
2.47.2


[-- Attachment #15: 0014-lavfi-split-use-ff_video_default_filterpad_premult_o.patch --]
[-- Type: text/x-diff, Size: 810 bytes --]

From 6dc1ef0d7f99cd23659e616429bee1ca752f916f Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:41:52 +0200
Subject: [PATCH 14/39] lavfi/split: use ff_video_default_filterpad_premult_ok

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/split.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/split.c b/libavfilter/split.c
index d0bd0c3b2a..831a2e9170 100644
--- a/libavfilter/split.c
+++ b/libavfilter/split.c
@@ -132,7 +132,7 @@ const FFFilter ff_vf_split = {
     .priv_size   = sizeof(SplitContext),
     .init        = split_init,
     .activate    = activate,
-    FILTER_INPUTS(ff_video_default_filterpad),
+    FILTER_INPUTS(ff_video_default_filterpad_premult_ok),
 };
 
 const FFFilter ff_af_asplit = {
-- 
2.47.2


[-- Attachment #16: 0015-lavfi-vf_format-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTI.patch --]
[-- Type: text/x-diff, Size: 798 bytes --]

From 9cb8a71cddfd32f3a15031efe041446b1a8a0723 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:37:00 +0200
Subject: [PATCH 15/39] lavfi/vf_format: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_format.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c
index ae91b9655a..3529e40e8b 100644
--- a/libavfilter/vf_format.c
+++ b/libavfilter/vf_format.c
@@ -180,6 +180,7 @@ static const AVFilterPad inputs[] = {
         .name             = "default",
         .type             = AVMEDIA_TYPE_VIDEO,
         .get_buffer.video = ff_null_get_video_buffer,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #17: 0016-lavfi-vf_scale-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTIP.patch --]
[-- Type: text/x-diff, Size: 1240 bytes --]

From c437bf3d55d2346e64243530b7be873e18fc3a23 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:37:31 +0200
Subject: [PATCH 16/39] lavfi/vf_scale: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_scale.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 54cd0b12b6..a4b331ddaf 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -1168,6 +1168,7 @@ static const AVFilterPad avfilter_vf_scale_inputs[] = {
     {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
@@ -1225,11 +1226,13 @@ static const AVFilterPad avfilter_vf_scale2ref_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
     {
         .name         = "ref",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame_ref,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #18: 0017-lavfi-vf_aspect-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTI.patch --]
[-- Type: text/x-diff, Size: 781 bytes --]

From c0c478a6b1e0f4ec4b4c3c9d7a74823d5d0ef251 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:38:35 +0200
Subject: [PATCH 17/39] lavfi/vf_aspect: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_aspect.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index 7ec1035336..7816c9934c 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -132,6 +132,7 @@ static const AVFilterPad aspect_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #19: 0018-lavfi-vf_setparams-set-AVFILTERPAD_FLAG_ACCEPT_PREMU.patch --]
[-- Type: text/x-diff, Size: 792 bytes --]

From 8d83718c4fc909dd91d6c1854bd2fff048fa53f1 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:38:50 +0200
Subject: [PATCH 18/39] lavfi/vf_setparams: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_setparams.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c
index 5043ae6e65..a2211cef8d 100644
--- a/libavfilter/vf_setparams.c
+++ b/libavfilter/vf_setparams.c
@@ -206,6 +206,7 @@ static const AVFilterPad inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #20: 0019-lavfi-vf_copy-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTIPL.patch --]
[-- Type: text/x-diff, Size: 777 bytes --]

From e795f7e514e3e23a516d5f2ca9162a62f57edc11 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:39:24 +0200
Subject: [PATCH 19/39] lavfi/vf_copy: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_copy.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_copy.c b/libavfilter/vf_copy.c
index c6d5191901..76537fe3e4 100644
--- a/libavfilter/vf_copy.c
+++ b/libavfilter/vf_copy.c
@@ -66,6 +66,7 @@ static const AVFilterPad avfilter_vf_copy_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #21: 0020-lavfi-vf_vfrdet-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTI.patch --]
[-- Type: text/x-diff, Size: 779 bytes --]

From 2ef259981ae8a8fb91865716dfb33ed05b6e6d37 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:39:36 +0200
Subject: [PATCH 20/39] lavfi/vf_vfrdet: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_vfrdet.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_vfrdet.c b/libavfilter/vf_vfrdet.c
index f99bc71de7..7500afb998 100644
--- a/libavfilter/vf_vfrdet.c
+++ b/libavfilter/vf_vfrdet.c
@@ -94,6 +94,7 @@ static const AVFilterPad vfrdet_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #22: 0021-lavfi-vf_framestep-set-AVFILTERPAD_FLAG_ACCEPT_PREMU.patch --]
[-- Type: text/x-diff, Size: 800 bytes --]

From 8905930c9d318d47c0406f38d634b902ed3a6b1c Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:39:55 +0200
Subject: [PATCH 21/39] lavfi/vf_framestep: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_framestep.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_framestep.c b/libavfilter/vf_framestep.c
index 02beda6cf3..76eeac30d2 100644
--- a/libavfilter/vf_framestep.c
+++ b/libavfilter/vf_framestep.c
@@ -79,6 +79,7 @@ static const AVFilterPad framestep_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #23: 0022-lavfi-vf_ccrepack-set-AVFILTERPAD_FLAG_ACCEPT_PREMUL.patch --]
[-- Type: text/x-diff, Size: 808 bytes --]

From d9676eb568a6567bb8052320e41cc201df68d1d0 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:40:03 +0200
Subject: [PATCH 22/39] lavfi/vf_ccrepack: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_ccrepack.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_ccrepack.c b/libavfilter/vf_ccrepack.c
index f3f0c69676..bc17f97bac 100644
--- a/libavfilter/vf_ccrepack.c
+++ b/libavfilter/vf_ccrepack.c
@@ -84,6 +84,7 @@ static const AVFilterPad avfilter_vf_ccrepack_inputs[] = {
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
         .config_props = config_input,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #24: 0023-lavfi-vf_dejudder-set-AVFILTERPAD_FLAG_ACCEPT_PREMUL.patch --]
[-- Type: text/x-diff, Size: 795 bytes --]

From 33fe0ee504510badc1dc4393232c2b3a4c39f21a Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:40:10 +0200
Subject: [PATCH 23/39] lavfi/vf_dejudder: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_dejudder.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_dejudder.c b/libavfilter/vf_dejudder.c
index 9d0c4717d2..875842314e 100644
--- a/libavfilter/vf_dejudder.c
+++ b/libavfilter/vf_dejudder.c
@@ -163,6 +163,7 @@ static const AVFilterPad dejudder_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #25: 0024-lavfi-vf_iccgen-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTI.patch --]
[-- Type: text/x-diff, Size: 794 bytes --]

From 19cb9e06457b565ed77c2389703ed444f2bdb41b Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:40:15 +0200
Subject: [PATCH 24/39] lavfi/vf_iccgen: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_iccgen.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_iccgen.c b/libavfilter/vf_iccgen.c
index 06c5b4ebdc..c1e41c7644 100644
--- a/libavfilter/vf_iccgen.c
+++ b/libavfilter/vf_iccgen.c
@@ -159,6 +159,7 @@ static const AVFilterPad iccgen_inputs[] = {
         .name           = "default",
         .type           = AVMEDIA_TYPE_VIDEO,
         .filter_frame   = iccgen_filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #26: 0025-lavfi-vf_premultiply-set-AVFILTERPAD_FLAG_ACCEPT_PRE.patch --]
[-- Type: text/x-diff, Size: 884 bytes --]

From f48375aa798c90914552fe5be1b81b1ddcefebed Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:40:23 +0200
Subject: [PATCH 25/39] lavfi/vf_premultiply: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_premultiply.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c
index 3232ba0ee2..5087268224 100644
--- a/libavfilter/vf_premultiply.c
+++ b/libavfilter/vf_premultiply.c
@@ -798,6 +798,8 @@ static av_cold int init(AVFilterContext *ctx)
     pad.type         = AVMEDIA_TYPE_VIDEO;
     pad.name         = "main";
     pad.config_props = config_input;
+    if (s->inverse)
+        pad.flags |= AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED;
 
     if ((ret = ff_append_inpad(ctx, &pad)) < 0)
         return ret;
-- 
2.47.2


[-- Attachment #27: 0026-lavfi-vf_random-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTI.patch --]
[-- Type: text/x-diff, Size: 781 bytes --]

From 4e9ae2107111d2418477df294ba287697fb8585a Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:40:30 +0200
Subject: [PATCH 26/39] lavfi/vf_random: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_random.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_random.c b/libavfilter/vf_random.c
index ca95ca2c10..6c69daeeec 100644
--- a/libavfilter/vf_random.c
+++ b/libavfilter/vf_random.c
@@ -130,6 +130,7 @@ static const AVFilterPad random_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #28: 0027-lavfi-vf_shuffleframes-set-AVFILTERPAD_FLAG_ACCEPT_P.patch --]
[-- Type: text/x-diff, Size: 830 bytes --]

From 9fe38c1f663f3edadf8f6422eafac53d32a052e6 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:40:47 +0200
Subject: [PATCH 27/39] lavfi/vf_shuffleframes: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_shuffleframes.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_shuffleframes.c b/libavfilter/vf_shuffleframes.c
index 7d16fcc497..5756431b00 100644
--- a/libavfilter/vf_shuffleframes.c
+++ b/libavfilter/vf_shuffleframes.c
@@ -144,6 +144,7 @@ static const AVFilterPad shuffleframes_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #29: 0028-lavfi-vf_overlay-set-AVFILTERPAD_FLAG_ACCEPT_PREMULT.patch --]
[-- Type: text/x-diff, Size: 1013 bytes --]

From 87227184fe87f115fbd17296706a612434164a0b Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:53:10 +0200
Subject: [PATCH 28/39] lavfi/vf_overlay: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_overlay.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c
index 8eb4218542..22d0a288f5 100644
--- a/libavfilter/vf_overlay.c
+++ b/libavfilter/vf_overlay.c
@@ -983,11 +983,13 @@ static const AVFilterPad avfilter_vf_overlay_inputs[] = {
         .name         = "main",
         .type         = AVMEDIA_TYPE_VIDEO,
         .config_props = config_input_main,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
     {
         .name         = "overlay",
         .type         = AVMEDIA_TYPE_VIDEO,
         .config_props = config_input_overlay,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #30: 0029-lavfi-f_select-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTIP.patch --]
[-- Type: text/x-diff, Size: 846 bytes --]

From 6e1ac54c782ce2ba4c0399248c64e6cc457ef737 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:54:11 +0200
Subject: [PATCH 29/39] lavfi/f_select: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Assume a very transparent frame counts as a scene change.

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/f_select.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c
index 46208a7b76..bc2ac66df6 100644
--- a/libavfilter/f_select.c
+++ b/libavfilter/f_select.c
@@ -549,6 +549,7 @@ static const AVFilterPad avfilter_vf_select_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .config_props = config_input,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #31: 0030-lavfi-vf_bbox-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTIPL.patch --]
[-- Type: text/x-diff, Size: 767 bytes --]

From 3d7193456082c9f7f792307b052e365aae35df41 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:55:47 +0200
Subject: [PATCH 30/39] lavfi/vf_bbox: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_bbox.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_bbox.c b/libavfilter/vf_bbox.c
index 9631613ff4..62b16ec968 100644
--- a/libavfilter/vf_bbox.c
+++ b/libavfilter/vf_bbox.c
@@ -133,6 +133,7 @@ static const AVFilterPad bbox_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #32: 0031-lavfi-vf_blackdetect-set-AVFILTERPAD_FLAG_ACCEPT_PRE.patch --]
[-- Type: text/x-diff, Size: 865 bytes --]

From f96bcd8a0a946c5fbda64217bafc4c1db2a72db9 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 19:56:52 +0200
Subject: [PATCH 31/39] lavfi/vf_blackdetect: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Assume very transparent counts as black.

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_blackdetect.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c
index b233bdfd60..628495560a 100644
--- a/libavfilter/vf_blackdetect.c
+++ b/libavfilter/vf_blackdetect.c
@@ -249,6 +249,7 @@ static const AVFilterPad blackdetect_inputs[] = {
         .type          = AVMEDIA_TYPE_VIDEO,
         .config_props  = config_input,
         .filter_frame  = filter_frame,
+        .flags         = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #33: 0032-lavfi-vf_pixdesctest-set-AVFILTERPAD_FLAG_ACCEPT_PRE.patch --]
[-- Type: text/x-diff, Size: 831 bytes --]

From 84293ddd1cc021097a75dd15376e40f1847c51ca Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 20:00:37 +0200
Subject: [PATCH 32/39] lavfi/vf_pixdesctest: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_pixdesctest.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c
index 994fe1db93..128511049b 100644
--- a/libavfilter/vf_pixdesctest.c
+++ b/libavfilter/vf_pixdesctest.c
@@ -113,6 +113,7 @@ static const AVFilterPad avfilter_vf_pixdesctest_inputs[] = {
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
         .config_props = config_props,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #34: 0033-lavfi-vf_libplacebo-set-AVFILTERPAD_FLAG_ACCEPT_PREM.patch --]
[-- Type: text/x-diff, Size: 914 bytes --]

From 26e6e4313bf0c0eb9dfa4fc37d01e2644a9f5f78 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 20:00:50 +0200
Subject: [PATCH 33/39] lavfi/vf_libplacebo: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_libplacebo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index 26ded247bc..89eb36e845 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -566,6 +566,7 @@ static int libplacebo_init(AVFilterContext *avctx)
             .name         = av_asprintf("input%d", i),
             .type         = AVMEDIA_TYPE_VIDEO,
             .config_props = &libplacebo_config_input,
+            .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
         };
         if (!pad.name)
             return AVERROR(ENOMEM);
-- 
2.47.2


[-- Attachment #35: 0034-lavfi-vf_field-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTIP.patch --]
[-- Type: text/x-diff, Size: 772 bytes --]

From c5c8d0edd0d35c63ed7057e446cf7fde7c741601 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 20:07:17 +0200
Subject: [PATCH 34/39] lavfi/vf_field: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_field.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_field.c b/libavfilter/vf_field.c
index 40fcf73bc4..0905c64edc 100644
--- a/libavfilter/vf_field.c
+++ b/libavfilter/vf_field.c
@@ -88,6 +88,7 @@ static const AVFilterPad field_inputs[] = {
         .name         = "default",
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #36: 0035-lavfi-vf_fieldhint-set-AVFILTERPAD_FLAG_ACCEPT_PREMU.patch --]
[-- Type: text/x-diff, Size: 795 bytes --]

From 79a372018b899142c45de6820754d2a30ba2765e Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 20:07:35 +0200
Subject: [PATCH 35/39] lavfi/vf_fieldhint: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_fieldhint.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_fieldhint.c b/libavfilter/vf_fieldhint.c
index 6f4403a48d..9680a16903 100644
--- a/libavfilter/vf_fieldhint.c
+++ b/libavfilter/vf_fieldhint.c
@@ -302,6 +302,7 @@ static const AVFilterPad inputs[] = {
         .type         = AVMEDIA_TYPE_VIDEO,
         .config_props = config_input,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #37: 0036-lavfi-vf_fieldmatch-set-AVFILTERPAD_FLAG_ACCEPT_PREM.patch --]
[-- Type: text/x-diff, Size: 824 bytes --]

From d22d3b3f6a51b438b3440f22e3a3cdb809bb129b Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 20:07:43 +0200
Subject: [PATCH 36/39] lavfi/vf_fieldmatch: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_fieldmatch.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c
index 60b4a602cb..484a0ea173 100644
--- a/libavfilter/vf_fieldmatch.c
+++ b/libavfilter/vf_fieldmatch.c
@@ -989,6 +989,7 @@ static av_cold int fieldmatch_init(AVFilterContext *ctx)
         .name         = "main",
         .type         = AVMEDIA_TYPE_VIDEO,
         .config_props = config_input,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     };
     int ret;
 
-- 
2.47.2


[-- Attachment #38: 0037-lavfi-vf_fieldorder-set-AVFILTERPAD_FLAG_ACCEPT_PREM.patch --]
[-- Type: text/x-diff, Size: 824 bytes --]

From b5bdd1448136333a77c97ea10f9a74f7dfb42434 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 20:07:50 +0200
Subject: [PATCH 37/39] lavfi/vf_fieldorder: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_fieldorder.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c
index fe999f27ea..0e288e86be 100644
--- a/libavfilter/vf_fieldorder.c
+++ b/libavfilter/vf_fieldorder.c
@@ -170,6 +170,7 @@ static const AVFilterPad avfilter_vf_fieldorder_inputs[] = {
         .type         = AVMEDIA_TYPE_VIDEO,
         .config_props = config_input,
         .filter_frame = filter_frame,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #39: 0038-lavfi-vf_hflip-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTIP.patch --]
[-- Type: text/x-diff, Size: 789 bytes --]

From 2408c4ca68d53bf33ec397a4fa50d86d053882b2 Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 20:09:02 +0200
Subject: [PATCH 38/39] lavfi/vf_hflip: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_hflip.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c
index 8f8dd14240..0100867fc0 100644
--- a/libavfilter/vf_hflip.c
+++ b/libavfilter/vf_hflip.c
@@ -143,6 +143,7 @@ static const AVFilterPad avfilter_vf_hflip_inputs[] = {
         .type         = AVMEDIA_TYPE_VIDEO,
         .filter_frame = filter_frame,
         .config_props = config_props,
+        .flags        = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #40: 0039-lavfi-vf_vflip-set-AVFILTERPAD_FLAG_ACCEPT_PREMULTIP.patch --]
[-- Type: text/x-diff, Size: 803 bytes --]

From d28bde401f8aa7a43c20729686831865f39cd7cb Mon Sep 17 00:00:00 2001
From: Nicolas George <george@nsup.org>
Date: Sun, 3 Aug 2025 20:09:11 +0200
Subject: [PATCH 39/39] lavfi/vf_vflip: set
 AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED

Signed-off-by: Nicolas George <george@nsup.org>
---
 libavfilter/vf_vflip.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c
index 4e0411a457..135d630ab1 100644
--- a/libavfilter/vf_vflip.c
+++ b/libavfilter/vf_vflip.c
@@ -124,6 +124,7 @@ static const AVFilterPad avfilter_vf_vflip_inputs[] = {
         .get_buffer.video = get_video_buffer,
         .filter_frame     = filter_frame,
         .config_props     = config_input,
+        .flags            = AVFILTERPAD_FLAG_ACCEPT_PREMULTIPLIED,
     },
 };
 
-- 
2.47.2


[-- Attachment #41: 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] 9+ messages in thread

* Re: [FFmpeg-devel] [PATCH] lavfi: protection against premultiplied alpha (was: The patch series about premultiplied alpha)
  2025-08-03 18:15         ` [FFmpeg-devel] [PATCH] lavfi: protection against premultiplied alpha (was: The patch series about premultiplied alpha) Nicolas George
@ 2025-08-03 20:04           ` Michael Niedermayer
  2025-08-03 20:50             ` Kacper Michajlow
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Niedermayer @ 2025-08-03 20:04 UTC (permalink / raw)
  To: FFmpeg development discussions and patches


[-- Attachment #1.1: Type: text/plain, Size: 2956 bytes --]

Hi

On Sun, Aug 03, 2025 at 08:15:09PM +0200, Nicolas George wrote:
> Nicolas George (HE12025-08-03):
> > I will send the series here in a few hours.
> 
> Here is a series of patch. I am absolutely not sure I found all the
> filters that could be flagged, but the rest can be done as the need
> arises.
> 
> Not tested every filter, but it is pretty straightforward.
> 

> I could not find how to download your patch series in a format suitable
> for git am from the monster, I used the v2 series, but it should not
> change anything.

the easiest way to get the latest pull req from forgejo is to add
the 3rd line of this to your git config matching your remote name for forgejo

[remote "fforge"]
url = git@code.ffmpeg.org:FFmpeg/FFmpeg.git
fetch = +refs/heads/*:refs/remotes/fforge/*
fetch = +refs/pull/*/head:refs/remotes/fforge/pr/*

than a simple
git fetch  fforge

will simply fetch all the new pull requests;

remote: Enumerating objects: 292, done.
remote: Counting objects: 100% (202/202), done.
remote: Compressing objects: 100% (140/140), done.
remote: Total 140 (delta 106), reused 0 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (140/140), 26.96 KiB | 1.80 MiB/s, done.
Resolving deltas: 100% (106/106), completed with 43 local objects.
From code.ffmpeg.org:FFmpeg/FFmpeg
   16d663d3713..d5f7a428b1e  master               -> fforge/master
 + 4f5d8d6d83e...e700be74501 refs/pull/20023/head -> fforge/pr/20023  (forced update)
 + 365709cea13...b48b607e18e refs/pull/20026/head -> fforge/pr/20026  (forced update)
 + 7c25b6966e5...999e3e9bf80 refs/pull/20076/head -> fforge/pr/20076  (forced update)
 + 79806960d83...5173c8db79f refs/pull/20080/head -> fforge/pr/20080  (forced update)
 + f80bfa6791f...f63ea15605a refs/pull/20088/head -> fforge/pr/20088  (forced update)
 + 0a38a1aeebf...901036493d5 refs/pull/20091/head -> fforge/pr/20091  (forced update)
 + ca981fb1b03...6b07a40fd67 refs/pull/20092/head -> fforge/pr/20092  (forced update)
 + 65ffc657982...95bd0614f6b refs/pull/20094/head -> fforge/pr/20094  (forced update)
 * [new ref]                 refs/pull/20096/head -> fforge/pr/20096
 * [new ref]                 refs/pull/20097/head -> fforge/pr/20097
 * [new ref]                 refs/pull/20098/head -> fforge/pr/20098
 * [new ref]                 refs/pull/20099/head -> fforge/pr/20099
 * [new ref]                 refs/pull/20101/head -> fforge/pr/20101
 * [new ref]                 refs/pull/20102/head -> fforge/pr/20102
 * [new ref]                 refs/pull/20103/head -> fforge/pr/20103


then simply a
git merge fforge/pr/20031

will merge the specified pull request

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Whats the most studid thing your enemy could do ? Blow himself up
Whats the most studid thing you could do ? Give up your rights and
freedom because your enemy blew himself up.


[-- 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] 9+ messages in thread

* Re: [FFmpeg-devel] [PATCH] lavfi: protection against premultiplied alpha (was: The patch series about premultiplied alpha)
  2025-08-03 20:04           ` Michael Niedermayer
@ 2025-08-03 20:50             ` Kacper Michajlow
  0 siblings, 0 replies; 9+ messages in thread
From: Kacper Michajlow @ 2025-08-03 20:50 UTC (permalink / raw)
  To: FFmpeg development discussions and patches

On Sun, 3 Aug 2025 at 22:04, Michael Niedermayer <michael@niedermayer.cc> wrote:
>
> Hi
>
> On Sun, Aug 03, 2025 at 08:15:09PM +0200, Nicolas George wrote:
> > Nicolas George (HE12025-08-03):
> > > I will send the series here in a few hours.
> >
> > Here is a series of patch. I am absolutely not sure I found all the
> > filters that could be flagged, but the rest can be done as the need
> > arises.
> >
> > Not tested every filter, but it is pretty straightforward.
> >
>
> > I could not find how to download your patch series in a format suitable
> > for git am from the monster, I used the v2 series, but it should not
> > change anything.
>
> the easiest way to get the latest pull req from forgejo is to add
> the 3rd line of this to your git config matching your remote name for forgejo
>
> [remote "fforge"]
> url = git@code.ffmpeg.org:FFmpeg/FFmpeg.git
> fetch = +refs/heads/*:refs/remotes/fforge/*
> fetch = +refs/pull/*/head:refs/remotes/fforge/pr/*
>
> than a simple
> git fetch  fforge
>
> will simply fetch all the new pull requests;
>
> remote: Enumerating objects: 292, done.
> remote: Counting objects: 100% (202/202), done.
> remote: Compressing objects: 100% (140/140), done.
> remote: Total 140 (delta 106), reused 0 (delta 0), pack-reused 0 (from 0)
> Receiving objects: 100% (140/140), 26.96 KiB | 1.80 MiB/s, done.
> Resolving deltas: 100% (106/106), completed with 43 local objects.
> From code.ffmpeg.org:FFmpeg/FFmpeg
>    16d663d3713..d5f7a428b1e  master               -> fforge/master
>  + 4f5d8d6d83e...e700be74501 refs/pull/20023/head -> fforge/pr/20023  (forced update)
>  + 365709cea13...b48b607e18e refs/pull/20026/head -> fforge/pr/20026  (forced update)
>  + 7c25b6966e5...999e3e9bf80 refs/pull/20076/head -> fforge/pr/20076  (forced update)
>  + 79806960d83...5173c8db79f refs/pull/20080/head -> fforge/pr/20080  (forced update)
>  + f80bfa6791f...f63ea15605a refs/pull/20088/head -> fforge/pr/20088  (forced update)
>  + 0a38a1aeebf...901036493d5 refs/pull/20091/head -> fforge/pr/20091  (forced update)
>  + ca981fb1b03...6b07a40fd67 refs/pull/20092/head -> fforge/pr/20092  (forced update)
>  + 65ffc657982...95bd0614f6b refs/pull/20094/head -> fforge/pr/20094  (forced update)
>  * [new ref]                 refs/pull/20096/head -> fforge/pr/20096
>  * [new ref]                 refs/pull/20097/head -> fforge/pr/20097
>  * [new ref]                 refs/pull/20098/head -> fforge/pr/20098
>  * [new ref]                 refs/pull/20099/head -> fforge/pr/20099
>  * [new ref]                 refs/pull/20101/head -> fforge/pr/20101
>  * [new ref]                 refs/pull/20102/head -> fforge/pr/20102
>  * [new ref]                 refs/pull/20103/head -> fforge/pr/20103
>
>
> then simply a
> git merge fforge/pr/20031
>
> will merge the specified pull request
>

If you prefer to not have all PR fetched on each remote update, it's
possible to do on demand with

git fetch upstream pull/20031/head && git merge FETCH_HEAD

The end result is the same.

- Kacper
_______________________________________________
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] 9+ messages in thread

end of thread, other threads:[~2025-08-03 20:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-02 15:18 [FFmpeg-devel] The patch series about premultiplied alpha Nicolas George
2025-08-02 18:03 ` Nicolas George
2025-08-03 10:42   ` Niklas Haas
2025-08-03 10:50     ` Niklas Haas
2025-08-03 14:35     ` Nicolas George
2025-08-03 15:49       ` Nicolas George
2025-08-03 18:15         ` [FFmpeg-devel] [PATCH] lavfi: protection against premultiplied alpha (was: The patch series about premultiplied alpha) Nicolas George
2025-08-03 20:04           ` Michael Niedermayer
2025-08-03 20:50             ` Kacper Michajlow

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