summaryrefslogtreecommitdiffstats
path: root/video/filter
diff options
context:
space:
mode:
Diffstat (limited to 'video/filter')
-rw-r--r--video/filter/vf_d3d11vpp.c18
-rw-r--r--video/filter/vf_fingerprint.c6
-rw-r--r--video/filter/vf_format.c36
-rw-r--r--video/filter/vf_gpu.c4
-rw-r--r--video/filter/vf_sub.c4
-rw-r--r--video/filter/vf_vapoursynth.c9
-rw-r--r--video/filter/vf_vavpp.c22
-rw-r--r--video/filter/vf_vdpaupp.c26
8 files changed, 63 insertions, 62 deletions
diff --git a/video/filter/vf_d3d11vpp.c b/video/filter/vf_d3d11vpp.c
index 504b881f3f..e3aa90c05e 100644
--- a/video/filter/vf_d3d11vpp.c
+++ b/video/filter/vf_d3d11vpp.c
@@ -476,15 +476,15 @@ fail:
#define OPT_BASE_STRUCT struct opts
static const m_option_t vf_opts_fields[] = {
- OPT_FLAG("deint", deint_enabled, 0),
- OPT_FLAG("interlaced-only", interlaced_only, 0),
- OPT_CHOICE("mode", mode, 0,
- ({"blend", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BLEND},
- {"bob", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB},
- {"adaptive", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE},
- {"mocomp", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION},
- {"ivctc", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_INVERSE_TELECINE},
- {"none", 0})),
+ {"deint", OPT_FLAG(deint_enabled)},
+ {"interlaced-only", OPT_FLAG(interlaced_only)},
+ {"mode", OPT_CHOICE(mode,
+ {"blend", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BLEND},
+ {"bob", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_BOB},
+ {"adaptive", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_ADAPTIVE},
+ {"mocomp", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_DEINTERLACE_MOTION_COMPENSATION},
+ {"ivctc", D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS_INVERSE_TELECINE},
+ {"none", 0})},
{0}
};
diff --git a/video/filter/vf_fingerprint.c b/video/filter/vf_fingerprint.c
index 471d995f4f..d06f80502d 100644
--- a/video/filter/vf_fingerprint.c
+++ b/video/filter/vf_fingerprint.c
@@ -45,9 +45,9 @@ const struct m_opt_choice_alternatives type_names[] = {
#define OPT_BASE_STRUCT struct f_opts
static const struct m_option f_opts_list[] = {
- OPT_CHOICE_C("type", type, 0, type_names),
- OPT_FLAG("clear-on-query", clear, 0),
- OPT_FLAG("print", print, 0),
+ {"type", OPT_CHOICE_C(type, type_names)},
+ {"clear-on-query", OPT_FLAG(clear)},
+ {"print", OPT_FLAG(print)},
{0}
};
diff --git a/video/filter/vf_format.c b/video/filter/vf_format.c
index 6681467fc3..a2adcca54a 100644
--- a/video/filter/vf_format.c
+++ b/video/filter/vf_format.c
@@ -183,24 +183,24 @@ static struct mp_filter *vf_format_create(struct mp_filter *parent, void *option
#define OPT_BASE_STRUCT struct vf_format_opts
static const m_option_t vf_opts_fields[] = {
- OPT_IMAGEFORMAT("fmt", fmt, 0),
- OPT_CHOICE_C("colormatrix", colormatrix, 0, mp_csp_names),
- OPT_CHOICE_C("colorlevels", colorlevels, 0, mp_csp_levels_names),
- OPT_CHOICE_C("primaries", primaries, 0, mp_csp_prim_names),
- OPT_CHOICE_C("gamma", gamma, 0, mp_csp_trc_names),
- OPT_FLOAT("sig-peak", sig_peak, 0),
- OPT_CHOICE_C("light", light, 0, mp_csp_light_names),
- OPT_CHOICE_C("chroma-location", chroma_location, 0, mp_chroma_names),
- OPT_CHOICE_C("stereo-in", stereo_in, 0, mp_stereo3d_names),
- OPT_INTRANGE("rotate", rotate, 0, -1, 359),
- OPT_INT("w", w, 0),
- OPT_INT("h", h, 0),
- OPT_INT("dw", dw, 0),
- OPT_INT("dh", dh, 0),
- OPT_DOUBLE("dar", dar, 0),
- OPT_FLAG("convert", convert, 0),
- OPT_REMOVED("outputlevels", "use the --video-output-levels global option"),
- OPT_REMOVED("peak", "use sig-peak instead (changed value scale!)"),
+ {"fmt", OPT_IMAGEFORMAT(fmt)},
+ {"colormatrix", OPT_CHOICE_C(colormatrix, mp_csp_names)},
+ {"colorlevels", OPT_CHOICE_C(colorlevels, mp_csp_levels_names)},
+ {"primaries", OPT_CHOICE_C(primaries, mp_csp_prim_names)},
+ {"gamma", OPT_CHOICE_C(gamma, mp_csp_trc_names)},
+ {"sig-peak", OPT_FLOAT(sig_peak)},
+ {"light", OPT_CHOICE_C(light, mp_csp_light_names)},
+ {"chroma-location", OPT_CHOICE_C(chroma_location, mp_chroma_names)},
+ {"stereo-in", OPT_CHOICE_C(stereo_in, mp_stereo3d_names)},
+ {"rotate", OPT_INT(rotate), M_RANGE(-1, 359)},
+ {"w", OPT_INT(w)},
+ {"h", OPT_INT(h)},
+ {"dw", OPT_INT(dw)},
+ {"dh", OPT_INT(dh)},
+ {"dar", OPT_DOUBLE(dar)},
+ {"convert", OPT_FLAG(convert)},
+ {"outputlevels", OPT_REMOVED("use the --video-output-levels global option")},
+ {"peak", OPT_REMOVED("use sig-peak instead (changed value scale!)")},
{0}
};
diff --git a/video/filter/vf_gpu.c b/video/filter/vf_gpu.c
index 5528abaa60..463d626e7d 100644
--- a/video/filter/vf_gpu.c
+++ b/video/filter/vf_gpu.c
@@ -363,8 +363,8 @@ const struct mp_user_filter_entry vf_gpu = {
.name = "gpu",
.priv_size = sizeof(OPT_BASE_STRUCT),
.options = (const struct m_option[]){
- OPT_INT("w", w, 0),
- OPT_INT("h", h, 0),
+ {"w", OPT_INT(w)},
+ {"h", OPT_INT(h)},
{0}
},
},
diff --git a/video/filter/vf_sub.c b/video/filter/vf_sub.c
index 8b2c1c83f0..ab2e308563 100644
--- a/video/filter/vf_sub.c
+++ b/video/filter/vf_sub.c
@@ -147,8 +147,8 @@ static struct mp_filter *vf_sub_create(struct mp_filter *parent, void *options)
#define OPT_BASE_STRUCT struct vf_sub_opts
static const m_option_t vf_opts_fields[] = {
- OPT_INTRANGE("bottom-margin", bottom_margin, 0, 0, 2000),
- OPT_INTRANGE("top-margin", top_margin, 0, 0, 2000),
+ {"bottom-margin", OPT_INT(bottom_margin), M_RANGE(0, 2000)},
+ {"top-margin", OPT_INT(top_margin), M_RANGE(0, 2000)},
{0}
};
diff --git a/video/filter/vf_vapoursynth.c b/video/filter/vf_vapoursynth.c
index d6cef08b3f..b7ed163c82 100644
--- a/video/filter/vf_vapoursynth.c
+++ b/video/filter/vf_vapoursynth.c
@@ -800,10 +800,11 @@ error:
#define OPT_BASE_STRUCT struct vapoursynth_opts
static const m_option_t vf_opts_fields[] = {
- OPT_STRING("file", file, M_OPT_FILE),
- OPT_INTRANGE("buffered-frames", maxbuffer, 0, 1, 9999, OPTDEF_INT(4)),
- OPT_CHOICE_OR_INT("concurrent-frames", maxrequests, 0, 1, 99,
- ({"auto", -1}), OPTDEF_INT(-1)),
+ {"file", OPT_STRING(file), .flags = M_OPT_FILE},
+ {"buffered-frames", OPT_INT(maxbuffer), M_RANGE(1, 9999),
+ OPTDEF_INT(4)},
+ {"concurrent-frames", OPT_CHOICE(maxrequests, {"auto", -1}),
+ M_RANGE(1, 99), OPTDEF_INT(-1)},
{0}
};
diff --git a/video/filter/vf_vavpp.c b/video/filter/vf_vavpp.c
index 8c41ba8734..ad2ecc04dc 100644
--- a/video/filter/vf_vavpp.c
+++ b/video/filter/vf_vavpp.c
@@ -471,17 +471,17 @@ error:
#define OPT_BASE_STRUCT struct opts
static const m_option_t vf_opts_fields[] = {
- OPT_CHOICE("deint", deint_type, 0,
- // The values >=0 must match with deint_algorithm[].
- ({"auto", -1},
- {"no", 0},
- {"first-field", 1},
- {"bob", 2},
- {"weave", 3},
- {"motion-adaptive", 4},
- {"motion-compensated", 5})),
- OPT_FLAG("interlaced-only", interlaced_only, 0),
- OPT_FLAG("reversal-bug", reversal_bug, 0),
+ {"deint", OPT_CHOICE(deint_type,
+ // The values >=0 must match with deint_algorithm[].
+ {"auto", -1},
+ {"no", 0},
+ {"first-field", 1},
+ {"bob", 2},
+ {"weave", 3},
+ {"motion-adaptive", 4},
+ {"motion-compensated", 5})},
+ {"interlaced-only", OPT_FLAG(interlaced_only)},
+ {"reversal-bug", OPT_FLAG(reversal_bug)},
{0}
};
diff --git a/video/filter/vf_vdpaupp.c b/video/filter/vf_vdpaupp.c
index fe3a903558..2f485bdbad 100644
--- a/video/filter/vf_vdpaupp.c
+++ b/video/filter/vf_vdpaupp.c
@@ -168,19 +168,19 @@ error:
#define OPT_BASE_STRUCT struct opts
static const m_option_t vf_opts_fields[] = {
- OPT_CHOICE("deint-mode", opts.deint, 0,
- ({"first-field", 1},
- {"bob", 2},
- {"temporal", 3},
- {"temporal-spatial", 4}),
- OPTDEF_INT(3)),
- OPT_FLAG("deint", deint_enabled, 0),
- OPT_FLAG("chroma-deint", opts.chroma_deint, 0, OPTDEF_INT(1)),
- OPT_FLAG("pullup", opts.pullup, 0),
- OPT_FLOATRANGE("denoise", opts.denoise, 0, 0, 1),
- OPT_FLOATRANGE("sharpen", opts.sharpen, 0, -1, 1),
- OPT_INTRANGE("hqscaling", opts.hqscaling, 0, 0, 9),
- OPT_FLAG("interlaced-only", interlaced_only, 0),
+ {"deint-mode", OPT_CHOICE(opts.deint,
+ {"first-field", 1},
+ {"bob", 2},
+ {"temporal", 3},
+ {"temporal-spatial", 4}),
+ OPTDEF_INT(3)},
+ {"deint", OPT_FLAG(deint_enabled)},
+ {"chroma-deint", OPT_FLAG(opts.chroma_deint), OPTDEF_INT(1)},
+ {"pullup", OPT_FLAG(opts.pullup)},
+ {"denoise", OPT_FLOAT(opts.denoise), M_RANGE(0, 1)},
+ {"sharpen", OPT_FLOAT(opts.sharpen), M_RANGE(-1, 1)},
+ {"hqscaling", OPT_INT(opts.hqscaling), M_RANGE(0, 9)},
+ {"interlaced-only", OPT_FLAG(interlaced_only)},
{0}
};