summaryrefslogtreecommitdiffstats
path: root/video/filter/vf_fingerprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter/vf_fingerprint.c')
-rw-r--r--video/filter/vf_fingerprint.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/video/filter/vf_fingerprint.c b/video/filter/vf_fingerprint.c
index d06f80502d..ea2c31478e 100644
--- a/video/filter/vf_fingerprint.c
+++ b/video/filter/vf_fingerprint.c
@@ -33,8 +33,8 @@
struct f_opts {
int type;
- int clear;
- int print;
+ bool clear;
+ bool print;
};
const struct m_opt_choice_alternatives type_names[] = {
@@ -46,14 +46,14 @@ const struct m_opt_choice_alternatives type_names[] = {
#define OPT_BASE_STRUCT struct f_opts
static const struct m_option f_opts_list[] = {
{"type", OPT_CHOICE_C(type, type_names)},
- {"clear-on-query", OPT_FLAG(clear)},
- {"print", OPT_FLAG(print)},
+ {"clear-on-query", OPT_BOOL(clear)},
+ {"print", OPT_BOOL(print)},
{0}
};
static const struct f_opts f_opts_def = {
.type = 16,
- .clear = 1,
+ .clear = true,
};
struct print_entry {
@@ -102,9 +102,10 @@ static void f_process(struct mp_filter *f)
// Try to achieve minimum conversion, even if it makes the fingerprints less
// "portable" across source video.
+ p->scaled->params.repr = mpi->params.repr;
p->scaled->params.color = mpi->params.color;
// Make output always full range; no reason to lose precision.
- p->scaled->params.color.levels = MP_CSP_LEVELS_PC;
+ p->scaled->params.repr.levels = PL_COLOR_LEVELS_FULL;
if (!mp_zimg_convert(p->zimg, p->scaled, mpi)) {
if (!p->fallback_warning) {
@@ -212,7 +213,7 @@ static struct mp_filter *f_create(struct mp_filter *parent, void *options)
.scaler_chroma_params = {NAN, NAN},
.scaler_chroma = ZIMG_RESIZE_BILINEAR,
.dither = ZIMG_DITHER_NONE,
- .fast = 1,
+ .fast = true,
};
return f;
}