Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Nicolas George via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Nicolas George <george@nsup.org>
Subject: [FFmpeg-devel] Re: [PATCH] avfilter/avfiltergraph: always retry format negotiation after auto-filters (PR #21100)
Date: Tue, 16 Dec 2025 16:59:45 +0100
Message-ID: <aUGB8Z5yyG0lsEeG@phare.normalesup.org> (raw)
In-Reply-To: <176485189756.39.11557437636566510079@2cb04c0e5124>

Niklas Haas via ffmpeg-devel (HE12025-12-04):
> >From 60a3b0848e038d75a59dd942c547787c6e68869a Mon Sep 17 00:00:00 2001
> From: Niklas Haas <git@haasn.dev>
> Date: Thu, 4 Dec 2025 13:25:03 +0100
> Subject: [PATCH 1/2] avfilter/avfiltergraph: always retry format negotiation
>  after auto-filters
> 
> There is an edge case not covered by the current logic: If there is only
> a single auto-filter inserted, but the auto-inserted filter is incompatible
> with a *different* format attribute (after settling the previous formats),
> we may need a second auto-filter (e.g. `scale`) to settle the newly introduced
> incompatibility.

I have strong doubts about this and the code it is trying to fix.

And since it was pushed too soon without review, I reserve the right to
revert, but let us discuss first.

The original negotiation code is designed for one single conversion
filter that does everything: if it is possible to convert at all, then
inserting the right conversion filter for the media type (scale for
video, aresample for audio) would be able to make the conversion.

This is not theoretical: unlike video, audio had multiple dimensions in
the negotiation from the start, and over time multiple subtle
adjustments had to be made to avoid doing multiple conversions due to
apparent incompatibilities.

And it is not a purely technical choice, it is also a choice for user
experience: if they want to control finely where the conversion happens,
the do not have to also worry about what conversion happens. They can,
but they do not have to.

But then you added the alpha mode negotiation, and you broke that.

So yes, this is not a proper fix.

The proper fix would be to make sure scale can convert between straight
and premultiplied alpha.

Please fix your fix.

Regards,

-- 
  Nicolas George
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

      parent reply	other threads:[~2025-12-16 16:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-04 12:38 [FFmpeg-devel] " Niklas Haas via ffmpeg-devel
2025-12-09 20:02 ` [FFmpeg-devel] " Nicolas George via ffmpeg-devel
2025-12-09 22:06   ` Nicolas George via ffmpeg-devel
2025-12-16 15:59 ` Nicolas George via ffmpeg-devel [this message]

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=aUGB8Z5yyG0lsEeG@phare.normalesup.org \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=george@nsup.org \
    /path/to/YOUR_REPLY

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

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

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

This inbox may be cloned and mirrored by anyone:

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

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

Example config snippet for mirrors.


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