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

2022-05-18 Thread Niklas Haas
On Wed, 18 May 2022 14:21:41 +0200 Niklas Haas wrote: > On Sun, 15 May 2022 18:32:36 +0200 Andreas Rheinhardt > 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 s

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

2022-05-18 Thread Niklas Haas
On Sun, 15 May 2022 18:32:36 +0200 Andreas Rheinhardt 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

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

2022-05-16 Thread Leo Izen
On 5/15/22 12:32, Andreas Rheinhardt wrote: Leo Izen: +/* Returns AVCOL_PRI_UNSPECIFIED if no clear match can be identified */ +enum AVColorPrimaries av_detect_color_primaries(const struct ColorPrimaries *prm); + +const struct ColorPrimaries *av_get_color_primaries(enum AVColorPrimaries prm); +

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

2022-05-15 Thread Michael Niedermayer
On Sun, May 15, 2022 at 08:55:49PM +0200, Michael Niedermayer wrote: > On Sun, May 15, 2022 at 12:49:51PM -0400, Ronald S. Bultje wrote: > > Hi, > > > > On Fri, May 13, 2022 at 5:22 PM Michael Niedermayer > > wrote: > > > > > On Fri, May 13, 2022 at 11:42:08AM -0400, Leo Izen wrote: > > > > This

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

2022-05-15 Thread Michael Niedermayer
On Sun, May 15, 2022 at 12:49:51PM -0400, Ronald S. Bultje wrote: > Hi, > > On Fri, May 13, 2022 at 5:22 PM Michael Niedermayer > wrote: > > > On Fri, May 13, 2022 at 11:42:08AM -0400, Leo Izen wrote: > > > This commit moves some of the functionality from avfilter/colorspace > > > into avutil/cs

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

2022-05-15 Thread Niklas Haas
On Sun, 15 May 2022 12:49:51 -0400 "Ronald S. Bultje" wrote: > To explain: when I designed this stuff, I chose to keep them in float so > that we can use the literal values from the specs, which are themselves in > floating point. That would not be possible anymore, and would therefore > make it

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

2022-05-15 Thread Ronald S. Bultje
Hi, On Fri, May 13, 2022 at 5:22 PM Michael Niedermayer wrote: > On Fri, May 13, 2022 at 11:42:08AM -0400, Leo Izen wrote: > > This commit moves some of the functionality from avfilter/colorspace > > into avutil/csp and exposes it as a public API so it can be used by > > libavcodec and/or libavf

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

2022-05-15 Thread Andreas Rheinhardt
Leo Izen: > This commit moves some of the functionality from avfilter/colorspace > into avutil/csp and exposes it as a public API so it can be used by > libavcodec and/or libavformat. > --- > libavfilter/colorspace.c| 88 > libavfilter/colorspace.h| 25 +-

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

2022-05-14 Thread Niklas Haas
Hi, If you push the code somewhere I can take a stab at porting it to AVRational. On Fri, 13 May 2022 22:41:15 -0400 Leo Izen wrote: > On 5/13/22 17:22, Michael Niedermayer wrote: > > On Fri, May 13, 2022 at 11:42:08AM -0400, Leo Izen wrote: > >> + > >> +struct WhitepointCoefficients { > >> +

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

2022-05-13 Thread Leo Izen
On 5/13/22 15:18, James Almer wrote: On 5/13/2022 12:42 PM, Leo Izen wrote: This commit moves some of the functionality from avfilter/colorspace into avutil/csp and exposes it as a public API so it can be used by libavcodec and/or libavformat. If it's of no use for library users, then make the

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

2022-05-13 Thread Leo Izen
On 5/13/22 17:22, Michael Niedermayer wrote: On Fri, May 13, 2022 at 11:42:08AM -0400, Leo Izen wrote: + +struct WhitepointCoefficients { +double xw, yw; +}; I think we should avoid floating point so as to ensure reproduceable results and simplify regerssion testing thx This code already e

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

2022-05-13 Thread Michael Niedermayer
On Fri, May 13, 2022 at 11:42:08AM -0400, Leo Izen wrote: > This commit moves some of the functionality from avfilter/colorspace > into avutil/csp and exposes it as a public API so it can be used by > libavcodec and/or libavformat. [...] > diff --git a/libavutil/csp.h b/libavutil/csp.h > new file m

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

2022-05-13 Thread James Almer
On 5/13/2022 12:42 PM, Leo Izen wrote: This commit moves some of the functionality from avfilter/colorspace into avutil/csp and exposes it as a public API so it can be used by libavcodec and/or libavformat. If it's of no use for library users, then make them avpriv_ and not installed. ---

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

2022-05-13 Thread Ronald S. Bultje
Hi, On Fri, May 13, 2022 at 11:42 AM Leo Izen wrote: > This commit moves some of the functionality from avfilter/colorspace > into avutil/csp and exposes it as a public API so it can be used by > libavcodec and/or libavformat. > --- > libavfilter/colorspace.c| 88 --

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

2022-05-13 Thread Leo Izen
This commit moves some of the functionality from avfilter/colorspace into avutil/csp and exposes it as a public API so it can be used by libavcodec and/or libavformat. --- libavfilter/colorspace.c| 88 libavfilter/colorspace.h| 25 +--- libavfilter/fflcms