[FFmpeg-devel] Again pre-multiplied alpha
Niklas Haas
ffmpeg at haasn.xyz
Thu Jul 24 14:11:54 EEST 2025
On Wed, 23 Jul 2025 19:02:06 +0200 Nicolas George <george at nsup.org> wrote:
> Niklas Haas (HE12025-07-23):
> > [PATCH v2 05/18] avcodec/encode: enforce alpha mode compatibility at encode time
>
> 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.
That is no worse than the status quo, so I fail to see how this patch is
a regression in this regard.
That aside, there is also not anything preventing you from doing the same
for images with a different chroma sample location, or different HDR metadata,
or different sample aspect ratios, or any of the other oodles of properties
(including arbitrarily extensible frame side data) that are not currently
participating in libavfilter format negotiation.
In a perfect world, we would have automatic format negotiation for every
AVFrame property; but as it stands, the libavfilter code is too obnoxious,
brittle and inflexible to permit such while remaining sane. While redesigning
libavfilter to make it more extensible would certainly be a useful exercise
(perhaps a good STF 2025 candidate?), I think that rather exceeds the scope
of this patchset.
>
> Regards,
>
> --
> Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-devel
mailing list