[FFmpeg-devel] [PATCH] avfilter: properly reduce YUV colorspace format lists

Damiano Galassi damiog at gmail.com
Wed Mar 27 16:13:38 EET 2024


On Mon, Mar 25, 2024 at 4:10 PM Niklas Haas <ffmpeg at haasn.xyz> wrote:

> From: Niklas Haas <git at haasn.dev>
>
> Doing this with REDUCE_FORMATS() instead of swap_color_*() is not only
> shorter, but more importantly comes with the benefit of being done
> inside a loop, allowing us to correctly propagate complex graphs
> involving multiple conversion filters (e.g. -vf scale,zscale).
>
> The latter family of swapping functions is only used to settle the
> best *remaining* entry if no exact match was found, and as such was
> never the correct solution to YUV colorspaces, which only care about
> exact matches.
>

I can confirm this fixes the issue I was seeing.


More information about the ffmpeg-devel mailing list