[FFmpeg-devel] [RFC PATCH 00/25] YUVJ removal + filter negotiation
Niklas Haas
ffmpeg at haasn.xyz
Thu Nov 9 14:19:32 EET 2023
Following up on the previous attempts at YUVJ removal, this series
implements full filter negotiation. It is WIP because I still need to go
through the remaining AVCodec (which are not covered by FATE) and
properly tag their colorspace and color range support. (See patch 19/25)
The rest should be good, though, so please feel free to review them with
scrutiny.
I decided to combine YUV range negotiation with YUV colorspace
negotiation. Several important points:
1. We now explicitly ignore YUV metadata for non-YUV (RGB/XYZ/PAL)
formats, as these have no hope of being useful. In particular, we
force the colorspace to AVCOL_SPC_RGB, mostly for sanity/consistency.
2. We currently continue treating GRAY formats as forced full range,
which is the swscale status quo. I have a separate series that adds
full range negotiation to grayscale formats, but it is out of scope
of this already ominous series.
It was a delicate balancing act to get the new filter negotiation API
integrated into all core filters (in particular vf_scale and
vf_buffersrc) while maintaining forward and backward compatibility and
not breaking FATE, but I managed to find an order that works, by first
adding support to vf_buffersrc to make sure accurate metadata is
available downstream _before_ we insert any conversion filters.
More information about the ffmpeg-devel
mailing list