diff mbox series

[FFmpeg-devel,08/11] avfilter/vf_hsvkey: Deduplicate inputs and outputs

Message ID GV1SPRMB003311585D5BD16D21B7B8C38FA7A@GV1SPRMB0033.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 93abb9b560e8398191383fb439810f775348e32c
Headers show
Series [FFmpeg-devel,01/11] avcodec/aactab: Deduplicate swb_offset_960 tabs | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Nov. 1, 2023, 8:35 a.m. UTC
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavfilter/vf_hsvkey.c | 30 ++++++------------------------
 1 file changed, 6 insertions(+), 24 deletions(-)
diff mbox series

Patch

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,