[FFmpeg-cvslog] avfilter/vf_hsvkey: Deduplicate inputs and outputs

Andreas Rheinhardt git at videolan.org
Sat Nov 4 02:36:27 EET 2023


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Nov  1 08:52:42 2023 +0100| [93abb9b560e8398191383fb439810f775348e32c] | committer: Andreas Rheinhardt

avfilter/vf_hsvkey: Deduplicate inputs and outputs

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93abb9b560e8398191383fb439810f775348e32c
---

 libavfilter/vf_hsvkey.c | 30 ++++++------------------------
 1 file 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,



More information about the ffmpeg-cvslog mailing list