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

Michael Niedermayer michael at niedermayer.cc
Wed May 18 21:27:48 EEST 2022


On Wed, May 18, 2022 at 08:23:38PM +0200, Michael Niedermayer wrote:
> On Wed, May 18, 2022 at 11:18:17AM -0400, Leo Izen wrote:
> > This commit moves some of the functionality from avfilter/colorspace
> > into avutil/csp and exposes it as an avpriv API so it can be used by
> > libavcodec and/or libavformat.
> [...]
> > +#ifndef AVUTIL_CSP_H
> > +#define AVUTIL_CSP_H
> > +
> > +#include "libavutil/pixfmt.h"
> > +
> > +typedef struct AVLumaCoefficients {
> > +    double cr, cg, cb;
> > +} AVLumaCoefficients;
> > +
> > +typedef struct AVPrimaryCoefficients {
> > +    double xr, yr, xg, yg, xb, yb;
> > +} AVPrimaryCoefficients;
> > +
> > +typedef struct AVWhitepointCoefficients {
> > +    double xw, yw;
> > +} AVWhitepointCoefficients;
> 
> As said, these should not be floating point.
> Adding a new public API and changing it later is messy, this
> should be changed before its made public

i now see you replaced some public by avpriv in the latest patch
but still i think this should be changed to fixed point or AVRational
first. Even as API between the libs its messy to change it later
it would require us to keep the double API when its changed until
the next major bump

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Take away the freedom of one citizen and you will be jailed, take away
the freedom of all citizens and you will be congratulated by your peers
in Parliament.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220518/858a8674/attachment.sig>


More information about the ffmpeg-devel mailing list