[FFmpeg-devel] Towards YUVJ removal
Nicolas George
george at nsup.org
Tue Dec 13 13:58:05 EET 2022
Niklas Haas (12022-12-13):
> So, the biggest roadblock I see with regards to making color range etc.
> part of filter negotiation is that, currently, color range (and
> colorspace and so on) are part of AVFrame, which can (in theory and
> possibly also in practice) change suddenly mid-stream.
That is not a problem, a lot of properties are part of AVFrame yet are
not supposed to change mid-stream in libavfilter, starting with the
resolution.
The real issue is not a hard one, but an expensive one: the negotiation
code requires a lot of refactoring, and before that testing coverage,
before we can comfortably add new negotiated properties.
I am not familiar with color ranges. Are they orthogonal to pixel
formats or do they depend on them? In other words, should we negotiate
them both at once, like sample rate, sample format and channel layout,
or should we decide the pixel format first and then the color range? The
plan I have for refactoring the negotiation can do both, but the second
one will require more work.
> How about having a special conversion layer exist only in front of
> encoders (e.g. inside avcodec_send_frame) to deal with incoming frames
> that have mismatched metadata relative to what the encoder supports?
I do not like that idea. But since the real negotiation requires a lot
of work, I will not oppose. Just make sure it is unobtrusive and easily
removed later.
Regards,
--
Nicolas George
More information about the ffmpeg-devel
mailing list