diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-11-01 08:52:42 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2023-11-04 01:24:09 +0100 |
commit | 93abb9b560e8398191383fb439810f775348e32c (patch) | |
tree | f51b62d2c850c3d360b3afc9d2e98133bd88f2da /libavfilter/vf_hsvkey.c | |
parent | 50d3c5bd8ca5a1181c1a57dbb8006c9aa87d3c4d (diff) | |
download | ffmpeg-93abb9b560e8398191383fb439810f775348e32c.tar.gz |
avfilter/vf_hsvkey: Deduplicate inputs and outputs
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_hsvkey.c')
-rw-r--r-- | libavfilter/vf_hsvkey.c | 30 |
1 files changed, 6 insertions, 24 deletions
diff --git a/libavfilter/vf_hsvkey.c b/libavfilter/vf_hsvkey.c index 542ac1f3b2..0bd8cace37 100644 --- a/libavfilter/vf_hsvkey.c +++ b/libavfilter/vf_hsvkey.c @@ -265,7 +265,7 @@ static const enum AVPixelFormat key_pixel_fmts[] = { AV_PIX_FMT_NONE }; -static const AVFilterPad hsvkey_inputs[] = { +static const AVFilterPad inputs[] = { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, @@ -275,7 +275,7 @@ static const AVFilterPad hsvkey_inputs[] = { }, }; -static const AVFilterPad hsvkey_outputs[] = { +static const AVFilterPad outputs[] = { { .name = "default", .type = AVMEDIA_TYPE_VIDEO, @@ -302,8 +302,8 @@ const AVFilter ff_vf_hsvkey = { .description = NULL_IF_CONFIG_SMALL("Turns a certain HSV range into transparency. Operates on YUV colors."), .priv_size = sizeof(HSVKeyContext), .priv_class = &hsvkey_class, - FILTER_INPUTS(hsvkey_inputs), - FILTER_OUTPUTS(hsvkey_outputs), + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(key_pixel_fmts), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, @@ -337,24 +337,6 @@ static const AVOption hsvhold_options[] = { { NULL } }; -static const AVFilterPad hsvhold_inputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .flags = AVFILTERPAD_FLAG_NEEDS_WRITABLE, - .filter_frame = filter_frame, - .config_props = config_input, - }, -}; - -static const AVFilterPad hsvhold_outputs[] = { - { - .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_output, - }, -}; - AVFILTER_DEFINE_CLASS(hsvhold); const AVFilter ff_vf_hsvhold = { @@ -362,8 +344,8 @@ const AVFilter ff_vf_hsvhold = { .description = NULL_IF_CONFIG_SMALL("Turns a certain HSV range into gray."), .priv_size = sizeof(HSVKeyContext), .priv_class = &hsvhold_class, - FILTER_INPUTS(hsvhold_inputs), - FILTER_OUTPUTS(hsvhold_outputs), + FILTER_INPUTS(inputs), + FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(hold_pixel_fmts), .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, |