[FFmpeg-devel] [RFC] [PATCH 0/7] Towards YUVJ removal, v2
Niklas Haas
ffmpeg at haasn.xyz
Wed Oct 11 17:55:34 EEST 2023
A follow-up to my previous post (almost a year ago) about YUVJ removal.
This patchset does not add full filter colorspace negotiation - rather,
we add metadata only to AVCodec, with a warning being printed if
incorrect frames are sent. fftools/ffmpeg_filter.c gained an explicit
auto-conversion case, which is enough to pass FATE, and not regress
current use cases where automatic YUVJ<->YUVJ conversion is happening.
The major caveats here are:
1. Handling in fftools is great, but not ideal for API users who want
the filter graph API to handle all auto-conversions. This would
require also adding support for color ranges etc. to the filter
format negotiation API, which would be a major undertaking, much
larger than this series in scope. It would also build on top of the
basis established out by this series, since the capabilities
advertise by the AVCodec would naturally plug in to the downstream
end of the filter graph.
2. For symmetry, I added *all* of the colorspace metadata fields, rather
than just color range. I don't expand their use in this series, but
it's quite low-hanging fruit at this point to add a list of supported
primaries etc. to whatever codecs need it (for example, VP8 can only
do BT.601 primaries, HEVC can only do certain chroma locations,
etc.).
While this is more future-proof, libswscale can't handle these
conversions at the moment. So we insert zscale instead, if available.
(And otherwise, we would just continue to generate an error)
Probably not in the final form that will be merged, but I wanted to
gather feedback on this approach.
More information about the ffmpeg-devel
mailing list