[FFmpeg-devel] [PATCH] avfilter: fix YUV colorspace negotiation for YUVJ

Niklas Haas ffmpeg at haasn.xyz
Thu Mar 28 14:55:13 EET 2024


On Mon, 25 Mar 2024 16:10:55 +0100 Niklas Haas <ffmpeg at haasn.xyz> wrote:
> On Mon, 25 Mar 2024 14:40:44 +0100 Niklas Haas <ffmpeg at haasn.xyz> wrote:
> > From: Niklas Haas <git at haasn.dev>
> > 
> > Ironically, despite being introduced to make YUVJ unnecessary, the new
> > YUV negotiation logic failed to actually negotiate YUVJ formats
> > themselves correctly, leading to errors when passing YUVJ frames into
> > a filter graph. (They were effectively treated like RGB or Grayscale
> > formats, rather than as forced-full-range YUV, and hence did not have
> > their colorspace matrix correctly negotiated)
> > 
> > Fix this by splitting off the YUVJ check from ff_fmt_is_regular_yuv().
> > Obviously, we can trivially undo this change again once YUVJ is actually
> > deleted from the codebase.
> 
> Breaks FATE, I will investigate.

This breakage was already fixed by another series of commits I had on
a different branch, which were themselves dependent on the new AVCodec
API.

(Specifically, those commits that enable ffmpeg_enc.c to propagate the
desired output color range back up the filter graph, as well as the FATE
fix to properly tag rawvideo tiles)

It may make more sense to just focus on merging that one first, then.


More information about the ffmpeg-devel mailing list