PR #21681 opened by jbvsmo URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21681 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21681.patch
Several filters that share the same options array also shared a single AVClass with a combined class_name like "(h|v)stack", "(a)split", "kirsch/prewitt/roberts/scharr/sobel", etc. While compact, this causes ffmpeg -help full and the AVOptions API to report a single merged entry for multiple distinct filters, making the output unsuitable for machine parsing. This patch gives each filter its own AVFILTER_DEFINE_CLASS_EXT with its actual filter name, while continuing to share the same underlying options array. The generated class symbols remain static, so there is no ABI or API change for downstream users. Affected filters: hstack, vstack split, asplit streamselect, astreamselect zmq, azmq drawgraph, adrawgraph realtime, arealtime graphmonitor, agraphmonitor movie, amovie sendcmd, asendcmd cue, acue perms, aperms format, noformat maskedmin, maskedmax weave, doubleweave premultiply, unpremultiply, premultiply_dynamic aderivative, aintegral anlms, anlmf agate, sidechaingate sidechaincompress, acompressor asuperpass, asuperstop lut, lutyuv, lutrgb bass, lowshelf, treble, highshelf, tiltshelf erosion, dilation, deflate, inflate prewitt, sobel, roberts, kirsch, scharr nullsrc, yuvtestsrc pal75bars, pal100bars smptebars, smptehdbars allyuv, allrgb >From 8ffd05532f9be7d5b417e8010c78b8effc7ca7cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Bernardo=20Oliveira?= <[email protected]> Date: Sat, 7 Feb 2026 23:52:15 -0300 Subject: [PATCH] libavfilter: split combined AVClass definitions into per-filter classes Several filters that share the same options array also shared a single AVClass with a combined class_name like "(h|v)stack", "(a)split", "kirsch/prewitt/roberts/scharr/sobel", etc. While compact, this causes ffmpeg -help full and the AVOptions API to report a single merged entry for multiple distinct filters, making the output unsuitable for machine parsing. This patch gives each filter its own AVFILTER_DEFINE_CLASS_EXT with its actual filter name, while continuing to share the same underlying options array. The generated class symbols remain static, so there is no ABI or API change for downstream users. --- libavfilter/af_aderivative.c | 5 +++-- libavfilter/af_agate.c | 7 ++++--- libavfilter/af_anlms.c | 5 +++-- libavfilter/af_asupercut.c | 8 ++++---- libavfilter/af_biquads.c | 18 ++++++++++-------- libavfilter/af_sidechaincompress.c | 9 ++++----- libavfilter/f_cue.c | 7 ++++--- libavfilter/f_drawgraph.c | 5 +++-- libavfilter/f_graphmonitor.c | 5 +++-- libavfilter/f_perms.c | 5 +++-- libavfilter/f_realtime.c | 5 +++-- libavfilter/f_sendcmd.c | 5 +++-- libavfilter/f_streamselect.c | 5 +++-- libavfilter/f_zmq.c | 5 +++-- libavfilter/split.c | 5 +++-- libavfilter/src_movie.c | 5 +++-- libavfilter/vf_convolution.c | 17 ++++++++++------- libavfilter/vf_format.c | 5 +++-- libavfilter/vf_lut.c | 8 +++++--- libavfilter/vf_maskedminmax.c | 7 ++++--- libavfilter/vf_neighbor.c | 15 +++++++++------ libavfilter/vf_premultiply.c | 8 +++++--- libavfilter/vf_stack.c | 7 ++++--- libavfilter/vf_weave.c | 5 +++-- libavfilter/vsrc_testsrc.c | 27 ++++++++++++++++----------- 25 files changed, 118 insertions(+), 85 deletions(-) diff --git a/libavfilter/af_aderivative.c b/libavfilter/af_aderivative.c index 7ac730836a..ec510fb4aa 100644 --- a/libavfilter/af_aderivative.c +++ b/libavfilter/af_aderivative.c @@ -158,7 +158,8 @@ static const AVOption aderivative_options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(aderivative, "aderivative/aintegral", aderivative_options); +AVFILTER_DEFINE_CLASS_EXT(aderivative, "aderivative", aderivative_options); +AVFILTER_DEFINE_CLASS_EXT(aintegral, "aintegral", aderivative_options); const FFFilter ff_af_aderivative = { .p.name = "aderivative", @@ -176,7 +177,7 @@ const FFFilter ff_af_aderivative = { const FFFilter ff_af_aintegral = { .p.name = "aintegral", .p.description = NULL_IF_CONFIG_SMALL("Compute integral of input audio."), - .p.priv_class = &aderivative_class, + .p.priv_class = &aintegral_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(ADerivativeContext), .uninit = uninit, diff --git a/libavfilter/af_agate.c b/libavfilter/af_agate.c index abac821e8c..96108636f8 100644 --- a/libavfilter/af_agate.c +++ b/libavfilter/af_agate.c @@ -88,7 +88,8 @@ static const AVOption options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(agate_sidechaingate, "agate/sidechaingate", options); +AVFILTER_DEFINE_CLASS_EXT(agate, "agate", options); +AVFILTER_DEFINE_CLASS_EXT(sidechaingate, "sidechaingate", options); static int agate_config_input(AVFilterLink *inlink) { @@ -231,7 +232,7 @@ static const AVFilterPad inputs[] = { const FFFilter ff_af_agate = { .p.name = "agate", .p.description = NULL_IF_CONFIG_SMALL("Audio gate."), - .p.priv_class = &agate_sidechaingate_class, + .p.priv_class = &agate_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(AudioGateContext), FILTER_INPUTS(inputs), @@ -381,7 +382,7 @@ static const AVFilterPad sidechaingate_outputs[] = { const FFFilter ff_af_sidechaingate = { .p.name = "sidechaingate", .p.description = NULL_IF_CONFIG_SMALL("Audio sidechain gate."), - .p.priv_class = &agate_sidechaingate_class, + .p.priv_class = &sidechaingate_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioGateContext), .activate = activate, diff --git a/libavfilter/af_anlms.c b/libavfilter/af_anlms.c index 3ac20bcc73..187f576d71 100644 --- a/libavfilter/af_anlms.c +++ b/libavfilter/af_anlms.c @@ -85,7 +85,8 @@ static const AVOption anlms_options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(anlms, "anlm(f|s)", anlms_options); +AVFILTER_DEFINE_CLASS_EXT(anlms, "anlms", anlms_options); +AVFILTER_DEFINE_CLASS_EXT(anlmf, "anlmf", anlms_options); static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, @@ -270,7 +271,7 @@ const FFFilter ff_af_anlms = { const FFFilter ff_af_anlmf = { .p.name = "anlmf", .p.description = NULL_IF_CONFIG_SMALL("Apply Normalized Least-Mean-Fourth algorithm to first audio stream."), - .p.priv_class = &anlms_class, + .p.priv_class = &anlmf_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioNLMSContext), diff --git a/libavfilter/af_asupercut.c b/libavfilter/af_asupercut.c index 3e032d74bd..33d578b67c 100644 --- a/libavfilter/af_asupercut.c +++ b/libavfilter/af_asupercut.c @@ -378,13 +378,13 @@ static const AVOption asuperpass_asuperstop_options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(asuperpass_asuperstop, "asuperpass/asuperstop", - asuperpass_asuperstop_options); +AVFILTER_DEFINE_CLASS_EXT(asuperpass, "asuperpass", asuperpass_asuperstop_options); +AVFILTER_DEFINE_CLASS_EXT(asuperstop, "asuperstop", asuperpass_asuperstop_options); const FFFilter ff_af_asuperpass = { .p.name = "asuperpass", .p.description = NULL_IF_CONFIG_SMALL("Apply high order Butterworth band-pass filter."), - .p.priv_class = &asuperpass_asuperstop_class, + .p.priv_class = &asuperpass_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ASuperCutContext), @@ -398,7 +398,7 @@ const FFFilter ff_af_asuperpass = { const FFFilter ff_af_asuperstop = { .p.name = "asuperstop", .p.description = NULL_IF_CONFIG_SMALL("Apply high order Butterworth band-stop filter."), - .p.priv_class = &asuperpass_asuperstop_class, + .p.priv_class = &asuperstop_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ASuperCutContext), diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c index 565da30391..4d9a64e78d 100644 --- a/libavfilter/af_biquads.c +++ b/libavfilter/af_biquads.c @@ -1552,13 +1552,14 @@ static const AVOption bass_lowshelf_options[] = { {NULL} }; -AVFILTER_DEFINE_CLASS_EXT(bass_lowshelf, "bass/lowshelf", bass_lowshelf_options); +AVFILTER_DEFINE_CLASS_EXT(bass, "bass", bass_lowshelf_options); +AVFILTER_DEFINE_CLASS_EXT(lowshelf, "lowshelf", bass_lowshelf_options); #if CONFIG_BASS_FILTER -DEFINE_BIQUAD_FILTER_2(bass, "Boost or cut lower frequencies.", bass_lowshelf); +DEFINE_BIQUAD_FILTER_2(bass, "Boost or cut lower frequencies.", bass); #endif /* CONFIG_BASS_FILTER */ #if CONFIG_LOWSHELF_FILTER -DEFINE_BIQUAD_FILTER_2(lowshelf, "Apply a low shelf filter.", bass_lowshelf); +DEFINE_BIQUAD_FILTER_2(lowshelf, "Apply a low shelf filter.", lowshelf); #endif /* CONFIG_LOWSHELF_FILTER */ #endif /* CONFIG_BASS_FILTER || CONFIG LOWSHELF_FILTER */ #if CONFIG_TREBLE_FILTER || CONFIG_HIGHSHELF_FILTER || CONFIG_TILTSHELF_FILTER @@ -1578,19 +1579,20 @@ static const AVOption treble_highshelf_options[] = { {NULL} }; -AVFILTER_DEFINE_CLASS_EXT(treble_highshelf, "treble/high/tiltshelf", - treble_highshelf_options); +AVFILTER_DEFINE_CLASS_EXT(treble, "treble", treble_highshelf_options); +AVFILTER_DEFINE_CLASS_EXT(highshelf, "highshelf", treble_highshelf_options); +AVFILTER_DEFINE_CLASS_EXT(tiltshelf, "tiltshelf", treble_highshelf_options); #if CONFIG_TREBLE_FILTER -DEFINE_BIQUAD_FILTER_2(treble, "Boost or cut upper frequencies.", treble_highshelf); +DEFINE_BIQUAD_FILTER_2(treble, "Boost or cut upper frequencies.", treble); #endif /* CONFIG_TREBLE_FILTER */ #if CONFIG_HIGHSHELF_FILTER -DEFINE_BIQUAD_FILTER_2(highshelf, "Apply a high shelf filter.", treble_highshelf); +DEFINE_BIQUAD_FILTER_2(highshelf, "Apply a high shelf filter.", highshelf); #endif /* CONFIG_HIGHSHELF_FILTER */ #if CONFIG_TILTSHELF_FILTER -DEFINE_BIQUAD_FILTER_2(tiltshelf, "Apply a tilt shelf filter.", treble_highshelf); +DEFINE_BIQUAD_FILTER_2(tiltshelf, "Apply a tilt shelf filter.", tiltshelf); #endif #endif /* CONFIG_TREBLE_FILTER || CONFIG_HIGHSHELF_FILTER || CONFIG_TILTSHELF_FILTER */ diff --git a/libavfilter/af_sidechaincompress.c b/libavfilter/af_sidechaincompress.c index 06555cbd26..9829752e45 100644 --- a/libavfilter/af_sidechaincompress.c +++ b/libavfilter/af_sidechaincompress.c @@ -94,9 +94,8 @@ static const AVOption options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(sidechaincompress_acompressor, - "acompressor/sidechaincompress", - options); +AVFILTER_DEFINE_CLASS_EXT(sidechaincompress, "sidechaincompress", options); +AVFILTER_DEFINE_CLASS_EXT(acompressor, "acompressor", options); // A fake infinity value (because real infinity may break some hosts) #define FAKE_INFINITY (65536.0 * 65536.0) @@ -366,7 +365,7 @@ static const AVFilterPad sidechaincompress_outputs[] = { const FFFilter ff_af_sidechaincompress = { .p.name = "sidechaincompress", .p.description = NULL_IF_CONFIG_SMALL("Sidechain compressor."), - .p.priv_class = &sidechaincompress_acompressor_class, + .p.priv_class = &sidechaincompress_class, .priv_size = sizeof(SidechainCompressContext), .activate = activate, .uninit = uninit, @@ -427,7 +426,7 @@ static const AVFilterPad acompressor_outputs[] = { const FFFilter ff_af_acompressor = { .p.name = "acompressor", .p.description = NULL_IF_CONFIG_SMALL("Audio compressor."), - .p.priv_class = &sidechaincompress_acompressor_class, + .p.priv_class = &acompressor_class, .priv_size = sizeof(SidechainCompressContext), FILTER_INPUTS(acompressor_inputs), FILTER_OUTPUTS(acompressor_outputs), diff --git a/libavfilter/f_cue.c b/libavfilter/f_cue.c index 63027c7c2e..a55246731d 100644 --- a/libavfilter/f_cue.c +++ b/libavfilter/f_cue.c @@ -97,13 +97,14 @@ static const AVOption options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(cue_acue, "(a)cue", options); +AVFILTER_DEFINE_CLASS_EXT(cue, "cue", options); +AVFILTER_DEFINE_CLASS_EXT(acue, "acue", options); #if CONFIG_CUE_FILTER const FFFilter ff_vf_cue = { .p.name = "cue", .p.description = NULL_IF_CONFIG_SMALL("Delay filtering to match a cue."), - .p.priv_class = &cue_acue_class, + .p.priv_class = &cue_class, .priv_size = sizeof(CueContext), FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(ff_video_default_filterpad), @@ -115,7 +116,7 @@ const FFFilter ff_vf_cue = { const FFFilter ff_af_acue = { .p.name = "acue", .p.description = NULL_IF_CONFIG_SMALL("Delay filtering to match a cue."), - .p.priv_class = &cue_acue_class, + .p.priv_class = &acue_class, .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(CueContext), FILTER_INPUTS(ff_audio_default_filterpad), diff --git a/libavfilter/f_drawgraph.c b/libavfilter/f_drawgraph.c index c9ac6c0ca9..9f8cc53987 100644 --- a/libavfilter/f_drawgraph.c +++ b/libavfilter/f_drawgraph.c @@ -85,7 +85,8 @@ static const AVOption drawgraph_options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(drawgraph, "(a)drawgraph", drawgraph_options); +AVFILTER_DEFINE_CLASS_EXT(drawgraph, "drawgraph", drawgraph_options); +AVFILTER_DEFINE_CLASS_EXT(adrawgraph, "adrawgraph", drawgraph_options); static const char *const var_names[] = { "MAX", "MIN", "VAL", NULL }; enum { VAR_MAX, VAR_MIN, VAR_VAL, VAR_VARS_NB }; @@ -501,7 +502,7 @@ static const AVFilterPad adrawgraph_inputs[] = { const FFFilter ff_avf_adrawgraph = { .p.name = "adrawgraph", .p.description = NULL_IF_CONFIG_SMALL("Draw a graph using input audio metadata."), - .p.priv_class = &drawgraph_class, + .p.priv_class = &adrawgraph_class, .priv_size = sizeof(DrawGraphContext), .init = init, .uninit = uninit, diff --git a/libavfilter/f_graphmonitor.c b/libavfilter/f_graphmonitor.c index 547659c1e1..e92a7865a9 100644 --- a/libavfilter/f_graphmonitor.c +++ b/libavfilter/f_graphmonitor.c @@ -566,7 +566,8 @@ static av_cold void uninit(AVFilterContext *ctx) s->cache_size = s->cache_index = 0; } -AVFILTER_DEFINE_CLASS_EXT(graphmonitor, "(a)graphmonitor", graphmonitor_options); +AVFILTER_DEFINE_CLASS_EXT(graphmonitor, "graphmonitor", graphmonitor_options); +AVFILTER_DEFINE_CLASS_EXT(agraphmonitor, "agraphmonitor", graphmonitor_options); static const AVFilterPad graphmonitor_outputs[] = { { @@ -599,7 +600,7 @@ const FFFilter ff_vf_graphmonitor = { const FFFilter ff_avf_agraphmonitor = { .p.name = "agraphmonitor", .p.description = NULL_IF_CONFIG_SMALL("Show various filtergraph stats."), - .p.priv_class = &graphmonitor_class, + .p.priv_class = &agraphmonitor_class, .priv_size = sizeof(GraphMonitorContext), .init = init, .uninit = uninit, diff --git a/libavfilter/f_perms.c b/libavfilter/f_perms.c index 28d32e6b94..caa9efef51 100644 --- a/libavfilter/f_perms.c +++ b/libavfilter/f_perms.c @@ -113,7 +113,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) return ret; } -AVFILTER_DEFINE_CLASS_EXT(perms, "(a)perms", options); +AVFILTER_DEFINE_CLASS_EXT(perms, "perms", options); +AVFILTER_DEFINE_CLASS_EXT(aperms, "aperms", options); #if CONFIG_APERMS_FILTER @@ -128,7 +129,7 @@ static const AVFilterPad aperms_inputs[] = { const FFFilter ff_af_aperms = { .p.name = "aperms", .p.description= NULL_IF_CONFIG_SMALL("Set permissions for the output audio frame."), - .p.priv_class= &perms_class, + .p.priv_class= &aperms_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, .init = init, diff --git a/libavfilter/f_realtime.c b/libavfilter/f_realtime.c index e142e0ca57..00cec7f872 100644 --- a/libavfilter/f_realtime.c +++ b/libavfilter/f_realtime.c @@ -75,7 +75,8 @@ static const AVOption options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(realtime, "(a)realtime", options); +AVFILTER_DEFINE_CLASS_EXT(realtime, "realtime", options); +AVFILTER_DEFINE_CLASS_EXT(arealtime, "arealtime", options); #if CONFIG_REALTIME_FILTER @@ -112,7 +113,7 @@ static const AVFilterPad arealtime_inputs[] = { const FFFilter ff_af_arealtime = { .p.name = "arealtime", .p.description = NULL_IF_CONFIG_SMALL("Slow down filtering to match realtime."), - .p.priv_class = &realtime_class, + .p.priv_class = &arealtime_class, .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(RealtimeContext), FILTER_INPUTS(arealtime_inputs), diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c index 304658ae3d..7d8998e1fd 100644 --- a/libavfilter/f_sendcmd.c +++ b/libavfilter/f_sendcmd.c @@ -588,7 +588,8 @@ end: return AVERROR(ENOSYS); } -AVFILTER_DEFINE_CLASS_EXT(sendcmd, "(a)sendcmd", options); +AVFILTER_DEFINE_CLASS_EXT(sendcmd, "sendcmd", options); +AVFILTER_DEFINE_CLASS_EXT(asendcmd, "asendcmd", options); #if CONFIG_SENDCMD_FILTER @@ -627,7 +628,7 @@ static const AVFilterPad asendcmd_inputs[] = { const FFFilter ff_af_asendcmd = { .p.name = "asendcmd", .p.description = NULL_IF_CONFIG_SMALL("Send commands to filters."), - .p.priv_class = &sendcmd_class, + .p.priv_class = &asendcmd_class, .p.flags = AVFILTER_FLAG_METADATA_ONLY, .init = init, .uninit = uninit, diff --git a/libavfilter/f_streamselect.c b/libavfilter/f_streamselect.c index 7378c9c2fe..f7fe4d1ee0 100644 --- a/libavfilter/f_streamselect.c +++ b/libavfilter/f_streamselect.c @@ -48,7 +48,8 @@ static const AVOption streamselect_options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(streamselect, "(a)streamselect", streamselect_options); +AVFILTER_DEFINE_CLASS_EXT(streamselect, "streamselect", streamselect_options); +AVFILTER_DEFINE_CLASS_EXT(astreamselect, "astreamselect", streamselect_options); static int process_frame(FFFrameSync *fs) { @@ -311,7 +312,7 @@ const FFFilter ff_vf_streamselect = { const FFFilter ff_af_astreamselect = { .p.name = "astreamselect", .p.description = NULL_IF_CONFIG_SMALL("Select audio streams"), - .p.priv_class = &streamselect_class, + .p.priv_class = &astreamselect_class, .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_DYNAMIC_OUTPUTS, .init = init, .process_command = process_command, diff --git a/libavfilter/f_zmq.c b/libavfilter/f_zmq.c index 253e1d9cc0..40749dd394 100644 --- a/libavfilter/f_zmq.c +++ b/libavfilter/f_zmq.c @@ -205,7 +205,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *ref) return ff_filter_frame(ctx->outputs[0], ref); } -AVFILTER_DEFINE_CLASS_EXT(zmq, "(a)zmq", options); +AVFILTER_DEFINE_CLASS_EXT(zmq, "zmq", options); +AVFILTER_DEFINE_CLASS_EXT(azmq, "azmq", options); #if CONFIG_ZMQ_FILTER @@ -243,7 +244,7 @@ static const AVFilterPad azmq_inputs[] = { const FFFilter ff_af_azmq = { .p.name = "azmq", .p.description = NULL_IF_CONFIG_SMALL("Receive commands through ZMQ and broker them to filters."), - .p.priv_class = &zmq_class, + .p.priv_class = &azmq_class, .init = init, .uninit = uninit, .priv_size = sizeof(ZMQContext), diff --git a/libavfilter/split.c b/libavfilter/split.c index d0bd0c3b2a..68c189cfcd 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -122,7 +122,8 @@ static const AVOption options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(split, "(a)split", options); +AVFILTER_DEFINE_CLASS_EXT(split, "split", options); +AVFILTER_DEFINE_CLASS_EXT(asplit, "asplit", options); const FFFilter ff_vf_split = { .p.name = "split", @@ -138,7 +139,7 @@ const FFFilter ff_vf_split = { const FFFilter ff_af_asplit = { .p.name = "asplit", .p.description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."), - .p.priv_class = &split_class, + .p.priv_class = &asplit_class, .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SplitContext), .init = split_init, diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index 5d4f6e31e6..7632e2e5e3 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -682,7 +682,8 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar return ret; } -AVFILTER_DEFINE_CLASS_EXT(movie, "(a)movie", movie_options); +AVFILTER_DEFINE_CLASS_EXT(movie, "movie", movie_options); +AVFILTER_DEFINE_CLASS_EXT(amovie, "amovie", movie_options); #if CONFIG_MOVIE_FILTER @@ -707,7 +708,7 @@ const FFFilter ff_avsrc_movie = { const FFFilter ff_avsrc_amovie = { .p.name = "amovie", .p.description = NULL_IF_CONFIG_SMALL("Read audio from a movie source."), - .p.priv_class = &movie_class, + .p.priv_class = &amovie_class, .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, .priv_size = sizeof(MovieContext), .init = movie_common_init, diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c index ce42df2cde..1cbd60a241 100644 --- a/libavfilter/vf_convolution.c +++ b/libavfilter/vf_convolution.c @@ -898,15 +898,18 @@ static const AVOption common_options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(common, "kirsch/prewitt/roberts/scharr/sobel", - common_options); +AVFILTER_DEFINE_CLASS_EXT(prewitt, "prewitt", common_options); +AVFILTER_DEFINE_CLASS_EXT(sobel, "sobel", common_options); +AVFILTER_DEFINE_CLASS_EXT(roberts, "roberts", common_options); +AVFILTER_DEFINE_CLASS_EXT(kirsch, "kirsch", common_options); +AVFILTER_DEFINE_CLASS_EXT(scharr, "scharr", common_options); #if CONFIG_PREWITT_FILTER const FFFilter ff_vf_prewitt = { .p.name = "prewitt", .p.description = NULL_IF_CONFIG_SMALL("Apply prewitt operator."), - .p.priv_class = &common_class, + .p.priv_class = &prewitt_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), FILTER_INPUTS(convolution_inputs), @@ -922,7 +925,7 @@ const FFFilter ff_vf_prewitt = { const FFFilter ff_vf_sobel = { .p.name = "sobel", .p.description = NULL_IF_CONFIG_SMALL("Apply sobel operator."), - .p.priv_class = &common_class, + .p.priv_class = &sobel_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), FILTER_INPUTS(convolution_inputs), @@ -938,7 +941,7 @@ const FFFilter ff_vf_sobel = { const FFFilter ff_vf_roberts = { .p.name = "roberts", .p.description = NULL_IF_CONFIG_SMALL("Apply roberts cross operator."), - .p.priv_class = &common_class, + .p.priv_class = &roberts_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), FILTER_INPUTS(convolution_inputs), @@ -954,7 +957,7 @@ const FFFilter ff_vf_roberts = { const FFFilter ff_vf_kirsch = { .p.name = "kirsch", .p.description = NULL_IF_CONFIG_SMALL("Apply kirsch operator."), - .p.priv_class = &common_class, + .p.priv_class = &kirsch_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), FILTER_INPUTS(convolution_inputs), @@ -970,7 +973,7 @@ const FFFilter ff_vf_kirsch = { const FFFilter ff_vf_scharr = { .p.name = "scharr", .p.description = NULL_IF_CONFIG_SMALL("Apply scharr operator."), - .p.priv_class = &common_class, + .p.priv_class = &scharr_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), FILTER_INPUTS(convolution_inputs), diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index 76d64bb4ae..26530b8227 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -189,7 +189,8 @@ static const AVOption options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(format, "(no)format", options); +AVFILTER_DEFINE_CLASS_EXT(format, "format", options); +AVFILTER_DEFINE_CLASS_EXT(noformat, "noformat", options); static const AVFilterPad inputs[] = { { @@ -223,7 +224,7 @@ const FFFilter ff_vf_format = { const FFFilter ff_vf_noformat = { .p.name = "noformat", .p.description = NULL_IF_CONFIG_SMALL("Force libavfilter not to use any of the specified pixel formats for the input to the next filter."), - .p.priv_class = &format_class, + .p.priv_class = &noformat_class, .p.flags = AVFILTER_FLAG_METADATA_ONLY, diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index ed00969e75..88abd773b5 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -605,7 +605,9 @@ static const AVFilterPad inputs[] = { .process_command = process_command, \ } -AVFILTER_DEFINE_CLASS_EXT(lut, "lut/lutyuv/lutrgb", options); +AVFILTER_DEFINE_CLASS_EXT(lut, "lut", options); +AVFILTER_DEFINE_CLASS_EXT(lutyuv, "lutyuv", options); +AVFILTER_DEFINE_CLASS_EXT(lutrgb, "lutrgb", options); #if CONFIG_LUT_FILTER @@ -627,7 +629,7 @@ static av_cold int lutyuv_init(AVFilterContext *ctx) } DEFINE_LUT_FILTER(lutyuv, "Compute and apply a lookup table to the YUV input video.", - lut); + lutyuv); #endif #if CONFIG_LUTRGB_FILTER @@ -642,5 +644,5 @@ static av_cold int lutrgb_init(AVFilterContext *ctx) } DEFINE_LUT_FILTER(lutrgb, "Compute and apply a lookup table to the RGB input video.", - lut); + lutrgb); #endif diff --git a/libavfilter/vf_maskedminmax.c b/libavfilter/vf_maskedminmax.c index b6762e16bf..763d36b32a 100644 --- a/libavfilter/vf_maskedminmax.c +++ b/libavfilter/vf_maskedminmax.c @@ -304,12 +304,13 @@ static const AVFilterPad maskedminmax_outputs[] = { }, }; -AVFILTER_DEFINE_CLASS_EXT(maskedminmax, "masked(min|max)", maskedminmax_options); +AVFILTER_DEFINE_CLASS_EXT(maskedmin, "maskedmin", maskedminmax_options); +AVFILTER_DEFINE_CLASS_EXT(maskedmax, "maskedmax", maskedminmax_options); const FFFilter ff_vf_maskedmin = { .p.name = "maskedmin", .p.description = NULL_IF_CONFIG_SMALL("Apply filtering with minimum difference of two streams."), - .p.priv_class = &maskedminmax_class, + .p.priv_class = &maskedmin_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MaskedMinMaxContext), @@ -325,7 +326,7 @@ const FFFilter ff_vf_maskedmin = { const FFFilter ff_vf_maskedmax = { .p.name = "maskedmax", .p.description = NULL_IF_CONFIG_SMALL("Apply filtering with maximum difference of two streams."), - .p.priv_class = &maskedminmax_class, + .p.priv_class = &maskedmax_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MaskedMinMaxContext), diff --git a/libavfilter/vf_neighbor.c b/libavfilter/vf_neighbor.c index 7bdc2ab91f..28568abacb 100644 --- a/libavfilter/vf_neighbor.c +++ b/libavfilter/vf_neighbor.c @@ -371,31 +371,34 @@ static const AVOption options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(erosion_dilation, "erosion/dilation", options); +AVFILTER_DEFINE_CLASS_EXT(erosion, "erosion", options); +AVFILTER_DEFINE_CLASS_EXT(dilation, "dilation", options); #if CONFIG_EROSION_FILTER -DEFINE_NEIGHBOR_FILTER(erosion, "Apply erosion effect.", erosion_dilation); +DEFINE_NEIGHBOR_FILTER(erosion, "Apply erosion effect.", erosion); #endif /* CONFIG_EROSION_FILTER */ #if CONFIG_DILATION_FILTER -DEFINE_NEIGHBOR_FILTER(dilation, "Apply dilation effect.", erosion_dilation); +DEFINE_NEIGHBOR_FILTER(dilation, "Apply dilation effect.", dilation); #endif /* CONFIG_DILATION_FILTER */ -AVFILTER_DEFINE_CLASS_EXT(deflate_inflate, "deflate/inflate", +AVFILTER_DEFINE_CLASS_EXT(deflate, "deflate", + &options[DEINFLATE_OPTIONS_OFFSET]); +AVFILTER_DEFINE_CLASS_EXT(inflate, "inflate", &options[DEINFLATE_OPTIONS_OFFSET]); #if CONFIG_DEFLATE_FILTER -DEFINE_NEIGHBOR_FILTER(deflate, "Apply deflate effect.", deflate_inflate); +DEFINE_NEIGHBOR_FILTER(deflate, "Apply deflate effect.", deflate); #endif /* CONFIG_DEFLATE_FILTER */ #if CONFIG_INFLATE_FILTER -DEFINE_NEIGHBOR_FILTER(inflate, "Apply inflate effect.", deflate_inflate); +DEFINE_NEIGHBOR_FILTER(inflate, "Apply inflate effect.", inflate); #endif /* CONFIG_INFLATE_FILTER */ diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c index 93e74d6c93..7df2de19cd 100644 --- a/libavfilter/vf_premultiply.c +++ b/libavfilter/vf_premultiply.c @@ -62,7 +62,9 @@ static const AVOption options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(premultiply, "(un)premultiply", options); +AVFILTER_DEFINE_CLASS_EXT(premultiply, "premultiply", options); +AVFILTER_DEFINE_CLASS_EXT(unpremultiply, "unpremultiply", options); +AVFILTER_DEFINE_CLASS_EXT(premultiply_dynamic, "premultiply_dynamic", options); static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, @@ -880,7 +882,7 @@ const FFFilter ff_vf_premultiply = { const FFFilter ff_vf_unpremultiply = { .p.name = "unpremultiply", .p.description = NULL_IF_CONFIG_SMALL("UnPreMultiply first stream with first plane of second stream."), - .p.priv_class = &premultiply_class, + .p.priv_class = &unpremultiply_class, .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS, @@ -907,7 +909,7 @@ static const AVFilterPad premultiply_input[] = { const FFFilter ff_vf_premultiply_dynamic = { .p.name = "premultiply_dynamic", .p.description = NULL_IF_CONFIG_SMALL("Premultiply or unpremultiply an image in-place, as needed."), - .p.priv_class = &premultiply_class, + .p.priv_class = &premultiply_dynamic_class, .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(PreMultiplyContext), .init = init, diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c index 6e9ac60a56..1acb558717 100644 --- a/libavfilter/vf_stack.c +++ b/libavfilter/vf_stack.c @@ -478,7 +478,8 @@ static const AVOption stack_options[] = { { NULL }, }; -AVFILTER_DEFINE_CLASS_EXT(stack, "(h|v)stack", stack_options); +AVFILTER_DEFINE_CLASS_EXT(hstack, "hstack", stack_options); +AVFILTER_DEFINE_CLASS_EXT(vstack, "vstack", stack_options); static const AVFilterPad outputs[] = { { @@ -493,7 +494,7 @@ static const AVFilterPad outputs[] = { const FFFilter ff_vf_hstack = { .p.name = "hstack", .p.description = NULL_IF_CONFIG_SMALL("Stack video inputs horizontally."), - .p.priv_class = &stack_class, + .p.priv_class = &hstack_class, .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(StackContext), FILTER_OUTPUTS(outputs), @@ -510,7 +511,7 @@ const FFFilter ff_vf_hstack = { const FFFilter ff_vf_vstack = { .p.name = "vstack", .p.description = NULL_IF_CONFIG_SMALL("Stack video inputs vertically."), - .p.priv_class = &stack_class, + .p.priv_class = &vstack_class, .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(StackContext), FILTER_OUTPUTS(outputs), diff --git a/libavfilter/vf_weave.c b/libavfilter/vf_weave.c index 91c98e0e66..850490462e 100644 --- a/libavfilter/vf_weave.c +++ b/libavfilter/vf_weave.c @@ -50,7 +50,8 @@ static const AVOption weave_options[] = { { NULL } }; -AVFILTER_DEFINE_CLASS_EXT(weave, "(double)weave", weave_options); +AVFILTER_DEFINE_CLASS_EXT(weave, "weave", weave_options); +AVFILTER_DEFINE_CLASS_EXT(doubleweave, "doubleweave", weave_options); static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, @@ -223,7 +224,7 @@ static av_cold int init(AVFilterContext *ctx) const FFFilter ff_vf_doubleweave = { .p.name = "doubleweave", .p.description = NULL_IF_CONFIG_SMALL("Weave input video fields into double number of frames."), - .p.priv_class = &weave_class, + .p.priv_class = &doubleweave_class, .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(WeaveContext), .init = init, diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index bfc3491596..087c0ad5dd 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -454,7 +454,8 @@ const FFFilter ff_vsrc_haldclutsrc = { }; #endif /* CONFIG_HALDCLUTSRC_FILTER */ -AVFILTER_DEFINE_CLASS_EXT(nullsrc_yuvtestsrc, "nullsrc/yuvtestsrc", options); +AVFILTER_DEFINE_CLASS_EXT(nullsrc, "nullsrc", options); +AVFILTER_DEFINE_CLASS_EXT(yuvtestsrc, "yuvtestsrc", options); #if CONFIG_NULLSRC_FILTER @@ -471,7 +472,7 @@ static av_cold int nullsrc_init(AVFilterContext *ctx) const FFFilter ff_vsrc_nullsrc = { .p.name = "nullsrc", .p.description= NULL_IF_CONFIG_SMALL("Null video source, return unprocessed video frames."), - .p.priv_class= &nullsrc_yuvtestsrc_class, + .p.priv_class= &nullsrc_class, .init = nullsrc_init, .uninit = uninit, .activate = activate, @@ -1347,7 +1348,7 @@ static const AVFilterPad avfilter_vsrc_yuvtestsrc_outputs[] = { const FFFilter ff_vsrc_yuvtestsrc = { .p.name = "yuvtestsrc", .p.description = NULL_IF_CONFIG_SMALL("Generate YUV test pattern."), - .p.priv_class = &nullsrc_yuvtestsrc_class, + .p.priv_class = &yuvtestsrc_class, .priv_size = sizeof(TestSourceContext), .init = yuvtest_init, .uninit = uninit, @@ -1496,7 +1497,8 @@ static int smptebars_query_formats(const AVFilterContext *ctx, return ff_set_pixel_formats_from_list2(ctx, cfg_in, cfg_out, smptebars_pix_fmts); } -AVFILTER_DEFINE_CLASS_EXT(palbars, "pal(75|100)bars", options); +AVFILTER_DEFINE_CLASS_EXT(pal75bars, "pal75bars", options); +AVFILTER_DEFINE_CLASS_EXT(pal100bars, "pal100bars", options); #if CONFIG_PAL75BARS_FILTER @@ -1529,7 +1531,7 @@ static av_cold int pal75bars_init(AVFilterContext *ctx) const FFFilter ff_vsrc_pal75bars = { .p.name = "pal75bars", .p.description = NULL_IF_CONFIG_SMALL("Generate PAL 75% color bars."), - .p.priv_class = &palbars_class, + .p.priv_class = &pal75bars_class, .priv_size = sizeof(TestSourceContext), .init = pal75bars_init, .uninit = uninit, @@ -1569,7 +1571,7 @@ static av_cold int pal100bars_init(AVFilterContext *ctx) const FFFilter ff_vsrc_pal100bars = { .p.name = "pal100bars", .p.description = NULL_IF_CONFIG_SMALL("Generate PAL 100% color bars."), - .p.priv_class = &palbars_class, + .p.priv_class = &pal100bars_class, .priv_size = sizeof(TestSourceContext), .init = pal100bars_init, .uninit = uninit, @@ -1580,7 +1582,8 @@ const FFFilter ff_vsrc_pal100bars = { #endif /* CONFIG_PAL100BARS_FILTER */ -AVFILTER_DEFINE_CLASS_EXT(smptebars, "smpte(hd)bars", options); +AVFILTER_DEFINE_CLASS_EXT(smptebars, "smptebars", options); +AVFILTER_DEFINE_CLASS_EXT(smptehdbars, "smptehdbars", options); #if CONFIG_SMPTEBARS_FILTER @@ -1733,7 +1736,7 @@ static av_cold int smptehdbars_init(AVFilterContext *ctx) const FFFilter ff_vsrc_smptehdbars = { .p.name = "smptehdbars", .p.description = NULL_IF_CONFIG_SMALL("Generate SMPTE HD color bars."), - .p.priv_class = &smptebars_class, + .p.priv_class = &smptehdbars_class, .priv_size = sizeof(TestSourceContext), .init = smptehdbars_init, .uninit = uninit, @@ -1745,7 +1748,9 @@ const FFFilter ff_vsrc_smptehdbars = { #endif /* CONFIG_SMPTEHDBARS_FILTER */ #endif /* CONFIG_SMPTEBARS_FILTER || CONFIG_SMPTEHDBARS_FILTER */ -AVFILTER_DEFINE_CLASS_EXT(allyuv_allrgb, "allyuv/allrgb", +AVFILTER_DEFINE_CLASS_EXT(allyuv, "allyuv", + &options[NOSIZE_OPTIONS_OFFSET]); +AVFILTER_DEFINE_CLASS_EXT(allrgb, "allrgb", &options[NOSIZE_OPTIONS_OFFSET]); #if CONFIG_ALLYUV_FILTER @@ -1788,7 +1793,7 @@ static av_cold int allyuv_init(AVFilterContext *ctx) const FFFilter ff_vsrc_allyuv = { .p.name = "allyuv", .p.description = NULL_IF_CONFIG_SMALL("Generate all yuv colors."), - .p.priv_class = &allyuv_allrgb_class, + .p.priv_class = &allyuv_class, .priv_size = sizeof(TestSourceContext), .init = allyuv_init, .uninit = uninit, @@ -1848,7 +1853,7 @@ static const AVFilterPad avfilter_vsrc_allrgb_outputs[] = { const FFFilter ff_vsrc_allrgb = { .p.name = "allrgb", .p.description = NULL_IF_CONFIG_SMALL("Generate all RGB colors."), - .p.priv_class = &allyuv_allrgb_class, + .p.priv_class = &allrgb_class, .priv_size = sizeof(TestSourceContext), .init = allrgb_init, .uninit = uninit, -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
