summaryrefslogtreecommitdiff
path: root/libavfilter/vf_iccdetect.c
diff options
context:
space:
mode:
authorLeo Izen <leo.izen@gmail.com>2022-05-28 09:30:36 -0400
committerRonald S. Bultje <rsbultje@gmail.com>2022-06-01 13:52:38 -0400
commitd42b410e05ad1c4d6e74aa981b4a4423103291fb (patch)
treeef3a78871469fd303caa770e888d78779998d030 /libavfilter/vf_iccdetect.c
parent77b529fbd228fe30a870e3157f051885b436ad92 (diff)
downloadffmpeg-d42b410e05ad1c4d6e74aa981b4a4423103291fb.tar.gz
avutil/csp: create public API for colorspace structs
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. It also converts those structs from double values to AVRational to make regression testing easier and more consistent. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavfilter/vf_iccdetect.c')
-rw-r--r--libavfilter/vf_iccdetect.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavfilter/vf_iccdetect.c b/libavfilter/vf_iccdetect.c
index fb7871f035..7c08a2baaa 100644
--- a/libavfilter/vf_iccdetect.c
+++ b/libavfilter/vf_iccdetect.c
@@ -24,6 +24,7 @@
#include <lcms2.h>
+#include "libavutil/csp.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
@@ -69,7 +70,7 @@ static int iccdetect_filter_frame(AVFilterLink *inlink, AVFrame *frame)
AVFilterContext *avctx = inlink->dst;
IccDetectContext *s = avctx->priv;
const AVFrameSideData *sd;
- struct ColorPrimaries coeffs;
+ AVColorPrimariesDesc coeffs;
cmsHPROFILE profile;
int ret;
@@ -98,7 +99,7 @@ static int iccdetect_filter_frame(AVFilterLink *inlink, AVFrame *frame)
if (ret < 0)
return ret;
- s->profile_prim = ff_detect_color_primaries(&coeffs);
+ s->profile_prim = av_csp_primaries_id_from_desc(&coeffs);
done:
if (s->profile_prim != AVCOL_PRI_UNSPECIFIED) {