[FFmpeg-cvslog] avfilter/vf_ciescope: add option to disable CIE tongue filling
Paul B Mahol
git at videolan.org
Tue Apr 19 23:06:04 EEST 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Apr 19 20:52:06 2022 +0200| [b9e75c186292acbd2874e0378d5f5ab736eb4709] | committer: Paul B Mahol
avfilter/vf_ciescope: add option to disable CIE tongue filling
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b9e75c186292acbd2874e0378d5f5ab736eb4709
---
doc/filters.texi | 3 +++
libavfilter/vf_ciescope.c | 7 +++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/doc/filters.texi b/doc/filters.texi
index a161754233..605d92a952 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -8459,6 +8459,9 @@ Show white point on CIE diagram, by default disabled.
@item gamma
Set input gamma. Used only with XYZ input color space.
+
+ at item fill
+Fill with CIE colors. By default is enabled.
@end table
@section codecview
diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c
index 31e7953edc..a0caaa76e9 100644
--- a/libavfilter/vf_ciescope.c
+++ b/libavfilter/vf_ciescope.c
@@ -61,6 +61,7 @@ typedef struct CiescopeContext {
float intensity;
float contrast;
int background;
+ int fill;
float log2lin[65536];
float igamma;
@@ -118,6 +119,7 @@ static const AVOption ciescope_options[] = {
{ "corrgamma", NULL, OFFSET(correct_gamma), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
{ "showwhite", NULL, OFFSET(show_white), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
{ "gamma", NULL, OFFSET(igamma), AV_OPT_TYPE_DOUBLE, {.dbl=2.6}, 0.1, 6, FLAGS },
+ { "fill", "fill with CIE colors", OFFSET(fill), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, FLAGS },
{ NULL }
};
@@ -1239,8 +1241,9 @@ static int draw_background(AVFilterContext *ctx)
tongue_outline(pixels, s->f->linesize[0] / 2, w, h, 65535, s->cie);
- fill_in_tongue(pixels, s->f->linesize[0] / 2, w, h, 65535, cs, (const float (*)[3])s->i, s->cie,
- s->correct_gamma, s->contrast);
+ if (s->fill)
+ fill_in_tongue(pixels, s->f->linesize[0] / 2, w, h, 65535, cs, (const float (*)[3])s->i, s->cie,
+ s->correct_gamma, s->contrast);
return 0;
}
More information about the ffmpeg-cvslog
mailing list