[FFmpeg-devel] [PATCH] avutil/csp: create public API for colorspace structs

Niklas Haas ffmpeg at haasn.xyz
Wed May 18 15:29:59 EEST 2022


On Wed, 18 May 2022 14:21:41 +0200 Niklas Haas <ffmpeg at haasn.xyz> wrote:
> On Sun, 15 May 2022 18:32:36 +0200 Andreas Rheinhardt <andreas.rheinhardt at outlook.com> wrote:
> > Is there any scenario in which these structs might need to be extended?
> > This is something that we could no longer easily do if these structs
> > were public.
> 
> This struct has existed in essentially this exact form for decades
> (before FFmpeg) and is derived from fundamentals of the human visual
> system. I could not begin to dream of a reason it would need to be
> suddenly extended - even if we add support for, say, CMYK color spaces
> and libavprinter, it would be a new struct.

That said, I think that it might make more sense, for reasons of polish,
to group the x/y coordinates into their own struct CIExy or something
along those lines.

Then you can also have helper functions accepting individual CIExy
struct elements. But YMMV.


More information about the ffmpeg-devel mailing list