diff --git a/configure b/configure index b09e9d0436..3a1e72e1c6 100755 --- a/configure +++ b/configure @@ -4262,7 +4262,7 @@ find_things_extern(){ find_filters_extern(){ file=$source_path/$1 - sed -n 's/^extern const AVFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file + sed -n 's/^extern const FFFilter ff_[avfsinkrc]\{2,5\}_\([[:alnum:]_]\{1,\}\);/\1_filter/p' $file } FILTER_LIST=$(find_filters_extern libavfilter/allfilters.c) @@ -8311,7 +8311,7 @@ cp_if_changed $TMPH libavutil/avconfig.h # full_filter_name_foo=vf_foo # full_filter_name_bar=asrc_bar # ... -eval "$(sed -n "s/^extern const AVFilter ff_\([avfsinkrc]\{2,5\}\)_\(.*\);/full_filter_name_\2=\1_\2/p" $source_path/libavfilter/allfilters.c)" +eval "$(sed -n "s/^extern const FFFilter ff_\([avfsinkrc]\{2,5\}\)_\(.*\);/full_filter_name_\2=\1_\2/p" $source_path/libavfilter/allfilters.c)" # generate the lists of enabled components print_enabled_components(){ @@ -8345,7 +8345,7 @@ print_enabled_components(){ cp_if_changed $TMPH $file } -print_enabled_components libavfilter/filter_list.c AVFilter filter_list $FILTER_LIST +print_enabled_components libavfilter/filter_list.c FFFilter filter_list $FILTER_LIST print_enabled_components libavcodec/codec_list.c FFCodec codec_list $CODEC_LIST print_enabled_components libavcodec/parser_list.c AVCodecParser parser_list $PARSER_LIST print_enabled_components libavcodec/bsf_list.c FFBitStreamFilter bitstream_filters $BSF_LIST diff --git a/libavfilter/aeval.c b/libavfilter/aeval.c index 37447b47e8..03ecb4e5bb 100644 --- a/libavfilter/aeval.c +++ b/libavfilter/aeval.c @@ -321,17 +321,16 @@ static const AVFilterPad aevalsrc_outputs[] = { }, }; -const AVFilter ff_asrc_aevalsrc = { - .name = "aevalsrc", - .description = NULL_IF_CONFIG_SMALL("Generate an audio signal generated by an expression."), +const FFFilter ff_asrc_aevalsrc = { + .p.name = "aevalsrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate an audio signal generated by an expression."), + .p.priv_class = &aevalsrc_class, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(EvalContext), - .inputs = NULL, FILTER_OUTPUTS(aevalsrc_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &aevalsrc_class, }; #endif /* CONFIG_AEVALSRC_FILTER */ @@ -463,17 +462,17 @@ static const AVFilterPad aeval_outputs[] = { }, }; -const AVFilter ff_af_aeval = { - .name = "aeval", - .description = NULL_IF_CONFIG_SMALL("Filter audio signal according to a specified expression."), +const FFFilter ff_af_aeval = { + .p.name = "aeval", + .p.description = NULL_IF_CONFIG_SMALL("Filter audio signal according to a specified expression."), + .p.priv_class = &aeval_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .init = init, .uninit = uninit, .priv_size = sizeof(EvalContext), FILTER_INPUTS(aeval_inputs), FILTER_OUTPUTS(aeval_outputs), FILTER_QUERY_FUNC2(aeval_query_formats), - .priv_class = &aeval_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; #endif /* CONFIG_AEVAL_FILTER */ diff --git a/libavfilter/af_aap.c b/libavfilter/af_aap.c index 05608d7fbb..8d3209a1ef 100644 --- a/libavfilter/af_aap.c +++ b/libavfilter/af_aap.c @@ -315,18 +315,18 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_af_aap = { - .name = "aap", - .description = NULL_IF_CONFIG_SMALL("Apply Affine Projection algorithm to first audio stream."), +const FFFilter ff_af_aap = { + .p.name = "aap", + .p.description = NULL_IF_CONFIG_SMALL("Apply Affine Projection algorithm to first audio stream."), + .p.priv_class = &aap_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioAPContext), - .priv_class = &aap_class, .init = init, .uninit = uninit, .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_acontrast.c b/libavfilter/af_acontrast.c index e520b1b66b..b99a65b2f6 100644 --- a/libavfilter/af_acontrast.c +++ b/libavfilter/af_acontrast.c @@ -169,11 +169,11 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_acontrast = { - .name = "acontrast", - .description = NULL_IF_CONFIG_SMALL("Simple audio dynamic range compression/expansion filter."), +const FFFilter ff_af_acontrast = { + .p.name = "acontrast", + .p.description = NULL_IF_CONFIG_SMALL("Simple audio dynamic range compression/expansion filter."), + .p.priv_class = &acontrast_class, .priv_size = sizeof(AudioContrastContext), - .priv_class = &acontrast_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, diff --git a/libavfilter/af_acopy.c b/libavfilter/af_acopy.c index 9d06e2d4b4..e886a2ce2b 100644 --- a/libavfilter/af_acopy.c +++ b/libavfilter/af_acopy.c @@ -53,10 +53,10 @@ static const AVFilterPad acopy_inputs[] = { }, }; -const AVFilter ff_af_acopy = { - .name = "acopy", - .description = NULL_IF_CONFIG_SMALL("Copy the input audio unchanged to the output."), - .flags = AVFILTER_FLAG_METADATA_ONLY, +const FFFilter ff_af_acopy = { + .p.name = "acopy", + .p.description = NULL_IF_CONFIG_SMALL("Copy the input audio unchanged to the output."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(acopy_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), }; diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c index 3fd5c1d246..2c9a1e00bc 100644 --- a/libavfilter/af_acrossover.c +++ b/libavfilter/af_acrossover.c @@ -617,17 +617,17 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_acrossover = { - .name = "acrossover", - .description = NULL_IF_CONFIG_SMALL("Split audio into per-bands streams."), +const FFFilter ff_af_acrossover = { + .p.name = "acrossover", + .p.description = NULL_IF_CONFIG_SMALL("Split audio into per-bands streams."), + .p.priv_class = &acrossover_class, + .p.outputs = NULL, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioCrossoverContext), - .priv_class = &acrossover_class, .init = init, .activate = activate, .uninit = uninit, FILTER_INPUTS(inputs), - .outputs = NULL, FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_acrusher.c b/libavfilter/af_acrusher.c index f064f5b04e..3ec38269d0 100644 --- a/libavfilter/af_acrusher.c +++ b/libavfilter/af_acrusher.c @@ -326,15 +326,15 @@ static const AVFilterPad avfilter_af_acrusher_inputs[] = { }, }; -const AVFilter ff_af_acrusher = { - .name = "acrusher", - .description = NULL_IF_CONFIG_SMALL("Reduce audio bit resolution."), +const FFFilter ff_af_acrusher = { + .p.name = "acrusher", + .p.description = NULL_IF_CONFIG_SMALL("Reduce audio bit resolution."), + .p.priv_class = &acrusher_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(ACrusherContext), - .priv_class = &acrusher_class, .uninit = uninit, FILTER_INPUTS(avfilter_af_acrusher_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_adeclick.c b/libavfilter/af_adeclick.c index 819ad2ab5c..043435b186 100644 --- a/libavfilter/af_adeclick.c +++ b/libavfilter/af_adeclick.c @@ -778,18 +778,18 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_adeclick = { - .name = "adeclick", - .description = NULL_IF_CONFIG_SMALL("Remove impulsive noise from input audio."), +const FFFilter ff_af_adeclick = { + .p.name = "adeclick", + .p.description = NULL_IF_CONFIG_SMALL("Remove impulsive noise from input audio."), + .p.priv_class = &adeclick_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioDeclickContext), - .priv_class = &adeclick_class, .init = init, .activate = activate, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; static const AVOption adeclip_options[] = { @@ -814,16 +814,16 @@ static const AVOption adeclip_options[] = { AVFILTER_DEFINE_CLASS(adeclip); -const AVFilter ff_af_adeclip = { - .name = "adeclip", - .description = NULL_IF_CONFIG_SMALL("Remove clipping from input audio."), +const FFFilter ff_af_adeclip = { + .p.name = "adeclip", + .p.description = NULL_IF_CONFIG_SMALL("Remove clipping from input audio."), + .p.priv_class = &adeclip_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioDeclickContext), - .priv_class = &adeclip_class, .init = init, .activate = activate, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_adecorrelate.c b/libavfilter/af_adecorrelate.c index 5cde9e7e18..8991bf2077 100644 --- a/libavfilter/af_adecorrelate.c +++ b/libavfilter/af_adecorrelate.c @@ -231,15 +231,15 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_adecorrelate = { - .name = "adecorrelate", - .description = NULL_IF_CONFIG_SMALL("Apply decorrelation to input audio."), +const FFFilter ff_af_adecorrelate = { + .p.name = "adecorrelate", + .p.description = NULL_IF_CONFIG_SMALL("Apply decorrelation to input audio."), + .p.priv_class = &adecorrelate_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ADecorrelateContext), - .priv_class = &adecorrelate_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_adelay.c b/libavfilter/af_adelay.c index ab2d660446..c0d076fe64 100644 --- a/libavfilter/af_adelay.c +++ b/libavfilter/af_adelay.c @@ -465,17 +465,17 @@ static const AVFilterPad adelay_inputs[] = { }, }; -const AVFilter ff_af_adelay = { - .name = "adelay", - .description = NULL_IF_CONFIG_SMALL("Delay one or more audio channels."), +const FFFilter ff_af_adelay = { + .p.name = "adelay", + .p.description = NULL_IF_CONFIG_SMALL("Delay one or more audio channels."), + .p.priv_class = &adelay_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioDelayContext), - .priv_class = &adelay_class, .activate = activate, .uninit = uninit, FILTER_INPUTS(adelay_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = process_command, }; diff --git a/libavfilter/af_adenorm.c b/libavfilter/af_adenorm.c index 7dc3c0f735..0d61eed1dd 100644 --- a/libavfilter/af_adenorm.c +++ b/libavfilter/af_adenorm.c @@ -262,15 +262,15 @@ static const AVOption adenorm_options[] = { AVFILTER_DEFINE_CLASS(adenorm); -const AVFilter ff_af_adenorm = { - .name = "adenorm", - .description = NULL_IF_CONFIG_SMALL("Remedy denormals by adding extremely low-level noise."), +const FFFilter ff_af_adenorm = { + .p.name = "adenorm", + .p.description = NULL_IF_CONFIG_SMALL("Remedy denormals by adding extremely low-level noise."), + .p.priv_class = &adenorm_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ADenormContext), FILTER_INPUTS(adenorm_inputs), FILTER_OUTPUTS(adenorm_outputs), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP), - .priv_class = &adenorm_class, .process_command = ff_filter_process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_aderivative.c b/libavfilter/af_aderivative.c index 1254aa9457..7ac730836a 100644 --- a/libavfilter/af_aderivative.c +++ b/libavfilter/af_aderivative.c @@ -160,27 +160,27 @@ static const AVOption aderivative_options[] = { AVFILTER_DEFINE_CLASS_EXT(aderivative, "aderivative/aintegral", aderivative_options); -const AVFilter ff_af_aderivative = { - .name = "aderivative", - .description = NULL_IF_CONFIG_SMALL("Compute derivative of input audio."), +const FFFilter ff_af_aderivative = { + .p.name = "aderivative", + .p.description = NULL_IF_CONFIG_SMALL("Compute derivative of input audio."), + .p.priv_class = &aderivative_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(ADerivativeContext), - .priv_class = &aderivative_class, .uninit = uninit, FILTER_INPUTS(aderivative_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; -const AVFilter ff_af_aintegral = { - .name = "aintegral", - .description = NULL_IF_CONFIG_SMALL("Compute integral of input audio."), +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.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(ADerivativeContext), - .priv_class = &aderivative_class, .uninit = uninit, FILTER_INPUTS(aderivative_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_adrc.c b/libavfilter/af_adrc.c index 7410b99ed3..9e3becdf2e 100644 --- a/libavfilter/af_adrc.c +++ b/libavfilter/af_adrc.c @@ -486,17 +486,17 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_adrc = { - .name = "adrc", - .description = NULL_IF_CONFIG_SMALL("Audio Spectral Dynamic Range Controller."), +const FFFilter ff_af_adrc = { + .p.name = "adrc", + .p.description = NULL_IF_CONFIG_SMALL("Audio Spectral Dynamic Range Controller."), + .p.priv_class = &adrc_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioDRCContext), - .priv_class = &adrc_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .activate = activate, .process_command = process_command, }; diff --git a/libavfilter/af_adynamicequalizer.c b/libavfilter/af_adynamicequalizer.c index ba03faff60..6043623f46 100644 --- a/libavfilter/af_adynamicequalizer.c +++ b/libavfilter/af_adynamicequalizer.c @@ -273,16 +273,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_adynamicequalizer = { - .name = "adynamicequalizer", - .description = NULL_IF_CONFIG_SMALL("Apply Dynamic Equalization of input audio."), +const FFFilter ff_af_adynamicequalizer = { + .p.name = "adynamicequalizer", + .p.description = NULL_IF_CONFIG_SMALL("Apply Dynamic Equalization of input audio."), + .p.priv_class = &adynamicequalizer_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioDynamicEqualizerContext), - .priv_class = &adynamicequalizer_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_adynamicsmooth.c b/libavfilter/af_adynamicsmooth.c index a0276616ca..aa729c9c16 100644 --- a/libavfilter/af_adynamicsmooth.c +++ b/libavfilter/af_adynamicsmooth.c @@ -121,15 +121,15 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_adynamicsmooth = { - .name = "adynamicsmooth", - .description = NULL_IF_CONFIG_SMALL("Apply Dynamic Smoothing of input audio."), +const FFFilter ff_af_adynamicsmooth = { + .p.name = "adynamicsmooth", + .p.description = NULL_IF_CONFIG_SMALL("Apply Dynamic Smoothing of input audio."), + .p.priv_class = &adynamicsmooth_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioDynamicSmoothContext), - .priv_class = &adynamicsmooth_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_aecho.c b/libavfilter/af_aecho.c index b1c656e034..ff316eaa67 100644 --- a/libavfilter/af_aecho.c +++ b/libavfilter/af_aecho.c @@ -336,11 +336,11 @@ static const AVFilterPad aecho_outputs[] = { }, }; -const AVFilter ff_af_aecho = { - .name = "aecho", - .description = NULL_IF_CONFIG_SMALL("Add echoing to the audio."), +const FFFilter ff_af_aecho = { + .p.name = "aecho", + .p.description = NULL_IF_CONFIG_SMALL("Add echoing to the audio."), + .p.priv_class = &aecho_class, .priv_size = sizeof(AudioEchoContext), - .priv_class = &aecho_class, .init = init, .activate = activate, .uninit = uninit, diff --git a/libavfilter/af_aemphasis.c b/libavfilter/af_aemphasis.c index 4bde916717..d35111f89f 100644 --- a/libavfilter/af_aemphasis.c +++ b/libavfilter/af_aemphasis.c @@ -361,16 +361,16 @@ static const AVFilterPad avfilter_af_aemphasis_inputs[] = { }, }; -const AVFilter ff_af_aemphasis = { - .name = "aemphasis", - .description = NULL_IF_CONFIG_SMALL("Audio emphasis."), +const FFFilter ff_af_aemphasis = { + .p.name = "aemphasis", + .p.description = NULL_IF_CONFIG_SMALL("Audio emphasis."), + .p.priv_class = &aemphasis_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioEmphasisContext), - .priv_class = &aemphasis_class, .uninit = uninit, FILTER_INPUTS(avfilter_af_aemphasis_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_aexciter.c b/libavfilter/af_aexciter.c index 3fe7ce799b..188693716c 100644 --- a/libavfilter/af_aexciter.c +++ b/libavfilter/af_aexciter.c @@ -265,15 +265,15 @@ static const AVFilterPad avfilter_af_aexciter_inputs[] = { }, }; -const AVFilter ff_af_aexciter = { - .name = "aexciter", - .description = NULL_IF_CONFIG_SMALL("Enhance high frequency part of audio."), +const FFFilter ff_af_aexciter = { + .p.name = "aexciter", + .p.description = NULL_IF_CONFIG_SMALL("Enhance high frequency part of audio."), + .p.priv_class = &aexciter_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AExciterContext), - .priv_class = &aexciter_class, .uninit = uninit, FILTER_INPUTS(avfilter_af_aexciter_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c index 7cc5182d1a..a9318c0ac5 100644 --- a/libavfilter/af_afade.c +++ b/libavfilter/af_afade.c @@ -433,17 +433,17 @@ static const AVFilterPad avfilter_af_afade_outputs[] = { }, }; -const AVFilter ff_af_afade = { - .name = "afade", - .description = NULL_IF_CONFIG_SMALL("Fade in/out input audio."), +const FFFilter ff_af_afade = { + .p.name = "afade", + .p.description = NULL_IF_CONFIG_SMALL("Fade in/out input audio."), + .p.priv_class = &afade_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(AudioFadeContext), .init = init, FILTER_INPUTS(avfilter_af_afade_inputs), FILTER_OUTPUTS(avfilter_af_afade_outputs), FILTER_SAMPLEFMTS_ARRAY(sample_fmts), - .priv_class = &afade_class, .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; #endif /* CONFIG_AFADE_FILTER */ @@ -731,12 +731,12 @@ static const AVFilterPad avfilter_af_acrossfade_outputs[] = { }, }; -const AVFilter ff_af_acrossfade = { - .name = "acrossfade", - .description = NULL_IF_CONFIG_SMALL("Cross fade two input audio streams."), +const FFFilter ff_af_acrossfade = { + .p.name = "acrossfade", + .p.description = NULL_IF_CONFIG_SMALL("Cross fade two input audio streams."), + .p.priv_class = &acrossfade_class, .priv_size = sizeof(AudioFadeContext), .activate = activate, - .priv_class = &acrossfade_class, FILTER_INPUTS(avfilter_af_acrossfade_inputs), FILTER_OUTPUTS(avfilter_af_acrossfade_outputs), FILTER_SAMPLEFMTS_ARRAY(sample_fmts), diff --git a/libavfilter/af_afftdn.c b/libavfilter/af_afftdn.c index eba5834420..ce71d1f511 100644 --- a/libavfilter/af_afftdn.c +++ b/libavfilter/af_afftdn.c @@ -1363,17 +1363,17 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_afftdn = { - .name = "afftdn", - .description = NULL_IF_CONFIG_SMALL("Denoise audio samples using FFT."), +const FFFilter ff_af_afftdn = { + .p.name = "afftdn", + .p.description = NULL_IF_CONFIG_SMALL("Denoise audio samples using FFT."), + .p.priv_class = &afftdn_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioFFTDeNoiseContext), - .priv_class = &afftdn_class, .activate = activate, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c index 98b09e666d..08cdcae2f7 100644 --- a/libavfilter/af_afftfilt.c +++ b/libavfilter/af_afftfilt.c @@ -439,16 +439,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_afftfilt = { - .name = "afftfilt", - .description = NULL_IF_CONFIG_SMALL("Apply arbitrary expressions to samples in frequency domain."), +const FFFilter ff_af_afftfilt = { + .p.name = "afftfilt", + .p.description = NULL_IF_CONFIG_SMALL("Apply arbitrary expressions to samples in frequency domain."), + .p.priv_class = &afftfilt_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AFFTFiltContext), - .priv_class = &afftfilt_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP), .activate = activate, .uninit = uninit, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_afir.c b/libavfilter/af_afir.c index c641893d4a..aff837d9bf 100644 --- a/libavfilter/af_afir.c +++ b/libavfilter/af_afir.c @@ -777,18 +777,18 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_af_afir = { - .name = "afir", - .description = NULL_IF_CONFIG_SMALL("Apply Finite Impulse Response filter with supplied coefficients in additional stream(s)."), +const FFFilter ff_af_afir = { + .p.name = "afir", + .p.description = NULL_IF_CONFIG_SMALL("Apply Finite Impulse Response filter with supplied coefficients in additional stream(s)."), + .p.priv_class = &afir_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | + AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioFIRContext), - .priv_class = &afir_class, FILTER_QUERY_FUNC2(query_formats), FILTER_OUTPUTS(outputs), .init = init, .activate = activate, .uninit = uninit, .process_command = process_command, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | - AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c index a7d05a9ce8..2806eac963 100644 --- a/libavfilter/af_aformat.c +++ b/libavfilter/af_aformat.c @@ -132,13 +132,13 @@ static int query_formats(const AVFilterContext *ctx, return 0; } -const AVFilter ff_af_aformat = { - .name = "aformat", - .description = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."), +const FFFilter ff_af_aformat = { + .p.name = "aformat", + .p.description = NULL_IF_CONFIG_SMALL("Convert the input audio to one of the specified formats."), + .p.priv_class = &aformat_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .init = init, .priv_size = sizeof(AFormatContext), - .priv_class = &aformat_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), diff --git a/libavfilter/af_afreqshift.c b/libavfilter/af_afreqshift.c index fa93eed995..68969f2fdd 100644 --- a/libavfilter/af_afreqshift.c +++ b/libavfilter/af_afreqshift.c @@ -366,18 +366,18 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_afreqshift = { - .name = "afreqshift", - .description = NULL_IF_CONFIG_SMALL("Apply frequency shifting to input audio."), +const FFFilter ff_af_afreqshift = { + .p.name = "afreqshift", + .p.description = NULL_IF_CONFIG_SMALL("Apply frequency shifting to input audio."), + .p.priv_class = &afreqshift_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AFreqShift), - .priv_class = &afreqshift_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS_ARRAY(sample_fmts), .process_command = ff_filter_process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; static const AVOption aphaseshift_options[] = { @@ -389,16 +389,16 @@ static const AVOption aphaseshift_options[] = { AVFILTER_DEFINE_CLASS(aphaseshift); -const AVFilter ff_af_aphaseshift = { - .name = "aphaseshift", - .description = NULL_IF_CONFIG_SMALL("Apply phase shifting to input audio."), +const FFFilter ff_af_aphaseshift = { + .p.name = "aphaseshift", + .p.description = NULL_IF_CONFIG_SMALL("Apply phase shifting to input audio."), + .p.priv_class = &aphaseshift_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AFreqShift), - .priv_class = &aphaseshift_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS_ARRAY(sample_fmts), .process_command = ff_filter_process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_afwtdn.c b/libavfilter/af_afwtdn.c index fb172f26cc..12a2c751c5 100644 --- a/libavfilter/af_afwtdn.c +++ b/libavfilter/af_afwtdn.c @@ -1301,17 +1301,17 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_af_afwtdn = { - .name = "afwtdn", - .description = NULL_IF_CONFIG_SMALL("Denoise audio stream using Wavelets."), +const FFFilter ff_af_afwtdn = { + .p.name = "afwtdn", + .p.description = NULL_IF_CONFIG_SMALL("Denoise audio stream using Wavelets."), + .p.priv_class = &afwtdn_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioFWTDNContext), - .priv_class = &afwtdn_class, .activate = activate, .uninit = uninit, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(outputs), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_agate.c b/libavfilter/af_agate.c index 09655b7f82..3f8a7b3202 100644 --- a/libavfilter/af_agate.c +++ b/libavfilter/af_agate.c @@ -228,16 +228,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_agate = { - .name = "agate", - .description = NULL_IF_CONFIG_SMALL("Audio gate."), - .priv_class = &agate_sidechaingate_class, +const FFFilter ff_af_agate = { + .p.name = "agate", + .p.description = NULL_IF_CONFIG_SMALL("Audio gate."), + .p.priv_class = &agate_sidechaingate_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(AudioGateContext), FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL), .process_command = ff_filter_process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; #endif /* CONFIG_AGATE_FILTER */ @@ -378,10 +378,11 @@ static const AVFilterPad sidechaingate_outputs[] = { }, }; -const AVFilter ff_af_sidechaingate = { - .name = "sidechaingate", - .description = NULL_IF_CONFIG_SMALL("Audio sidechain gate."), - .priv_class = &agate_sidechaingate_class, +const FFFilter ff_af_sidechaingate = { + .p.name = "sidechaingate", + .p.description = NULL_IF_CONFIG_SMALL("Audio sidechain gate."), + .p.priv_class = &agate_sidechaingate_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioGateContext), .activate = activate, .uninit = uninit, @@ -389,6 +390,5 @@ const AVFilter ff_af_sidechaingate = { FILTER_OUTPUTS(sidechaingate_outputs), FILTER_QUERY_FUNC2(scquery_formats), .process_command = ff_filter_process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; #endif /* CONFIG_SIDECHAINGATE_FILTER */ diff --git a/libavfilter/af_aiir.c b/libavfilter/af_aiir.c index dfeeb34c9b..9a43235ad6 100644 --- a/libavfilter/af_aiir.c +++ b/libavfilter/af_aiir.c @@ -1560,15 +1560,15 @@ static const AVOption aiir_options[] = { AVFILTER_DEFINE_CLASS(aiir); -const AVFilter ff_af_aiir = { - .name = "aiir", - .description = NULL_IF_CONFIG_SMALL("Apply Infinite Impulse Response filter with supplied coefficients."), +const FFFilter ff_af_aiir = { + .p.name = "aiir", + .p.description = NULL_IF_CONFIG_SMALL("Apply Infinite Impulse Response filter with supplied coefficients."), + .p.priv_class = &aiir_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioIIRContext), - .priv_class = &aiir_class, .init = init, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_alimiter.c b/libavfilter/af_alimiter.c index a08616f69c..61ea7beb6f 100644 --- a/libavfilter/af_alimiter.c +++ b/libavfilter/af_alimiter.c @@ -421,16 +421,16 @@ static const AVFilterPad alimiter_outputs[] = { }, }; -const AVFilter ff_af_alimiter = { - .name = "alimiter", - .description = NULL_IF_CONFIG_SMALL("Audio lookahead limiter."), +const FFFilter ff_af_alimiter = { + .p.name = "alimiter", + .p.description = NULL_IF_CONFIG_SMALL("Audio lookahead limiter."), + .p.priv_class = &alimiter_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(AudioLimiterContext), - .priv_class = &alimiter_class, .init = init, .uninit = uninit, FILTER_INPUTS(alimiter_inputs), FILTER_OUTPUTS(alimiter_outputs), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL), .process_command = ff_filter_process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c index 16507299b5..bb82128a84 100644 --- a/libavfilter/af_amerge.c +++ b/libavfilter/af_amerge.c @@ -341,17 +341,17 @@ static const AVFilterPad amerge_outputs[] = { }, }; -const AVFilter ff_af_amerge = { - .name = "amerge", - .description = NULL_IF_CONFIG_SMALL("Merge two or more audio streams into " +const FFFilter ff_af_amerge = { + .p.name = "amerge", + .p.description = NULL_IF_CONFIG_SMALL("Merge two or more audio streams into " "a single multi-channel stream."), + .p.inputs = NULL, + .p.priv_class = &amerge_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(AMergeContext), .init = init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(amerge_outputs), FILTER_QUERY_FUNC(query_formats), - .priv_class = &amerge_class, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index bc97200926..082d69b97f 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -616,18 +616,18 @@ static const AVFilterPad avfilter_af_amix_outputs[] = { }, }; -const AVFilter ff_af_amix = { - .name = "amix", - .description = NULL_IF_CONFIG_SMALL("Audio mixing."), +const FFFilter ff_af_amix = { + .p.name = "amix", + .p.description = NULL_IF_CONFIG_SMALL("Audio mixing."), + .p.priv_class = &amix_class, + .p.inputs = NULL, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(MixContext), - .priv_class = &amix_class, .init = init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(avfilter_af_amix_outputs), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP), .process_command = process_command, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_amultiply.c b/libavfilter/af_amultiply.c index 5090098c1b..6b6d3e0a57 100644 --- a/libavfilter/af_amultiply.c +++ b/libavfilter/af_amultiply.c @@ -169,9 +169,9 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_af_amultiply = { - .name = "amultiply", - .description = NULL_IF_CONFIG_SMALL("Multiply two audio streams."), +const FFFilter ff_af_amultiply = { + .p.name = "amultiply", + .p.description = NULL_IF_CONFIG_SMALL("Multiply two audio streams."), .priv_size = sizeof(AudioMultiplyContext), .init = init, .uninit = uninit, diff --git a/libavfilter/af_anequalizer.c b/libavfilter/af_anequalizer.c index 26e9c3cdd7..26df4f7e32 100644 --- a/libavfilter/af_anequalizer.c +++ b/libavfilter/af_anequalizer.c @@ -752,18 +752,18 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_anequalizer = { - .name = "anequalizer", - .description = NULL_IF_CONFIG_SMALL("Apply high-order audio parametric multi band equalizer."), +const FFFilter ff_af_anequalizer = { + .p.name = "anequalizer", + .p.description = NULL_IF_CONFIG_SMALL("Apply high-order audio parametric multi band equalizer."), + .p.priv_class = &anequalizer_class, + .p.outputs = NULL, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | + AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioNEqualizerContext), - .priv_class = &anequalizer_class, .init = init, .uninit = uninit, FILTER_INPUTS(inputs), - .outputs = NULL, FILTER_QUERY_FUNC2(query_formats), .process_command = process_command, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | - AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_anlmdn.c b/libavfilter/af_anlmdn.c index f8e4f92c47..b1944fb2d7 100644 --- a/libavfilter/af_anlmdn.c +++ b/libavfilter/af_anlmdn.c @@ -349,17 +349,17 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_af_anlmdn = { - .name = "anlmdn", - .description = NULL_IF_CONFIG_SMALL("Reduce broadband noise from stream using Non-Local Means."), +const FFFilter ff_af_anlmdn = { + .p.name = "anlmdn", + .p.description = NULL_IF_CONFIG_SMALL("Reduce broadband noise from stream using Non-Local Means."), + .p.priv_class = &anlmdn_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioNLMeansContext), - .priv_class = &anlmdn_class, .activate = activate, .uninit = uninit, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(outputs), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_anlms.c b/libavfilter/af_anlms.c index 4e83a0501d..b03dd6da2a 100644 --- a/libavfilter/af_anlms.c +++ b/libavfilter/af_anlms.c @@ -251,34 +251,34 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_af_anlms = { - .name = "anlms", - .description = NULL_IF_CONFIG_SMALL("Apply Normalized Least-Mean-Squares algorithm to first audio stream."), +const FFFilter ff_af_anlms = { + .p.name = "anlms", + .p.description = NULL_IF_CONFIG_SMALL("Apply Normalized Least-Mean-Squares algorithm to first audio stream."), + .p.priv_class = &anlms_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioNLMSContext), - .priv_class = &anlms_class, .init = init, .uninit = uninit, .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; -const AVFilter ff_af_anlmf = { - .name = "anlmf", - .description = NULL_IF_CONFIG_SMALL("Apply Normalized Least-Mean-Fourth algorithm to first audio stream."), +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.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioNLMSContext), - .priv_class = &anlms_class, .init = init, .uninit = uninit, .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_anull.c b/libavfilter/af_anull.c index d7645fd0ec..6df598261a 100644 --- a/libavfilter/af_anull.c +++ b/libavfilter/af_anull.c @@ -27,10 +27,10 @@ #include "filters.h" #include "libavutil/internal.h" -const AVFilter ff_af_anull = { - .name = "anull", - .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), - .flags = AVFILTER_FLAG_METADATA_ONLY, +const FFFilter ff_af_anull = { + .p.name = "anull", + .p.description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(ff_audio_default_filterpad), }; diff --git a/libavfilter/af_apad.c b/libavfilter/af_apad.c index 6cdfd15972..cc214f7cc8 100644 --- a/libavfilter/af_apad.c +++ b/libavfilter/af_apad.c @@ -194,14 +194,14 @@ static const AVFilterPad apad_outputs[] = { }, }; -const AVFilter ff_af_apad = { - .name = "apad", - .description = NULL_IF_CONFIG_SMALL("Pad audio with silence."), +const FFFilter ff_af_apad = { + .p.name = "apad", + .p.description = NULL_IF_CONFIG_SMALL("Pad audio with silence."), + .p.priv_class = &apad_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .init = init, .activate = activate, .priv_size = sizeof(APadContext), FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(apad_outputs), - .priv_class = &apad_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_aphaser.c b/libavfilter/af_aphaser.c index b070f4d2a6..8d7f624827 100644 --- a/libavfilter/af_aphaser.c +++ b/libavfilter/af_aphaser.c @@ -256,9 +256,10 @@ static const AVFilterPad aphaser_outputs[] = { }, }; -const AVFilter ff_af_aphaser = { - .name = "aphaser", - .description = NULL_IF_CONFIG_SMALL("Add a phasing effect to the audio."), +const FFFilter ff_af_aphaser = { + .p.name = "aphaser", + .p.description = NULL_IF_CONFIG_SMALL("Add a phasing effect to the audio."), + .p.priv_class = &aphaser_class, .priv_size = sizeof(AudioPhaserContext), .init = init, .uninit = uninit, @@ -268,5 +269,4 @@ const AVFilter ff_af_aphaser = { AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P), - .priv_class = &aphaser_class, }; diff --git a/libavfilter/af_apsyclip.c b/libavfilter/af_apsyclip.c index 5afc3930c1..35ef2cef17 100644 --- a/libavfilter/af_apsyclip.c +++ b/libavfilter/af_apsyclip.c @@ -637,17 +637,17 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_apsyclip = { - .name = "apsyclip", - .description = NULL_IF_CONFIG_SMALL("Audio Psychoacoustic Clipper."), +const FFFilter ff_af_apsyclip = { + .p.name = "apsyclip", + .p.description = NULL_IF_CONFIG_SMALL("Audio Psychoacoustic Clipper."), + .p.priv_class = &apsyclip_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioPsyClipContext), - .priv_class = &apsyclip_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .activate = activate, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_apulsator.c b/libavfilter/af_apulsator.c index 4272e5f3a0..71f79a4475 100644 --- a/libavfilter/af_apulsator.c +++ b/libavfilter/af_apulsator.c @@ -249,11 +249,11 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_apulsator = { - .name = "apulsator", - .description = NULL_IF_CONFIG_SMALL("Audio pulsator."), +const FFFilter ff_af_apulsator = { + .p.name = "apulsator", + .p.description = NULL_IF_CONFIG_SMALL("Audio pulsator."), + .p.priv_class = &apulsator_class, .priv_size = sizeof(AudioPulsatorContext), - .priv_class = &apulsator_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), diff --git a/libavfilter/af_aresample.c b/libavfilter/af_aresample.c index d6de074041..9de8d8059a 100644 --- a/libavfilter/af_aresample.c +++ b/libavfilter/af_aresample.c @@ -361,14 +361,14 @@ static const AVFilterPad aresample_outputs[] = { }, }; -const AVFilter ff_af_aresample = { - .name = "aresample", - .description = NULL_IF_CONFIG_SMALL("Resample audio data."), +const FFFilter ff_af_aresample = { + .p.name = "aresample", + .p.description = NULL_IF_CONFIG_SMALL("Resample audio data."), + .p.priv_class = &aresample_class, .preinit = preinit, .activate = activate, .uninit = uninit, .priv_size = sizeof(AResampleContext), - .priv_class = &aresample_class, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(aresample_outputs), FILTER_QUERY_FUNC2(query_formats), diff --git a/libavfilter/af_arls.c b/libavfilter/af_arls.c index 3f182454e4..a74d632d37 100644 --- a/libavfilter/af_arls.c +++ b/libavfilter/af_arls.c @@ -281,18 +281,18 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_af_arls = { - .name = "arls", - .description = NULL_IF_CONFIG_SMALL("Apply Recursive Least Squares algorithm to first audio stream."), +const FFFilter ff_af_arls = { + .p.name = "arls", + .p.description = NULL_IF_CONFIG_SMALL("Apply Recursive Least Squares algorithm to first audio stream."), + .p.priv_class = &arls_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioRLSContext), - .priv_class = &arls_class, .init = init, .uninit = uninit, .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_arnndn.c b/libavfilter/af_arnndn.c index 3c2ae6370d..27a35c8492 100644 --- a/libavfilter/af_arnndn.c +++ b/libavfilter/af_arnndn.c @@ -1596,18 +1596,18 @@ static const AVOption arnndn_options[] = { AVFILTER_DEFINE_CLASS(arnndn); -const AVFilter ff_af_arnndn = { - .name = "arnndn", - .description = NULL_IF_CONFIG_SMALL("Reduce noise from speech using Recurrent Neural Networks."), +const FFFilter ff_af_arnndn = { + .p.name = "arnndn", + .p.description = NULL_IF_CONFIG_SMALL("Reduce noise from speech using Recurrent Neural Networks."), + .p.priv_class = &arnndn_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioRNNContext), - .priv_class = &arnndn_class, .activate = activate, .init = init, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/af_asdr.c b/libavfilter/af_asdr.c index 7765690fd8..ea74940179 100644 --- a/libavfilter/af_asdr.c +++ b/libavfilter/af_asdr.c @@ -266,45 +266,45 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_af_asdr = { - .name = "asdr", - .description = NULL_IF_CONFIG_SMALL("Measure Audio Signal-to-Distortion Ratio."), +const FFFilter ff_af_asdr = { + .p.name = "asdr", + .p.description = NULL_IF_CONFIG_SMALL("Measure Audio Signal-to-Distortion Ratio."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioSDRContext), .activate = activate, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP), }; -const AVFilter ff_af_apsnr = { - .name = "apsnr", - .description = NULL_IF_CONFIG_SMALL("Measure Audio Peak Signal-to-Noise Ratio."), +const FFFilter ff_af_apsnr = { + .p.name = "apsnr", + .p.description = NULL_IF_CONFIG_SMALL("Measure Audio Peak Signal-to-Noise Ratio."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioSDRContext), .activate = activate, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP), }; -const AVFilter ff_af_asisdr = { - .name = "asisdr", - .description = NULL_IF_CONFIG_SMALL("Measure Audio Scale-Invariant Signal-to-Distortion Ratio."), +const FFFilter ff_af_asisdr = { + .p.name = "asisdr", + .p.description = NULL_IF_CONFIG_SMALL("Measure Audio Scale-Invariant Signal-to-Distortion Ratio."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioSDRContext), .activate = activate, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, diff --git a/libavfilter/af_asetnsamples.c b/libavfilter/af_asetnsamples.c index 3d2d99dae2..137fab9403 100644 --- a/libavfilter/af_asetnsamples.c +++ b/libavfilter/af_asetnsamples.c @@ -102,14 +102,14 @@ static int activate(AVFilterContext *ctx) return FFERROR_NOT_READY; } -const AVFilter ff_af_asetnsamples = { - .name = "asetnsamples", - .description = NULL_IF_CONFIG_SMALL("Set the number of samples for each output audio frames."), +const FFFilter ff_af_asetnsamples = { + .p.name = "asetnsamples", + .p.description = NULL_IF_CONFIG_SMALL("Set the number of samples for each output audio frames."), + .p.priv_class = &asetnsamples_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(ASNSContext), - .priv_class = &asetnsamples_class, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(ff_audio_default_filterpad), .activate = activate, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_asetrate.c b/libavfilter/af_asetrate.c index 061edebdf0..9cf4cb806b 100644 --- a/libavfilter/af_asetrate.c +++ b/libavfilter/af_asetrate.c @@ -111,14 +111,14 @@ static const AVFilterPad asetrate_outputs[] = { }, }; -const AVFilter ff_af_asetrate = { - .name = "asetrate", - .description = NULL_IF_CONFIG_SMALL("Change the sample rate without " +const FFFilter ff_af_asetrate = { + .p.name = "asetrate", + .p.description = NULL_IF_CONFIG_SMALL("Change the sample rate without " "altering the data."), + .p.priv_class = &asetrate_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(ASetRateContext), FILTER_INPUTS(asetrate_inputs), FILTER_OUTPUTS(asetrate_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &asetrate_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c index de94d4c7c2..57f1ebf535 100644 --- a/libavfilter/af_ashowinfo.c +++ b/libavfilter/af_ashowinfo.c @@ -241,12 +241,12 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_ashowinfo = { - .name = "ashowinfo", - .description = NULL_IF_CONFIG_SMALL("Show textual information for each audio frame."), +const FFFilter ff_af_ashowinfo = { + .p.name = "ashowinfo", + .p.description = NULL_IF_CONFIG_SMALL("Show textual information for each audio frame."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(AShowInfoContext), .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), }; diff --git a/libavfilter/af_asoftclip.c b/libavfilter/af_asoftclip.c index 232ed05c01..19923f2c34 100644 --- a/libavfilter/af_asoftclip.c +++ b/libavfilter/af_asoftclip.c @@ -473,16 +473,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_asoftclip = { - .name = "asoftclip", - .description = NULL_IF_CONFIG_SMALL("Audio Soft Clipper."), +const FFFilter ff_af_asoftclip = { + .p.name = "asoftclip", + .p.description = NULL_IF_CONFIG_SMALL("Audio Soft Clipper."), + .p.priv_class = &asoftclip_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ASoftClipContext), - .priv_class = &asoftclip_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP), .uninit = uninit, .process_command = ff_filter_process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_aspectralstats.c b/libavfilter/af_aspectralstats.c index ca79395514..ac7da748ee 100644 --- a/libavfilter/af_aspectralstats.c +++ b/libavfilter/af_aspectralstats.c @@ -608,15 +608,15 @@ static const AVFilterPad aspectralstats_outputs[] = { }, }; -const AVFilter ff_af_aspectralstats = { - .name = "aspectralstats", - .description = NULL_IF_CONFIG_SMALL("Show frequency domain statistics about audio frames."), +const FFFilter ff_af_aspectralstats = { + .p.name = "aspectralstats", + .p.description = NULL_IF_CONFIG_SMALL("Show frequency domain statistics about audio frames."), + .p.priv_class = &aspectralstats_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioSpectralStatsContext), - .priv_class = &aspectralstats_class, .uninit = uninit, .activate = activate, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(aspectralstats_outputs), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP), - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_asr.c b/libavfilter/af_asr.c index 8e8eeb19a7..c39ac772d3 100644 --- a/libavfilter/af_asr.c +++ b/libavfilter/af_asr.c @@ -173,14 +173,14 @@ static const AVFilterPad asr_inputs[] = { }, }; -const AVFilter ff_af_asr = { - .name = "asr", - .description = NULL_IF_CONFIG_SMALL("Automatic Speech Recognition."), +const FFFilter ff_af_asr = { + .p.name = "asr", + .p.description = NULL_IF_CONFIG_SMALL("Automatic Speech Recognition."), + .p.priv_class = &asr_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(ASRContext), - .priv_class = &asr_class, .init = asr_init, .uninit = asr_uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(asr_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), diff --git a/libavfilter/af_astats.c b/libavfilter/af_astats.c index 62ebc3f83b..aa2028d3f0 100644 --- a/libavfilter/af_astats.c +++ b/libavfilter/af_astats.c @@ -956,11 +956,12 @@ static const AVFilterPad astats_outputs[] = { }, }; -const AVFilter ff_af_astats = { - .name = "astats", - .description = NULL_IF_CONFIG_SMALL("Show time domain statistics about audio frames."), +const FFFilter ff_af_astats = { + .p.name = "astats", + .p.description = NULL_IF_CONFIG_SMALL("Show time domain statistics about audio frames."), + .p.priv_class = &astats_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(AudioStatsContext), - .priv_class = &astats_class, .uninit = uninit, FILTER_INPUTS(astats_inputs), FILTER_OUTPUTS(astats_outputs), @@ -969,5 +970,4 @@ const AVFilter ff_af_astats = { AV_SAMPLE_FMT_S64, AV_SAMPLE_FMT_S64P, AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/af_asubboost.c b/libavfilter/af_asubboost.c index 5698f50287..58135626b9 100644 --- a/libavfilter/af_asubboost.c +++ b/libavfilter/af_asubboost.c @@ -238,16 +238,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_asubboost = { - .name = "asubboost", - .description = NULL_IF_CONFIG_SMALL("Boost subwoofer frequencies."), +const FFFilter ff_af_asubboost = { + .p.name = "asubboost", + .p.description = NULL_IF_CONFIG_SMALL("Boost subwoofer frequencies."), + .p.priv_class = &asubboost_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ASubBoostContext), - .priv_class = &asubboost_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_asupercut.c b/libavfilter/af_asupercut.c index 76e9d4b969..3e032d74bd 100644 --- a/libavfilter/af_asupercut.c +++ b/libavfilter/af_asupercut.c @@ -333,18 +333,18 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_asupercut = { - .name = "asupercut", - .description = NULL_IF_CONFIG_SMALL("Cut super frequencies."), +const FFFilter ff_af_asupercut = { + .p.name = "asupercut", + .p.description = NULL_IF_CONFIG_SMALL("Cut super frequencies."), + .p.priv_class = &asupercut_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ASuperCutContext), - .priv_class = &asupercut_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS_ARRAY(sample_fmts), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; static const AVOption asubcut_options[] = { @@ -356,18 +356,18 @@ static const AVOption asubcut_options[] = { AVFILTER_DEFINE_CLASS(asubcut); -const AVFilter ff_af_asubcut = { - .name = "asubcut", - .description = NULL_IF_CONFIG_SMALL("Cut subwoofer frequencies."), +const FFFilter ff_af_asubcut = { + .p.name = "asubcut", + .p.description = NULL_IF_CONFIG_SMALL("Cut subwoofer frequencies."), + .p.priv_class = &asubcut_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ASuperCutContext), - .priv_class = &asubcut_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS_ARRAY(sample_fmts), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; static const AVOption asuperpass_asuperstop_options[] = { @@ -381,30 +381,30 @@ static const AVOption asuperpass_asuperstop_options[] = { AVFILTER_DEFINE_CLASS_EXT(asuperpass_asuperstop, "asuperpass/asuperstop", asuperpass_asuperstop_options); -const AVFilter ff_af_asuperpass = { - .name = "asuperpass", - .description = NULL_IF_CONFIG_SMALL("Apply high order Butterworth band-pass filter."), - .priv_class = &asuperpass_asuperstop_class, +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.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ASuperCutContext), .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS_ARRAY(sample_fmts), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; -const AVFilter ff_af_asuperstop = { - .name = "asuperstop", - .description = NULL_IF_CONFIG_SMALL("Apply high order Butterworth band-stop filter."), - .priv_class = &asuperpass_asuperstop_class, +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.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ASuperCutContext), .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS_ARRAY(sample_fmts), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c index 3b03caa4d0..62a8e11b78 100644 --- a/libavfilter/af_atempo.c +++ b/libavfilter/af_atempo.c @@ -1176,14 +1176,14 @@ static const AVFilterPad atempo_outputs[] = { }, }; -const AVFilter ff_af_atempo = { - .name = "atempo", - .description = NULL_IF_CONFIG_SMALL("Adjust audio tempo."), +const FFFilter ff_af_atempo = { + .p.name = "atempo", + .p.description = NULL_IF_CONFIG_SMALL("Adjust audio tempo."), + .p.priv_class = &atempo_class, .init = init, .uninit = uninit, .process_command = process_command, .priv_size = sizeof(ATempoContext), - .priv_class = &atempo_class, FILTER_INPUTS(atempo_inputs), FILTER_OUTPUTS(atempo_outputs), FILTER_SAMPLEFMTS_ARRAY(sample_fmts), diff --git a/libavfilter/af_atilt.c b/libavfilter/af_atilt.c index c8f4ba1e94..b2cdef8fbb 100644 --- a/libavfilter/af_atilt.c +++ b/libavfilter/af_atilt.c @@ -246,16 +246,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_atilt = { - .name = "atilt", - .description = NULL_IF_CONFIG_SMALL("Apply spectral tilt to audio."), +const FFFilter ff_af_atilt = { + .p.name = "atilt", + .p.description = NULL_IF_CONFIG_SMALL("Apply spectral tilt to audio."), + .p.priv_class = &atilt_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ATiltContext), - .priv_class = &atilt_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_axcorrelate.c b/libavfilter/af_axcorrelate.c index b887c07bfb..eb61536c4e 100644 --- a/libavfilter/af_axcorrelate.c +++ b/libavfilter/af_axcorrelate.c @@ -454,11 +454,11 @@ static const AVOption axcorrelate_options[] = { AVFILTER_DEFINE_CLASS(axcorrelate); -const AVFilter ff_af_axcorrelate = { - .name = "axcorrelate", - .description = NULL_IF_CONFIG_SMALL("Cross-correlate two audio streams."), +const FFFilter ff_af_axcorrelate = { + .p.name = "axcorrelate", + .p.description = NULL_IF_CONFIG_SMALL("Cross-correlate two audio streams."), + .p.priv_class = &axcorrelate_class, .priv_size = sizeof(AudioXCorrelateContext), - .priv_class = &axcorrelate_class, .activate = activate, .uninit = uninit, FILTER_INPUTS(inputs), diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c index dc7f19d7ea..88992e36b9 100644 --- a/libavfilter/af_biquads.c +++ b/libavfilter/af_biquads.c @@ -1453,10 +1453,12 @@ static av_cold int name_##_init(AVFilterContext *ctx) \ return 0; \ } \ \ -const AVFilter ff_af_##name_ = { \ - .name = #name_, \ - .description = NULL_IF_CONFIG_SMALL(description_), \ - .priv_class = &priv_class_##_class, \ +const FFFilter ff_af_##name_ = { \ + .p.name = #name_, \ + .p.description = NULL_IF_CONFIG_SMALL(description_), \ + .p.priv_class = &priv_class_##_class, \ + .p.flags = AVFILTER_FLAG_SLICE_THREADS | \ + AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, \ .priv_size = sizeof(BiquadsContext), \ .init = name_##_init, \ .activate = activate, \ @@ -1465,7 +1467,6 @@ const AVFilter ff_af_##name_ = { \ FILTER_OUTPUTS(outputs), \ FILTER_QUERY_FUNC2(query_formats), \ .process_command = process_command, \ - .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, \ } #define DEFINE_BIQUAD_FILTER(name, description) \ diff --git a/libavfilter/af_bs2b.c b/libavfilter/af_bs2b.c index 006c8564fc..a6580a69ea 100644 --- a/libavfilter/af_bs2b.c +++ b/libavfilter/af_bs2b.c @@ -205,11 +205,11 @@ static const AVFilterPad bs2b_outputs[] = { }, }; -const AVFilter ff_af_bs2b = { - .name = "bs2b", - .description = NULL_IF_CONFIG_SMALL("Bauer stereo-to-binaural filter."), +const FFFilter ff_af_bs2b = { + .p.name = "bs2b", + .p.description = NULL_IF_CONFIG_SMALL("Bauer stereo-to-binaural filter."), + .p.priv_class = &bs2b_class, .priv_size = sizeof(Bs2bContext), - .priv_class = &bs2b_class, .init = init, .uninit = uninit, FILTER_INPUTS(bs2b_inputs), diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index 7a99ac7780..a883934fa6 100644 --- a/libavfilter/af_channelmap.c +++ b/libavfilter/af_channelmap.c @@ -444,13 +444,13 @@ static const AVFilterPad avfilter_af_channelmap_inputs[] = { }, }; -const AVFilter ff_af_channelmap = { - .name = "channelmap", - .description = NULL_IF_CONFIG_SMALL("Remap audio channels."), +const FFFilter ff_af_channelmap = { + .p.name = "channelmap", + .p.description = NULL_IF_CONFIG_SMALL("Remap audio channels."), + .p.priv_class = &channelmap_class, .init = channelmap_init, .uninit = channelmap_uninit, .priv_size = sizeof(ChannelMapContext), - .priv_class = &channelmap_class, FILTER_INPUTS(avfilter_af_channelmap_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(channelmap_query_formats), diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c index 64b6c7a1e1..0156c0c28c 100644 --- a/libavfilter/af_channelsplit.c +++ b/libavfilter/af_channelsplit.c @@ -241,16 +241,15 @@ static int activate(AVFilterContext *ctx) return FFERROR_NOT_READY; } -const AVFilter ff_af_channelsplit = { - .name = "channelsplit", - .description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams."), +const FFFilter ff_af_channelsplit = { + .p.name = "channelsplit", + .p.description = NULL_IF_CONFIG_SMALL("Split audio into per-channel streams."), + .p.priv_class = &channelsplit_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, .priv_size = sizeof(ChannelSplitContext), - .priv_class = &channelsplit_class, .init = init, .activate = activate, .uninit = uninit, FILTER_INPUTS(ff_audio_default_filterpad), - .outputs = NULL, FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; diff --git a/libavfilter/af_chorus.c b/libavfilter/af_chorus.c index 7b3f5be9ab..f7eeea3a23 100644 --- a/libavfilter/af_chorus.c +++ b/libavfilter/af_chorus.c @@ -339,11 +339,11 @@ static const AVFilterPad chorus_outputs[] = { }, }; -const AVFilter ff_af_chorus = { - .name = "chorus", - .description = NULL_IF_CONFIG_SMALL("Add a chorus effect to the audio."), +const FFFilter ff_af_chorus = { + .p.name = "chorus", + .p.description = NULL_IF_CONFIG_SMALL("Add a chorus effect to the audio."), + .p.priv_class = &chorus_class, .priv_size = sizeof(ChorusContext), - .priv_class = &chorus_class, .init = init, .uninit = uninit, FILTER_INPUTS(chorus_inputs), diff --git a/libavfilter/af_compand.c b/libavfilter/af_compand.c index 1aedc0f6bb..69de1360f1 100644 --- a/libavfilter/af_compand.c +++ b/libavfilter/af_compand.c @@ -542,12 +542,12 @@ static const AVFilterPad compand_outputs[] = { }; -const AVFilter ff_af_compand = { - .name = "compand", - .description = NULL_IF_CONFIG_SMALL( +const FFFilter ff_af_compand = { + .p.name = "compand", + .p.description = NULL_IF_CONFIG_SMALL( "Compress or expand audio dynamic range."), + .p.priv_class = &compand_class, .priv_size = sizeof(CompandContext), - .priv_class = &compand_class, .init = init, .uninit = uninit, FILTER_INPUTS(compand_inputs), diff --git a/libavfilter/af_compensationdelay.c b/libavfilter/af_compensationdelay.c index 9d307fd1f3..67f0b8f29b 100644 --- a/libavfilter/af_compensationdelay.c +++ b/libavfilter/af_compensationdelay.c @@ -166,15 +166,15 @@ static const AVFilterPad compensationdelay_inputs[] = { }, }; -const AVFilter ff_af_compensationdelay = { - .name = "compensationdelay", - .description = NULL_IF_CONFIG_SMALL("Audio Compensation Delay Line."), +const FFFilter ff_af_compensationdelay = { + .p.name = "compensationdelay", + .p.description = NULL_IF_CONFIG_SMALL("Audio Compensation Delay Line."), + .p.priv_class = &compensationdelay_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(CompensationDelayContext), - .priv_class = &compensationdelay_class, .uninit = uninit, FILTER_INPUTS(compensationdelay_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_crossfeed.c b/libavfilter/af_crossfeed.c index 1d70e40643..bc2fcf52b4 100644 --- a/libavfilter/af_crossfeed.c +++ b/libavfilter/af_crossfeed.c @@ -373,16 +373,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_crossfeed = { - .name = "crossfeed", - .description = NULL_IF_CONFIG_SMALL("Apply headphone crossfeed filter."), +const FFFilter ff_af_crossfeed = { + .p.name = "crossfeed", + .p.description = NULL_IF_CONFIG_SMALL("Apply headphone crossfeed filter."), + .p.priv_class = &crossfeed_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(CrossfeedContext), - .priv_class = &crossfeed_class, .activate = activate, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = process_command, }; diff --git a/libavfilter/af_crystalizer.c b/libavfilter/af_crystalizer.c index f7f4b063bf..3cb5dc71d8 100644 --- a/libavfilter/af_crystalizer.c +++ b/libavfilter/af_crystalizer.c @@ -233,17 +233,17 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_crystalizer = { - .name = "crystalizer", - .description = NULL_IF_CONFIG_SMALL("Simple audio noise sharpening filter."), +const FFFilter ff_af_crystalizer = { + .p.name = "crystalizer", + .p.description = NULL_IF_CONFIG_SMALL("Simple audio noise sharpening filter."), + .p.priv_class = &crystalizer_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(CrystalizerContext), - .priv_class = &crystalizer_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBL, AV_SAMPLE_FMT_DBLP), .process_command = ff_filter_process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_dcshift.c b/libavfilter/af_dcshift.c index bea15e51d9..9aec777e1f 100644 --- a/libavfilter/af_dcshift.c +++ b/libavfilter/af_dcshift.c @@ -122,14 +122,14 @@ static const AVFilterPad dcshift_inputs[] = { }, }; -const AVFilter ff_af_dcshift = { - .name = "dcshift", - .description = NULL_IF_CONFIG_SMALL("Apply a DC shift to the audio."), +const FFFilter ff_af_dcshift = { + .p.name = "dcshift", + .p.description = NULL_IF_CONFIG_SMALL("Apply a DC shift to the audio."), + .p.priv_class = &dcshift_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(DCShiftContext), - .priv_class = &dcshift_class, .init = init, FILTER_INPUTS(dcshift_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_S32P), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/af_deesser.c b/libavfilter/af_deesser.c index b5fad9789b..657604267c 100644 --- a/libavfilter/af_deesser.c +++ b/libavfilter/af_deesser.c @@ -194,14 +194,14 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_deesser = { - .name = "deesser", - .description = NULL_IF_CONFIG_SMALL("Apply de-essing to the audio."), +const FFFilter ff_af_deesser = { + .p.name = "deesser", + .p.description = NULL_IF_CONFIG_SMALL("Apply de-essing to the audio."), + .p.priv_class = &deesser_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(DeesserContext), - .priv_class = &deesser_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_dialoguenhance.c b/libavfilter/af_dialoguenhance.c index cae8375547..df9b2d6af2 100644 --- a/libavfilter/af_dialoguenhance.c +++ b/libavfilter/af_dialoguenhance.c @@ -217,16 +217,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_dialoguenhance = { - .name = "dialoguenhance", - .description = NULL_IF_CONFIG_SMALL("Audio Dialogue Enhancement."), +const FFFilter ff_af_dialoguenhance = { + .p.name = "dialoguenhance", + .p.description = NULL_IF_CONFIG_SMALL("Audio Dialogue Enhancement."), + .p.priv_class = &dialoguenhance_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioDialogueEnhanceContext), - .priv_class = &dialoguenhance_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .activate = activate, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_drmeter.c b/libavfilter/af_drmeter.c index e5859e9d82..6feb9a3e95 100644 --- a/libavfilter/af_drmeter.c +++ b/libavfilter/af_drmeter.c @@ -197,13 +197,13 @@ static const AVFilterPad drmeter_outputs[] = { }, }; -const AVFilter ff_af_drmeter = { - .name = "drmeter", - .description = NULL_IF_CONFIG_SMALL("Measure audio dynamic range."), +const FFFilter ff_af_drmeter = { + .p.name = "drmeter", + .p.description = NULL_IF_CONFIG_SMALL("Measure audio dynamic range."), + .p.priv_class = &drmeter_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(DRMeterContext), - .priv_class = &drmeter_class, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(drmeter_inputs), FILTER_OUTPUTS(drmeter_outputs), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_FLT), diff --git a/libavfilter/af_dynaudnorm.c b/libavfilter/af_dynaudnorm.c index 90b3f8bbee..ddeedf6258 100644 --- a/libavfilter/af_dynaudnorm.c +++ b/libavfilter/af_dynaudnorm.c @@ -1020,9 +1020,12 @@ static const AVFilterPad avfilter_af_dynaudnorm_inputs[] = { }, }; -const AVFilter ff_af_dynaudnorm = { - .name = "dynaudnorm", - .description = NULL_IF_CONFIG_SMALL("Dynamic Audio Normalizer."), +const FFFilter ff_af_dynaudnorm = { + .p.name = "dynaudnorm", + .p.description = NULL_IF_CONFIG_SMALL("Dynamic Audio Normalizer."), + .p.priv_class = &dynaudnorm_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(DynamicAudioNormalizerContext), .init = init, .uninit = uninit, @@ -1030,8 +1033,5 @@ const AVFilter ff_af_dynaudnorm = { FILTER_INPUTS(avfilter_af_dynaudnorm_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), - .priv_class = &dynaudnorm_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/af_earwax.c b/libavfilter/af_earwax.c index a457481741..49a98787ec 100644 --- a/libavfilter/af_earwax.c +++ b/libavfilter/af_earwax.c @@ -236,9 +236,9 @@ static const AVFilterPad earwax_inputs[] = { }, }; -const AVFilter ff_af_earwax = { - .name = "earwax", - .description = NULL_IF_CONFIG_SMALL("Widen the stereo image."), +const FFFilter ff_af_earwax = { + .p.name = "earwax", + .p.description = NULL_IF_CONFIG_SMALL("Widen the stereo image."), .priv_size = sizeof(EarwaxContext), .uninit = uninit, FILTER_INPUTS(earwax_inputs), diff --git a/libavfilter/af_extrastereo.c b/libavfilter/af_extrastereo.c index e511a2b968..5403267597 100644 --- a/libavfilter/af_extrastereo.c +++ b/libavfilter/af_extrastereo.c @@ -122,14 +122,14 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_extrastereo = { - .name = "extrastereo", - .description = NULL_IF_CONFIG_SMALL("Increase difference between stereo audio channels."), +const FFFilter ff_af_extrastereo = { + .p.name = "extrastereo", + .p.description = NULL_IF_CONFIG_SMALL("Increase difference between stereo audio channels."), + .p.priv_class = &extrastereo_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(ExtraStereoContext), - .priv_class = &extrastereo_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_firequalizer.c b/libavfilter/af_firequalizer.c index 386d8cd242..38663200eb 100644 --- a/libavfilter/af_firequalizer.c +++ b/libavfilter/af_firequalizer.c @@ -955,14 +955,14 @@ static const AVFilterPad firequalizer_outputs[] = { }, }; -const AVFilter ff_af_firequalizer = { - .name = "firequalizer", - .description = NULL_IF_CONFIG_SMALL("Finite Impulse Response Equalizer."), +const FFFilter ff_af_firequalizer = { + .p.name = "firequalizer", + .p.description = NULL_IF_CONFIG_SMALL("Finite Impulse Response Equalizer."), + .p.priv_class = &firequalizer_class, .uninit = uninit, .process_command = process_command, .priv_size = sizeof(FIREqualizerContext), FILTER_INPUTS(firequalizer_inputs), FILTER_OUTPUTS(firequalizer_outputs), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_FLTP), - .priv_class = &firequalizer_class, }; diff --git a/libavfilter/af_flanger.c b/libavfilter/af_flanger.c index 092ffcaa23..c5c70d76f9 100644 --- a/libavfilter/af_flanger.c +++ b/libavfilter/af_flanger.c @@ -195,11 +195,11 @@ static const AVFilterPad flanger_inputs[] = { }, }; -const AVFilter ff_af_flanger = { - .name = "flanger", - .description = NULL_IF_CONFIG_SMALL("Apply a flanging effect to the audio."), +const FFFilter ff_af_flanger = { + .p.name = "flanger", + .p.description = NULL_IF_CONFIG_SMALL("Apply a flanging effect to the audio."), + .p.priv_class = &flanger_class, .priv_size = sizeof(FlangerContext), - .priv_class = &flanger_class, .init = init, .uninit = uninit, FILTER_INPUTS(flanger_inputs), diff --git a/libavfilter/af_haas.c b/libavfilter/af_haas.c index 6726c85298..4260bb8556 100644 --- a/libavfilter/af_haas.c +++ b/libavfilter/af_haas.c @@ -218,11 +218,11 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_haas = { - .name = "haas", - .description = NULL_IF_CONFIG_SMALL("Apply Haas Stereo Enhancer."), +const FFFilter ff_af_haas = { + .p.name = "haas", + .p.description = NULL_IF_CONFIG_SMALL("Apply Haas Stereo Enhancer."), + .p.priv_class = &haas_class, .priv_size = sizeof(HaasContext), - .priv_class = &haas_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), diff --git a/libavfilter/af_hdcd.c b/libavfilter/af_hdcd.c index c9d992d017..6bded8ef74 100644 --- a/libavfilter/af_hdcd.c +++ b/libavfilter/af_hdcd.c @@ -1758,11 +1758,11 @@ static const AVFilterPad avfilter_af_hdcd_inputs[] = { }, }; -const AVFilter ff_af_hdcd = { - .name = "hdcd", - .description = NULL_IF_CONFIG_SMALL("Apply High Definition Compatible Digital (HDCD) decoding."), +const FFFilter ff_af_hdcd = { + .p.name = "hdcd", + .p.description = NULL_IF_CONFIG_SMALL("Apply High Definition Compatible Digital (HDCD) decoding."), + .p.priv_class = &hdcd_class, .priv_size = sizeof(HDCDContext), - .priv_class = &hdcd_class, .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_af_hdcd_inputs), diff --git a/libavfilter/af_headphone.c b/libavfilter/af_headphone.c index fccd8d3f12..fd07633498 100644 --- a/libavfilter/af_headphone.c +++ b/libavfilter/af_headphone.c @@ -776,16 +776,15 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_af_headphone = { - .name = "headphone", - .description = NULL_IF_CONFIG_SMALL("Apply headphone binaural spatialization with HRTFs in additional streams."), +const FFFilter ff_af_headphone = { + .p.name = "headphone", + .p.description = NULL_IF_CONFIG_SMALL("Apply headphone binaural spatialization with HRTFs in additional streams."), + .p.priv_class = &headphone_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(HeadphoneContext), - .priv_class = &headphone_class, .init = init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index 0ea53248b6..de13f8f2dc 100644 --- a/libavfilter/af_join.c +++ b/libavfilter/af_join.c @@ -595,17 +595,16 @@ static const AVFilterPad avfilter_af_join_outputs[] = { }, }; -const AVFilter ff_af_join = { - .name = "join", - .description = NULL_IF_CONFIG_SMALL("Join multiple audio streams into " +const FFFilter ff_af_join = { + .p.name = "join", + .p.description = NULL_IF_CONFIG_SMALL("Join multiple audio streams into " "multi-channel output."), + .p.priv_class = &join_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(JoinContext), - .priv_class = &join_class, .init = join_init, .uninit = join_uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(avfilter_af_join_outputs), FILTER_QUERY_FUNC2(join_query_formats), - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c index 35ff90b1a8..0ae2b902cb 100644 --- a/libavfilter/af_ladspa.c +++ b/libavfilter/af_ladspa.c @@ -810,16 +810,15 @@ static const AVFilterPad ladspa_outputs[] = { }, }; -const AVFilter ff_af_ladspa = { - .name = "ladspa", - .description = NULL_IF_CONFIG_SMALL("Apply LADSPA effect."), +const FFFilter ff_af_ladspa = { + .p.name = "ladspa", + .p.description = NULL_IF_CONFIG_SMALL("Apply LADSPA effect."), + .p.priv_class = &ladspa_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(LADSPAContext), - .priv_class = &ladspa_class, .init = init, .uninit = uninit, .process_command = process_command, - .inputs = 0, FILTER_OUTPUTS(ladspa_outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_loudnorm.c b/libavfilter/af_loudnorm.c index d63a713818..432b9710a5 100644 --- a/libavfilter/af_loudnorm.c +++ b/libavfilter/af_loudnorm.c @@ -926,11 +926,11 @@ static const AVFilterPad avfilter_af_loudnorm_inputs[] = { }, }; -const AVFilter ff_af_loudnorm = { - .name = "loudnorm", - .description = NULL_IF_CONFIG_SMALL("EBU R128 loudness normalization"), +const FFFilter ff_af_loudnorm = { + .p.name = "loudnorm", + .p.description = NULL_IF_CONFIG_SMALL("EBU R128 loudness normalization"), + .p.priv_class = &loudnorm_class, .priv_size = sizeof(LoudNormContext), - .priv_class = &loudnorm_class, .init = init, .activate = activate, .uninit = uninit, diff --git a/libavfilter/af_lv2.c b/libavfilter/af_lv2.c index db9b1e3639..44405b04f9 100644 --- a/libavfilter/af_lv2.c +++ b/libavfilter/af_lv2.c @@ -590,16 +590,15 @@ static const AVFilterPad lv2_outputs[] = { }, }; -const AVFilter ff_af_lv2 = { - .name = "lv2", - .description = NULL_IF_CONFIG_SMALL("Apply LV2 effect."), +const FFFilter ff_af_lv2 = { + .p.name = "lv2", + .p.description = NULL_IF_CONFIG_SMALL("Apply LV2 effect."), + .p.priv_class = &lv2_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(LV2Context), - .priv_class = &lv2_class, .init = init, .uninit = uninit, .process_command = process_command, - .inputs = 0, FILTER_OUTPUTS(lv2_outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/af_mcompand.c b/libavfilter/af_mcompand.c index b2f61fc5f9..855d893550 100644 --- a/libavfilter/af_mcompand.c +++ b/libavfilter/af_mcompand.c @@ -634,12 +634,12 @@ static const AVFilterPad mcompand_outputs[] = { }; -const AVFilter ff_af_mcompand = { - .name = "mcompand", - .description = NULL_IF_CONFIG_SMALL( +const FFFilter ff_af_mcompand = { + .p.name = "mcompand", + .p.description = NULL_IF_CONFIG_SMALL( "Multiband Compress or expand audio dynamic range."), + .p.priv_class = &mcompand_class, .priv_size = sizeof(MCompandContext), - .priv_class = &mcompand_class, .uninit = uninit, FILTER_INPUTS(mcompand_inputs), FILTER_OUTPUTS(mcompand_outputs), diff --git a/libavfilter/af_pan.c b/libavfilter/af_pan.c index 5feb2439c7..3c577edfe1 100644 --- a/libavfilter/af_pan.c +++ b/libavfilter/af_pan.c @@ -416,11 +416,11 @@ static const AVFilterPad pan_inputs[] = { }, }; -const AVFilter ff_af_pan = { - .name = "pan", - .description = NULL_IF_CONFIG_SMALL("Remix channels with coefficients (panning)."), +const FFFilter ff_af_pan = { + .p.name = "pan", + .p.description = NULL_IF_CONFIG_SMALL("Remix channels with coefficients (panning)."), + .p.priv_class = &pan_class, .priv_size = sizeof(PanContext), - .priv_class = &pan_class, .init = init, .uninit = uninit, FILTER_INPUTS(pan_inputs), diff --git a/libavfilter/af_replaygain.c b/libavfilter/af_replaygain.c index e3e2e921c4..db67cc6f4b 100644 --- a/libavfilter/af_replaygain.c +++ b/libavfilter/af_replaygain.c @@ -643,12 +643,12 @@ static const AVOption replaygain_options[] = { AVFILTER_DEFINE_CLASS(replaygain); -const AVFilter ff_af_replaygain = { - .name = "replaygain", - .description = NULL_IF_CONFIG_SMALL("ReplayGain scanner."), +const FFFilter ff_af_replaygain = { + .p.name = "replaygain", + .p.description = NULL_IF_CONFIG_SMALL("ReplayGain scanner."), + .p.priv_class = &replaygain_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(ReplayGainContext), - .priv_class = &replaygain_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(replaygain_inputs), FILTER_OUTPUTS(replaygain_outputs), FILTER_QUERY_FUNC2(query_formats), diff --git a/libavfilter/af_rubberband.c b/libavfilter/af_rubberband.c index cf055f77d0..eedd96b195 100644 --- a/libavfilter/af_rubberband.c +++ b/libavfilter/af_rubberband.c @@ -205,11 +205,11 @@ static const AVFilterPad rubberband_inputs[] = { }, }; -const AVFilter ff_af_rubberband = { - .name = "rubberband", - .description = NULL_IF_CONFIG_SMALL("Apply time-stretching and pitch-shifting."), +const FFFilter ff_af_rubberband = { + .p.name = "rubberband", + .p.description = NULL_IF_CONFIG_SMALL("Apply time-stretching and pitch-shifting."), + .p.priv_class = &rubberband_class, .priv_size = sizeof(RubberBandContext), - .priv_class = &rubberband_class, .uninit = uninit, .activate = activate, FILTER_INPUTS(rubberband_inputs), diff --git a/libavfilter/af_sidechaincompress.c b/libavfilter/af_sidechaincompress.c index d2bc63f5de..492442df86 100644 --- a/libavfilter/af_sidechaincompress.c +++ b/libavfilter/af_sidechaincompress.c @@ -363,10 +363,10 @@ static const AVFilterPad sidechaincompress_outputs[] = { }, }; -const AVFilter ff_af_sidechaincompress = { - .name = "sidechaincompress", - .description = NULL_IF_CONFIG_SMALL("Sidechain compressor."), - .priv_class = &sidechaincompress_acompressor_class, +const FFFilter ff_af_sidechaincompress = { + .p.name = "sidechaincompress", + .p.description = NULL_IF_CONFIG_SMALL("Sidechain compressor."), + .p.priv_class = &sidechaincompress_acompressor_class, .priv_size = sizeof(SidechainCompressContext), .activate = activate, .uninit = uninit, @@ -424,10 +424,10 @@ static const AVFilterPad acompressor_outputs[] = { }, }; -const AVFilter ff_af_acompressor = { - .name = "acompressor", - .description = NULL_IF_CONFIG_SMALL("Audio compressor."), - .priv_class = &sidechaincompress_acompressor_class, +const FFFilter ff_af_acompressor = { + .p.name = "acompressor", + .p.description = NULL_IF_CONFIG_SMALL("Audio compressor."), + .p.priv_class = &sidechaincompress_acompressor_class, .priv_size = sizeof(SidechainCompressContext), FILTER_INPUTS(acompressor_inputs), FILTER_OUTPUTS(acompressor_outputs), diff --git a/libavfilter/af_silencedetect.c b/libavfilter/af_silencedetect.c index 9bb17400e7..7011978b0e 100644 --- a/libavfilter/af_silencedetect.c +++ b/libavfilter/af_silencedetect.c @@ -253,9 +253,11 @@ static const AVFilterPad silencedetect_inputs[] = { }, }; -const AVFilter ff_af_silencedetect = { - .name = "silencedetect", - .description = NULL_IF_CONFIG_SMALL("Detect silence."), +const FFFilter ff_af_silencedetect = { + .p.name = "silencedetect", + .p.description = NULL_IF_CONFIG_SMALL("Detect silence."), + .p.priv_class = &silencedetect_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SilenceDetectContext), .uninit = uninit, FILTER_INPUTS(silencedetect_inputs), @@ -264,6 +266,4 @@ const AVFilter ff_af_silencedetect = { AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_S32P, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P), - .priv_class = &silencedetect_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/af_silenceremove.c b/libavfilter/af_silenceremove.c index 3cc518a7eb..fe12fd598f 100644 --- a/libavfilter/af_silenceremove.c +++ b/libavfilter/af_silenceremove.c @@ -478,11 +478,12 @@ static const AVFilterPad silenceremove_outputs[] = { }, }; -const AVFilter ff_af_silenceremove = { - .name = "silenceremove", - .description = NULL_IF_CONFIG_SMALL("Remove silence."), +const FFFilter ff_af_silenceremove = { + .p.name = "silenceremove", + .p.description = NULL_IF_CONFIG_SMALL("Remove silence."), + .p.priv_class = &silenceremove_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(SilenceRemoveContext), - .priv_class = &silenceremove_class, .init = init, .activate = activate, .uninit = uninit, @@ -491,5 +492,4 @@ const AVFilter ff_af_silenceremove = { FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_DBL), .process_command = ff_filter_process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c index 178b9c0b53..3071c85bd2 100644 --- a/libavfilter/af_sofalizer.c +++ b/libavfilter/af_sofalizer.c @@ -1088,16 +1088,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_sofalizer = { - .name = "sofalizer", - .description = NULL_IF_CONFIG_SMALL("SOFAlizer (Spatially Oriented Format for Acoustics)."), +const FFFilter ff_af_sofalizer = { + .p.name = "sofalizer", + .p.description = NULL_IF_CONFIG_SMALL("SOFAlizer (Spatially Oriented Format for Acoustics)."), + .p.priv_class = &sofalizer_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(SOFAlizerContext), - .priv_class = &sofalizer_class, .init = init, .activate = activate, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/af_speechnorm.c b/libavfilter/af_speechnorm.c index 840c432c1a..9e2ba6381c 100644 --- a/libavfilter/af_speechnorm.c +++ b/libavfilter/af_speechnorm.c @@ -590,16 +590,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_speechnorm = { - .name = "speechnorm", - .description = NULL_IF_CONFIG_SMALL("Speech Normalizer."), +const FFFilter ff_af_speechnorm = { + .p.name = "speechnorm", + .p.description = NULL_IF_CONFIG_SMALL("Speech Normalizer."), + .p.priv_class = &speechnorm_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(SpeechNormalizerContext), - .priv_class = &speechnorm_class, .activate = activate, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = process_command, }; diff --git a/libavfilter/af_stereotools.c b/libavfilter/af_stereotools.c index bbbc88cd4f..4f2e2616b6 100644 --- a/libavfilter/af_stereotools.c +++ b/libavfilter/af_stereotools.c @@ -379,15 +379,15 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_stereotools = { - .name = "stereotools", - .description = NULL_IF_CONFIG_SMALL("Apply various stereo tools."), +const FFFilter ff_af_stereotools = { + .p.name = "stereotools", + .p.description = NULL_IF_CONFIG_SMALL("Apply various stereo tools."), + .p.priv_class = &stereotools_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(StereoToolsContext), - .priv_class = &stereotools_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/af_stereowiden.c b/libavfilter/af_stereowiden.c index 66aa24a03c..312a24ffe2 100644 --- a/libavfilter/af_stereowiden.c +++ b/libavfilter/af_stereowiden.c @@ -161,15 +161,15 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_stereowiden = { - .name = "stereowiden", - .description = NULL_IF_CONFIG_SMALL("Apply stereo widening effect."), +const FFFilter ff_af_stereowiden = { + .p.name = "stereowiden", + .p.description = NULL_IF_CONFIG_SMALL("Apply stereo widening effect."), + .p.priv_class = &stereowiden_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(StereoWidenContext), - .priv_class = &stereowiden_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_superequalizer.c b/libavfilter/af_superequalizer.c index bdf6e12afe..402d9d0af3 100644 --- a/libavfilter/af_superequalizer.c +++ b/libavfilter/af_superequalizer.c @@ -350,11 +350,11 @@ static const AVOption superequalizer_options[] = { AVFILTER_DEFINE_CLASS(superequalizer); -const AVFilter ff_af_superequalizer = { - .name = "superequalizer", - .description = NULL_IF_CONFIG_SMALL("Apply 18 band equalization filter."), +const FFFilter ff_af_superequalizer = { + .p.name = "superequalizer", + .p.description = NULL_IF_CONFIG_SMALL("Apply 18 band equalization filter."), + .p.priv_class = &superequalizer_class, .priv_size = sizeof(SuperEqualizerContext), - .priv_class = &superequalizer_class, .init = init, .activate = activate, .uninit = uninit, diff --git a/libavfilter/af_surround.c b/libavfilter/af_surround.c index 95efe4685a..46380192a2 100644 --- a/libavfilter/af_surround.c +++ b/libavfilter/af_surround.c @@ -1510,17 +1510,17 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_af_surround = { - .name = "surround", - .description = NULL_IF_CONFIG_SMALL("Apply audio surround upmix filter."), +const FFFilter ff_af_surround = { + .p.name = "surround", + .p.description = NULL_IF_CONFIG_SMALL("Apply audio surround upmix filter."), + .p.priv_class = &surround_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AudioSurroundContext), - .priv_class = &surround_class, .init = init, .uninit = uninit, .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/af_tremolo.c b/libavfilter/af_tremolo.c index 0c781a2de3..d6bf06e217 100644 --- a/libavfilter/af_tremolo.c +++ b/libavfilter/af_tremolo.c @@ -122,14 +122,14 @@ static const AVFilterPad avfilter_af_tremolo_inputs[] = { }, }; -const AVFilter ff_af_tremolo = { - .name = "tremolo", - .description = NULL_IF_CONFIG_SMALL("Apply tremolo effect."), +const FFFilter ff_af_tremolo = { + .p.name = "tremolo", + .p.description = NULL_IF_CONFIG_SMALL("Apply tremolo effect."), + .p.priv_class = &tremolo_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(TremoloContext), - .priv_class = &tremolo_class, .uninit = uninit, FILTER_INPUTS(avfilter_af_tremolo_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBL), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/af_vibrato.c b/libavfilter/af_vibrato.c index a3bf90ae8e..f4fd697a78 100644 --- a/libavfilter/af_vibrato.c +++ b/libavfilter/af_vibrato.c @@ -166,14 +166,14 @@ static const AVFilterPad avfilter_af_vibrato_inputs[] = { }, }; -const AVFilter ff_af_vibrato = { - .name = "vibrato", - .description = NULL_IF_CONFIG_SMALL("Apply vibrato effect."), +const FFFilter ff_af_vibrato = { + .p.name = "vibrato", + .p.description = NULL_IF_CONFIG_SMALL("Apply vibrato effect."), + .p.priv_class = &vibrato_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(VibratoContext), - .priv_class = &vibrato_class, .uninit = uninit, FILTER_INPUTS(avfilter_af_vibrato_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SINGLE_SAMPLEFMT(AV_SAMPLE_FMT_DBLP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/af_virtualbass.c b/libavfilter/af_virtualbass.c index d2f28ab1a1..41df742aa6 100644 --- a/libavfilter/af_virtualbass.c +++ b/libavfilter/af_virtualbass.c @@ -171,14 +171,14 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_af_virtualbass = { - .name = "virtualbass", - .description = NULL_IF_CONFIG_SMALL("Audio Virtual Bass."), +const FFFilter ff_af_virtualbass = { + .p.name = "virtualbass", + .p.description = NULL_IF_CONFIG_SMALL("Audio Virtual Bass."), + .p.priv_class = &virtualbass_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(AudioVirtualBassContext), - .priv_class = &virtualbass_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c index ed924cf45f..18b1616cab 100644 --- a/libavfilter/af_volume.c +++ b/libavfilter/af_volume.c @@ -471,16 +471,16 @@ static const AVFilterPad avfilter_af_volume_outputs[] = { }, }; -const AVFilter ff_af_volume = { - .name = "volume", - .description = NULL_IF_CONFIG_SMALL("Change input volume."), +const FFFilter ff_af_volume = { + .p.name = "volume", + .p.description = NULL_IF_CONFIG_SMALL("Change input volume."), + .p.priv_class = &volume_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(VolumeContext), - .priv_class = &volume_class, .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_af_volume_inputs), FILTER_OUTPUTS(avfilter_af_volume_outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, }; diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index 25f7bf5695..6437687c8d 100644 --- a/libavfilter/af_volumedetect.c +++ b/libavfilter/af_volumedetect.c @@ -122,12 +122,12 @@ static const AVFilterPad volumedetect_inputs[] = { }, }; -const AVFilter ff_af_volumedetect = { - .name = "volumedetect", - .description = NULL_IF_CONFIG_SMALL("Detect audio volume."), +const FFFilter ff_af_volumedetect = { + .p.name = "volumedetect", + .p.description = NULL_IF_CONFIG_SMALL("Detect audio volume."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(VolDetectContext), .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(volumedetect_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), FILTER_SAMPLEFMTS(AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P), diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 9819f0f95b..c9178ba27b 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -20,602 +20,603 @@ */ #include "avfilter.h" +#include "filters.h" -extern const AVFilter ff_af_aap; -extern const AVFilter ff_af_abench; -extern const AVFilter ff_af_acompressor; -extern const AVFilter ff_af_acontrast; -extern const AVFilter ff_af_acopy; -extern const AVFilter ff_af_acue; -extern const AVFilter ff_af_acrossfade; -extern const AVFilter ff_af_acrossover; -extern const AVFilter ff_af_acrusher; -extern const AVFilter ff_af_adeclick; -extern const AVFilter ff_af_adeclip; -extern const AVFilter ff_af_adecorrelate; -extern const AVFilter ff_af_adelay; -extern const AVFilter ff_af_adenorm; -extern const AVFilter ff_af_aderivative; -extern const AVFilter ff_af_adrc; -extern const AVFilter ff_af_adynamicequalizer; -extern const AVFilter ff_af_adynamicsmooth; -extern const AVFilter ff_af_aecho; -extern const AVFilter ff_af_aemphasis; -extern const AVFilter ff_af_aeval; -extern const AVFilter ff_af_aexciter; -extern const AVFilter ff_af_afade; -extern const AVFilter ff_af_afftdn; -extern const AVFilter ff_af_afftfilt; -extern const AVFilter ff_af_afir; -extern const AVFilter ff_af_aformat; -extern const AVFilter ff_af_afreqshift; -extern const AVFilter ff_af_afwtdn; -extern const AVFilter ff_af_agate; -extern const AVFilter ff_af_aiir; -extern const AVFilter ff_af_aintegral; -extern const AVFilter ff_af_ainterleave; -extern const AVFilter ff_af_alatency; -extern const AVFilter ff_af_alimiter; -extern const AVFilter ff_af_allpass; -extern const AVFilter ff_af_aloop; -extern const AVFilter ff_af_amerge; -extern const AVFilter ff_af_ametadata; -extern const AVFilter ff_af_amix; -extern const AVFilter ff_af_amultiply; -extern const AVFilter ff_af_anequalizer; -extern const AVFilter ff_af_anlmdn; -extern const AVFilter ff_af_anlmf; -extern const AVFilter ff_af_anlms; -extern const AVFilter ff_af_anull; -extern const AVFilter ff_af_apad; -extern const AVFilter ff_af_aperms; -extern const AVFilter ff_af_aphaser; -extern const AVFilter ff_af_aphaseshift; -extern const AVFilter ff_af_apsnr; -extern const AVFilter ff_af_apsyclip; -extern const AVFilter ff_af_apulsator; -extern const AVFilter ff_af_arealtime; -extern const AVFilter ff_af_aresample; -extern const AVFilter ff_af_areverse; -extern const AVFilter ff_af_arls; -extern const AVFilter ff_af_arnndn; -extern const AVFilter ff_af_asdr; -extern const AVFilter ff_af_asegment; -extern const AVFilter ff_af_aselect; -extern const AVFilter ff_af_asendcmd; -extern const AVFilter ff_af_asetnsamples; -extern const AVFilter ff_af_asetpts; -extern const AVFilter ff_af_asetrate; -extern const AVFilter ff_af_asettb; -extern const AVFilter ff_af_ashowinfo; -extern const AVFilter ff_af_asidedata; -extern const AVFilter ff_af_asisdr; -extern const AVFilter ff_af_asoftclip; -extern const AVFilter ff_af_aspectralstats; -extern const AVFilter ff_af_asplit; -extern const AVFilter ff_af_asr; -extern const AVFilter ff_af_astats; -extern const AVFilter ff_af_astreamselect; -extern const AVFilter ff_af_asubboost; -extern const AVFilter ff_af_asubcut; -extern const AVFilter ff_af_asupercut; -extern const AVFilter ff_af_asuperpass; -extern const AVFilter ff_af_asuperstop; -extern const AVFilter ff_af_atempo; -extern const AVFilter ff_af_atilt; -extern const AVFilter ff_af_atrim; -extern const AVFilter ff_af_axcorrelate; -extern const AVFilter ff_af_azmq; -extern const AVFilter ff_af_bandpass; -extern const AVFilter ff_af_bandreject; -extern const AVFilter ff_af_bass; -extern const AVFilter ff_af_biquad; -extern const AVFilter ff_af_bs2b; -extern const AVFilter ff_af_channelmap; -extern const AVFilter ff_af_channelsplit; -extern const AVFilter ff_af_chorus; -extern const AVFilter ff_af_compand; -extern const AVFilter ff_af_compensationdelay; -extern const AVFilter ff_af_crossfeed; -extern const AVFilter ff_af_crystalizer; -extern const AVFilter ff_af_dcshift; -extern const AVFilter ff_af_deesser; -extern const AVFilter ff_af_dialoguenhance; -extern const AVFilter ff_af_drmeter; -extern const AVFilter ff_af_dynaudnorm; -extern const AVFilter ff_af_earwax; -extern const AVFilter ff_af_ebur128; -extern const AVFilter ff_af_equalizer; -extern const AVFilter ff_af_extrastereo; -extern const AVFilter ff_af_firequalizer; -extern const AVFilter ff_af_flanger; -extern const AVFilter ff_af_haas; -extern const AVFilter ff_af_hdcd; -extern const AVFilter ff_af_headphone; -extern const AVFilter ff_af_highpass; -extern const AVFilter ff_af_highshelf; -extern const AVFilter ff_af_join; -extern const AVFilter ff_af_ladspa; -extern const AVFilter ff_af_loudnorm; -extern const AVFilter ff_af_lowpass; -extern const AVFilter ff_af_lowshelf; -extern const AVFilter ff_af_lv2; -extern const AVFilter ff_af_mcompand; -extern const AVFilter ff_af_pan; -extern const AVFilter ff_af_replaygain; -extern const AVFilter ff_af_rubberband; -extern const AVFilter ff_af_sidechaincompress; -extern const AVFilter ff_af_sidechaingate; -extern const AVFilter ff_af_silencedetect; -extern const AVFilter ff_af_silenceremove; -extern const AVFilter ff_af_sofalizer; -extern const AVFilter ff_af_speechnorm; -extern const AVFilter ff_af_stereotools; -extern const AVFilter ff_af_stereowiden; -extern const AVFilter ff_af_superequalizer; -extern const AVFilter ff_af_surround; -extern const AVFilter ff_af_tiltshelf; -extern const AVFilter ff_af_treble; -extern const AVFilter ff_af_tremolo; -extern const AVFilter ff_af_vibrato; -extern const AVFilter ff_af_virtualbass; -extern const AVFilter ff_af_volume; -extern const AVFilter ff_af_volumedetect; +extern const FFFilter ff_af_aap; +extern const FFFilter ff_af_abench; +extern const FFFilter ff_af_acompressor; +extern const FFFilter ff_af_acontrast; +extern const FFFilter ff_af_acopy; +extern const FFFilter ff_af_acue; +extern const FFFilter ff_af_acrossfade; +extern const FFFilter ff_af_acrossover; +extern const FFFilter ff_af_acrusher; +extern const FFFilter ff_af_adeclick; +extern const FFFilter ff_af_adeclip; +extern const FFFilter ff_af_adecorrelate; +extern const FFFilter ff_af_adelay; +extern const FFFilter ff_af_adenorm; +extern const FFFilter ff_af_aderivative; +extern const FFFilter ff_af_adrc; +extern const FFFilter ff_af_adynamicequalizer; +extern const FFFilter ff_af_adynamicsmooth; +extern const FFFilter ff_af_aecho; +extern const FFFilter ff_af_aemphasis; +extern const FFFilter ff_af_aeval; +extern const FFFilter ff_af_aexciter; +extern const FFFilter ff_af_afade; +extern const FFFilter ff_af_afftdn; +extern const FFFilter ff_af_afftfilt; +extern const FFFilter ff_af_afir; +extern const FFFilter ff_af_aformat; +extern const FFFilter ff_af_afreqshift; +extern const FFFilter ff_af_afwtdn; +extern const FFFilter ff_af_agate; +extern const FFFilter ff_af_aiir; +extern const FFFilter ff_af_aintegral; +extern const FFFilter ff_af_ainterleave; +extern const FFFilter ff_af_alatency; +extern const FFFilter ff_af_alimiter; +extern const FFFilter ff_af_allpass; +extern const FFFilter ff_af_aloop; +extern const FFFilter ff_af_amerge; +extern const FFFilter ff_af_ametadata; +extern const FFFilter ff_af_amix; +extern const FFFilter ff_af_amultiply; +extern const FFFilter ff_af_anequalizer; +extern const FFFilter ff_af_anlmdn; +extern const FFFilter ff_af_anlmf; +extern const FFFilter ff_af_anlms; +extern const FFFilter ff_af_anull; +extern const FFFilter ff_af_apad; +extern const FFFilter ff_af_aperms; +extern const FFFilter ff_af_aphaser; +extern const FFFilter ff_af_aphaseshift; +extern const FFFilter ff_af_apsnr; +extern const FFFilter ff_af_apsyclip; +extern const FFFilter ff_af_apulsator; +extern const FFFilter ff_af_arealtime; +extern const FFFilter ff_af_aresample; +extern const FFFilter ff_af_areverse; +extern const FFFilter ff_af_arls; +extern const FFFilter ff_af_arnndn; +extern const FFFilter ff_af_asdr; +extern const FFFilter ff_af_asegment; +extern const FFFilter ff_af_aselect; +extern const FFFilter ff_af_asendcmd; +extern const FFFilter ff_af_asetnsamples; +extern const FFFilter ff_af_asetpts; +extern const FFFilter ff_af_asetrate; +extern const FFFilter ff_af_asettb; +extern const FFFilter ff_af_ashowinfo; +extern const FFFilter ff_af_asidedata; +extern const FFFilter ff_af_asisdr; +extern const FFFilter ff_af_asoftclip; +extern const FFFilter ff_af_aspectralstats; +extern const FFFilter ff_af_asplit; +extern const FFFilter ff_af_asr; +extern const FFFilter ff_af_astats; +extern const FFFilter ff_af_astreamselect; +extern const FFFilter ff_af_asubboost; +extern const FFFilter ff_af_asubcut; +extern const FFFilter ff_af_asupercut; +extern const FFFilter ff_af_asuperpass; +extern const FFFilter ff_af_asuperstop; +extern const FFFilter ff_af_atempo; +extern const FFFilter ff_af_atilt; +extern const FFFilter ff_af_atrim; +extern const FFFilter ff_af_axcorrelate; +extern const FFFilter ff_af_azmq; +extern const FFFilter ff_af_bandpass; +extern const FFFilter ff_af_bandreject; +extern const FFFilter ff_af_bass; +extern const FFFilter ff_af_biquad; +extern const FFFilter ff_af_bs2b; +extern const FFFilter ff_af_channelmap; +extern const FFFilter ff_af_channelsplit; +extern const FFFilter ff_af_chorus; +extern const FFFilter ff_af_compand; +extern const FFFilter ff_af_compensationdelay; +extern const FFFilter ff_af_crossfeed; +extern const FFFilter ff_af_crystalizer; +extern const FFFilter ff_af_dcshift; +extern const FFFilter ff_af_deesser; +extern const FFFilter ff_af_dialoguenhance; +extern const FFFilter ff_af_drmeter; +extern const FFFilter ff_af_dynaudnorm; +extern const FFFilter ff_af_earwax; +extern const FFFilter ff_af_ebur128; +extern const FFFilter ff_af_equalizer; +extern const FFFilter ff_af_extrastereo; +extern const FFFilter ff_af_firequalizer; +extern const FFFilter ff_af_flanger; +extern const FFFilter ff_af_haas; +extern const FFFilter ff_af_hdcd; +extern const FFFilter ff_af_headphone; +extern const FFFilter ff_af_highpass; +extern const FFFilter ff_af_highshelf; +extern const FFFilter ff_af_join; +extern const FFFilter ff_af_ladspa; +extern const FFFilter ff_af_loudnorm; +extern const FFFilter ff_af_lowpass; +extern const FFFilter ff_af_lowshelf; +extern const FFFilter ff_af_lv2; +extern const FFFilter ff_af_mcompand; +extern const FFFilter ff_af_pan; +extern const FFFilter ff_af_replaygain; +extern const FFFilter ff_af_rubberband; +extern const FFFilter ff_af_sidechaincompress; +extern const FFFilter ff_af_sidechaingate; +extern const FFFilter ff_af_silencedetect; +extern const FFFilter ff_af_silenceremove; +extern const FFFilter ff_af_sofalizer; +extern const FFFilter ff_af_speechnorm; +extern const FFFilter ff_af_stereotools; +extern const FFFilter ff_af_stereowiden; +extern const FFFilter ff_af_superequalizer; +extern const FFFilter ff_af_surround; +extern const FFFilter ff_af_tiltshelf; +extern const FFFilter ff_af_treble; +extern const FFFilter ff_af_tremolo; +extern const FFFilter ff_af_vibrato; +extern const FFFilter ff_af_virtualbass; +extern const FFFilter ff_af_volume; +extern const FFFilter ff_af_volumedetect; -extern const AVFilter ff_asrc_aevalsrc; -extern const AVFilter ff_asrc_afdelaysrc; -extern const AVFilter ff_asrc_afireqsrc; -extern const AVFilter ff_asrc_afirsrc; -extern const AVFilter ff_asrc_anoisesrc; -extern const AVFilter ff_asrc_anullsrc; -extern const AVFilter ff_asrc_flite; -extern const AVFilter ff_asrc_hilbert; -extern const AVFilter ff_asrc_sinc; -extern const AVFilter ff_asrc_sine; +extern const FFFilter ff_asrc_aevalsrc; +extern const FFFilter ff_asrc_afdelaysrc; +extern const FFFilter ff_asrc_afireqsrc; +extern const FFFilter ff_asrc_afirsrc; +extern const FFFilter ff_asrc_anoisesrc; +extern const FFFilter ff_asrc_anullsrc; +extern const FFFilter ff_asrc_flite; +extern const FFFilter ff_asrc_hilbert; +extern const FFFilter ff_asrc_sinc; +extern const FFFilter ff_asrc_sine; -extern const AVFilter ff_asink_anullsink; +extern const FFFilter ff_asink_anullsink; -extern const AVFilter ff_vf_addroi; -extern const AVFilter ff_vf_alphaextract; -extern const AVFilter ff_vf_alphamerge; -extern const AVFilter ff_vf_amplify; -extern const AVFilter ff_vf_ass; -extern const AVFilter ff_vf_atadenoise; -extern const AVFilter ff_vf_avgblur; -extern const AVFilter ff_vf_avgblur_opencl; -extern const AVFilter ff_vf_avgblur_vulkan; -extern const AVFilter ff_vf_backgroundkey; -extern const AVFilter ff_vf_bbox; -extern const AVFilter ff_vf_bench; -extern const AVFilter ff_vf_bilateral; -extern const AVFilter ff_vf_bilateral_cuda; -extern const AVFilter ff_vf_bitplanenoise; -extern const AVFilter ff_vf_blackdetect; -extern const AVFilter ff_vf_blackframe; -extern const AVFilter ff_vf_blend; -extern const AVFilter ff_vf_blend_vulkan; -extern const AVFilter ff_vf_blockdetect; -extern const AVFilter ff_vf_blurdetect; -extern const AVFilter ff_vf_bm3d; -extern const AVFilter ff_vf_boxblur; -extern const AVFilter ff_vf_boxblur_opencl; -extern const AVFilter ff_vf_bwdif; -extern const AVFilter ff_vf_bwdif_cuda; -extern const AVFilter ff_vf_bwdif_vulkan; -extern const AVFilter ff_vf_cas; -extern const AVFilter ff_vf_ccrepack; -extern const AVFilter ff_vf_chromaber_vulkan; -extern const AVFilter ff_vf_chromahold; -extern const AVFilter ff_vf_chromakey; -extern const AVFilter ff_vf_chromakey_cuda; -extern const AVFilter ff_vf_chromanr; -extern const AVFilter ff_vf_chromashift; -extern const AVFilter ff_vf_ciescope; -extern const AVFilter ff_vf_codecview; -extern const AVFilter ff_vf_colorbalance; -extern const AVFilter ff_vf_colorchannelmixer; -extern const AVFilter ff_vf_colorcontrast; -extern const AVFilter ff_vf_colorcorrect; -extern const AVFilter ff_vf_colorize; -extern const AVFilter ff_vf_colorkey; -extern const AVFilter ff_vf_colorkey_opencl; -extern const AVFilter ff_vf_colorhold; -extern const AVFilter ff_vf_colorlevels; -extern const AVFilter ff_vf_colormap; -extern const AVFilter ff_vf_colormatrix; -extern const AVFilter ff_vf_colorspace; -extern const AVFilter ff_vf_colorspace_cuda; -extern const AVFilter ff_vf_colortemperature; -extern const AVFilter ff_vf_convolution; -extern const AVFilter ff_vf_convolution_opencl; -extern const AVFilter ff_vf_convolve; -extern const AVFilter ff_vf_copy; -extern const AVFilter ff_vf_coreimage; -extern const AVFilter ff_vf_corr; -extern const AVFilter ff_vf_cover_rect; -extern const AVFilter ff_vf_crop; -extern const AVFilter ff_vf_cropdetect; -extern const AVFilter ff_vf_cue; -extern const AVFilter ff_vf_curves; -extern const AVFilter ff_vf_datascope; -extern const AVFilter ff_vf_dblur; -extern const AVFilter ff_vf_dctdnoiz; -extern const AVFilter ff_vf_deband; -extern const AVFilter ff_vf_deblock; -extern const AVFilter ff_vf_decimate; -extern const AVFilter ff_vf_deconvolve; -extern const AVFilter ff_vf_dedot; -extern const AVFilter ff_vf_deflate; -extern const AVFilter ff_vf_deflicker; -extern const AVFilter ff_vf_deinterlace_qsv; -extern const AVFilter ff_vf_deinterlace_vaapi; -extern const AVFilter ff_vf_dejudder; -extern const AVFilter ff_vf_delogo; -extern const AVFilter ff_vf_denoise_vaapi; -extern const AVFilter ff_vf_derain; -extern const AVFilter ff_vf_deshake; -extern const AVFilter ff_vf_deshake_opencl; -extern const AVFilter ff_vf_despill; -extern const AVFilter ff_vf_detelecine; -extern const AVFilter ff_vf_dilation; -extern const AVFilter ff_vf_dilation_opencl; -extern const AVFilter ff_vf_displace; -extern const AVFilter ff_vf_dnn_classify; -extern const AVFilter ff_vf_dnn_detect; -extern const AVFilter ff_vf_dnn_processing; -extern const AVFilter ff_vf_doubleweave; -extern const AVFilter ff_vf_drawbox; -extern const AVFilter ff_vf_drawgraph; -extern const AVFilter ff_vf_drawgrid; -extern const AVFilter ff_vf_drawtext; -extern const AVFilter ff_vf_edgedetect; -extern const AVFilter ff_vf_elbg; -extern const AVFilter ff_vf_entropy; -extern const AVFilter ff_vf_epx; -extern const AVFilter ff_vf_eq; -extern const AVFilter ff_vf_erosion; -extern const AVFilter ff_vf_erosion_opencl; -extern const AVFilter ff_vf_estdif; -extern const AVFilter ff_vf_exposure; -extern const AVFilter ff_vf_extractplanes; -extern const AVFilter ff_vf_fade; -extern const AVFilter ff_vf_feedback; -extern const AVFilter ff_vf_fftdnoiz; -extern const AVFilter ff_vf_fftfilt; -extern const AVFilter ff_vf_field; -extern const AVFilter ff_vf_fieldhint; -extern const AVFilter ff_vf_fieldmatch; -extern const AVFilter ff_vf_fieldorder; -extern const AVFilter ff_vf_fillborders; -extern const AVFilter ff_vf_find_rect; -extern const AVFilter ff_vf_flip_vulkan; -extern const AVFilter ff_vf_floodfill; -extern const AVFilter ff_vf_format; -extern const AVFilter ff_vf_fps; -extern const AVFilter ff_vf_framepack; -extern const AVFilter ff_vf_framerate; -extern const AVFilter ff_vf_framestep; -extern const AVFilter ff_vf_freezedetect; -extern const AVFilter ff_vf_freezeframes; -extern const AVFilter ff_vf_frei0r; -extern const AVFilter ff_vf_fspp; -extern const AVFilter ff_vf_fsync; -extern const AVFilter ff_vf_gblur; -extern const AVFilter ff_vf_gblur_vulkan; -extern const AVFilter ff_vf_geq; -extern const AVFilter ff_vf_gradfun; -extern const AVFilter ff_vf_graphmonitor; -extern const AVFilter ff_vf_grayworld; -extern const AVFilter ff_vf_greyedge; -extern const AVFilter ff_vf_guided; -extern const AVFilter ff_vf_haldclut; -extern const AVFilter ff_vf_hflip; -extern const AVFilter ff_vf_hflip_vulkan; -extern const AVFilter ff_vf_histeq; -extern const AVFilter ff_vf_histogram; -extern const AVFilter ff_vf_hqdn3d; -extern const AVFilter ff_vf_hqx; -extern const AVFilter ff_vf_hstack; -extern const AVFilter ff_vf_hsvhold; -extern const AVFilter ff_vf_hsvkey; -extern const AVFilter ff_vf_hue; -extern const AVFilter ff_vf_huesaturation; -extern const AVFilter ff_vf_hwdownload; -extern const AVFilter ff_vf_hwmap; -extern const AVFilter ff_vf_hwupload; -extern const AVFilter ff_vf_hwupload_cuda; -extern const AVFilter ff_vf_hysteresis; -extern const AVFilter ff_vf_iccdetect; -extern const AVFilter ff_vf_iccgen; -extern const AVFilter ff_vf_identity; -extern const AVFilter ff_vf_idet; -extern const AVFilter ff_vf_il; -extern const AVFilter ff_vf_inflate; -extern const AVFilter ff_vf_interlace; -extern const AVFilter ff_vf_interleave; -extern const AVFilter ff_vf_kerndeint; -extern const AVFilter ff_vf_kirsch; -extern const AVFilter ff_vf_lagfun; -extern const AVFilter ff_vf_latency; -extern const AVFilter ff_vf_lcevc; -extern const AVFilter ff_vf_lenscorrection; -extern const AVFilter ff_vf_lensfun; -extern const AVFilter ff_vf_libplacebo; -extern const AVFilter ff_vf_libvmaf; -extern const AVFilter ff_vf_libvmaf_cuda; -extern const AVFilter ff_vf_limitdiff; -extern const AVFilter ff_vf_limiter; -extern const AVFilter ff_vf_loop; -extern const AVFilter ff_vf_lumakey; -extern const AVFilter ff_vf_lut; -extern const AVFilter ff_vf_lut1d; -extern const AVFilter ff_vf_lut2; -extern const AVFilter ff_vf_lut3d; -extern const AVFilter ff_vf_lutrgb; -extern const AVFilter ff_vf_lutyuv; -extern const AVFilter ff_vf_maskedclamp; -extern const AVFilter ff_vf_maskedmax; -extern const AVFilter ff_vf_maskedmerge; -extern const AVFilter ff_vf_maskedmin; -extern const AVFilter ff_vf_maskedthreshold; -extern const AVFilter ff_vf_maskfun; -extern const AVFilter ff_vf_mcdeint; -extern const AVFilter ff_vf_median; -extern const AVFilter ff_vf_mergeplanes; -extern const AVFilter ff_vf_mestimate; -extern const AVFilter ff_vf_metadata; -extern const AVFilter ff_vf_midequalizer; -extern const AVFilter ff_vf_minterpolate; -extern const AVFilter ff_vf_mix; -extern const AVFilter ff_vf_monochrome; -extern const AVFilter ff_vf_morpho; -extern const AVFilter ff_vf_mpdecimate; -extern const AVFilter ff_vf_msad; -extern const AVFilter ff_vf_multiply; -extern const AVFilter ff_vf_negate; -extern const AVFilter ff_vf_nlmeans; -extern const AVFilter ff_vf_nlmeans_opencl; -extern const AVFilter ff_vf_nlmeans_vulkan; -extern const AVFilter ff_vf_nnedi; -extern const AVFilter ff_vf_noformat; -extern const AVFilter ff_vf_noise; -extern const AVFilter ff_vf_normalize; -extern const AVFilter ff_vf_null; -extern const AVFilter ff_vf_ocr; -extern const AVFilter ff_vf_ocv; -extern const AVFilter ff_vf_oscilloscope; -extern const AVFilter ff_vf_overlay; -extern const AVFilter ff_vf_overlay_opencl; -extern const AVFilter ff_vf_overlay_qsv; -extern const AVFilter ff_vf_overlay_vaapi; -extern const AVFilter ff_vf_overlay_vulkan; -extern const AVFilter ff_vf_overlay_cuda; -extern const AVFilter ff_vf_owdenoise; -extern const AVFilter ff_vf_pad; -extern const AVFilter ff_vf_pad_opencl; -extern const AVFilter ff_vf_palettegen; -extern const AVFilter ff_vf_paletteuse; -extern const AVFilter ff_vf_perms; -extern const AVFilter ff_vf_perspective; -extern const AVFilter ff_vf_phase; -extern const AVFilter ff_vf_photosensitivity; -extern const AVFilter ff_vf_pixdesctest; -extern const AVFilter ff_vf_pixelize; -extern const AVFilter ff_vf_pixscope; -extern const AVFilter ff_vf_pp; -extern const AVFilter ff_vf_pp7; -extern const AVFilter ff_vf_premultiply; -extern const AVFilter ff_vf_prewitt; -extern const AVFilter ff_vf_prewitt_opencl; -extern const AVFilter ff_vf_procamp_vaapi; -extern const AVFilter ff_vf_program_opencl; -extern const AVFilter ff_vf_pseudocolor; -extern const AVFilter ff_vf_psnr; -extern const AVFilter ff_vf_pullup; -extern const AVFilter ff_vf_qp; -extern const AVFilter ff_vf_qrencode; -extern const AVFilter ff_vf_quirc; -extern const AVFilter ff_vf_random; -extern const AVFilter ff_vf_readeia608; -extern const AVFilter ff_vf_readvitc; -extern const AVFilter ff_vf_realtime; -extern const AVFilter ff_vf_remap; -extern const AVFilter ff_vf_remap_opencl; -extern const AVFilter ff_vf_removegrain; -extern const AVFilter ff_vf_removelogo; -extern const AVFilter ff_vf_repeatfields; -extern const AVFilter ff_vf_reverse; -extern const AVFilter ff_vf_rgbashift; -extern const AVFilter ff_vf_roberts; -extern const AVFilter ff_vf_roberts_opencl; -extern const AVFilter ff_vf_rotate; -extern const AVFilter ff_vf_sab; -extern const AVFilter ff_vf_scale; -extern const AVFilter ff_vf_scale_cuda; -extern const AVFilter ff_vf_scale_npp; -extern const AVFilter ff_vf_scale_qsv; -extern const AVFilter ff_vf_scale_vaapi; -extern const AVFilter ff_vf_scale_vt; -extern const AVFilter ff_vf_scale_vulkan; -extern const AVFilter ff_vf_scale2ref; -extern const AVFilter ff_vf_scale2ref_npp; -extern const AVFilter ff_vf_scdet; -extern const AVFilter ff_vf_scharr; -extern const AVFilter ff_vf_scroll; -extern const AVFilter ff_vf_segment; -extern const AVFilter ff_vf_select; -extern const AVFilter ff_vf_selectivecolor; -extern const AVFilter ff_vf_sendcmd; -extern const AVFilter ff_vf_separatefields; -extern const AVFilter ff_vf_setdar; -extern const AVFilter ff_vf_setfield; -extern const AVFilter ff_vf_setparams; -extern const AVFilter ff_vf_setpts; -extern const AVFilter ff_vf_setrange; -extern const AVFilter ff_vf_setsar; -extern const AVFilter ff_vf_settb; -extern const AVFilter ff_vf_sharpen_npp; -extern const AVFilter ff_vf_sharpness_vaapi; -extern const AVFilter ff_vf_shear; -extern const AVFilter ff_vf_showinfo; -extern const AVFilter ff_vf_showpalette; -extern const AVFilter ff_vf_shuffleframes; -extern const AVFilter ff_vf_shufflepixels; -extern const AVFilter ff_vf_shuffleplanes; -extern const AVFilter ff_vf_sidedata; -extern const AVFilter ff_vf_signalstats; -extern const AVFilter ff_vf_signature; -extern const AVFilter ff_vf_siti; -extern const AVFilter ff_vf_smartblur; -extern const AVFilter ff_vf_sobel; -extern const AVFilter ff_vf_sobel_opencl; -extern const AVFilter ff_vf_split; -extern const AVFilter ff_vf_spp; -extern const AVFilter ff_vf_sr; -extern const AVFilter ff_vf_ssim; -extern const AVFilter ff_vf_ssim360; -extern const AVFilter ff_vf_stereo3d; -extern const AVFilter ff_vf_streamselect; -extern const AVFilter ff_vf_subtitles; -extern const AVFilter ff_vf_super2xsai; -extern const AVFilter ff_vf_swaprect; -extern const AVFilter ff_vf_swapuv; -extern const AVFilter ff_vf_tblend; -extern const AVFilter ff_vf_telecine; -extern const AVFilter ff_vf_thistogram; -extern const AVFilter ff_vf_threshold; -extern const AVFilter ff_vf_thumbnail; -extern const AVFilter ff_vf_thumbnail_cuda; -extern const AVFilter ff_vf_tile; -extern const AVFilter ff_vf_tiltandshift; -extern const AVFilter ff_vf_tinterlace; -extern const AVFilter ff_vf_tlut2; -extern const AVFilter ff_vf_tmedian; -extern const AVFilter ff_vf_tmidequalizer; -extern const AVFilter ff_vf_tmix; -extern const AVFilter ff_vf_tonemap; -extern const AVFilter ff_vf_tonemap_opencl; -extern const AVFilter ff_vf_tonemap_vaapi; -extern const AVFilter ff_vf_tpad; -extern const AVFilter ff_vf_transpose; -extern const AVFilter ff_vf_transpose_npp; -extern const AVFilter ff_vf_transpose_opencl; -extern const AVFilter ff_vf_transpose_vaapi; -extern const AVFilter ff_vf_transpose_vt; -extern const AVFilter ff_vf_transpose_vulkan; -extern const AVFilter ff_vf_trim; -extern const AVFilter ff_vf_unpremultiply; -extern const AVFilter ff_vf_unsharp; -extern const AVFilter ff_vf_unsharp_opencl; -extern const AVFilter ff_vf_untile; -extern const AVFilter ff_vf_uspp; -extern const AVFilter ff_vf_v360; -extern const AVFilter ff_vf_vaguedenoiser; -extern const AVFilter ff_vf_varblur; -extern const AVFilter ff_vf_vectorscope; -extern const AVFilter ff_vf_vflip; -extern const AVFilter ff_vf_vflip_vulkan; -extern const AVFilter ff_vf_vfrdet; -extern const AVFilter ff_vf_vibrance; -extern const AVFilter ff_vf_vidstabdetect; -extern const AVFilter ff_vf_vidstabtransform; -extern const AVFilter ff_vf_vif; -extern const AVFilter ff_vf_vignette; -extern const AVFilter ff_vf_vmafmotion; -extern const AVFilter ff_vf_vpp_qsv; -extern const AVFilter ff_vf_vstack; -extern const AVFilter ff_vf_w3fdif; -extern const AVFilter ff_vf_waveform; -extern const AVFilter ff_vf_weave; -extern const AVFilter ff_vf_xbr; -extern const AVFilter ff_vf_xcorrelate; -extern const AVFilter ff_vf_xfade; -extern const AVFilter ff_vf_xfade_opencl; -extern const AVFilter ff_vf_xfade_vulkan; -extern const AVFilter ff_vf_xmedian; -extern const AVFilter ff_vf_xpsnr; -extern const AVFilter ff_vf_xstack; -extern const AVFilter ff_vf_yadif; -extern const AVFilter ff_vf_yadif_cuda; -extern const AVFilter ff_vf_yadif_videotoolbox; -extern const AVFilter ff_vf_yaepblur; -extern const AVFilter ff_vf_zmq; -extern const AVFilter ff_vf_zoompan; -extern const AVFilter ff_vf_zscale; -extern const AVFilter ff_vf_hstack_vaapi; -extern const AVFilter ff_vf_vstack_vaapi; -extern const AVFilter ff_vf_xstack_vaapi; -extern const AVFilter ff_vf_hstack_qsv; -extern const AVFilter ff_vf_vstack_qsv; -extern const AVFilter ff_vf_xstack_qsv; -extern const AVFilter ff_vf_pad_vaapi; -extern const AVFilter ff_vf_drawbox_vaapi; +extern const FFFilter ff_vf_addroi; +extern const FFFilter ff_vf_alphaextract; +extern const FFFilter ff_vf_alphamerge; +extern const FFFilter ff_vf_amplify; +extern const FFFilter ff_vf_ass; +extern const FFFilter ff_vf_atadenoise; +extern const FFFilter ff_vf_avgblur; +extern const FFFilter ff_vf_avgblur_opencl; +extern const FFFilter ff_vf_avgblur_vulkan; +extern const FFFilter ff_vf_backgroundkey; +extern const FFFilter ff_vf_bbox; +extern const FFFilter ff_vf_bench; +extern const FFFilter ff_vf_bilateral; +extern const FFFilter ff_vf_bilateral_cuda; +extern const FFFilter ff_vf_bitplanenoise; +extern const FFFilter ff_vf_blackdetect; +extern const FFFilter ff_vf_blackframe; +extern const FFFilter ff_vf_blend; +extern const FFFilter ff_vf_blend_vulkan; +extern const FFFilter ff_vf_blockdetect; +extern const FFFilter ff_vf_blurdetect; +extern const FFFilter ff_vf_bm3d; +extern const FFFilter ff_vf_boxblur; +extern const FFFilter ff_vf_boxblur_opencl; +extern const FFFilter ff_vf_bwdif; +extern const FFFilter ff_vf_bwdif_cuda; +extern const FFFilter ff_vf_bwdif_vulkan; +extern const FFFilter ff_vf_cas; +extern const FFFilter ff_vf_ccrepack; +extern const FFFilter ff_vf_chromaber_vulkan; +extern const FFFilter ff_vf_chromahold; +extern const FFFilter ff_vf_chromakey; +extern const FFFilter ff_vf_chromakey_cuda; +extern const FFFilter ff_vf_chromanr; +extern const FFFilter ff_vf_chromashift; +extern const FFFilter ff_vf_ciescope; +extern const FFFilter ff_vf_codecview; +extern const FFFilter ff_vf_colorbalance; +extern const FFFilter ff_vf_colorchannelmixer; +extern const FFFilter ff_vf_colorcontrast; +extern const FFFilter ff_vf_colorcorrect; +extern const FFFilter ff_vf_colorize; +extern const FFFilter ff_vf_colorkey; +extern const FFFilter ff_vf_colorkey_opencl; +extern const FFFilter ff_vf_colorhold; +extern const FFFilter ff_vf_colorlevels; +extern const FFFilter ff_vf_colormap; +extern const FFFilter ff_vf_colormatrix; +extern const FFFilter ff_vf_colorspace; +extern const FFFilter ff_vf_colorspace_cuda; +extern const FFFilter ff_vf_colortemperature; +extern const FFFilter ff_vf_convolution; +extern const FFFilter ff_vf_convolution_opencl; +extern const FFFilter ff_vf_convolve; +extern const FFFilter ff_vf_copy; +extern const FFFilter ff_vf_coreimage; +extern const FFFilter ff_vf_corr; +extern const FFFilter ff_vf_cover_rect; +extern const FFFilter ff_vf_crop; +extern const FFFilter ff_vf_cropdetect; +extern const FFFilter ff_vf_cue; +extern const FFFilter ff_vf_curves; +extern const FFFilter ff_vf_datascope; +extern const FFFilter ff_vf_dblur; +extern const FFFilter ff_vf_dctdnoiz; +extern const FFFilter ff_vf_deband; +extern const FFFilter ff_vf_deblock; +extern const FFFilter ff_vf_decimate; +extern const FFFilter ff_vf_deconvolve; +extern const FFFilter ff_vf_dedot; +extern const FFFilter ff_vf_deflate; +extern const FFFilter ff_vf_deflicker; +extern const FFFilter ff_vf_deinterlace_qsv; +extern const FFFilter ff_vf_deinterlace_vaapi; +extern const FFFilter ff_vf_dejudder; +extern const FFFilter ff_vf_delogo; +extern const FFFilter ff_vf_denoise_vaapi; +extern const FFFilter ff_vf_derain; +extern const FFFilter ff_vf_deshake; +extern const FFFilter ff_vf_deshake_opencl; +extern const FFFilter ff_vf_despill; +extern const FFFilter ff_vf_detelecine; +extern const FFFilter ff_vf_dilation; +extern const FFFilter ff_vf_dilation_opencl; +extern const FFFilter ff_vf_displace; +extern const FFFilter ff_vf_dnn_classify; +extern const FFFilter ff_vf_dnn_detect; +extern const FFFilter ff_vf_dnn_processing; +extern const FFFilter ff_vf_doubleweave; +extern const FFFilter ff_vf_drawbox; +extern const FFFilter ff_vf_drawgraph; +extern const FFFilter ff_vf_drawgrid; +extern const FFFilter ff_vf_drawtext; +extern const FFFilter ff_vf_edgedetect; +extern const FFFilter ff_vf_elbg; +extern const FFFilter ff_vf_entropy; +extern const FFFilter ff_vf_epx; +extern const FFFilter ff_vf_eq; +extern const FFFilter ff_vf_erosion; +extern const FFFilter ff_vf_erosion_opencl; +extern const FFFilter ff_vf_estdif; +extern const FFFilter ff_vf_exposure; +extern const FFFilter ff_vf_extractplanes; +extern const FFFilter ff_vf_fade; +extern const FFFilter ff_vf_feedback; +extern const FFFilter ff_vf_fftdnoiz; +extern const FFFilter ff_vf_fftfilt; +extern const FFFilter ff_vf_field; +extern const FFFilter ff_vf_fieldhint; +extern const FFFilter ff_vf_fieldmatch; +extern const FFFilter ff_vf_fieldorder; +extern const FFFilter ff_vf_fillborders; +extern const FFFilter ff_vf_find_rect; +extern const FFFilter ff_vf_flip_vulkan; +extern const FFFilter ff_vf_floodfill; +extern const FFFilter ff_vf_format; +extern const FFFilter ff_vf_fps; +extern const FFFilter ff_vf_framepack; +extern const FFFilter ff_vf_framerate; +extern const FFFilter ff_vf_framestep; +extern const FFFilter ff_vf_freezedetect; +extern const FFFilter ff_vf_freezeframes; +extern const FFFilter ff_vf_frei0r; +extern const FFFilter ff_vf_fspp; +extern const FFFilter ff_vf_fsync; +extern const FFFilter ff_vf_gblur; +extern const FFFilter ff_vf_gblur_vulkan; +extern const FFFilter ff_vf_geq; +extern const FFFilter ff_vf_gradfun; +extern const FFFilter ff_vf_graphmonitor; +extern const FFFilter ff_vf_grayworld; +extern const FFFilter ff_vf_greyedge; +extern const FFFilter ff_vf_guided; +extern const FFFilter ff_vf_haldclut; +extern const FFFilter ff_vf_hflip; +extern const FFFilter ff_vf_hflip_vulkan; +extern const FFFilter ff_vf_histeq; +extern const FFFilter ff_vf_histogram; +extern const FFFilter ff_vf_hqdn3d; +extern const FFFilter ff_vf_hqx; +extern const FFFilter ff_vf_hstack; +extern const FFFilter ff_vf_hsvhold; +extern const FFFilter ff_vf_hsvkey; +extern const FFFilter ff_vf_hue; +extern const FFFilter ff_vf_huesaturation; +extern const FFFilter ff_vf_hwdownload; +extern const FFFilter ff_vf_hwmap; +extern const FFFilter ff_vf_hwupload; +extern const FFFilter ff_vf_hwupload_cuda; +extern const FFFilter ff_vf_hysteresis; +extern const FFFilter ff_vf_iccdetect; +extern const FFFilter ff_vf_iccgen; +extern const FFFilter ff_vf_identity; +extern const FFFilter ff_vf_idet; +extern const FFFilter ff_vf_il; +extern const FFFilter ff_vf_inflate; +extern const FFFilter ff_vf_interlace; +extern const FFFilter ff_vf_interleave; +extern const FFFilter ff_vf_kerndeint; +extern const FFFilter ff_vf_kirsch; +extern const FFFilter ff_vf_lagfun; +extern const FFFilter ff_vf_latency; +extern const FFFilter ff_vf_lcevc; +extern const FFFilter ff_vf_lenscorrection; +extern const FFFilter ff_vf_lensfun; +extern const FFFilter ff_vf_libplacebo; +extern const FFFilter ff_vf_libvmaf; +extern const FFFilter ff_vf_libvmaf_cuda; +extern const FFFilter ff_vf_limitdiff; +extern const FFFilter ff_vf_limiter; +extern const FFFilter ff_vf_loop; +extern const FFFilter ff_vf_lumakey; +extern const FFFilter ff_vf_lut; +extern const FFFilter ff_vf_lut1d; +extern const FFFilter ff_vf_lut2; +extern const FFFilter ff_vf_lut3d; +extern const FFFilter ff_vf_lutrgb; +extern const FFFilter ff_vf_lutyuv; +extern const FFFilter ff_vf_maskedclamp; +extern const FFFilter ff_vf_maskedmax; +extern const FFFilter ff_vf_maskedmerge; +extern const FFFilter ff_vf_maskedmin; +extern const FFFilter ff_vf_maskedthreshold; +extern const FFFilter ff_vf_maskfun; +extern const FFFilter ff_vf_mcdeint; +extern const FFFilter ff_vf_median; +extern const FFFilter ff_vf_mergeplanes; +extern const FFFilter ff_vf_mestimate; +extern const FFFilter ff_vf_metadata; +extern const FFFilter ff_vf_midequalizer; +extern const FFFilter ff_vf_minterpolate; +extern const FFFilter ff_vf_mix; +extern const FFFilter ff_vf_monochrome; +extern const FFFilter ff_vf_morpho; +extern const FFFilter ff_vf_mpdecimate; +extern const FFFilter ff_vf_msad; +extern const FFFilter ff_vf_multiply; +extern const FFFilter ff_vf_negate; +extern const FFFilter ff_vf_nlmeans; +extern const FFFilter ff_vf_nlmeans_opencl; +extern const FFFilter ff_vf_nlmeans_vulkan; +extern const FFFilter ff_vf_nnedi; +extern const FFFilter ff_vf_noformat; +extern const FFFilter ff_vf_noise; +extern const FFFilter ff_vf_normalize; +extern const FFFilter ff_vf_null; +extern const FFFilter ff_vf_ocr; +extern const FFFilter ff_vf_ocv; +extern const FFFilter ff_vf_oscilloscope; +extern const FFFilter ff_vf_overlay; +extern const FFFilter ff_vf_overlay_opencl; +extern const FFFilter ff_vf_overlay_qsv; +extern const FFFilter ff_vf_overlay_vaapi; +extern const FFFilter ff_vf_overlay_vulkan; +extern const FFFilter ff_vf_overlay_cuda; +extern const FFFilter ff_vf_owdenoise; +extern const FFFilter ff_vf_pad; +extern const FFFilter ff_vf_pad_opencl; +extern const FFFilter ff_vf_palettegen; +extern const FFFilter ff_vf_paletteuse; +extern const FFFilter ff_vf_perms; +extern const FFFilter ff_vf_perspective; +extern const FFFilter ff_vf_phase; +extern const FFFilter ff_vf_photosensitivity; +extern const FFFilter ff_vf_pixdesctest; +extern const FFFilter ff_vf_pixelize; +extern const FFFilter ff_vf_pixscope; +extern const FFFilter ff_vf_pp; +extern const FFFilter ff_vf_pp7; +extern const FFFilter ff_vf_premultiply; +extern const FFFilter ff_vf_prewitt; +extern const FFFilter ff_vf_prewitt_opencl; +extern const FFFilter ff_vf_procamp_vaapi; +extern const FFFilter ff_vf_program_opencl; +extern const FFFilter ff_vf_pseudocolor; +extern const FFFilter ff_vf_psnr; +extern const FFFilter ff_vf_pullup; +extern const FFFilter ff_vf_qp; +extern const FFFilter ff_vf_qrencode; +extern const FFFilter ff_vf_quirc; +extern const FFFilter ff_vf_random; +extern const FFFilter ff_vf_readeia608; +extern const FFFilter ff_vf_readvitc; +extern const FFFilter ff_vf_realtime; +extern const FFFilter ff_vf_remap; +extern const FFFilter ff_vf_remap_opencl; +extern const FFFilter ff_vf_removegrain; +extern const FFFilter ff_vf_removelogo; +extern const FFFilter ff_vf_repeatfields; +extern const FFFilter ff_vf_reverse; +extern const FFFilter ff_vf_rgbashift; +extern const FFFilter ff_vf_roberts; +extern const FFFilter ff_vf_roberts_opencl; +extern const FFFilter ff_vf_rotate; +extern const FFFilter ff_vf_sab; +extern const FFFilter ff_vf_scale; +extern const FFFilter ff_vf_scale_cuda; +extern const FFFilter ff_vf_scale_npp; +extern const FFFilter ff_vf_scale_qsv; +extern const FFFilter ff_vf_scale_vaapi; +extern const FFFilter ff_vf_scale_vt; +extern const FFFilter ff_vf_scale_vulkan; +extern const FFFilter ff_vf_scale2ref; +extern const FFFilter ff_vf_scale2ref_npp; +extern const FFFilter ff_vf_scdet; +extern const FFFilter ff_vf_scharr; +extern const FFFilter ff_vf_scroll; +extern const FFFilter ff_vf_segment; +extern const FFFilter ff_vf_select; +extern const FFFilter ff_vf_selectivecolor; +extern const FFFilter ff_vf_sendcmd; +extern const FFFilter ff_vf_separatefields; +extern const FFFilter ff_vf_setdar; +extern const FFFilter ff_vf_setfield; +extern const FFFilter ff_vf_setparams; +extern const FFFilter ff_vf_setpts; +extern const FFFilter ff_vf_setrange; +extern const FFFilter ff_vf_setsar; +extern const FFFilter ff_vf_settb; +extern const FFFilter ff_vf_sharpen_npp; +extern const FFFilter ff_vf_sharpness_vaapi; +extern const FFFilter ff_vf_shear; +extern const FFFilter ff_vf_showinfo; +extern const FFFilter ff_vf_showpalette; +extern const FFFilter ff_vf_shuffleframes; +extern const FFFilter ff_vf_shufflepixels; +extern const FFFilter ff_vf_shuffleplanes; +extern const FFFilter ff_vf_sidedata; +extern const FFFilter ff_vf_signalstats; +extern const FFFilter ff_vf_signature; +extern const FFFilter ff_vf_siti; +extern const FFFilter ff_vf_smartblur; +extern const FFFilter ff_vf_sobel; +extern const FFFilter ff_vf_sobel_opencl; +extern const FFFilter ff_vf_split; +extern const FFFilter ff_vf_spp; +extern const FFFilter ff_vf_sr; +extern const FFFilter ff_vf_ssim; +extern const FFFilter ff_vf_ssim360; +extern const FFFilter ff_vf_stereo3d; +extern const FFFilter ff_vf_streamselect; +extern const FFFilter ff_vf_subtitles; +extern const FFFilter ff_vf_super2xsai; +extern const FFFilter ff_vf_swaprect; +extern const FFFilter ff_vf_swapuv; +extern const FFFilter ff_vf_tblend; +extern const FFFilter ff_vf_telecine; +extern const FFFilter ff_vf_thistogram; +extern const FFFilter ff_vf_threshold; +extern const FFFilter ff_vf_thumbnail; +extern const FFFilter ff_vf_thumbnail_cuda; +extern const FFFilter ff_vf_tile; +extern const FFFilter ff_vf_tiltandshift; +extern const FFFilter ff_vf_tinterlace; +extern const FFFilter ff_vf_tlut2; +extern const FFFilter ff_vf_tmedian; +extern const FFFilter ff_vf_tmidequalizer; +extern const FFFilter ff_vf_tmix; +extern const FFFilter ff_vf_tonemap; +extern const FFFilter ff_vf_tonemap_opencl; +extern const FFFilter ff_vf_tonemap_vaapi; +extern const FFFilter ff_vf_tpad; +extern const FFFilter ff_vf_transpose; +extern const FFFilter ff_vf_transpose_npp; +extern const FFFilter ff_vf_transpose_opencl; +extern const FFFilter ff_vf_transpose_vaapi; +extern const FFFilter ff_vf_transpose_vt; +extern const FFFilter ff_vf_transpose_vulkan; +extern const FFFilter ff_vf_trim; +extern const FFFilter ff_vf_unpremultiply; +extern const FFFilter ff_vf_unsharp; +extern const FFFilter ff_vf_unsharp_opencl; +extern const FFFilter ff_vf_untile; +extern const FFFilter ff_vf_uspp; +extern const FFFilter ff_vf_v360; +extern const FFFilter ff_vf_vaguedenoiser; +extern const FFFilter ff_vf_varblur; +extern const FFFilter ff_vf_vectorscope; +extern const FFFilter ff_vf_vflip; +extern const FFFilter ff_vf_vflip_vulkan; +extern const FFFilter ff_vf_vfrdet; +extern const FFFilter ff_vf_vibrance; +extern const FFFilter ff_vf_vidstabdetect; +extern const FFFilter ff_vf_vidstabtransform; +extern const FFFilter ff_vf_vif; +extern const FFFilter ff_vf_vignette; +extern const FFFilter ff_vf_vmafmotion; +extern const FFFilter ff_vf_vpp_qsv; +extern const FFFilter ff_vf_vstack; +extern const FFFilter ff_vf_w3fdif; +extern const FFFilter ff_vf_waveform; +extern const FFFilter ff_vf_weave; +extern const FFFilter ff_vf_xbr; +extern const FFFilter ff_vf_xcorrelate; +extern const FFFilter ff_vf_xfade; +extern const FFFilter ff_vf_xfade_opencl; +extern const FFFilter ff_vf_xfade_vulkan; +extern const FFFilter ff_vf_xmedian; +extern const FFFilter ff_vf_xpsnr; +extern const FFFilter ff_vf_xstack; +extern const FFFilter ff_vf_yadif; +extern const FFFilter ff_vf_yadif_cuda; +extern const FFFilter ff_vf_yadif_videotoolbox; +extern const FFFilter ff_vf_yaepblur; +extern const FFFilter ff_vf_zmq; +extern const FFFilter ff_vf_zoompan; +extern const FFFilter ff_vf_zscale; +extern const FFFilter ff_vf_hstack_vaapi; +extern const FFFilter ff_vf_vstack_vaapi; +extern const FFFilter ff_vf_xstack_vaapi; +extern const FFFilter ff_vf_hstack_qsv; +extern const FFFilter ff_vf_vstack_qsv; +extern const FFFilter ff_vf_xstack_qsv; +extern const FFFilter ff_vf_pad_vaapi; +extern const FFFilter ff_vf_drawbox_vaapi; -extern const AVFilter ff_vsrc_allrgb; -extern const AVFilter ff_vsrc_allyuv; -extern const AVFilter ff_vsrc_cellauto; -extern const AVFilter ff_vsrc_color; -extern const AVFilter ff_vsrc_color_vulkan; -extern const AVFilter ff_vsrc_colorchart; -extern const AVFilter ff_vsrc_colorspectrum; -extern const AVFilter ff_vsrc_coreimagesrc; -extern const AVFilter ff_vsrc_ddagrab; -extern const AVFilter ff_vsrc_frei0r_src; -extern const AVFilter ff_vsrc_gradients; -extern const AVFilter ff_vsrc_haldclutsrc; -extern const AVFilter ff_vsrc_life; -extern const AVFilter ff_vsrc_mandelbrot; -extern const AVFilter ff_vsrc_mptestsrc; -extern const AVFilter ff_vsrc_nullsrc; -extern const AVFilter ff_vsrc_openclsrc; -extern const AVFilter ff_vsrc_qrencodesrc; -extern const AVFilter ff_vsrc_pal75bars; -extern const AVFilter ff_vsrc_pal100bars; -extern const AVFilter ff_vsrc_perlin; -extern const AVFilter ff_vsrc_rgbtestsrc; -extern const AVFilter ff_vsrc_sierpinski; -extern const AVFilter ff_vsrc_smptebars; -extern const AVFilter ff_vsrc_smptehdbars; -extern const AVFilter ff_vsrc_testsrc; -extern const AVFilter ff_vsrc_testsrc2; -extern const AVFilter ff_vsrc_yuvtestsrc; -extern const AVFilter ff_vsrc_zoneplate; +extern const FFFilter ff_vsrc_allrgb; +extern const FFFilter ff_vsrc_allyuv; +extern const FFFilter ff_vsrc_cellauto; +extern const FFFilter ff_vsrc_color; +extern const FFFilter ff_vsrc_color_vulkan; +extern const FFFilter ff_vsrc_colorchart; +extern const FFFilter ff_vsrc_colorspectrum; +extern const FFFilter ff_vsrc_coreimagesrc; +extern const FFFilter ff_vsrc_ddagrab; +extern const FFFilter ff_vsrc_frei0r_src; +extern const FFFilter ff_vsrc_gradients; +extern const FFFilter ff_vsrc_haldclutsrc; +extern const FFFilter ff_vsrc_life; +extern const FFFilter ff_vsrc_mandelbrot; +extern const FFFilter ff_vsrc_mptestsrc; +extern const FFFilter ff_vsrc_nullsrc; +extern const FFFilter ff_vsrc_openclsrc; +extern const FFFilter ff_vsrc_qrencodesrc; +extern const FFFilter ff_vsrc_pal75bars; +extern const FFFilter ff_vsrc_pal100bars; +extern const FFFilter ff_vsrc_perlin; +extern const FFFilter ff_vsrc_rgbtestsrc; +extern const FFFilter ff_vsrc_sierpinski; +extern const FFFilter ff_vsrc_smptebars; +extern const FFFilter ff_vsrc_smptehdbars; +extern const FFFilter ff_vsrc_testsrc; +extern const FFFilter ff_vsrc_testsrc2; +extern const FFFilter ff_vsrc_yuvtestsrc; +extern const FFFilter ff_vsrc_zoneplate; -extern const AVFilter ff_vsink_nullsink; +extern const FFFilter ff_vsink_nullsink; /* multimedia filters */ -extern const AVFilter ff_avf_a3dscope; -extern const AVFilter ff_avf_abitscope; -extern const AVFilter ff_avf_adrawgraph; -extern const AVFilter ff_avf_agraphmonitor; -extern const AVFilter ff_avf_ahistogram; -extern const AVFilter ff_avf_aphasemeter; -extern const AVFilter ff_avf_avectorscope; -extern const AVFilter ff_avf_concat; -extern const AVFilter ff_avf_showcqt; -extern const AVFilter ff_avf_showcwt; -extern const AVFilter ff_avf_showfreqs; -extern const AVFilter ff_avf_showspatial; -extern const AVFilter ff_avf_showspectrum; -extern const AVFilter ff_avf_showspectrumpic; -extern const AVFilter ff_avf_showvolume; -extern const AVFilter ff_avf_showwaves; -extern const AVFilter ff_avf_showwavespic; -extern const AVFilter ff_vaf_spectrumsynth; +extern const FFFilter ff_avf_a3dscope; +extern const FFFilter ff_avf_abitscope; +extern const FFFilter ff_avf_adrawgraph; +extern const FFFilter ff_avf_agraphmonitor; +extern const FFFilter ff_avf_ahistogram; +extern const FFFilter ff_avf_aphasemeter; +extern const FFFilter ff_avf_avectorscope; +extern const FFFilter ff_avf_concat; +extern const FFFilter ff_avf_showcqt; +extern const FFFilter ff_avf_showcwt; +extern const FFFilter ff_avf_showfreqs; +extern const FFFilter ff_avf_showspatial; +extern const FFFilter ff_avf_showspectrum; +extern const FFFilter ff_avf_showspectrumpic; +extern const FFFilter ff_avf_showvolume; +extern const FFFilter ff_avf_showwaves; +extern const FFFilter ff_avf_showwavespic; +extern const FFFilter ff_vaf_spectrumsynth; /* multimedia sources */ -extern const AVFilter ff_avsrc_avsynctest; -extern const AVFilter ff_avsrc_amovie; -extern const AVFilter ff_avsrc_movie; +extern const FFFilter ff_avsrc_avsynctest; +extern const FFFilter ff_avsrc_amovie; +extern const FFFilter ff_avsrc_movie; /* those filters are part of public or internal API, * they are formatted to not be found by the grep * as they are manually added again (due to their 'names' * being the same while having different 'types'). */ -extern const AVFilter ff_asrc_abuffer; -extern const AVFilter ff_vsrc_buffer; -extern const AVFilter ff_asink_abuffer; -extern const AVFilter ff_vsink_buffer; +extern const FFFilter ff_asrc_abuffer; +extern const FFFilter ff_vsrc_buffer; +extern const FFFilter ff_asink_abuffer; +extern const FFFilter ff_vsink_buffer; #include "libavfilter/filter_list.c" @@ -623,12 +624,14 @@ extern const AVFilter ff_vsink_buffer; const AVFilter *av_filter_iterate(void **opaque) { uintptr_t i = (uintptr_t)*opaque; - const AVFilter *f = filter_list[i]; + const FFFilter *f = filter_list[i]; - if (f) + if (f) { *opaque = (void*)(i + 1); + return &f->p; + } - return f; + return NULL; } const AVFilter *avfilter_get_by_name(const char *name) diff --git a/libavfilter/asink_anullsink.c b/libavfilter/asink_anullsink.c index 5ba1c7288d..e65705177c 100644 --- a/libavfilter/asink_anullsink.c +++ b/libavfilter/asink_anullsink.c @@ -36,10 +36,10 @@ static const AVFilterPad avfilter_asink_anullsink_inputs[] = { }, }; -const AVFilter ff_asink_anullsink = { - .name = "anullsink", - .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input audio."), +const FFFilter ff_asink_anullsink = { + .p.name = "anullsink", + .p.description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input audio."), + .p.outputs = NULL, .priv_size = 0, FILTER_INPUTS(avfilter_asink_anullsink_inputs), - .outputs = NULL, }; diff --git a/libavfilter/asrc_afdelaysrc.c b/libavfilter/asrc_afdelaysrc.c index cb6f236ba6..3efa94a942 100644 --- a/libavfilter/asrc_afdelaysrc.c +++ b/libavfilter/asrc_afdelaysrc.c @@ -140,13 +140,12 @@ static const AVOption afdelaysrc_options[] = { AVFILTER_DEFINE_CLASS(afdelaysrc); -const AVFilter ff_asrc_afdelaysrc = { - .name = "afdelaysrc", - .description = NULL_IF_CONFIG_SMALL("Generate a Fractional delay FIR coefficients."), +const FFFilter ff_asrc_afdelaysrc = { + .p.name = "afdelaysrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate a Fractional delay FIR coefficients."), + .p.priv_class = &afdelaysrc_class, .priv_size = sizeof(AFDelaySrcContext), - .priv_class = &afdelaysrc_class, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(afdelaysrc_outputs), FILTER_QUERY_FUNC2(query_formats), }; diff --git a/libavfilter/asrc_afirsrc.c b/libavfilter/asrc_afirsrc.c index 0ea611d837..49ee4122fb 100644 --- a/libavfilter/asrc_afirsrc.c +++ b/libavfilter/asrc_afirsrc.c @@ -297,17 +297,16 @@ static const AVFilterPad afirsrc_outputs[] = { }, }; -const AVFilter ff_asrc_afirsrc = { - .name = "afirsrc", - .description = NULL_IF_CONFIG_SMALL("Generate a FIR coefficients audio stream."), +const FFFilter ff_asrc_afirsrc = { + .p.name = "afirsrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate a FIR coefficients audio stream."), + .p.priv_class = &afirsrc_class, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(AudioFIRSourceContext), - .inputs = NULL, FILTER_OUTPUTS(afirsrc_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &afirsrc_class, }; #define DEFAULT_BANDS "25 40 63 100 160 250 400 630 1000 1600 2500 4000 6300 10000 16000 24000" @@ -579,14 +578,13 @@ static const AVFilterPad afireqsrc_outputs[] = { }, }; -const AVFilter ff_asrc_afireqsrc = { - .name = "afireqsrc", - .description = NULL_IF_CONFIG_SMALL("Generate a FIR equalizer coefficients audio stream."), +const FFFilter ff_asrc_afireqsrc = { + .p.name = "afireqsrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate a FIR equalizer coefficients audio stream."), + .p.priv_class = &afireqsrc_class, .uninit = uninit, .activate = activate, .priv_size = sizeof(AudioFIRSourceContext), - .inputs = NULL, FILTER_OUTPUTS(afireqsrc_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &afireqsrc_class, }; diff --git a/libavfilter/asrc_anoisesrc.c b/libavfilter/asrc_anoisesrc.c index 0206fd69ce..ba425d7925 100644 --- a/libavfilter/asrc_anoisesrc.c +++ b/libavfilter/asrc_anoisesrc.c @@ -239,13 +239,12 @@ static const AVFilterPad anoisesrc_outputs[] = { }, }; -const AVFilter ff_asrc_anoisesrc = { - .name = "anoisesrc", - .description = NULL_IF_CONFIG_SMALL("Generate a noise audio signal."), +const FFFilter ff_asrc_anoisesrc = { + .p.name = "anoisesrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate a noise audio signal."), + .p.priv_class = &anoisesrc_class, .priv_size = sizeof(ANoiseSrcContext), - .inputs = NULL, .activate = activate, FILTER_OUTPUTS(anoisesrc_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &anoisesrc_class, }; diff --git a/libavfilter/asrc_anullsrc.c b/libavfilter/asrc_anullsrc.c index d8fd5e7c06..7d74319dff 100644 --- a/libavfilter/asrc_anullsrc.c +++ b/libavfilter/asrc_anullsrc.c @@ -120,13 +120,12 @@ static const AVFilterPad avfilter_asrc_anullsrc_outputs[] = { }, }; -const AVFilter ff_asrc_anullsrc = { - .name = "anullsrc", - .description = NULL_IF_CONFIG_SMALL("Null audio source, return empty audio frames."), +const FFFilter ff_asrc_anullsrc = { + .p.name = "anullsrc", + .p.description = NULL_IF_CONFIG_SMALL("Null audio source, return empty audio frames."), + .p.priv_class = &anullsrc_class, .priv_size = sizeof(ANullContext), - .inputs = NULL, FILTER_OUTPUTS(avfilter_asrc_anullsrc_outputs), FILTER_QUERY_FUNC2(query_formats), .activate = activate, - .priv_class = &anullsrc_class, }; diff --git a/libavfilter/asrc_flite.c b/libavfilter/asrc_flite.c index 1bbd329177..33576beade 100644 --- a/libavfilter/asrc_flite.c +++ b/libavfilter/asrc_flite.c @@ -350,15 +350,14 @@ static const AVFilterPad flite_outputs[] = { }, }; -const AVFilter ff_asrc_flite = { - .name = "flite", - .description = NULL_IF_CONFIG_SMALL("Synthesize voice from text using libflite."), +const FFFilter ff_asrc_flite = { + .p.name = "flite", + .p.description = NULL_IF_CONFIG_SMALL("Synthesize voice from text using libflite."), + .p.priv_class = &flite_class, .init = init, .uninit = uninit, .priv_size = sizeof(FliteContext), .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(flite_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &flite_class, }; diff --git a/libavfilter/asrc_hilbert.c b/libavfilter/asrc_hilbert.c index 3cf5e8728e..aeaf49e642 100644 --- a/libavfilter/asrc_hilbert.c +++ b/libavfilter/asrc_hilbert.c @@ -161,15 +161,14 @@ static const AVFilterPad hilbert_outputs[] = { }, }; -const AVFilter ff_asrc_hilbert = { - .name = "hilbert", - .description = NULL_IF_CONFIG_SMALL("Generate a Hilbert transform FIR coefficients."), +const FFFilter ff_asrc_hilbert = { + .p.name = "hilbert", + .p.description = NULL_IF_CONFIG_SMALL("Generate a Hilbert transform FIR coefficients."), + .p.priv_class = &hilbert_class, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(HilbertContext), - .inputs = NULL, FILTER_OUTPUTS(hilbert_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &hilbert_class, }; diff --git a/libavfilter/asrc_sinc.c b/libavfilter/asrc_sinc.c index 22b031a60d..6ff3303316 100644 --- a/libavfilter/asrc_sinc.c +++ b/libavfilter/asrc_sinc.c @@ -421,14 +421,13 @@ static const AVOption sinc_options[] = { AVFILTER_DEFINE_CLASS(sinc); -const AVFilter ff_asrc_sinc = { - .name = "sinc", - .description = NULL_IF_CONFIG_SMALL("Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients."), +const FFFilter ff_asrc_sinc = { + .p.name = "sinc", + .p.description = NULL_IF_CONFIG_SMALL("Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients."), + .p.priv_class = &sinc_class, .priv_size = sizeof(SincContext), - .priv_class = &sinc_class, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(sinc_outputs), FILTER_QUERY_FUNC2(query_formats), }; diff --git a/libavfilter/asrc_sine.c b/libavfilter/asrc_sine.c index 6a591b551b..337efda8eb 100644 --- a/libavfilter/asrc_sine.c +++ b/libavfilter/asrc_sine.c @@ -298,15 +298,14 @@ static const AVFilterPad sine_outputs[] = { }, }; -const AVFilter ff_asrc_sine = { - .name = "sine", - .description = NULL_IF_CONFIG_SMALL("Generate sine wave audio signal."), +const FFFilter ff_asrc_sine = { + .p.name = "sine", + .p.description = NULL_IF_CONFIG_SMALL("Generate sine wave audio signal."), + .p.priv_class = &sine_class, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(SineContext), - .inputs = NULL, FILTER_OUTPUTS(sine_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &sine_class, }; diff --git a/libavfilter/avf_a3dscope.c b/libavfilter/avf_a3dscope.c index 18f647e8a6..fb08720412 100644 --- a/libavfilter/avf_a3dscope.c +++ b/libavfilter/avf_a3dscope.c @@ -335,15 +335,15 @@ static const AVFilterPad audio3dscope_outputs[] = { }, }; -const AVFilter ff_avf_a3dscope = { - .name = "a3dscope", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to 3d scope video output."), +const FFFilter ff_avf_a3dscope = { + .p.name = "a3dscope", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to 3d scope video output."), + .p.priv_class = &a3dscope_class, .uninit = uninit, .priv_size = sizeof(Audio3dScopeContext), .activate = activate, FILTER_INPUTS(audio3dscope_inputs), FILTER_OUTPUTS(audio3dscope_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &a3dscope_class, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/avf_abitscope.c b/libavfilter/avf_abitscope.c index 6d3a40d8d0..a4b2109473 100644 --- a/libavfilter/avf_abitscope.c +++ b/libavfilter/avf_abitscope.c @@ -305,14 +305,14 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_avf_abitscope = { - .name = "abitscope", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to audio bit scope video output."), +const FFFilter ff_avf_abitscope = { + .p.name = "abitscope", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to audio bit scope video output."), + .p.priv_class = &abitscope_class, .priv_size = sizeof(AudioBitScopeContext), FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), .uninit = uninit, .activate = activate, - .priv_class = &abitscope_class, }; diff --git a/libavfilter/avf_ahistogram.c b/libavfilter/avf_ahistogram.c index baa95c0539..ce0d82f9ec 100644 --- a/libavfilter/avf_ahistogram.c +++ b/libavfilter/avf_ahistogram.c @@ -494,14 +494,14 @@ static const AVFilterPad ahistogram_outputs[] = { }, }; -const AVFilter ff_avf_ahistogram = { - .name = "ahistogram", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to histogram video output."), +const FFFilter ff_avf_ahistogram = { + .p.name = "ahistogram", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to histogram video output."), + .p.priv_class = &ahistogram_class, .uninit = uninit, .priv_size = sizeof(AudioHistogramContext), .activate = activate, FILTER_INPUTS(ahistogram_inputs), FILTER_OUTPUTS(ahistogram_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &ahistogram_class, }; diff --git a/libavfilter/avf_aphasemeter.c b/libavfilter/avf_aphasemeter.c index adcfcb3c5a..4c6b4ae02c 100644 --- a/libavfilter/avf_aphasemeter.c +++ b/libavfilter/avf_aphasemeter.c @@ -428,16 +428,15 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_avf_aphasemeter = { - .name = "aphasemeter", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to phase meter video output."), +const FFFilter ff_avf_aphasemeter = { + .p.name = "aphasemeter", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to phase meter video output."), + .p.priv_class = &aphasemeter_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, .init = init, .uninit = uninit, .priv_size = sizeof(AudioPhaseMeterContext), FILTER_INPUTS(inputs), .activate = activate, - .outputs = NULL, FILTER_QUERY_FUNC2(query_formats), - .priv_class = &aphasemeter_class, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c index cfcedfda00..902d461d86 100644 --- a/libavfilter/avf_avectorscope.c +++ b/libavfilter/avf_avectorscope.c @@ -486,16 +486,16 @@ static const AVFilterPad audiovectorscope_outputs[] = { }, }; -const AVFilter ff_avf_avectorscope = { - .name = "avectorscope", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to vectorscope video output."), +const FFFilter ff_avf_avectorscope = { + .p.name = "avectorscope", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to vectorscope video output."), + .p.priv_class = &avectorscope_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .uninit = uninit, .priv_size = sizeof(AudioVectorScopeContext), .activate = activate, FILTER_INPUTS(audiovectorscope_inputs), FILTER_OUTPUTS(audiovectorscope_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &avectorscope_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c index 5a4319123f..531aa071a0 100644 --- a/libavfilter/avf_concat.c +++ b/libavfilter/avf_concat.c @@ -451,17 +451,17 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar return ret; } -const AVFilter ff_avf_concat = { - .name = "concat", - .description = NULL_IF_CONFIG_SMALL("Concatenate audio and video streams."), +const FFFilter ff_avf_concat = { + .p.name = "concat", + .p.description = NULL_IF_CONFIG_SMALL("Concatenate audio and video streams."), + .p.inputs = NULL, + .p.outputs = NULL, + .p.priv_class = &concat_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_DYNAMIC_OUTPUTS, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(ConcatContext), - .inputs = NULL, - .outputs = NULL, - .priv_class = &concat_class, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_DYNAMIC_OUTPUTS, FILTER_QUERY_FUNC2(query_formats), .process_command = process_command, }; diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c index 9633f36edb..8ff6ecbe09 100644 --- a/libavfilter/avf_showcqt.c +++ b/libavfilter/avf_showcqt.c @@ -1598,9 +1598,10 @@ static const AVFilterPad showcqt_outputs[] = { }, }; -const AVFilter ff_avf_showcqt = { - .name = "showcqt", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to a CQT (Constant/Clamped Q Transform) spectrum video output."), +const FFFilter ff_avf_showcqt = { + .p.name = "showcqt", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to a CQT (Constant/Clamped Q Transform) spectrum video output."), + .p.priv_class = &showcqt_class, .init = init, .activate = activate, .uninit = uninit, @@ -1608,5 +1609,4 @@ const AVFilter ff_avf_showcqt = { FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(showcqt_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &showcqt_class, }; diff --git a/libavfilter/avf_showcwt.c b/libavfilter/avf_showcwt.c index dbb9fc7e2f..8edf2fb43b 100644 --- a/libavfilter/avf_showcwt.c +++ b/libavfilter/avf_showcwt.c @@ -1318,15 +1318,15 @@ static const AVFilterPad showcwt_outputs[] = { }, }; -const AVFilter ff_avf_showcwt = { - .name = "showcwt", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to a CWT (Continuous Wavelet Transform) spectrum video output."), +const FFFilter ff_avf_showcwt = { + .p.name = "showcwt", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to a CWT (Continuous Wavelet Transform) spectrum video output."), + .p.priv_class = &showcwt_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .uninit = uninit, .priv_size = sizeof(ShowCWTContext), FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(showcwt_outputs), FILTER_QUERY_FUNC2(query_formats), .activate = activate, - .priv_class = &showcwt_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c index 91e3a339e4..244b013ada 100644 --- a/libavfilter/avf_showfreqs.c +++ b/libavfilter/avf_showfreqs.c @@ -549,14 +549,14 @@ static const AVFilterPad showfreqs_outputs[] = { }, }; -const AVFilter ff_avf_showfreqs = { - .name = "showfreqs", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to a frequencies video output."), +const FFFilter ff_avf_showfreqs = { + .p.name = "showfreqs", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to a frequencies video output."), + .p.priv_class = &showfreqs_class, .uninit = uninit, .priv_size = sizeof(ShowFreqsContext), .activate = activate, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(showfreqs_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &showfreqs_class, }; diff --git a/libavfilter/avf_showspatial.c b/libavfilter/avf_showspatial.c index 285f2f1a81..491501e337 100644 --- a/libavfilter/avf_showspatial.c +++ b/libavfilter/avf_showspatial.c @@ -321,15 +321,15 @@ static const AVFilterPad showspatial_outputs[] = { }, }; -const AVFilter ff_avf_showspatial = { - .name = "showspatial", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to a spatial video output."), +const FFFilter ff_avf_showspatial = { + .p.name = "showspatial", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to a spatial video output."), + .p.priv_class = &showspatial_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .uninit = uninit, .priv_size = sizeof(ShowSpatialContext), FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(showspatial_outputs), FILTER_QUERY_FUNC2(query_formats), .activate = spatial_activate, - .priv_class = &showspatial_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index c6594177eb..dc608c450a 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -1680,17 +1680,17 @@ static const AVFilterPad showspectrum_outputs[] = { }, }; -const AVFilter ff_avf_showspectrum = { - .name = "showspectrum", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to a spectrum video output."), +const FFFilter ff_avf_showspectrum = { + .p.name = "showspectrum", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to a spectrum video output."), + .p.priv_class = &showspectrum_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .uninit = uninit, .priv_size = sizeof(ShowSpectrumContext), FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(showspectrum_outputs), FILTER_QUERY_FUNC2(query_formats), .activate = activate, - .priv_class = &showspectrum_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; #endif // CONFIG_SHOWSPECTRUM_FILTER @@ -1867,16 +1867,16 @@ static const AVFilterPad showspectrumpic_outputs[] = { }, }; -const AVFilter ff_avf_showspectrumpic = { - .name = "showspectrumpic", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to a spectrum video output single picture."), +const FFFilter ff_avf_showspectrumpic = { + .p.name = "showspectrumpic", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to a spectrum video output single picture."), + .p.priv_class = &showspectrumpic_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .uninit = uninit, .priv_size = sizeof(ShowSpectrumContext), FILTER_INPUTS(showspectrumpic_inputs), FILTER_OUTPUTS(showspectrumpic_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &showspectrumpic_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; #endif // CONFIG_SHOWSPECTRUMPIC_FILTER diff --git a/libavfilter/avf_showvolume.c b/libavfilter/avf_showvolume.c index 8caabf5376..e760caad2d 100644 --- a/libavfilter/avf_showvolume.c +++ b/libavfilter/avf_showvolume.c @@ -502,9 +502,10 @@ static const AVFilterPad showvolume_outputs[] = { }, }; -const AVFilter ff_avf_showvolume = { - .name = "showvolume", - .description = NULL_IF_CONFIG_SMALL("Convert input audio volume to video output."), +const FFFilter ff_avf_showvolume = { + .p.name = "showvolume", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio volume to video output."), + .p.priv_class = &showvolume_class, .init = init, .activate = activate, .uninit = uninit, @@ -512,5 +513,4 @@ const AVFilter ff_avf_showvolume = { FILTER_INPUTS(showvolume_inputs), FILTER_OUTPUTS(showvolume_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &showvolume_class, }; diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index de73d8050f..d1f1277beb 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -796,9 +796,10 @@ static const AVFilterPad showwaves_outputs[] = { }, }; -const AVFilter ff_avf_showwaves = { - .name = "showwaves", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to a video output."), +const FFFilter ff_avf_showwaves = { + .p.name = "showwaves", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to a video output."), + .p.priv_class = &showwaves_class, .init = init, .uninit = uninit, .priv_size = sizeof(ShowWavesContext), @@ -806,7 +807,6 @@ const AVFilter ff_avf_showwaves = { .activate = activate, FILTER_OUTPUTS(showwaves_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &showwaves_class, }; #endif // CONFIG_SHOWWAVES_FILTER @@ -908,16 +908,16 @@ static const AVFilterPad showwavespic_outputs[] = { }, }; -const AVFilter ff_avf_showwavespic = { - .name = "showwavespic", - .description = NULL_IF_CONFIG_SMALL("Convert input audio to a video output single picture."), +const FFFilter ff_avf_showwavespic = { + .p.name = "showwavespic", + .p.description = NULL_IF_CONFIG_SMALL("Convert input audio to a video output single picture."), + .p.priv_class = &showwavespic_class, .init = init, .uninit = uninit, .priv_size = sizeof(ShowWavesContext), FILTER_INPUTS(showwavespic_inputs), FILTER_OUTPUTS(showwavespic_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &showwavespic_class, }; #endif // CONFIG_SHOWWAVESPIC_FILTER diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 235c9ea14a..fbce8d8a83 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -418,7 +418,7 @@ int ff_filter_config_links(AVFilterContext *filter) } if (link->src->nb_inputs && - !(link->src->filter->flags_internal & FF_FILTER_FLAG_HWFRAME_AWARE)) { + !(fffilter(link->src->filter)->flags_internal & FF_FILTER_FLAG_HWFRAME_AWARE)) { FilterLink *l0 = ff_filter_link(link->src->inputs[0]); av_assert0(!li->l.hw_frames_ctx && @@ -478,7 +478,7 @@ int ff_request_frame(AVFilterLink *link) FF_TPRINTF_START(NULL, request_frame); ff_tlog_link(NULL, link, 1); - av_assert1(!link->dst->filter->activate); + av_assert1(!fffilter(link->dst->filter)->activate); if (li->status_out) return li->status_out; if (li->status_in) { @@ -620,15 +620,15 @@ int avfilter_process_command(AVFilterContext *filter, const char *cmd, const cha return 0; }else if(!strcmp(cmd, "enable")) { return set_enable_expr(fffilterctx(filter), arg); - }else if(filter->filter->process_command) { - return filter->filter->process_command(filter, cmd, arg, res, res_len, flags); + }else if (fffilter(filter->filter)->process_command) { + return fffilter(filter->filter)->process_command(filter, cmd, arg, res, res_len, flags); } return AVERROR(ENOSYS); } unsigned avfilter_filter_pad_count(const AVFilter *filter, int is_output) { - return is_output ? filter->nb_outputs : filter->nb_inputs; + return is_output ? fffilter(filter)->nb_outputs : fffilter(filter)->nb_inputs; } static const char *default_filter_name(void *filter_ctx) @@ -700,6 +700,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) { FFFilterContext *ctx; AVFilterContext *ret; + const FFFilter *const fi = fffilter(filter); int preinited = 0; if (!filter) @@ -713,13 +714,13 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) ret->av_class = &avfilter_class; ret->filter = filter; ret->name = inst_name ? av_strdup(inst_name) : NULL; - if (filter->priv_size) { - ret->priv = av_mallocz(filter->priv_size); + if (fi->priv_size) { + ret->priv = av_mallocz(fi->priv_size); if (!ret->priv) goto err; } - if (filter->preinit) { - if (filter->preinit(ret) < 0) + if (fi->preinit) { + if (fi->preinit(ret) < 0) goto err; preinited = 1; } @@ -732,7 +733,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) ctx->execute = default_execute; - ret->nb_inputs = filter->nb_inputs; + ret->nb_inputs = fi->nb_inputs; if (ret->nb_inputs ) { ret->input_pads = av_memdup(filter->inputs, ret->nb_inputs * sizeof(*filter->inputs)); if (!ret->input_pads) @@ -742,7 +743,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) goto err; } - ret->nb_outputs = filter->nb_outputs; + ret->nb_outputs = fi->nb_outputs; if (ret->nb_outputs) { ret->output_pads = av_memdup(filter->outputs, ret->nb_outputs * sizeof(*filter->outputs)); if (!ret->output_pads) @@ -756,7 +757,7 @@ AVFilterContext *ff_filter_alloc(const AVFilter *filter, const char *inst_name) err: if (preinited) - filter->uninit(ret); + fi->uninit(ret); av_freep(&ret->inputs); av_freep(&ret->input_pads); ret->nb_inputs = 0; @@ -803,8 +804,8 @@ void avfilter_free(AVFilterContext *filter) if (filter->graph) ff_filter_graph_remove_filter(filter->graph, filter); - if (filter->filter->uninit) - filter->filter->uninit(filter); + if (fffilter(filter->filter)->uninit) + fffilter(filter->filter)->uninit(filter); for (i = 0; i < filter->nb_inputs; i++) { free_link(filter->inputs[i]); @@ -935,8 +936,8 @@ int avfilter_init_dict(AVFilterContext *ctx, AVDictionary **options) ctx->thread_type = 0; } - if (ctx->filter->init) - ret = ctx->filter->init(ctx); + if (fffilter(ctx->filter)->init) + ret = fffilter(ctx->filter)->init(ctx); if (ret < 0) return ret; @@ -1421,14 +1422,14 @@ static int filter_activate_default(AVFilterContext *filter) int ff_filter_activate(AVFilterContext *filter) { FFFilterContext *ctxi = fffilterctx(filter); + const FFFilter *const fi = fffilter(filter->filter); int ret; /* Generic timeline support is not yet implemented but should be easy */ - av_assert1(!(filter->filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC && - filter->filter->activate)); + av_assert1(!(fi->p.flags & AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC && + fi->activate)); ctxi->ready = 0; - ret = filter->filter->activate ? filter->filter->activate(filter) : - filter_activate_default(filter); + ret = fi->activate ? fi->activate(filter) : filter_activate_default(filter); if (ret == FFERROR_NOT_READY) ret = 0; return ret; diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index b88b31a834..9f349b1b45 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -43,7 +43,6 @@ #include "libavutil/dict.h" #include "libavutil/frame.h" #include "libavutil/log.h" -#include "libavutil/samplefmt.h" #include "libavutil/pixfmt.h" #include "libavutil/rational.h" @@ -70,7 +69,6 @@ const char *avfilter_configuration(void); */ const char *avfilter_license(void); -typedef struct AVFilterContext AVFilterContext; typedef struct AVFilterLink AVFilterLink; typedef struct AVFilterPad AVFilterPad; typedef struct AVFilterFormats AVFilterFormats; @@ -243,204 +241,6 @@ typedef struct AVFilter { * A combination of AVFILTER_FLAG_* */ int flags; - - /***************************************************************** - * All fields below this line are not part of the public API. They - * may not be used outside of libavfilter and can be changed and - * removed at will. - * New public fields should be added right above. - ***************************************************************** - */ - - /** - * The number of entries in the list of inputs. - */ - uint8_t nb_inputs; - - /** - * The number of entries in the list of outputs. - */ - uint8_t nb_outputs; - - /** - * This field determines the state of the formats union. - * It is an enum FilterFormatsState value. - */ - uint8_t formats_state; - - /** - * Filter pre-initialization function - * - * This callback will be called immediately after the filter context is - * allocated, to allow allocating and initing sub-objects. - * - * If this callback is not NULL, the uninit callback will be called on - * allocation failure. - * - * @return 0 on success, - * AVERROR code on failure (but the code will be - * dropped and treated as ENOMEM by the calling code) - */ - int (*preinit)(AVFilterContext *ctx); - - /** - * Filter initialization function. - * - * This callback will be called only once during the filter lifetime, after - * all the options have been set, but before links between filters are - * established and format negotiation is done. - * - * Basic filter initialization should be done here. Filters with dynamic - * inputs and/or outputs should create those inputs/outputs here based on - * provided options. No more changes to this filter's inputs/outputs can be - * done after this callback. - * - * This callback must not assume that the filter links exist or frame - * parameters are known. - * - * @ref AVFilter.uninit "uninit" is guaranteed to be called even if - * initialization fails, so this callback does not have to clean up on - * failure. - * - * @return 0 on success, a negative AVERROR on failure - */ - int (*init)(AVFilterContext *ctx); - - /** - * Filter uninitialization function. - * - * Called only once right before the filter is freed. Should deallocate any - * memory held by the filter, release any buffer references, etc. It does - * not need to deallocate the AVFilterContext.priv memory itself. - * - * This callback may be called even if @ref AVFilter.init "init" was not - * called or failed, so it must be prepared to handle such a situation. - */ - void (*uninit)(AVFilterContext *ctx); - - /** - * The state of the following union is determined by formats_state. - * See the documentation of enum FilterFormatsState in internal.h. - */ - union { - /** - * Query formats supported by the filter on its inputs and outputs. - * - * This callback is called after the filter is initialized (so the inputs - * and outputs are fixed), shortly before the format negotiation. This - * callback may be called more than once. - * - * This callback must set ::AVFilterLink's - * @ref AVFilterFormatsConfig.formats "outcfg.formats" - * on every input link and - * @ref AVFilterFormatsConfig.formats "incfg.formats" - * on every output link to a list of pixel/sample formats that the filter - * supports on that link. - * For video links, this filter may also set - * @ref AVFilterFormatsConfig.color_spaces "incfg.color_spaces" - * / - * @ref AVFilterFormatsConfig.color_spaces "outcfg.color_spaces" - * and @ref AVFilterFormatsConfig.color_ranges "incfg.color_ranges" - * / - * @ref AVFilterFormatsConfig.color_ranges "outcfg.color_ranges" - * analogously. - * For audio links, this filter must also set - * @ref AVFilterFormatsConfig.samplerates "incfg.samplerates" - * / - * @ref AVFilterFormatsConfig.samplerates "outcfg.samplerates" - * and @ref AVFilterFormatsConfig.channel_layouts "incfg.channel_layouts" - * / - * @ref AVFilterFormatsConfig.channel_layouts "outcfg.channel_layouts" - * analogously. - * - * This callback must never be NULL if the union is in this state. - * - * @return zero on success, a negative value corresponding to an - * AVERROR code otherwise - */ - int (*query_func)(AVFilterContext *); - - /** - * Same as query_func(), except this function writes the results into - * provided arrays. - * - * @param cfg_in array of input format configurations with as many - * members as the filters has inputs (NULL when there are - * no inputs); - * @param cfg_out array of output format configurations with as many - * members as the filters has outputs (NULL when there - * are no outputs); - */ - int (*query_func2)(const AVFilterContext *, - struct AVFilterFormatsConfig **cfg_in, - struct AVFilterFormatsConfig **cfg_out); - /** - * A pointer to an array of admissible pixel formats delimited - * by AV_PIX_FMT_NONE. The generic code will use this list - * to indicate that this filter supports each of these pixel formats, - * provided that all inputs and outputs use the same pixel format. - * - * In addition to that the generic code will mark all inputs - * and all outputs as supporting all color spaces and ranges, as - * long as all inputs and outputs use the same color space/range. - * - * This list must never be NULL if the union is in this state. - * The type of all inputs and outputs of filters using this must - * be AVMEDIA_TYPE_VIDEO. - */ - const enum AVPixelFormat *pixels_list; - /** - * Analogous to pixels, but delimited by AV_SAMPLE_FMT_NONE - * and restricted to filters that only have AVMEDIA_TYPE_AUDIO - * inputs and outputs. - * - * In addition to that the generic code will mark all inputs - * and all outputs as supporting all sample rates and every - * channel count and channel layout, as long as all inputs - * and outputs use the same sample rate and channel count/layout. - */ - const enum AVSampleFormat *samples_list; - /** - * Equivalent to { pix_fmt, AV_PIX_FMT_NONE } as pixels_list. - */ - enum AVPixelFormat pix_fmt; - /** - * Equivalent to { sample_fmt, AV_SAMPLE_FMT_NONE } as samples_list. - */ - enum AVSampleFormat sample_fmt; - } formats; - - int priv_size; ///< size of private data to allocate for the filter - - int flags_internal; ///< Additional flags for avfilter internal use only. - - /** - * Make the filter instance process a command. - * - * @param cmd the command to process, for handling simplicity all commands must be alphanumeric only - * @param arg the argument for the command - * @param res a buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported. - * @param flags if AVFILTER_CMD_FLAG_FAST is set and the command would be - * time consuming then a filter should treat it like an unsupported command - * - * @returns >=0 on success otherwise an error code. - * AVERROR(ENOSYS) on unsupported commands - */ - int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags); - - /** - * Filter activation function. - * - * Called when any processing is needed from the filter, instead of any - * filter_frame and request_frame on pads. - * - * The function must examine inlinks and outlinks and perform a single - * step of processing. If there is nothing to do, the function must do - * nothing and not return an error. If more steps are or may be - * possible, it must use ff_filter_set_ready() to schedule another - * activation. - */ - int (*activate)(AVFilterContext *ctx); } AVFilter; /** @@ -454,7 +254,7 @@ unsigned avfilter_filter_pad_count(const AVFilter *filter, int is_output); #define AVFILTER_THREAD_SLICE (1 << 0) /** An instance of a filter */ -struct AVFilterContext { +typedef struct AVFilterContext { const AVClass *av_class; ///< needed for av_log() and filters common options const AVFilter *filter; ///< the AVFilter of which this is an instance @@ -561,7 +361,7 @@ struct AVFilterContext { * configured. */ int extra_hw_frames; -}; +} AVFilterContext; /** * A link between two filters. This contains pointers to the source and diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index c6472876bf..5e93f93aab 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -343,16 +343,17 @@ static int filter_check_formats(AVFilterContext *ctx) static int filter_query_formats(AVFilterContext *ctx) { + const FFFilter *const filter = fffilter(ctx->filter); int ret; - if (ctx->filter->formats_state == FF_FILTER_FORMATS_QUERY_FUNC) { - if ((ret = ctx->filter->formats.query_func(ctx)) < 0) { + if (filter->formats_state == FF_FILTER_FORMATS_QUERY_FUNC) { + if ((ret = filter->formats.query_func(ctx)) < 0) { if (ret != AVERROR(EAGAIN)) av_log(ctx, AV_LOG_ERROR, "Query format failed for '%s': %s\n", ctx->name, av_err2str(ret)); return ret; } - } else if (ctx->filter->formats_state == FF_FILTER_FORMATS_QUERY_FUNC2) { + } else if (filter->formats_state == FF_FILTER_FORMATS_QUERY_FUNC2) { AVFilterFormatsConfig *cfg_in_stack[64], *cfg_out_stack[64]; AVFilterFormatsConfig **cfg_in_dyn = NULL, **cfg_out_dyn = NULL; AVFilterFormatsConfig **cfg_in, **cfg_out; @@ -385,7 +386,7 @@ static int filter_query_formats(AVFilterContext *ctx) cfg_out[i] = &l->incfg; } - ret = ctx->filter->formats.query_func2(ctx, cfg_in, cfg_out); + ret = filter->formats.query_func2(ctx, cfg_in, cfg_out); av_freep(&cfg_in_dyn); av_freep(&cfg_out_dyn); if (ret < 0) { @@ -396,8 +397,8 @@ static int filter_query_formats(AVFilterContext *ctx) } } - if (ctx->filter->formats_state == FF_FILTER_FORMATS_QUERY_FUNC || - ctx->filter->formats_state == FF_FILTER_FORMATS_QUERY_FUNC2) { + if (filter->formats_state == FF_FILTER_FORMATS_QUERY_FUNC || + filter->formats_state == FF_FILTER_FORMATS_QUERY_FUNC2) { ret = filter_check_formats(ctx); if (ret < 0) return ret; @@ -1433,7 +1434,7 @@ int avfilter_graph_request_oldest(AVFilterGraph *graph) while (graphi->sink_links_count) { oldesti = graphi->sink_links[0]; oldest = &oldesti->l.pub; - if (oldest->dst->filter->activate) { + if (fffilter(oldest->dst->filter)->activate) { r = av_buffersink_get_frame_flags(oldest->dst, NULL, AV_BUFFERSINK_FLAG_PEEK); if (r != AVERROR_EOF) @@ -1454,7 +1455,7 @@ int avfilter_graph_request_oldest(AVFilterGraph *graph) } if (!graphi->sink_links_count) return AVERROR_EOF; - av_assert1(!oldest->dst->filter->activate); + av_assert1(!fffilter(oldest->dst->filter)->activate); av_assert1(oldesti->age_index >= 0); frame_count = oldesti->l.frame_count_out; while (frame_count == oldesti->l.frame_count_out) { diff --git a/libavfilter/buffersink.c b/libavfilter/buffersink.c index 565d084ddf..7cdda8bfb0 100644 --- a/libavfilter/buffersink.c +++ b/libavfilter/buffersink.c @@ -315,7 +315,7 @@ void av_buffersink_set_frame_size(AVFilterContext *ctx, unsigned frame_size) #define MAKE_AVFILTERLINK_ACCESSOR(type, field) \ type av_buffersink_get_##field(const AVFilterContext *ctx) { \ - av_assert0(ctx->filter->activate == activate); \ + av_assert0(fffilter(ctx->filter)->activate == activate); \ return ctx->inputs[0]->field; \ } @@ -334,20 +334,20 @@ MAKE_AVFILTERLINK_ACCESSOR(int , sample_rate ) AVRational av_buffersink_get_frame_rate(const AVFilterContext *ctx) { FilterLink *l = ff_filter_link(ctx->inputs[0]); - av_assert0(ctx->filter->activate == activate); + av_assert0(fffilter(ctx->filter)->activate == activate); return l->frame_rate; } AVBufferRef* av_buffersink_get_hw_frames_ctx(const AVFilterContext *ctx) { FilterLink *l = ff_filter_link(ctx->inputs[0]); - av_assert0(ctx->filter->activate == activate); + av_assert0(fffilter(ctx->filter)->activate == activate); return l->hw_frames_ctx; } int av_buffersink_get_channels(const AVFilterContext *ctx) { - av_assert0(ctx->filter->activate == activate); + av_assert0(fffilter(ctx->filter)->activate == activate); return ctx->inputs[0]->ch_layout.nb_channels; } @@ -356,7 +356,7 @@ int av_buffersink_get_ch_layout(const AVFilterContext *ctx, AVChannelLayout *out AVChannelLayout ch_layout = { 0 }; int ret; - av_assert0(ctx->filter->activate == activate); + av_assert0(fffilter(ctx->filter)->activate == activate); ret = av_channel_layout_copy(&ch_layout, &ctx->inputs[0]->ch_layout); if (ret < 0) return ret; @@ -528,16 +528,16 @@ static const AVOption abuffersink_options[] = { AVFILTER_DEFINE_CLASS(buffersink); AVFILTER_DEFINE_CLASS(abuffersink); -const AVFilter ff_vsink_buffer = { - .name = "buffersink", - .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them available to the end of the filter graph."), +const FFFilter ff_vsink_buffer = { + .p.name = "buffersink", + .p.description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them available to the end of the filter graph."), + .p.priv_class = &buffersink_class, + .p.outputs = NULL, .priv_size = sizeof(BufferSinkContext), - .priv_class = &buffersink_class, .init = init_video, .uninit = uninit, .activate = activate, FILTER_INPUTS(ff_video_default_filterpad), - .outputs = NULL, FILTER_QUERY_FUNC2(vsink_query_formats), }; @@ -549,15 +549,15 @@ static const AVFilterPad inputs_audio[] = { }, }; -const AVFilter ff_asink_abuffer = { - .name = "abuffersink", - .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them available to the end of the filter graph."), - .priv_class = &abuffersink_class, +const FFFilter ff_asink_abuffer = { + .p.name = "abuffersink", + .p.description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them available to the end of the filter graph."), + .p.priv_class = &abuffersink_class, + .p.outputs = NULL, .priv_size = sizeof(BufferSinkContext), .init = init_audio, .uninit = uninit, .activate = activate, FILTER_INPUTS(inputs_audio), - .outputs = NULL, FILTER_QUERY_FUNC2(asink_query_formats), }; diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 117ac0cfa2..cb1e9c8d6f 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -554,18 +554,17 @@ static const AVFilterPad avfilter_vsrc_buffer_outputs[] = { }, }; -const AVFilter ff_vsrc_buffer = { - .name = "buffer", - .description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."), +const FFFilter ff_vsrc_buffer = { + .p.name = "buffer", + .p.description = NULL_IF_CONFIG_SMALL("Buffer video frames, and make them accessible to the filterchain."), + .p.priv_class = &buffer_class, .priv_size = sizeof(BufferSourceContext), .activate = activate, .init = init_video, .uninit = uninit, - .inputs = NULL, FILTER_OUTPUTS(avfilter_vsrc_buffer_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &buffer_class, }; static const AVFilterPad avfilter_asrc_abuffer_outputs[] = { @@ -576,16 +575,15 @@ static const AVFilterPad avfilter_asrc_abuffer_outputs[] = { }, }; -const AVFilter ff_asrc_abuffer = { - .name = "abuffer", - .description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."), +const FFFilter ff_asrc_abuffer = { + .p.name = "abuffer", + .p.description = NULL_IF_CONFIG_SMALL("Buffer audio frames, and make them accessible to the filterchain."), + .p.priv_class = &abuffer_class, .priv_size = sizeof(BufferSourceContext), .activate = activate, .init = init_audio, .uninit = uninit, - .inputs = NULL, FILTER_OUTPUTS(avfilter_asrc_abuffer_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &abuffer_class, }; diff --git a/libavfilter/f_bench.c b/libavfilter/f_bench.c index 3f1fa23ae4..9898e94c76 100644 --- a/libavfilter/f_bench.c +++ b/libavfilter/f_bench.c @@ -101,15 +101,15 @@ static const AVFilterPad bench_inputs[] = { }, }; -const AVFilter ff_vf_bench = { - .name = "bench", - .description = NULL_IF_CONFIG_SMALL("Benchmark part of a filtergraph."), +const FFFilter ff_vf_bench = { + .p.name = "bench", + .p.description = NULL_IF_CONFIG_SMALL("Benchmark part of a filtergraph."), + .p.priv_class = &bench_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(BenchContext), .init = init, FILTER_INPUTS(bench_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .priv_class = &bench_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_BENCH_FILTER */ @@ -125,14 +125,14 @@ static const AVFilterPad abench_inputs[] = { }, }; -const AVFilter ff_af_abench = { - .name = "abench", - .description = NULL_IF_CONFIG_SMALL("Benchmark part of a filtergraph."), +const FFFilter ff_af_abench = { + .p.name = "abench", + .p.description = NULL_IF_CONFIG_SMALL("Benchmark part of a filtergraph."), + .p.priv_class = &abench_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(BenchContext), .init = init, FILTER_INPUTS(abench_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), - .priv_class = &abench_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_ABENCH_FILTER */ diff --git a/libavfilter/f_cue.c b/libavfilter/f_cue.c index 38500bb515..63027c7c2e 100644 --- a/libavfilter/f_cue.c +++ b/libavfilter/f_cue.c @@ -100,10 +100,10 @@ static const AVOption options[] = { AVFILTER_DEFINE_CLASS_EXT(cue_acue, "(a)cue", options); #if CONFIG_CUE_FILTER -const AVFilter ff_vf_cue = { - .name = "cue", - .description = NULL_IF_CONFIG_SMALL("Delay filtering to match a cue."), - .priv_class = &cue_acue_class, +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, .priv_size = sizeof(CueContext), FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(ff_video_default_filterpad), @@ -112,12 +112,12 @@ const AVFilter ff_vf_cue = { #endif /* CONFIG_CUE_FILTER */ #if CONFIG_ACUE_FILTER -const AVFilter ff_af_acue = { - .name = "acue", - .description = NULL_IF_CONFIG_SMALL("Delay filtering to match a cue."), - .priv_class = &cue_acue_class, +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.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(CueContext), - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(ff_audio_default_filterpad), .activate = activate, diff --git a/libavfilter/f_drawgraph.c b/libavfilter/f_drawgraph.c index 24288a1175..f781e8c2fe 100644 --- a/libavfilter/f_drawgraph.c +++ b/libavfilter/f_drawgraph.c @@ -474,11 +474,11 @@ static const AVFilterPad drawgraph_inputs[] = { }, }; -const AVFilter ff_vf_drawgraph = { - .name = "drawgraph", - .description = NULL_IF_CONFIG_SMALL("Draw a graph using input video metadata."), +const FFFilter ff_vf_drawgraph = { + .p.name = "drawgraph", + .p.description = NULL_IF_CONFIG_SMALL("Draw a graph using input video metadata."), + .p.priv_class = &drawgraph_class, .priv_size = sizeof(DrawGraphContext), - .priv_class = &drawgraph_class, .init = init, .uninit = uninit, FILTER_INPUTS(drawgraph_inputs), @@ -498,10 +498,10 @@ static const AVFilterPad adrawgraph_inputs[] = { }, }; -const AVFilter ff_avf_adrawgraph = { - .name = "adrawgraph", - .description = NULL_IF_CONFIG_SMALL("Draw a graph using input audio metadata."), - .priv_class = &drawgraph_class, +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, .priv_size = sizeof(DrawGraphContext), .init = init, .uninit = uninit, diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c index 8760c74f78..768f062bac 100644 --- a/libavfilter/f_ebur128.c +++ b/libavfilter/f_ebur128.c @@ -1109,16 +1109,16 @@ static const AVFilterPad ebur128_inputs[] = { }, }; -const AVFilter ff_af_ebur128 = { - .name = "ebur128", - .description = NULL_IF_CONFIG_SMALL("EBU R128 scanner."), +const FFFilter ff_af_ebur128 = { + .p.name = "ebur128", + .p.description = NULL_IF_CONFIG_SMALL("EBU R128 scanner."), + .p.outputs = NULL, + .p.priv_class = &ebur128_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, .priv_size = sizeof(EBUR128Context), .init = init, .uninit = uninit, .activate = activate, FILTER_INPUTS(ebur128_inputs), - .outputs = NULL, FILTER_QUERY_FUNC2(query_formats), - .priv_class = &ebur128_class, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; diff --git a/libavfilter/f_graphmonitor.c b/libavfilter/f_graphmonitor.c index 453d1e82de..de9946586c 100644 --- a/libavfilter/f_graphmonitor.c +++ b/libavfilter/f_graphmonitor.c @@ -578,11 +578,11 @@ static const AVFilterPad graphmonitor_outputs[] = { #if CONFIG_GRAPHMONITOR_FILTER -const AVFilter ff_vf_graphmonitor = { - .name = "graphmonitor", - .description = NULL_IF_CONFIG_SMALL("Show various filtergraph stats."), +const FFFilter ff_vf_graphmonitor = { + .p.name = "graphmonitor", + .p.description = NULL_IF_CONFIG_SMALL("Show various filtergraph stats."), + .p.priv_class = &graphmonitor_class, .priv_size = sizeof(GraphMonitorContext), - .priv_class = &graphmonitor_class, .init = init, .uninit = uninit, .activate = activate, @@ -596,10 +596,10 @@ const AVFilter ff_vf_graphmonitor = { #if CONFIG_AGRAPHMONITOR_FILTER -const AVFilter ff_avf_agraphmonitor = { - .name = "agraphmonitor", - .description = NULL_IF_CONFIG_SMALL("Show various filtergraph stats."), - .priv_class = &graphmonitor_class, +const FFFilter ff_avf_agraphmonitor = { + .p.name = "agraphmonitor", + .p.description = NULL_IF_CONFIG_SMALL("Show various filtergraph stats."), + .p.priv_class = &graphmonitor_class, .priv_size = sizeof(GraphMonitorContext), .init = init, .uninit = uninit, diff --git a/libavfilter/f_interleave.c b/libavfilter/f_interleave.c index 1bfd002ba0..31e903e6b0 100644 --- a/libavfilter/f_interleave.c +++ b/libavfilter/f_interleave.c @@ -230,15 +230,15 @@ static const AVFilterPad interleave_outputs[] = { }, }; -const AVFilter ff_vf_interleave = { - .name = "interleave", - .description = NULL_IF_CONFIG_SMALL("Temporally interleave video inputs."), +const FFFilter ff_vf_interleave = { + .p.name = "interleave", + .p.description = NULL_IF_CONFIG_SMALL("Temporally interleave video inputs."), + .p.priv_class = &interleave_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(InterleaveContext), .init = init, .activate = activate, FILTER_OUTPUTS(interleave_outputs), - .priv_class = &interleave_class, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; #endif @@ -256,15 +256,15 @@ static const AVFilterPad ainterleave_outputs[] = { }, }; -const AVFilter ff_af_ainterleave = { - .name = "ainterleave", - .description = NULL_IF_CONFIG_SMALL("Temporally interleave audio inputs."), +const FFFilter ff_af_ainterleave = { + .p.name = "ainterleave", + .p.description = NULL_IF_CONFIG_SMALL("Temporally interleave audio inputs."), + .p.priv_class = &ainterleave_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(InterleaveContext), .init = init, .activate = activate, FILTER_OUTPUTS(ainterleave_outputs), - .priv_class = &ainterleave_class, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; #endif diff --git a/libavfilter/f_latency.c b/libavfilter/f_latency.c index 85bdc4a1f6..00b55ddb4b 100644 --- a/libavfilter/f_latency.c +++ b/libavfilter/f_latency.c @@ -100,15 +100,15 @@ static av_cold void uninit(AVFilterContext *ctx) #if CONFIG_LATENCY_FILTER -const AVFilter ff_vf_latency = { - .name = "latency", - .description = NULL_IF_CONFIG_SMALL("Report video filtering latency."), +const FFFilter ff_vf_latency = { + .p.name = "latency", + .p.description = NULL_IF_CONFIG_SMALL("Report video filtering latency."), + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(LatencyContext), .init = init, .uninit = uninit, .activate = activate, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(ff_video_default_filterpad), }; @@ -117,14 +117,14 @@ const AVFilter ff_vf_latency = { #if CONFIG_ALATENCY_FILTER -const AVFilter ff_af_alatency = { - .name = "alatency", - .description = NULL_IF_CONFIG_SMALL("Report audio filtering latency."), +const FFFilter ff_af_alatency = { + .p.name = "alatency", + .p.description = NULL_IF_CONFIG_SMALL("Report audio filtering latency."), + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(LatencyContext), .init = init, .uninit = uninit, .activate = activate, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(ff_audio_default_filterpad), }; diff --git a/libavfilter/f_loop.c b/libavfilter/f_loop.c index 4e5e8d0e79..1984fad70d 100644 --- a/libavfilter/f_loop.c +++ b/libavfilter/f_loop.c @@ -284,11 +284,11 @@ static const AVFilterPad ainputs[] = { }, }; -const AVFilter ff_af_aloop = { - .name = "aloop", - .description = NULL_IF_CONFIG_SMALL("Loop audio samples."), +const FFFilter ff_af_aloop = { + .p.name = "aloop", + .p.description = NULL_IF_CONFIG_SMALL("Loop audio samples."), + .p.priv_class = &aloop_class, .priv_size = sizeof(LoopContext), - .priv_class = &aloop_class, .activate = aactivate, .uninit = auninit, FILTER_INPUTS(ainputs), @@ -456,11 +456,11 @@ static const AVOption loop_options[] = { AVFILTER_DEFINE_CLASS(loop); -const AVFilter ff_vf_loop = { - .name = "loop", - .description = NULL_IF_CONFIG_SMALL("Loop video frames."), +const FFFilter ff_vf_loop = { + .p.name = "loop", + .p.description = NULL_IF_CONFIG_SMALL("Loop video frames."), + .p.priv_class = &loop_class, .priv_size = sizeof(LoopContext), - .priv_class = &loop_class, .init = init, .uninit = uninit, .activate = activate, diff --git a/libavfilter/f_metadata.c b/libavfilter/f_metadata.c index abdfb1802b..f4e4aa312d 100644 --- a/libavfilter/f_metadata.c +++ b/libavfilter/f_metadata.c @@ -375,17 +375,17 @@ static const AVFilterPad ainputs[] = { }, }; -const AVFilter ff_af_ametadata = { - .name = "ametadata", - .description = NULL_IF_CONFIG_SMALL("Manipulate audio frame metadata."), +const FFFilter ff_af_ametadata = { + .p.name = "ametadata", + .p.description = NULL_IF_CONFIG_SMALL("Manipulate audio frame metadata."), + .p.priv_class = &ametadata_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(MetadataContext), - .priv_class = &ametadata_class, .init = init, .uninit = uninit, FILTER_INPUTS(ainputs), FILTER_OUTPUTS(ff_audio_default_filterpad), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_AMETADATA_FILTER */ @@ -402,16 +402,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_metadata = { - .name = "metadata", - .description = NULL_IF_CONFIG_SMALL("Manipulate video frame metadata."), +const FFFilter ff_vf_metadata = { + .p.name = "metadata", + .p.description = NULL_IF_CONFIG_SMALL("Manipulate video frame metadata."), + .p.priv_class = &metadata_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(MetadataContext), - .priv_class = &metadata_class, .init = init, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_METADATA_FILTER */ diff --git a/libavfilter/f_perms.c b/libavfilter/f_perms.c index 0e8c208272..28d32e6b94 100644 --- a/libavfilter/f_perms.c +++ b/libavfilter/f_perms.c @@ -125,16 +125,16 @@ static const AVFilterPad aperms_inputs[] = { }, }; -const AVFilter ff_af_aperms = { - .name = "aperms", - .description = NULL_IF_CONFIG_SMALL("Set permissions for the output audio frame."), - .priv_class = &perms_class, +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.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, .init = init, .priv_size = sizeof(PermsContext), FILTER_INPUTS(aperms_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_METADATA_ONLY, .process_command = ff_filter_process_command, }; #endif /* CONFIG_APERMS_FILTER */ @@ -149,16 +149,16 @@ static const AVFilterPad perms_inputs[] = { }, }; -const AVFilter ff_vf_perms = { - .name = "perms", - .description = NULL_IF_CONFIG_SMALL("Set permissions for the output video frame."), +const FFFilter ff_vf_perms = { + .p.name = "perms", + .p.description = NULL_IF_CONFIG_SMALL("Set permissions for the output video frame."), + .p.priv_class = &perms_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, .init = init, .priv_size = sizeof(PermsContext), FILTER_INPUTS(perms_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .priv_class = &perms_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_METADATA_ONLY, .process_command = ff_filter_process_command, }; #endif /* CONFIG_PERMS_FILTER */ diff --git a/libavfilter/f_realtime.c b/libavfilter/f_realtime.c index d85bef571e..e142e0ca57 100644 --- a/libavfilter/f_realtime.c +++ b/libavfilter/f_realtime.c @@ -87,12 +87,12 @@ static const AVFilterPad avfilter_vf_realtime_inputs[] = { }, }; -const AVFilter ff_vf_realtime = { - .name = "realtime", - .description = NULL_IF_CONFIG_SMALL("Slow down filtering to match realtime."), +const FFFilter ff_vf_realtime = { + .p.name = "realtime", + .p.description = NULL_IF_CONFIG_SMALL("Slow down filtering to match realtime."), + .p.priv_class = &realtime_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(RealtimeContext), - .priv_class = &realtime_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_realtime_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), .process_command = ff_filter_process_command, @@ -109,12 +109,12 @@ static const AVFilterPad arealtime_inputs[] = { }, }; -const AVFilter ff_af_arealtime = { - .name = "arealtime", - .description = NULL_IF_CONFIG_SMALL("Slow down filtering to match realtime."), - .priv_class = &realtime_class, +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.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(RealtimeContext), - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(arealtime_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), .process_command = ff_filter_process_command, diff --git a/libavfilter/f_reverse.c b/libavfilter/f_reverse.c index a939ca751d..4bd963288f 100644 --- a/libavfilter/f_reverse.c +++ b/libavfilter/f_reverse.c @@ -147,9 +147,9 @@ static const AVFilterPad reverse_outputs[] = { }, }; -const AVFilter ff_vf_reverse = { - .name = "reverse", - .description = NULL_IF_CONFIG_SMALL("Reverse a clip."), +const FFFilter ff_vf_reverse = { + .p.name = "reverse", + .p.description = NULL_IF_CONFIG_SMALL("Reverse a clip."), .priv_size = sizeof(ReverseContext), .init = init, .uninit = uninit, @@ -299,9 +299,9 @@ static const AVFilterPad areverse_outputs[] = { }, }; -const AVFilter ff_af_areverse = { - .name = "areverse", - .description = NULL_IF_CONFIG_SMALL("Reverse an audio clip."), +const FFFilter ff_af_areverse = { + .p.name = "areverse", + .p.description = NULL_IF_CONFIG_SMALL("Reverse an audio clip."), .priv_size = sizeof(ReverseContext), .init = init, .uninit = uninit, diff --git a/libavfilter/f_segment.c b/libavfilter/f_segment.c index 4bcda427a0..ece53ae56d 100644 --- a/libavfilter/f_segment.c +++ b/libavfilter/f_segment.c @@ -289,17 +289,16 @@ static const AVFilterPad segment_inputs[] = { }, }; -const AVFilter ff_vf_segment = { - .name = "segment", - .description = NULL_IF_CONFIG_SMALL("Segment video stream."), +const FFFilter ff_vf_segment = { + .p.name = "segment", + .p.description = NULL_IF_CONFIG_SMALL("Segment video stream."), + .p.priv_class = &segment_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, .init = video_init, .uninit = uninit, .priv_size = sizeof(SegmentContext), - .priv_class = &segment_class, .activate = activate, FILTER_INPUTS(segment_inputs), - .outputs = NULL, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, }; #endif // CONFIG_SEGMENT_FILTER @@ -328,16 +327,15 @@ static const AVFilterPad asegment_inputs[] = { }, }; -const AVFilter ff_af_asegment = { - .name = "asegment", - .description = NULL_IF_CONFIG_SMALL("Segment audio stream."), +const FFFilter ff_af_asegment = { + .p.name = "asegment", + .p.description = NULL_IF_CONFIG_SMALL("Segment audio stream."), + .p.priv_class = &asegment_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, .init = audio_init, .uninit = uninit, .priv_size = sizeof(SegmentContext), - .priv_class = &asegment_class, .activate = activate, FILTER_INPUTS(asegment_inputs), - .outputs = NULL, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, }; #endif // CONFIG_ASEGMENT_FILTER diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 744fef6906..1f2a9a59fc 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -501,15 +501,15 @@ static const AVFilterPad avfilter_af_aselect_inputs[] = { }, }; -const AVFilter ff_af_aselect = { - .name = "aselect", - .description = NULL_IF_CONFIG_SMALL("Select audio frames to pass in output."), +const FFFilter ff_af_aselect = { + .p.name = "aselect", + .p.description = NULL_IF_CONFIG_SMALL("Select audio frames to pass in output."), + .p.priv_class = &aselect_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, .init = aselect_init, .uninit = uninit, .priv_size = sizeof(SelectContext), FILTER_INPUTS(avfilter_af_aselect_inputs), - .priv_class = &aselect_class, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; #endif /* CONFIG_ASELECT_FILTER */ @@ -557,15 +557,15 @@ static const AVFilterPad avfilter_vf_select_inputs[] = { }, }; -const AVFilter ff_vf_select = { - .name = "select", - .description = NULL_IF_CONFIG_SMALL("Select video frames to pass in output."), +const FFFilter ff_vf_select = { + .p.name = "select", + .p.description = NULL_IF_CONFIG_SMALL("Select video frames to pass in output."), + .p.priv_class = &select_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, .init = select_init, .uninit = uninit, .priv_size = sizeof(SelectContext), - .priv_class = &select_class, FILTER_INPUTS(avfilter_vf_select_inputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_SELECT_FILTER */ diff --git a/libavfilter/f_sendcmd.c b/libavfilter/f_sendcmd.c index f895271629..d5d72e6410 100644 --- a/libavfilter/f_sendcmd.c +++ b/libavfilter/f_sendcmd.c @@ -602,16 +602,16 @@ static const AVFilterPad sendcmd_inputs[] = { }, }; -const AVFilter ff_vf_sendcmd = { - .name = "sendcmd", - .description = NULL_IF_CONFIG_SMALL("Send commands to filters."), +const FFFilter ff_vf_sendcmd = { + .p.name = "sendcmd", + .p.description = NULL_IF_CONFIG_SMALL("Send commands to filters."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, + .p.priv_class = &sendcmd_class, .init = init, .uninit = uninit, .priv_size = sizeof(SendCmdContext), - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(sendcmd_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .priv_class = &sendcmd_class, }; #endif @@ -626,14 +626,14 @@ static const AVFilterPad asendcmd_inputs[] = { }, }; -const AVFilter ff_af_asendcmd = { - .name = "asendcmd", - .description = NULL_IF_CONFIG_SMALL("Send commands to filters."), - .priv_class = &sendcmd_class, +const FFFilter ff_af_asendcmd = { + .p.name = "asendcmd", + .p.description = NULL_IF_CONFIG_SMALL("Send commands to filters."), + .p.priv_class = &sendcmd_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .init = init, .uninit = uninit, .priv_size = sizeof(SendCmdContext), - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(asendcmd_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), }; diff --git a/libavfilter/f_sidedata.c b/libavfilter/f_sidedata.c index 23dffec803..b88a8cbd02 100644 --- a/libavfilter/f_sidedata.c +++ b/libavfilter/f_sidedata.c @@ -143,16 +143,16 @@ static const AVFilterPad ainputs[] = { }, }; -const AVFilter ff_af_asidedata = { - .name = "asidedata", - .description = NULL_IF_CONFIG_SMALL("Manipulate audio frame side data."), +const FFFilter ff_af_asidedata = { + .p.name = "asidedata", + .p.description = NULL_IF_CONFIG_SMALL("Manipulate audio frame side data."), + .p.priv_class = &asidedata_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SideDataContext), - .priv_class = &asidedata_class, .init = init, FILTER_INPUTS(ainputs), FILTER_OUTPUTS(ff_audio_default_filterpad), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_ASIDEDATA_FILTER */ @@ -169,15 +169,15 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_sidedata = { - .name = "sidedata", - .description = NULL_IF_CONFIG_SMALL("Manipulate video frame side data."), +const FFFilter ff_vf_sidedata = { + .p.name = "sidedata", + .p.description = NULL_IF_CONFIG_SMALL("Manipulate video frame side data."), + .p.priv_class = &sidedata_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SideDataContext), - .priv_class = &sidedata_class, .init = init, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_SIDEDATA_FILTER */ diff --git a/libavfilter/f_streamselect.c b/libavfilter/f_streamselect.c index 2afd22d4a3..7378c9c2fe 100644 --- a/libavfilter/f_streamselect.c +++ b/libavfilter/f_streamselect.c @@ -296,26 +296,26 @@ static av_cold void uninit(AVFilterContext *ctx) ff_framesync_uninit(&s->fs); } -const AVFilter ff_vf_streamselect = { - .name = "streamselect", - .description = NULL_IF_CONFIG_SMALL("Select video streams"), +const FFFilter ff_vf_streamselect = { + .p.name = "streamselect", + .p.description = NULL_IF_CONFIG_SMALL("Select video streams"), + .p.priv_class = &streamselect_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_DYNAMIC_OUTPUTS, .init = init, .process_command = process_command, .uninit = uninit, .activate = activate, .priv_size = sizeof(StreamSelectContext), - .priv_class = &streamselect_class, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; -const AVFilter ff_af_astreamselect = { - .name = "astreamselect", - .description = NULL_IF_CONFIG_SMALL("Select audio streams"), - .priv_class = &streamselect_class, +const FFFilter ff_af_astreamselect = { + .p.name = "astreamselect", + .p.description = NULL_IF_CONFIG_SMALL("Select audio streams"), + .p.priv_class = &streamselect_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_DYNAMIC_OUTPUTS, .init = init, .process_command = process_command, .uninit = uninit, .activate = activate, .priv_size = sizeof(StreamSelectContext), - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; diff --git a/libavfilter/f_zmq.c b/libavfilter/f_zmq.c index 84acc75ef2..253e1d9cc0 100644 --- a/libavfilter/f_zmq.c +++ b/libavfilter/f_zmq.c @@ -217,15 +217,15 @@ static const AVFilterPad zmq_inputs[] = { }, }; -const AVFilter ff_vf_zmq = { - .name = "zmq", - .description = NULL_IF_CONFIG_SMALL("Receive commands through ZMQ and broker them to filters."), +const FFFilter ff_vf_zmq = { + .p.name = "zmq", + .p.description = NULL_IF_CONFIG_SMALL("Receive commands through ZMQ and broker them to filters."), + .p.priv_class = &zmq_class, .init = init, .uninit = uninit, .priv_size = sizeof(ZMQContext), FILTER_INPUTS(zmq_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .priv_class = &zmq_class, }; #endif @@ -240,10 +240,10 @@ static const AVFilterPad azmq_inputs[] = { }, }; -const AVFilter ff_af_azmq = { - .name = "azmq", - .description = NULL_IF_CONFIG_SMALL("Receive commands through ZMQ and broker them to filters."), - .priv_class = &zmq_class, +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, .init = init, .uninit = uninit, .priv_size = sizeof(ZMQContext), diff --git a/libavfilter/filters.h b/libavfilter/filters.h index fdc7a95cee..654aed5c9e 100644 --- a/libavfilter/filters.h +++ b/libavfilter/filters.h @@ -22,7 +22,7 @@ #define AVFILTER_FILTERS_H /** - * Filters implementation helper functions + * Filters implementation helper functions and internal structures */ #include "avfilter.h" @@ -257,11 +257,214 @@ enum FilterFormatsState { .formats_state = FF_FILTER_FORMATS_SINGLE_SAMPLEFMT #define FILTER_INOUTPADS(inout, array) \ - .inout = array, \ + .p.inout = array, \ .nb_ ## inout = FF_ARRAY_ELEMS(array) #define FILTER_INPUTS(array) FILTER_INOUTPADS(inputs, (array)) #define FILTER_OUTPUTS(array) FILTER_INOUTPADS(outputs, (array)) +typedef struct FFFilter { + /** + * The public AVFilter. See avfilter.h for it. + */ + AVFilter p; + + /** + * The number of entries in the list of inputs. + */ + uint8_t nb_inputs; + + /** + * The number of entries in the list of outputs. + */ + uint8_t nb_outputs; + + /** + * This field determines the state of the formats union. + * It is an enum FilterFormatsState value. + */ + uint8_t formats_state; + + /** + * Filter pre-initialization function + * + * This callback will be called immediately after the filter context is + * allocated, to allow allocating and initing sub-objects. + * + * If this callback is not NULL, the uninit callback will be called on + * allocation failure. + * + * @return 0 on success, + * AVERROR code on failure (but the code will be + * dropped and treated as ENOMEM by the calling code) + */ + int (*preinit)(AVFilterContext *ctx); + + /** + * Filter initialization function. + * + * This callback will be called only once during the filter lifetime, after + * all the options have been set, but before links between filters are + * established and format negotiation is done. + * + * Basic filter initialization should be done here. Filters with dynamic + * inputs and/or outputs should create those inputs/outputs here based on + * provided options. No more changes to this filter's inputs/outputs can be + * done after this callback. + * + * This callback must not assume that the filter links exist or frame + * parameters are known. + * + * @ref AVFilter.uninit "uninit" is guaranteed to be called even if + * initialization fails, so this callback does not have to clean up on + * failure. + * + * @return 0 on success, a negative AVERROR on failure + */ + int (*init)(AVFilterContext *ctx); + + /** + * Filter uninitialization function. + * + * Called only once right before the filter is freed. Should deallocate any + * memory held by the filter, release any buffer references, etc. It does + * not need to deallocate the AVFilterContext.priv memory itself. + * + * This callback may be called even if @ref AVFilter.init "init" was not + * called or failed, so it must be prepared to handle such a situation. + */ + void (*uninit)(AVFilterContext *ctx); + + /** + * The state of the following union is determined by formats_state. + * See the documentation of enum FilterFormatsState in internal.h. + */ + union { + /** + * Query formats supported by the filter on its inputs and outputs. + * + * This callback is called after the filter is initialized (so the inputs + * and outputs are fixed), shortly before the format negotiation. This + * callback may be called more than once. + * + * This callback must set ::AVFilterLink's + * @ref AVFilterFormatsConfig.formats "outcfg.formats" + * on every input link and + * @ref AVFilterFormatsConfig.formats "incfg.formats" + * on every output link to a list of pixel/sample formats that the filter + * supports on that link. + * For video links, this filter may also set + * @ref AVFilterFormatsConfig.color_spaces "incfg.color_spaces" + * / + * @ref AVFilterFormatsConfig.color_spaces "outcfg.color_spaces" + * and @ref AVFilterFormatsConfig.color_ranges "incfg.color_ranges" + * / + * @ref AVFilterFormatsConfig.color_ranges "outcfg.color_ranges" + * analogously. + * For audio links, this filter must also set + * @ref AVFilterFormatsConfig.samplerates "incfg.samplerates" + * / + * @ref AVFilterFormatsConfig.samplerates "outcfg.samplerates" + * and @ref AVFilterFormatsConfig.channel_layouts "incfg.channel_layouts" + * / + * @ref AVFilterFormatsConfig.channel_layouts "outcfg.channel_layouts" + * analogously. + * + * This callback must never be NULL if the union is in this state. + * + * @return zero on success, a negative value corresponding to an + * AVERROR code otherwise + */ + int (*query_func)(AVFilterContext *); + + /** + * Same as query_func(), except this function writes the results into + * provided arrays. + * + * @param cfg_in array of input format configurations with as many + * members as the filters has inputs (NULL when there are + * no inputs); + * @param cfg_out array of output format configurations with as many + * members as the filters has outputs (NULL when there + * are no outputs); + */ + int (*query_func2)(const AVFilterContext *, + struct AVFilterFormatsConfig **cfg_in, + struct AVFilterFormatsConfig **cfg_out); + /** + * A pointer to an array of admissible pixel formats delimited + * by AV_PIX_FMT_NONE. The generic code will use this list + * to indicate that this filter supports each of these pixel formats, + * provided that all inputs and outputs use the same pixel format. + * + * In addition to that the generic code will mark all inputs + * and all outputs as supporting all color spaces and ranges, as + * long as all inputs and outputs use the same color space/range. + * + * This list must never be NULL if the union is in this state. + * The type of all inputs and outputs of filters using this must + * be AVMEDIA_TYPE_VIDEO. + */ + const enum AVPixelFormat *pixels_list; + /** + * Analogous to pixels, but delimited by AV_SAMPLE_FMT_NONE + * and restricted to filters that only have AVMEDIA_TYPE_AUDIO + * inputs and outputs. + * + * In addition to that the generic code will mark all inputs + * and all outputs as supporting all sample rates and every + * channel count and channel layout, as long as all inputs + * and outputs use the same sample rate and channel count/layout. + */ + const enum AVSampleFormat *samples_list; + /** + * Equivalent to { pix_fmt, AV_PIX_FMT_NONE } as pixels_list. + */ + enum AVPixelFormat pix_fmt; + /** + * Equivalent to { sample_fmt, AV_SAMPLE_FMT_NONE } as samples_list. + */ + enum AVSampleFormat sample_fmt; + } formats; + + int priv_size; ///< size of private data to allocate for the filter + + int flags_internal; ///< Additional flags for avfilter internal use only. + + /** + * Make the filter instance process a command. + * + * @param cmd the command to process, for handling simplicity all commands must be alphanumeric only + * @param arg the argument for the command + * @param res a buffer with size res_size where the filter(s) can return a response. This must not change when the command is not supported. + * @param flags if AVFILTER_CMD_FLAG_FAST is set and the command would be + * time consuming then a filter should treat it like an unsupported command + * + * @returns >=0 on success otherwise an error code. + * AVERROR(ENOSYS) on unsupported commands + */ + int (*process_command)(AVFilterContext *, const char *cmd, const char *arg, char *res, int res_len, int flags); + + /** + * Filter activation function. + * + * Called when any processing is needed from the filter, instead of any + * filter_frame and request_frame on pads. + * + * The function must examine inlinks and outlinks and perform a single + * step of processing. If there is nothing to do, the function must do + * nothing and not return an error. If more steps are or may be + * possible, it must use ff_filter_set_ready() to schedule another + * activation. + */ + int (*activate)(AVFilterContext *ctx); +} FFFilter; + +static inline const FFFilter *fffilter(const AVFilter *f) +{ + return (const FFFilter*)f; +} + + #define AVFILTER_DEFINE_CLASS_EXT(name, desc, options) \ static const AVClass name##_class = { \ .class_name = desc, \ diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 21539b35d1..9bd9690df2 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -1025,7 +1025,7 @@ int ff_set_common_formats_from_list2(const AVFilterContext *ctx, int ff_default_query_formats(AVFilterContext *ctx) { - const AVFilter *const f = ctx->filter; + const FFFilter *const f = fffilter(ctx->filter); AVFilterFormats *formats; enum AVMediaType type; int ret; diff --git a/libavfilter/qrencode.c b/libavfilter/qrencode.c index d3f55013d3..f96cc8dc93 100644 --- a/libavfilter/qrencode.c +++ b/libavfilter/qrencode.c @@ -700,14 +700,14 @@ static const AVFilterPad qrencodesrc_outputs[] = { } }; -const AVFilter ff_vsrc_qrencodesrc = { - .name = "qrencodesrc", - .description = NULL_IF_CONFIG_SMALL("Generate a QR code."), +const FFFilter ff_vsrc_qrencodesrc = { + .p.name = "qrencodesrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate a QR code."), + .p.priv_class = &qrencodesrc_class, + .p.inputs = NULL, .priv_size = sizeof(QREncodeContext), - .priv_class = &qrencodesrc_class, .init = init, .uninit = uninit, - .inputs = NULL, FILTER_OUTPUTS(qrencodesrc_outputs), FILTER_QUERY_FUNC2(qrencodesrc_query_formats), }; @@ -813,17 +813,17 @@ static const AVFilterPad avfilter_vf_qrencode_inputs[] = { }, }; -const AVFilter ff_vf_qrencode = { - .name = "qrencode", - .description = NULL_IF_CONFIG_SMALL("Draw a QR code on top of video frames."), +const FFFilter ff_vf_qrencode = { + .p.name = "qrencode", + .p.description = NULL_IF_CONFIG_SMALL("Draw a QR code on top of video frames."), + .p.priv_class = &qrencode_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(QREncodeContext), - .priv_class = &qrencode_class, .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_vf_qrencode_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(qrencode_query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; #endif // CONFIG_QRENCODE_FILTER diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c index b92573a7fa..75d96247af 100644 --- a/libavfilter/setpts.c +++ b/libavfilter/setpts.c @@ -340,17 +340,19 @@ static const AVFilterPad outputs_video[] = { }, }; -const AVFilter ff_vf_setpts = { - .name = "setpts", - .description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."), +const FFFilter ff_vf_setpts = { + .p.name = "setpts", + .p.description = NULL_IF_CONFIG_SMALL("Set PTS for the output video frame."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, + + .p.priv_class = &setpts_class, + .init = init, .activate = activate, .uninit = uninit, .process_command = process_command, - .flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SetPTSContext), - .priv_class = &setpts_class, FILTER_INPUTS(avfilter_vf_setpts_inputs), FILTER_OUTPUTS(outputs_video), @@ -373,16 +375,16 @@ static const AVFilterPad asetpts_inputs[] = { }, }; -const AVFilter ff_af_asetpts = { - .name = "asetpts", - .description = NULL_IF_CONFIG_SMALL("Set PTS for the output audio frame."), +const FFFilter ff_af_asetpts = { + .p.name = "asetpts", + .p.description = NULL_IF_CONFIG_SMALL("Set PTS for the output audio frame."), + .p.priv_class = &asetpts_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .init = init, .activate = activate, .uninit = uninit, .process_command = process_command, .priv_size = sizeof(SetPTSContext), - .priv_class = &asetpts_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(asetpts_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), }; diff --git a/libavfilter/settb.c b/libavfilter/settb.c index e6a2272834..6000c9c5a6 100644 --- a/libavfilter/settb.c +++ b/libavfilter/settb.c @@ -172,15 +172,15 @@ static const AVFilterPad avfilter_vf_settb_outputs[] = { }, }; -const AVFilter ff_vf_settb = { - .name = "settb", - .description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."), +const FFFilter ff_vf_settb = { + .p.name = "settb", + .p.description = NULL_IF_CONFIG_SMALL("Set timebase for the video output link."), + .p.priv_class = &settb_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SetTBContext), - .priv_class = &settb_class, FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(avfilter_vf_settb_outputs), .activate = activate, - .flags = AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_SETTB_FILTER */ @@ -197,14 +197,14 @@ static const AVFilterPad avfilter_af_asettb_outputs[] = { }, }; -const AVFilter ff_af_asettb = { - .name = "asettb", - .description = NULL_IF_CONFIG_SMALL("Set timebase for the audio output link."), +const FFFilter ff_af_asettb = { + .p.name = "asettb", + .p.description = NULL_IF_CONFIG_SMALL("Set timebase for the audio output link."), + .p.priv_class = &asettb_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SetTBContext), FILTER_INPUTS(ff_audio_default_filterpad), FILTER_OUTPUTS(avfilter_af_asettb_outputs), - .priv_class = &asettb_class, .activate = activate, - .flags = AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_ASETTB_FILTER */ diff --git a/libavfilter/split.c b/libavfilter/split.c index 8309cdb4ea..bf004358d8 100644 --- a/libavfilter/split.c +++ b/libavfilter/split.c @@ -131,26 +131,24 @@ static const AVOption options[] = { AVFILTER_DEFINE_CLASS_EXT(split, "(a)split", options); -const AVFilter ff_vf_split = { - .name = "split", - .description = NULL_IF_CONFIG_SMALL("Pass on the input to N video outputs."), +const FFFilter ff_vf_split = { + .p.name = "split", + .p.description = NULL_IF_CONFIG_SMALL("Pass on the input to N video outputs."), + .p.priv_class = &split_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SplitContext), - .priv_class = &split_class, .init = split_init, .activate = activate, FILTER_INPUTS(ff_video_default_filterpad), - .outputs = NULL, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, }; -const AVFilter ff_af_asplit = { - .name = "asplit", - .description = NULL_IF_CONFIG_SMALL("Pass on the audio input to N audio outputs."), - .priv_class = &split_class, +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.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SplitContext), .init = split_init, .activate = activate, FILTER_INPUTS(ff_audio_default_filterpad), - .outputs = NULL, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/src_avsynctest.c b/libavfilter/src_avsynctest.c index c46281c72b..6f42137f49 100644 --- a/libavfilter/src_avsynctest.c +++ b/libavfilter/src_avsynctest.c @@ -396,12 +396,11 @@ static const AVFilterPad avsynctest_outputs[] = { }, }; -const AVFilter ff_avsrc_avsynctest = { - .name = "avsynctest", - .description = NULL_IF_CONFIG_SMALL("Generate an Audio Video Sync Test."), +const FFFilter ff_avsrc_avsynctest = { + .p.name = "avsynctest", + .p.description = NULL_IF_CONFIG_SMALL("Generate an Audio Video Sync Test."), + .p.priv_class = &avsynctest_class, .priv_size = sizeof(AVSyncTestContext), - .priv_class = &avsynctest_class, - .inputs = NULL, .activate = activate, FILTER_OUTPUTS(avsynctest_outputs), FILTER_QUERY_FUNC2(query_formats), diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index d2aa572d12..ac5e082798 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -681,19 +681,17 @@ AVFILTER_DEFINE_CLASS_EXT(movie, "(a)movie", movie_options); #if CONFIG_MOVIE_FILTER -const AVFilter ff_avsrc_movie = { - .name = "movie", - .description = NULL_IF_CONFIG_SMALL("Read from a movie source."), +const FFFilter ff_avsrc_movie = { + .p.name = "movie", + .p.description = NULL_IF_CONFIG_SMALL("Read from a movie source."), + .p.priv_class = &movie_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, .priv_size = sizeof(MovieContext), - .priv_class = &movie_class, .init = movie_common_init, .activate = activate, .uninit = movie_uninit, FILTER_QUERY_FUNC2(movie_query_formats), - .inputs = NULL, - .outputs = NULL, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, .process_command = process_command }; @@ -701,19 +699,17 @@ const AVFilter ff_avsrc_movie = { #if CONFIG_AMOVIE_FILTER -const AVFilter ff_avsrc_amovie = { - .name = "amovie", - .description = NULL_IF_CONFIG_SMALL("Read audio from a movie source."), - .priv_class = &movie_class, +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.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, .priv_size = sizeof(MovieContext), .init = movie_common_init, .activate = activate, .uninit = movie_uninit, FILTER_QUERY_FUNC2(movie_query_formats), - .inputs = NULL, - .outputs = NULL, - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, .process_command = process_command, }; diff --git a/libavfilter/stack_internal.c b/libavfilter/stack_internal.c index fcec119bac..e453b729d9 100644 --- a/libavfilter/stack_internal.c +++ b/libavfilter/stack_internal.c @@ -342,16 +342,16 @@ static const AVFilterPad stack_outputs[] = { .option = category##_##api##_options, \ .version = LIBAVUTIL_VERSION_INT, \ }; \ - const AVFilter ff_vf_##category##_##api = { \ - .name = #category "_" #api, \ - .description = NULL_IF_CONFIG_SMALL(#capi " " #category), \ + const FFFilter ff_vf_##category##_##api = { \ + .p.name = #category "_" #api, \ + .p.description = NULL_IF_CONFIG_SMALL(#capi " " #category), \ + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | filter_flags, \ + .p.priv_class = &category##_##api##_class, \ .priv_size = sizeof(StackHWContext), \ - .priv_class = &category##_##api##_class, \ .init = api##_stack_init, \ .uninit = api##_stack_uninit, \ .activate = stack_activate, \ FILTER_PIXFMTS_ARRAY(api ## _stack_pix_fmts), \ FILTER_OUTPUTS(stack_outputs), \ .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, \ - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | filter_flags, \ } diff --git a/libavfilter/tests/filtfmts.c b/libavfilter/tests/filtfmts.c index 4ef6968826..5979333afb 100644 --- a/libavfilter/tests/filtfmts.c +++ b/libavfilter/tests/filtfmts.c @@ -78,6 +78,7 @@ static void print_formats(AVFilterContext *filter_ctx) int main(int argc, char **argv) { const AVFilter *filter; + const FFFilter *fi; AVFilterContext *filter_ctx; AVFilterGraph *graph_ctx; const char *filter_name; @@ -106,6 +107,7 @@ int main(int argc, char **argv) fprintf(stderr, "Unrecognized filter with name '%s'\n", filter_name); return 1; } + fi = fffilter(filter); /* open filter and add it to the graph */ if (!(filter_ctx = avfilter_graph_alloc_filter(graph_ctx, filter, filter_name))) { @@ -141,9 +143,9 @@ int main(int argc, char **argv) filter_ctx->outputs[i] = link; } - if (filter->formats_state == FF_FILTER_FORMATS_QUERY_FUNC) - ret = filter->formats.query_func(filter_ctx); - else if (filter->formats_state == FF_FILTER_FORMATS_QUERY_FUNC2) { + if (fi->formats_state == FF_FILTER_FORMATS_QUERY_FUNC) + ret = fi->formats.query_func(filter_ctx); + else if (fi->formats_state == FF_FILTER_FORMATS_QUERY_FUNC2) { AVFilterFormatsConfig **cfg_in = NULL, **cfg_out = NULL; if (filter_ctx->nb_inputs) { @@ -157,7 +159,7 @@ int main(int argc, char **argv) cfg_out[i] = &filter_ctx->outputs[i]->incfg; } - ret = filter->formats.query_func2(filter_ctx, cfg_in, cfg_out); + ret = fi->formats.query_func2(filter_ctx, cfg_in, cfg_out); av_freep(&cfg_in); av_freep(&cfg_out); } else diff --git a/libavfilter/trim.c b/libavfilter/trim.c index a795d7541b..7200680716 100644 --- a/libavfilter/trim.c +++ b/libavfilter/trim.c @@ -356,14 +356,14 @@ static const AVFilterPad trim_inputs[] = { }, }; -const AVFilter ff_vf_trim = { - .name = "trim", - .description = NULL_IF_CONFIG_SMALL("Pick one continuous section from the input, drop the rest."), +const FFFilter ff_vf_trim = { + .p.name = "trim", + .p.description = NULL_IF_CONFIG_SMALL("Pick one continuous section from the input, drop the rest."), + .p.priv_class = &trim_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .init = init, .activate = activate, .priv_size = sizeof(TrimContext), - .priv_class = &trim_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(trim_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), }; @@ -392,14 +392,14 @@ static const AVFilterPad atrim_inputs[] = { }, }; -const AVFilter ff_af_atrim = { - .name = "atrim", - .description = NULL_IF_CONFIG_SMALL("Pick one continuous section from the input, drop the rest."), +const FFFilter ff_af_atrim = { + .p.name = "atrim", + .p.description = NULL_IF_CONFIG_SMALL("Pick one continuous section from the input, drop the rest."), + .p.priv_class = &atrim_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .init = init, .activate = activate, .priv_size = sizeof(TrimContext), - .priv_class = &atrim_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(atrim_inputs), FILTER_OUTPUTS(ff_audio_default_filterpad), }; diff --git a/libavfilter/vaf_spectrumsynth.c b/libavfilter/vaf_spectrumsynth.c index c8d3525b7b..a2f797ec6f 100644 --- a/libavfilter/vaf_spectrumsynth.c +++ b/libavfilter/vaf_spectrumsynth.c @@ -539,14 +539,14 @@ static const AVFilterPad spectrumsynth_outputs[] = { }, }; -const AVFilter ff_vaf_spectrumsynth = { - .name = "spectrumsynth", - .description = NULL_IF_CONFIG_SMALL("Convert input spectrum videos to audio output."), +const FFFilter ff_vaf_spectrumsynth = { + .p.name = "spectrumsynth", + .p.description = NULL_IF_CONFIG_SMALL("Convert input spectrum videos to audio output."), + .p.priv_class = &spectrumsynth_class, .uninit = uninit, .activate = activate, .priv_size = sizeof(SpectrumSynthContext), FILTER_INPUTS(spectrumsynth_inputs), FILTER_OUTPUTS(spectrumsynth_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &spectrumsynth_class, }; diff --git a/libavfilter/vf_addroi.c b/libavfilter/vf_addroi.c index d6765e9d8c..c123d6771e 100644 --- a/libavfilter/vf_addroi.c +++ b/libavfilter/vf_addroi.c @@ -248,16 +248,16 @@ static const AVFilterPad addroi_inputs[] = { }, }; -const AVFilter ff_vf_addroi = { - .name = "addroi", - .description = NULL_IF_CONFIG_SMALL("Add region of interest to frame."), +const FFFilter ff_vf_addroi = { + .p.name = "addroi", + .p.description = NULL_IF_CONFIG_SMALL("Add region of interest to frame."), + .p.priv_class = &addroi_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, + .init = addroi_init, .uninit = addroi_uninit, .priv_size = sizeof(AddROIContext), - .priv_class = &addroi_class, - - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(addroi_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c index c732f29367..f5779484a9 100644 --- a/libavfilter/vf_alphamerge.c +++ b/libavfilter/vf_alphamerge.c @@ -198,18 +198,18 @@ static const AVOption alphamerge_options[] = { FRAMESYNC_DEFINE_CLASS(alphamerge, AlphaMergeContext, fs); -const AVFilter ff_vf_alphamerge = { - .name = "alphamerge", - .description = NULL_IF_CONFIG_SMALL("Copy the luma value of the second " +const FFFilter ff_vf_alphamerge = { + .p.name = "alphamerge", + .p.description = NULL_IF_CONFIG_SMALL("Copy the luma value of the second " "input into the alpha channel of the first input."), + .p.priv_class = &alphamerge_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .preinit = alphamerge_framesync_preinit, .priv_size = sizeof(AlphaMergeContext), - .priv_class = &alphamerge_class, .init = init, FILTER_INPUTS(alphamerge_inputs), FILTER_OUTPUTS(alphamerge_outputs), FILTER_QUERY_FUNC2(query_formats), .uninit = uninit, .activate = activate, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_amplify.c b/libavfilter/vf_amplify.c index 69d751593f..7f18012a53 100644 --- a/libavfilter/vf_amplify.c +++ b/libavfilter/vf_amplify.c @@ -271,16 +271,16 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(amplify); -const AVFilter ff_vf_amplify = { - .name = "amplify", - .description = NULL_IF_CONFIG_SMALL("Amplify changes between successive video frames."), +const FFFilter ff_vf_amplify = { + .p.name = "amplify", + .p.description = NULL_IF_CONFIG_SMALL("Amplify changes between successive video frames."), + .p.priv_class = &lify_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(AmplifyContext), - .priv_class = &lify_class, FILTER_OUTPUTS(outputs), FILTER_INPUTS(inputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), .init = init, .uninit = uninit, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c index 5b4b9fd6e5..7ec1035336 100644 --- a/libavfilter/vf_aspect.c +++ b/libavfilter/vf_aspect.c @@ -187,12 +187,12 @@ static const AVFilterPad avfilter_vf_setdar_outputs[] = { }, }; -const AVFilter ff_vf_setdar = { - .name = "setdar", - .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."), +const FFFilter ff_vf_setdar = { + .p.name = "setdar", + .p.description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."), + .p.priv_class = &setdar_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(AspectContext), - .priv_class = &setdar_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(aspect_inputs), FILTER_OUTPUTS(avfilter_vf_setdar_outputs), }; @@ -242,12 +242,12 @@ static const AVFilterPad avfilter_vf_setsar_outputs[] = { }, }; -const AVFilter ff_vf_setsar = { - .name = "setsar", - .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."), +const FFFilter ff_vf_setsar = { + .p.name = "setsar", + .p.description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."), + .p.priv_class = &setsar_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(AspectContext), - .priv_class = &setsar_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(aspect_inputs), FILTER_OUTPUTS(avfilter_vf_setsar_outputs), }; diff --git a/libavfilter/vf_atadenoise.c b/libavfilter/vf_atadenoise.c index bb60ce8490..cdebdb7f14 100644 --- a/libavfilter/vf_atadenoise.c +++ b/libavfilter/vf_atadenoise.c @@ -561,16 +561,16 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_atadenoise = { - .name = "atadenoise", - .description = NULL_IF_CONFIG_SMALL("Apply an Adaptive Temporal Averaging Denoiser."), +const FFFilter ff_vf_atadenoise = { + .p.name = "atadenoise", + .p.description = NULL_IF_CONFIG_SMALL("Apply an Adaptive Temporal Averaging Denoiser."), + .p.priv_class = &atadenoise_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ATADenoiseContext), - .priv_class = &atadenoise_class, .init = init, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_avgblur.c b/libavfilter/vf_avgblur.c index 013d83b1be..3bd4faa5f6 100644 --- a/libavfilter/vf_avgblur.c +++ b/libavfilter/vf_avgblur.c @@ -334,15 +334,15 @@ static const AVFilterPad avgblur_inputs[] = { }, }; -const AVFilter ff_vf_avgblur = { - .name = "avgblur", - .description = NULL_IF_CONFIG_SMALL("Apply Average Blur filter."), +const FFFilter ff_vf_avgblur = { + .p.name = "avgblur", + .p.description = NULL_IF_CONFIG_SMALL("Apply Average Blur filter."), + .p.priv_class = &avgblur_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(AverageBlurContext), - .priv_class = &avgblur_class, .uninit = uninit, FILTER_INPUTS(avgblur_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, }; diff --git a/libavfilter/vf_avgblur_opencl.c b/libavfilter/vf_avgblur_opencl.c index 0790f25a28..790a51ea80 100644 --- a/libavfilter/vf_avgblur_opencl.c +++ b/libavfilter/vf_avgblur_opencl.c @@ -340,11 +340,11 @@ static const AVOption avgblur_opencl_options[] = { AVFILTER_DEFINE_CLASS(avgblur_opencl); -const AVFilter ff_vf_avgblur_opencl = { - .name = "avgblur_opencl", - .description = NULL_IF_CONFIG_SMALL("Apply average blur filter"), +const FFFilter ff_vf_avgblur_opencl = { + .p.name = "avgblur_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Apply average blur filter"), + .p.priv_class = &avgblur_opencl_class, .priv_size = sizeof(AverageBlurOpenCLContext), - .priv_class = &avgblur_opencl_class, .init = &ff_opencl_filter_init, .uninit = &avgblur_opencl_uninit, FILTER_INPUTS(avgblur_opencl_inputs), @@ -379,18 +379,18 @@ static const AVOption boxblur_opencl_options[] = { AVFILTER_DEFINE_CLASS(boxblur_opencl); -const AVFilter ff_vf_boxblur_opencl = { - .name = "boxblur_opencl", - .description = NULL_IF_CONFIG_SMALL("Apply boxblur filter to input video"), +const FFFilter ff_vf_boxblur_opencl = { + .p.name = "boxblur_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Apply boxblur filter to input video"), + .p.priv_class = &boxblur_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(AverageBlurOpenCLContext), - .priv_class = &boxblur_opencl_class, .init = &ff_opencl_filter_init, .uninit = &avgblur_opencl_uninit, FILTER_INPUTS(avgblur_opencl_inputs), FILTER_OUTPUTS(avgblur_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; #endif /* CONFIG_BOXBLUR_OPENCL_FILTER */ diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c index 9fe65353d9..e291d5d8e9 100644 --- a/libavfilter/vf_avgblur_vulkan.c +++ b/libavfilter/vf_avgblur_vulkan.c @@ -248,16 +248,16 @@ static const AVFilterPad avgblur_vulkan_outputs[] = { }, }; -const AVFilter ff_vf_avgblur_vulkan = { - .name = "avgblur_vulkan", - .description = NULL_IF_CONFIG_SMALL("Apply avgblur mask to input video"), +const FFFilter ff_vf_avgblur_vulkan = { + .p.name = "avgblur_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Apply avgblur mask to input video"), + .p.priv_class = &avgblur_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(AvgBlurVulkanContext), .init = &ff_vk_filter_init, .uninit = &avgblur_vulkan_uninit, FILTER_INPUTS(avgblur_vulkan_inputs), FILTER_OUTPUTS(avgblur_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &avgblur_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_backgroundkey.c b/libavfilter/vf_backgroundkey.c index 4a6ee5380d..f0a76b977e 100644 --- a/libavfilter/vf_backgroundkey.c +++ b/libavfilter/vf_backgroundkey.c @@ -241,15 +241,15 @@ static const enum AVPixelFormat backgroundkey_fmts[] = { AVFILTER_DEFINE_CLASS(backgroundkey); -const AVFilter ff_vf_backgroundkey = { - .name = "backgroundkey", - .description = NULL_IF_CONFIG_SMALL("Turns a static background into transparency."), +const FFFilter ff_vf_backgroundkey = { + .p.name = "backgroundkey", + .p.description = NULL_IF_CONFIG_SMALL("Turns a static background into transparency."), + .p.priv_class = &backgroundkey_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(BackgroundkeyContext), - .priv_class = &backgroundkey_class, .uninit = uninit, FILTER_INPUTS(backgroundkey_inputs), FILTER_OUTPUTS(backgroundkey_outputs), FILTER_PIXFMTS_ARRAY(backgroundkey_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_bbox.c b/libavfilter/vf_bbox.c index b4f74dca68..9631613ff4 100644 --- a/libavfilter/vf_bbox.c +++ b/libavfilter/vf_bbox.c @@ -144,14 +144,14 @@ static const AVFilterPad bbox_outputs[] = { }, }; -const AVFilter ff_vf_bbox = { - .name = "bbox", - .description = NULL_IF_CONFIG_SMALL("Compute bounding box for each frame."), +const FFFilter ff_vf_bbox = { + .p.name = "bbox", + .p.description = NULL_IF_CONFIG_SMALL("Compute bounding box for each frame."), + .p.priv_class = &bbox_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(BBoxContext), - .priv_class = &bbox_class, FILTER_INPUTS(bbox_inputs), FILTER_OUTPUTS(bbox_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_bilateral.c b/libavfilter/vf_bilateral.c index 66cc56d1c4..cf62b2315d 100644 --- a/libavfilter/vf_bilateral.c +++ b/libavfilter/vf_bilateral.c @@ -498,16 +498,16 @@ static const AVFilterPad bilateral_inputs[] = { }, }; -const AVFilter ff_vf_bilateral = { - .name = "bilateral", - .description = NULL_IF_CONFIG_SMALL("Apply Bilateral filter."), +const FFFilter ff_vf_bilateral = { + .p.name = "bilateral", + .p.description = NULL_IF_CONFIG_SMALL("Apply Bilateral filter."), + .p.priv_class = &bilateral_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(BilateralContext), - .priv_class = &bilateral_class, .uninit = uninit, FILTER_INPUTS(bilateral_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_bilateral_cuda.c b/libavfilter/vf_bilateral_cuda.c index 5e13acd330..7115fa9e05 100644 --- a/libavfilter/vf_bilateral_cuda.c +++ b/libavfilter/vf_bilateral_cuda.c @@ -462,15 +462,16 @@ static const AVFilterPad cuda_bilateral_outputs[] = { }, }; -const AVFilter ff_vf_bilateral_cuda = { - .name = "bilateral_cuda", - .description = NULL_IF_CONFIG_SMALL("GPU accelerated bilateral filter"), +const FFFilter ff_vf_bilateral_cuda = { + .p.name = "bilateral_cuda", + .p.description = NULL_IF_CONFIG_SMALL("GPU accelerated bilateral filter"), + + .p.priv_class = &cuda_bilateral_class, .init = cudabilateral_init, .uninit = cudabilateral_uninit, .priv_size = sizeof(CUDABilateralContext), - .priv_class = &cuda_bilateral_class, FILTER_INPUTS(cuda_bilateral_inputs), FILTER_OUTPUTS(cuda_bilateral_outputs), diff --git a/libavfilter/vf_bitplanenoise.c b/libavfilter/vf_bitplanenoise.c index 24377d1fe6..639d9cadb9 100644 --- a/libavfilter/vf_bitplanenoise.c +++ b/libavfilter/vf_bitplanenoise.c @@ -196,13 +196,13 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_bitplanenoise = { - .name = "bitplanenoise", - .description = NULL_IF_CONFIG_SMALL("Measure bit plane noise."), +const FFFilter ff_vf_bitplanenoise = { + .p.name = "bitplanenoise", + .p.description = NULL_IF_CONFIG_SMALL("Measure bit plane noise."), + .p.priv_class = &bitplanenoise_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(BPNContext), FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixfmts), - .priv_class = &bitplanenoise_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c index ac74ef74ad..21f35f705d 100644 --- a/libavfilter/vf_blackdetect.c +++ b/libavfilter/vf_blackdetect.c @@ -244,14 +244,14 @@ static const AVFilterPad blackdetect_inputs[] = { }, }; -const AVFilter ff_vf_blackdetect = { - .name = "blackdetect", - .description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."), +const FFFilter ff_vf_blackdetect = { + .p.name = "blackdetect", + .p.description = NULL_IF_CONFIG_SMALL("Detect video intervals that are (almost) black."), + .p.priv_class = &blackdetect_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(BlackDetectContext), FILTER_INPUTS(blackdetect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), .uninit = uninit, - .priv_class = &blackdetect_class, - .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c index 7b74aa61b9..f0aa53e133 100644 --- a/libavfilter/vf_blackframe.c +++ b/libavfilter/vf_blackframe.c @@ -114,12 +114,12 @@ static const AVFilterPad avfilter_vf_blackframe_inputs[] = { }, }; -const AVFilter ff_vf_blackframe = { - .name = "blackframe", - .description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."), +const FFFilter ff_vf_blackframe = { + .p.name = "blackframe", + .p.description = NULL_IF_CONFIG_SMALL("Detect frames that are (almost) black."), + .p.priv_class = &blackframe_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(BlackFrameContext), - .priv_class = &blackframe_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_blackframe_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c index 2e5dc93861..149d64399c 100644 --- a/libavfilter/vf_blend.c +++ b/libavfilter/vf_blend.c @@ -428,9 +428,11 @@ static const AVFilterPad blend_inputs[] = { }, }; -const AVFilter ff_vf_blend = { - .name = "blend", - .description = NULL_IF_CONFIG_SMALL("Blend two video frames into each other."), +const FFFilter ff_vf_blend = { + .p.name = "blend", + .p.description = NULL_IF_CONFIG_SMALL("Blend two video frames into each other."), + .p.priv_class = &blend_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .preinit = blend_framesync_preinit, .init = init, .uninit = uninit, @@ -439,8 +441,6 @@ const AVFilter ff_vf_blend = { FILTER_INPUTS(blend_inputs), FILTER_OUTPUTS(blend_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &blend_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -479,17 +479,17 @@ static const AVFilterPad tblend_inputs[] = { }, }; -const AVFilter ff_vf_tblend = { - .name = "tblend", - .description = NULL_IF_CONFIG_SMALL("Blend successive frames."), +const FFFilter ff_vf_tblend = { + .p.name = "tblend", + .p.description = NULL_IF_CONFIG_SMALL("Blend successive frames."), + .p.priv_class = &tblend_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(BlendContext), - .priv_class = &tblend_class, .init = init, .uninit = uninit, FILTER_INPUTS(tblend_inputs), FILTER_OUTPUTS(blend_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_blend_vulkan.c b/libavfilter/vf_blend_vulkan.c index ab4c00ebc6..58a8f24d5c 100644 --- a/libavfilter/vf_blend_vulkan.c +++ b/libavfilter/vf_blend_vulkan.c @@ -387,9 +387,11 @@ static const AVFilterPad blend_vulkan_outputs[] = { } }; -const AVFilter ff_vf_blend_vulkan = { - .name = "blend_vulkan", - .description = NULL_IF_CONFIG_SMALL("Blend two video frames in Vulkan"), +const FFFilter ff_vf_blend_vulkan = { + .p.name = "blend_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Blend two video frames in Vulkan"), + .p.priv_class = &blend_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(BlendVulkanContext), .init = &init, .uninit = &uninit, @@ -397,8 +399,6 @@ const AVFilter ff_vf_blend_vulkan = { FILTER_INPUTS(blend_vulkan_inputs), FILTER_OUTPUTS(blend_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &blend_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, .process_command = &process_command, }; diff --git a/libavfilter/vf_blockdetect.c b/libavfilter/vf_blockdetect.c index dc6d9a922d..e957db6a24 100644 --- a/libavfilter/vf_blockdetect.c +++ b/libavfilter/vf_blockdetect.c @@ -276,14 +276,14 @@ static const AVFilterPad blockdetect_inputs[] = { }, }; -const AVFilter ff_vf_blockdetect = { - .name = "blockdetect", - .description = NULL_IF_CONFIG_SMALL("Blockdetect filter."), +const FFFilter ff_vf_blockdetect = { + .p.name = "blockdetect", + .p.description = NULL_IF_CONFIG_SMALL("Blockdetect filter."), + .p.priv_class = &blockdetect_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(BLKContext), .uninit = blockdetect_uninit, FILTER_PIXFMTS_ARRAY(pix_fmts), FILTER_INPUTS(blockdetect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .priv_class = &blockdetect_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_blurdetect.c b/libavfilter/vf_blurdetect.c index a99d61f88a..0d30ea9f58 100644 --- a/libavfilter/vf_blurdetect.c +++ b/libavfilter/vf_blurdetect.c @@ -360,15 +360,15 @@ static const AVFilterPad blurdetect_inputs[] = { }, }; -const AVFilter ff_vf_blurdetect = { - .name = "blurdetect", - .description = NULL_IF_CONFIG_SMALL("Blurdetect filter."), +const FFFilter ff_vf_blurdetect = { + .p.name = "blurdetect", + .p.description = NULL_IF_CONFIG_SMALL("Blurdetect filter."), + .p.priv_class = &blurdetect_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(BLRContext), .init = blurdetect_init, .uninit = blurdetect_uninit, FILTER_PIXFMTS_ARRAY(pix_fmts), FILTER_INPUTS(blurdetect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .priv_class = &blurdetect_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_bm3d.c b/libavfilter/vf_bm3d.c index 49597ea8fb..b482f7693a 100644 --- a/libavfilter/vf_bm3d.c +++ b/libavfilter/vf_bm3d.c @@ -1042,18 +1042,18 @@ static const AVFilterPad bm3d_outputs[] = { }, }; -const AVFilter ff_vf_bm3d = { - .name = "bm3d", - .description = NULL_IF_CONFIG_SMALL("Block-Matching 3D denoiser."), +const FFFilter ff_vf_bm3d = { + .p.name = "bm3d", + .p.description = NULL_IF_CONFIG_SMALL("Block-Matching 3D denoiser."), + .p.inputs = NULL, + .p.priv_class = &bm3d_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_DYNAMIC_INPUTS | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(BM3DContext), .init = init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(bm3d_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &bm3d_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_DYNAMIC_INPUTS | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c index d684dee99d..3cb42471a7 100644 --- a/libavfilter/vf_boxblur.c +++ b/libavfilter/vf_boxblur.c @@ -297,14 +297,14 @@ static const AVFilterPad avfilter_vf_boxblur_inputs[] = { }, }; -const AVFilter ff_vf_boxblur = { - .name = "boxblur", - .description = NULL_IF_CONFIG_SMALL("Blur the input."), +const FFFilter ff_vf_boxblur = { + .p.name = "boxblur", + .p.description = NULL_IF_CONFIG_SMALL("Blur the input."), + .p.priv_class = &boxblur_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(BoxBlurContext), - .priv_class = &boxblur_class, .uninit = uninit, FILTER_INPUTS(avfilter_vf_boxblur_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_bwdif.c b/libavfilter/vf_bwdif.c index d41a25f8ea..d49f3f66d6 100644 --- a/libavfilter/vf_bwdif.c +++ b/libavfilter/vf_bwdif.c @@ -224,14 +224,14 @@ static const AVFilterPad avfilter_vf_bwdif_outputs[] = { }, }; -const AVFilter ff_vf_bwdif = { - .name = "bwdif", - .description = NULL_IF_CONFIG_SMALL("Deinterlace the input image."), +const FFFilter ff_vf_bwdif = { + .p.name = "bwdif", + .p.description = NULL_IF_CONFIG_SMALL("Deinterlace the input image."), + .p.priv_class = &bwdif_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(BWDIFContext), - .priv_class = &bwdif_class, .uninit = ff_yadif_uninit, FILTER_INPUTS(avfilter_vf_bwdif_inputs), FILTER_OUTPUTS(avfilter_vf_bwdif_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_bwdif_cuda.c b/libavfilter/vf_bwdif_cuda.c index 396a246710..cc954ab1d3 100644 --- a/libavfilter/vf_bwdif_cuda.c +++ b/libavfilter/vf_bwdif_cuda.c @@ -357,15 +357,15 @@ static const AVFilterPad deint_cuda_outputs[] = { }, }; -const AVFilter ff_vf_bwdif_cuda = { - .name = "bwdif_cuda", - .description = NULL_IF_CONFIG_SMALL("Deinterlace CUDA frames"), +const FFFilter ff_vf_bwdif_cuda = { + .p.name = "bwdif_cuda", + .p.description = NULL_IF_CONFIG_SMALL("Deinterlace CUDA frames"), + .p.priv_class = &bwdif_cuda_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(DeintCUDAContext), - .priv_class = &bwdif_cuda_class, .uninit = deint_cuda_uninit, FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA), FILTER_INPUTS(deint_cuda_inputs), FILTER_OUTPUTS(deint_cuda_outputs), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_bwdif_vulkan.c b/libavfilter/vf_bwdif_vulkan.c index 3f6d7b72bf..0afe8ac0ed 100644 --- a/libavfilter/vf_bwdif_vulkan.c +++ b/libavfilter/vf_bwdif_vulkan.c @@ -325,17 +325,17 @@ static const AVFilterPad bwdif_vulkan_outputs[] = { }, }; -const AVFilter ff_vf_bwdif_vulkan = { - .name = "bwdif_vulkan", - .description = NULL_IF_CONFIG_SMALL("Deinterlace Vulkan frames via bwdif"), +const FFFilter ff_vf_bwdif_vulkan = { + .p.name = "bwdif_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Deinterlace Vulkan frames via bwdif"), + .p.priv_class = &bwdif_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE | + AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(BWDIFVulkanContext), .init = &ff_vk_filter_init, .uninit = &bwdif_vulkan_uninit, FILTER_INPUTS(bwdif_vulkan_inputs), FILTER_OUTPUTS(bwdif_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &bwdif_vulkan_class, - .flags = AVFILTER_FLAG_HWDEVICE | - AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_cas.c b/libavfilter/vf_cas.c index 7fc384026a..54d164fb7f 100644 --- a/libavfilter/vf_cas.c +++ b/libavfilter/vf_cas.c @@ -265,14 +265,14 @@ static const AVOption cas_options[] = { AVFILTER_DEFINE_CLASS(cas); -const AVFilter ff_vf_cas = { - .name = "cas", - .description = NULL_IF_CONFIG_SMALL("Contrast Adaptive Sharpen."), +const FFFilter ff_vf_cas = { + .p.name = "cas", + .p.description = NULL_IF_CONFIG_SMALL("Contrast Adaptive Sharpen."), + .p.priv_class = &cas_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(CASContext), - .priv_class = &cas_class, FILTER_INPUTS(cas_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_ccrepack.c b/libavfilter/vf_ccrepack.c index 3e72622203..f3f0c69676 100644 --- a/libavfilter/vf_ccrepack.c +++ b/libavfilter/vf_ccrepack.c @@ -87,12 +87,12 @@ static const AVFilterPad avfilter_vf_ccrepack_inputs[] = { }, }; -const AVFilter ff_vf_ccrepack = { - .name = "ccrepack", - .description = NULL_IF_CONFIG_SMALL("Repack CEA-708 closed caption metadata"), +const FFFilter ff_vf_ccrepack = { + .p.name = "ccrepack", + .p.description = NULL_IF_CONFIG_SMALL("Repack CEA-708 closed caption metadata"), + .p.priv_class = &ccrepack_class, .uninit = uninit, .priv_size = sizeof(CCRepackContext), - .priv_class = &ccrepack_class, FILTER_INPUTS(avfilter_vf_ccrepack_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), }; diff --git a/libavfilter/vf_chromaber_vulkan.c b/libavfilter/vf_chromaber_vulkan.c index 5fc962ac49..65b53afd64 100644 --- a/libavfilter/vf_chromaber_vulkan.c +++ b/libavfilter/vf_chromaber_vulkan.c @@ -249,16 +249,16 @@ static const AVFilterPad chromaber_vulkan_outputs[] = { }, }; -const AVFilter ff_vf_chromaber_vulkan = { - .name = "chromaber_vulkan", - .description = NULL_IF_CONFIG_SMALL("Offset chroma of input video (chromatic aberration)"), +const FFFilter ff_vf_chromaber_vulkan = { + .p.name = "chromaber_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Offset chroma of input video (chromatic aberration)"), + .p.priv_class = &chromaber_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(ChromaticAberrationVulkanContext), .init = &ff_vk_filter_init, .uninit = &chromaber_vulkan_uninit, FILTER_INPUTS(chromaber_vulkan_inputs), FILTER_OUTPUTS(chromaber_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &chromaber_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_chromakey.c b/libavfilter/vf_chromakey.c index 659ba28559..f6f6314615 100644 --- a/libavfilter/vf_chromakey.c +++ b/libavfilter/vf_chromakey.c @@ -365,15 +365,15 @@ static const enum AVPixelFormat chromakey_fmts[] = { AVFILTER_DEFINE_CLASS(chromakey); -const AVFilter ff_vf_chromakey = { - .name = "chromakey", - .description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on YUV colors."), +const FFFilter ff_vf_chromakey = { + .p.name = "chromakey", + .p.description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on YUV colors."), + .p.priv_class = &chromakey_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ChromakeyContext), - .priv_class = &chromakey_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(chromakey_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -406,14 +406,14 @@ static const enum AVPixelFormat hold_pixel_fmts[] = { AVFILTER_DEFINE_CLASS(chromahold); -const AVFilter ff_vf_chromahold = { - .name = "chromahold", - .description = NULL_IF_CONFIG_SMALL("Turns a certain color range into gray."), +const FFFilter ff_vf_chromahold = { + .p.name = "chromahold", + .p.description = NULL_IF_CONFIG_SMALL("Turns a certain color range into gray."), + .p.priv_class = &chromahold_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ChromakeyContext), - .priv_class = &chromahold_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(hold_pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_chromakey_cuda.c b/libavfilter/vf_chromakey_cuda.c index c59ac7b26c..43f50c5a9a 100644 --- a/libavfilter/vf_chromakey_cuda.c +++ b/libavfilter/vf_chromakey_cuda.c @@ -480,15 +480,16 @@ static const AVFilterPad cudachromakey_outputs[] = { }, }; -const AVFilter ff_vf_chromakey_cuda = { - .name = "chromakey_cuda", - .description = NULL_IF_CONFIG_SMALL("GPU accelerated chromakey filter"), +const FFFilter ff_vf_chromakey_cuda = { + .p.name = "chromakey_cuda", + .p.description = NULL_IF_CONFIG_SMALL("GPU accelerated chromakey filter"), + + .p.priv_class = &cudachromakey_class, .init = cudachromakey_init, .uninit = cudachromakey_uninit, .priv_size = sizeof(ChromakeyCUDAContext), - .priv_class = &cudachromakey_class, FILTER_INPUTS(cudachromakey_inputs), FILTER_OUTPUTS(cudachromakey_outputs), diff --git a/libavfilter/vf_chromanr.c b/libavfilter/vf_chromanr.c index 6e1fba034b..ba2c57cdf4 100644 --- a/libavfilter/vf_chromanr.c +++ b/libavfilter/vf_chromanr.c @@ -289,14 +289,14 @@ static const AVFilterPad inputs[] = { AVFILTER_DEFINE_CLASS(chromanr); -const AVFilter ff_vf_chromanr = { - .name = "chromanr", - .description = NULL_IF_CONFIG_SMALL("Reduce chrominance noise."), +const FFFilter ff_vf_chromanr = { + .p.name = "chromanr", + .p.description = NULL_IF_CONFIG_SMALL("Reduce chrominance noise."), + .p.priv_class = &chromanr_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ChromaNRContext), - .priv_class = &chromanr_class, FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_INPUTS(inputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_chromashift.c b/libavfilter/vf_chromashift.c index 58c4c1b5c4..f0449d5977 100644 --- a/libavfilter/vf_chromashift.c +++ b/libavfilter/vf_chromashift.c @@ -395,15 +395,15 @@ static const enum AVPixelFormat yuv_pix_fmts[] = { AVFILTER_DEFINE_CLASS(chromashift); -const AVFilter ff_vf_chromashift = { - .name = "chromashift", - .description = NULL_IF_CONFIG_SMALL("Shift chroma."), +const FFFilter ff_vf_chromashift = { + .p.name = "chromashift", + .p.description = NULL_IF_CONFIG_SMALL("Shift chroma."), + .p.priv_class = &chromashift_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ChromaShiftContext), - .priv_class = &chromashift_class, FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_INPUTS(inputs), FILTER_PIXFMTS_ARRAY(yuv_pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; @@ -432,14 +432,14 @@ static const AVOption rgbashift_options[] = { AVFILTER_DEFINE_CLASS(rgbashift); -const AVFilter ff_vf_rgbashift = { - .name = "rgbashift", - .description = NULL_IF_CONFIG_SMALL("Shift RGBA."), +const FFFilter ff_vf_rgbashift = { + .p.name = "rgbashift", + .p.description = NULL_IF_CONFIG_SMALL("Shift RGBA."), + .p.priv_class = &rgbashift_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ChromaShiftContext), - .priv_class = &rgbashift_class, FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_INPUTS(inputs), FILTER_PIXFMTS_ARRAY(rgb_pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_ciescope.c b/libavfilter/vf_ciescope.c index 8ca47aaafd..21f7dc5de3 100644 --- a/libavfilter/vf_ciescope.c +++ b/libavfilter/vf_ciescope.c @@ -1553,11 +1553,11 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_ciescope = { - .name = "ciescope", - .description = NULL_IF_CONFIG_SMALL("Video CIE scope."), +const FFFilter ff_vf_ciescope = { + .p.name = "ciescope", + .p.description = NULL_IF_CONFIG_SMALL("Video CIE scope."), + .p.priv_class = &ciescope_class, .priv_size = sizeof(CiescopeContext), - .priv_class = &ciescope_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c index b7396f6668..a4a701b00c 100644 --- a/libavfilter/vf_codecview.c +++ b/libavfilter/vf_codecview.c @@ -333,15 +333,15 @@ static const AVFilterPad codecview_inputs[] = { }, }; -const AVFilter ff_vf_codecview = { - .name = "codecview", - .description = NULL_IF_CONFIG_SMALL("Visualize information about some codecs."), +const FFFilter ff_vf_codecview = { + .p.name = "codecview", + .p.description = NULL_IF_CONFIG_SMALL("Visualize information about some codecs."), + .p.priv_class = &codecview_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(CodecViewContext), FILTER_INPUTS(codecview_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), // TODO: we can probably add way more pixel formats without any other // changes; anything with 8-bit luma in first plane should be working FILTER_SINGLE_PIXFMT(AV_PIX_FMT_YUV420P), - .priv_class = &codecview_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c index 1c88aa4a16..80e218d32b 100644 --- a/libavfilter/vf_colorbalance.c +++ b/libavfilter/vf_colorbalance.c @@ -430,14 +430,14 @@ static const AVFilterPad colorbalance_outputs[] = { }, }; -const AVFilter ff_vf_colorbalance = { - .name = "colorbalance", - .description = NULL_IF_CONFIG_SMALL("Adjust the color balance."), +const FFFilter ff_vf_colorbalance = { + .p.name = "colorbalance", + .p.description = NULL_IF_CONFIG_SMALL("Adjust the color balance."), + .p.priv_class = &colorbalance_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorBalanceContext), - .priv_class = &colorbalance_class, FILTER_INPUTS(colorbalance_inputs), FILTER_OUTPUTS(colorbalance_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colorchannelmixer.c b/libavfilter/vf_colorchannelmixer.c index 02ad3435fa..f941e7f80a 100644 --- a/libavfilter/vf_colorchannelmixer.c +++ b/libavfilter/vf_colorchannelmixer.c @@ -493,15 +493,15 @@ static const AVFilterPad colorchannelmixer_outputs[] = { }, }; -const AVFilter ff_vf_colorchannelmixer = { - .name = "colorchannelmixer", - .description = NULL_IF_CONFIG_SMALL("Adjust colors by mixing color channels."), +const FFFilter ff_vf_colorchannelmixer = { + .p.name = "colorchannelmixer", + .p.description = NULL_IF_CONFIG_SMALL("Adjust colors by mixing color channels."), + .p.priv_class = &colorchannelmixer_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorChannelMixerContext), - .priv_class = &colorchannelmixer_class, .uninit = uninit, FILTER_INPUTS(colorchannelmixer_inputs), FILTER_OUTPUTS(colorchannelmixer_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_colorconstancy.c b/libavfilter/vf_colorconstancy.c index 035880294e..d5f8fd1098 100644 --- a/libavfilter/vf_colorconstancy.c +++ b/libavfilter/vf_colorconstancy.c @@ -725,16 +725,16 @@ static const AVOption greyedge_options[] = { AVFILTER_DEFINE_CLASS(greyedge); -const AVFilter ff_vf_greyedge = { - .name = GREY_EDGE, - .description = NULL_IF_CONFIG_SMALL("Estimates scene illumination by grey edge assumption."), +const FFFilter ff_vf_greyedge = { + .p.name = GREY_EDGE, + .p.description = NULL_IF_CONFIG_SMALL("Estimates scene illumination by grey edge assumption."), + .p.priv_class = &greyedge_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorConstancyContext), - .priv_class = &greyedge_class, .uninit = uninit, FILTER_INPUTS(colorconstancy_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), // TODO: support more formats // FIXME: error when saving to .jpg FILTER_SINGLE_PIXFMT(AV_PIX_FMT_GBRP), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_colorcontrast.c b/libavfilter/vf_colorcontrast.c index 419f5a1e1e..05f2ad5676 100644 --- a/libavfilter/vf_colorcontrast.c +++ b/libavfilter/vf_colorcontrast.c @@ -374,14 +374,14 @@ static const AVOption colorcontrast_options[] = { AVFILTER_DEFINE_CLASS(colorcontrast); -const AVFilter ff_vf_colorcontrast = { - .name = "colorcontrast", - .description = NULL_IF_CONFIG_SMALL("Adjust color contrast between RGB components."), +const FFFilter ff_vf_colorcontrast = { + .p.name = "colorcontrast", + .p.description = NULL_IF_CONFIG_SMALL("Adjust color contrast between RGB components."), + .p.priv_class = &colorcontrast_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorContrastContext), - .priv_class = &colorcontrast_class, FILTER_INPUTS(colorcontrast_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colorcorrect.c b/libavfilter/vf_colorcorrect.c index db69a22e4e..4249bd414d 100644 --- a/libavfilter/vf_colorcorrect.c +++ b/libavfilter/vf_colorcorrect.c @@ -531,15 +531,15 @@ static const AVOption colorcorrect_options[] = { AVFILTER_DEFINE_CLASS(colorcorrect); -const AVFilter ff_vf_colorcorrect = { - .name = "colorcorrect", - .description = NULL_IF_CONFIG_SMALL("Adjust color white balance selectively for blacks and whites."), +const FFFilter ff_vf_colorcorrect = { + .p.name = "colorcorrect", + .p.description = NULL_IF_CONFIG_SMALL("Adjust color white balance selectively for blacks and whites."), + .p.priv_class = &colorcorrect_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorCorrectContext), - .priv_class = &colorcorrect_class, .uninit = uninit, FILTER_INPUTS(colorcorrect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colorize.c b/libavfilter/vf_colorize.c index e20008e79f..1ab71b2b87 100644 --- a/libavfilter/vf_colorize.c +++ b/libavfilter/vf_colorize.c @@ -272,14 +272,14 @@ static const AVOption colorize_options[] = { AVFILTER_DEFINE_CLASS(colorize); -const AVFilter ff_vf_colorize = { - .name = "colorize", - .description = NULL_IF_CONFIG_SMALL("Overlay a solid color on the video stream."), +const FFFilter ff_vf_colorize = { + .p.name = "colorize", + .p.description = NULL_IF_CONFIG_SMALL("Overlay a solid color on the video stream."), + .p.priv_class = &colorize_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorizeContext), - .priv_class = &colorize_class, FILTER_INPUTS(colorize_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colorkey.c b/libavfilter/vf_colorkey.c index 343a93c1d4..4781e53bb2 100644 --- a/libavfilter/vf_colorkey.c +++ b/libavfilter/vf_colorkey.c @@ -222,15 +222,15 @@ static const AVOption colorkey_options[] = { AVFILTER_DEFINE_CLASS(colorkey); -const AVFilter ff_vf_colorkey = { - .name = "colorkey", - .description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on RGB colors."), +const FFFilter ff_vf_colorkey = { + .p.name = "colorkey", + .p.description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on RGB colors."), + .p.priv_class = &colorkey_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorkeyContext), - .priv_class = &colorkey_class, FILTER_INPUTS(colorkey_inputs), FILTER_OUTPUTS(colorkey_outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; @@ -246,15 +246,15 @@ static const AVOption colorhold_options[] = { AVFILTER_DEFINE_CLASS(colorhold); -const AVFilter ff_vf_colorhold = { - .name = "colorhold", - .description = NULL_IF_CONFIG_SMALL("Turns a certain color range into gray. Operates on RGB colors."), +const FFFilter ff_vf_colorhold = { + .p.name = "colorhold", + .p.description = NULL_IF_CONFIG_SMALL("Turns a certain color range into gray. Operates on RGB colors."), + .p.priv_class = &colorhold_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorkeyContext), - .priv_class = &colorhold_class, FILTER_INPUTS(colorkey_inputs), FILTER_OUTPUTS(colorkey_outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colorkey_opencl.c b/libavfilter/vf_colorkey_opencl.c index 24c6b1f741..403e763503 100644 --- a/libavfilter/vf_colorkey_opencl.c +++ b/libavfilter/vf_colorkey_opencl.c @@ -226,16 +226,16 @@ static const AVOption colorkey_opencl_options[] = { AVFILTER_DEFINE_CLASS(colorkey_opencl); -const AVFilter ff_vf_colorkey_opencl = { - .name = "colorkey_opencl", - .description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on RGB colors."), +const FFFilter ff_vf_colorkey_opencl = { + .p.name = "colorkey_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Turns a certain color into transparency. Operates on RGB colors."), + .p.priv_class = &colorkey_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(ColorkeyOpenCLContext), - .priv_class = &colorkey_opencl_class, .init = &ff_opencl_filter_init, .uninit = &colorkey_opencl_uninit, FILTER_INPUTS(colorkey_opencl_inputs), FILTER_OUTPUTS(colorkey_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_colorlevels.c b/libavfilter/vf_colorlevels.c index e33bdf6799..5fa378ca38 100644 --- a/libavfilter/vf_colorlevels.c +++ b/libavfilter/vf_colorlevels.c @@ -557,11 +557,12 @@ static const AVFilterPad colorlevels_inputs[] = { }, }; -const AVFilter ff_vf_colorlevels = { - .name = "colorlevels", - .description = NULL_IF_CONFIG_SMALL("Adjust the color levels."), +const FFFilter ff_vf_colorlevels = { + .p.name = "colorlevels", + .p.description = NULL_IF_CONFIG_SMALL("Adjust the color levels."), + .p.priv_class = &colorlevels_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorLevelsContext), - .priv_class = &colorlevels_class, FILTER_INPUTS(colorlevels_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS(AV_PIX_FMT_0RGB, AV_PIX_FMT_0BGR, @@ -578,6 +579,5 @@ const AVFilter ff_vf_colorlevels = { AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP16, AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_colormap.c b/libavfilter/vf_colormap.c index 77b7067d07..e0afc471ef 100644 --- a/libavfilter/vf_colormap.c +++ b/libavfilter/vf_colormap.c @@ -561,17 +561,17 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(colormap); -const AVFilter ff_vf_colormap = { - .name = "colormap", - .description = NULL_IF_CONFIG_SMALL("Apply custom Color Maps to video stream."), - .priv_class = &colormap_class, +const FFFilter ff_vf_colormap = { + .p.name = "colormap", + .p.description = NULL_IF_CONFIG_SMALL("Apply custom Color Maps to video stream."), + .p.priv_class = &colormap_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorMapContext), .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, .uninit = uninit, }; diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c index d0e3043fd5..04504cd3fb 100644 --- a/libavfilter/vf_colormatrix.c +++ b/libavfilter/vf_colormatrix.c @@ -481,9 +481,11 @@ static const AVFilterPad colormatrix_inputs[] = { }, }; -const AVFilter ff_vf_colormatrix = { - .name = "colormatrix", - .description = NULL_IF_CONFIG_SMALL("Convert color matrix."), +const FFFilter ff_vf_colormatrix = { + .p.name = "colormatrix", + .p.description = NULL_IF_CONFIG_SMALL("Convert color matrix."), + .p.priv_class = &colormatrix_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorMatrixContext), .init = init, FILTER_INPUTS(colormatrix_inputs), @@ -492,6 +494,4 @@ const AVFilter ff_vf_colormatrix = { AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_UYVY422), - .priv_class = &colormatrix_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index 84c6767302..e1f4725f63 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -1037,15 +1037,15 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_colorspace = { - .name = "colorspace", - .description = NULL_IF_CONFIG_SMALL("Convert between colorspaces."), +const FFFilter ff_vf_colorspace = { + .p.name = "colorspace", + .p.description = NULL_IF_CONFIG_SMALL("Convert between colorspaces."), + .p.priv_class = &colorspace_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .init = init, .uninit = uninit, .priv_size = sizeof(ColorSpaceContext), - .priv_class = &colorspace_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_colorspace_cuda.c b/libavfilter/vf_colorspace_cuda.c index 9d1058ff7f..54d6228cd1 100644 --- a/libavfilter/vf_colorspace_cuda.c +++ b/libavfilter/vf_colorspace_cuda.c @@ -418,15 +418,16 @@ static const AVFilterPad cudacolorspace_outputs[] = { }, }; -const AVFilter ff_vf_colorspace_cuda = { - .name = "colorspace_cuda", - .description = NULL_IF_CONFIG_SMALL("CUDA accelerated video color converter"), +const FFFilter ff_vf_colorspace_cuda = { + .p.name = "colorspace_cuda", + .p.description = NULL_IF_CONFIG_SMALL("CUDA accelerated video color converter"), + + .p.priv_class = &cudacolorspace_class, .init = cudacolorspace_init, .uninit = cudacolorspace_uninit, .priv_size = sizeof(CUDAColorspaceContext), - .priv_class = &cudacolorspace_class, FILTER_INPUTS(cudacolorspace_inputs), FILTER_OUTPUTS(cudacolorspace_outputs), diff --git a/libavfilter/vf_colortemperature.c b/libavfilter/vf_colortemperature.c index 3c2f347885..b56bf837fb 100644 --- a/libavfilter/vf_colortemperature.c +++ b/libavfilter/vf_colortemperature.c @@ -380,14 +380,14 @@ static const AVOption colortemperature_options[] = { AVFILTER_DEFINE_CLASS(colortemperature); -const AVFilter ff_vf_colortemperature = { - .name = "colortemperature", - .description = NULL_IF_CONFIG_SMALL("Adjust color temperature of video."), +const FFFilter ff_vf_colortemperature = { + .p.name = "colortemperature", + .p.description = NULL_IF_CONFIG_SMALL("Adjust color temperature of video."), + .p.priv_class = &colortemperature_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ColorTemperatureContext), - .priv_class = &colortemperature_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_convolution.c b/libavfilter/vf_convolution.c index aacfe0add2..1f4efea9aa 100644 --- a/libavfilter/vf_convolution.c +++ b/libavfilter/vf_convolution.c @@ -877,15 +877,15 @@ static const AVFilterPad convolution_inputs[] = { #if CONFIG_CONVOLUTION_FILTER -const AVFilter ff_vf_convolution = { - .name = "convolution", - .description = NULL_IF_CONFIG_SMALL("Apply convolution filter."), +const FFFilter ff_vf_convolution = { + .p.name = "convolution", + .p.description = NULL_IF_CONFIG_SMALL("Apply convolution filter."), + .p.priv_class = &convolution_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), - .priv_class = &convolution_class, FILTER_INPUTS(convolution_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -903,15 +903,15 @@ AVFILTER_DEFINE_CLASS_EXT(common, "kirsch/prewitt/roberts/scharr/sobel", #if CONFIG_PREWITT_FILTER -const AVFilter ff_vf_prewitt = { - .name = "prewitt", - .description = NULL_IF_CONFIG_SMALL("Apply prewitt operator."), +const FFFilter ff_vf_prewitt = { + .p.name = "prewitt", + .p.description = NULL_IF_CONFIG_SMALL("Apply prewitt operator."), + .p.priv_class = &common_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), - .priv_class = &common_class, FILTER_INPUTS(convolution_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -919,15 +919,15 @@ const AVFilter ff_vf_prewitt = { #if CONFIG_SOBEL_FILTER -const AVFilter ff_vf_sobel = { - .name = "sobel", - .description = NULL_IF_CONFIG_SMALL("Apply sobel operator."), +const FFFilter ff_vf_sobel = { + .p.name = "sobel", + .p.description = NULL_IF_CONFIG_SMALL("Apply sobel operator."), + .p.priv_class = &common_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), - .priv_class = &common_class, FILTER_INPUTS(convolution_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -935,15 +935,15 @@ const AVFilter ff_vf_sobel = { #if CONFIG_ROBERTS_FILTER -const AVFilter ff_vf_roberts = { - .name = "roberts", - .description = NULL_IF_CONFIG_SMALL("Apply roberts cross operator."), +const FFFilter ff_vf_roberts = { + .p.name = "roberts", + .p.description = NULL_IF_CONFIG_SMALL("Apply roberts cross operator."), + .p.priv_class = &common_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), - .priv_class = &common_class, FILTER_INPUTS(convolution_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -951,15 +951,15 @@ const AVFilter ff_vf_roberts = { #if CONFIG_KIRSCH_FILTER -const AVFilter ff_vf_kirsch = { - .name = "kirsch", - .description = NULL_IF_CONFIG_SMALL("Apply kirsch operator."), +const FFFilter ff_vf_kirsch = { + .p.name = "kirsch", + .p.description = NULL_IF_CONFIG_SMALL("Apply kirsch operator."), + .p.priv_class = &common_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), - .priv_class = &common_class, FILTER_INPUTS(convolution_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -967,15 +967,15 @@ const AVFilter ff_vf_kirsch = { #if CONFIG_SCHARR_FILTER -const AVFilter ff_vf_scharr = { - .name = "scharr", - .description = NULL_IF_CONFIG_SMALL("Apply scharr operator."), +const FFFilter ff_vf_scharr = { + .p.name = "scharr", + .p.description = NULL_IF_CONFIG_SMALL("Apply scharr operator."), + .p.priv_class = &common_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ConvolutionContext), - .priv_class = &common_class, FILTER_INPUTS(convolution_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_convolution_opencl.c b/libavfilter/vf_convolution_opencl.c index ba6f084548..7193a2b0d9 100644 --- a/libavfilter/vf_convolution_opencl.c +++ b/libavfilter/vf_convolution_opencl.c @@ -365,18 +365,18 @@ static const AVOption convolution_opencl_options[] = { AVFILTER_DEFINE_CLASS(convolution_opencl); -const AVFilter ff_vf_convolution_opencl = { - .name = "convolution_opencl", - .description = NULL_IF_CONFIG_SMALL("Apply convolution mask to input video"), +const FFFilter ff_vf_convolution_opencl = { + .p.name = "convolution_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Apply convolution mask to input video"), + .p.priv_class = &convolution_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(ConvolutionOpenCLContext), - .priv_class = &convolution_opencl_class, .init = &ff_opencl_filter_init, .uninit = &convolution_opencl_uninit, FILTER_INPUTS(convolution_opencl_inputs), FILTER_OUTPUTS(convolution_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; #endif /* CONFIG_CONVOLUTION_OPENCL_FILTER */ @@ -392,18 +392,18 @@ static const AVOption sobel_opencl_options[] = { AVFILTER_DEFINE_CLASS(sobel_opencl); -const AVFilter ff_vf_sobel_opencl = { - .name = "sobel_opencl", - .description = NULL_IF_CONFIG_SMALL("Apply sobel operator"), +const FFFilter ff_vf_sobel_opencl = { + .p.name = "sobel_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Apply sobel operator"), + .p.priv_class = &sobel_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(ConvolutionOpenCLContext), - .priv_class = &sobel_opencl_class, .init = &ff_opencl_filter_init, .uninit = &convolution_opencl_uninit, FILTER_INPUTS(convolution_opencl_inputs), FILTER_OUTPUTS(convolution_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; #endif /* CONFIG_SOBEL_OPENCL_FILTER */ @@ -419,18 +419,18 @@ static const AVOption prewitt_opencl_options[] = { AVFILTER_DEFINE_CLASS(prewitt_opencl); -const AVFilter ff_vf_prewitt_opencl = { - .name = "prewitt_opencl", - .description = NULL_IF_CONFIG_SMALL("Apply prewitt operator"), +const FFFilter ff_vf_prewitt_opencl = { + .p.name = "prewitt_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Apply prewitt operator"), + .p.priv_class = &prewitt_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(ConvolutionOpenCLContext), - .priv_class = &prewitt_opencl_class, .init = &ff_opencl_filter_init, .uninit = &convolution_opencl_uninit, FILTER_INPUTS(convolution_opencl_inputs), FILTER_OUTPUTS(convolution_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; #endif /* CONFIG_PREWITT_OPENCL_FILTER */ @@ -446,18 +446,18 @@ static const AVOption roberts_opencl_options[] = { AVFILTER_DEFINE_CLASS(roberts_opencl); -const AVFilter ff_vf_roberts_opencl = { - .name = "roberts_opencl", - .description = NULL_IF_CONFIG_SMALL("Apply roberts operator"), +const FFFilter ff_vf_roberts_opencl = { + .p.name = "roberts_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Apply roberts operator"), + .p.priv_class = &roberts_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(ConvolutionOpenCLContext), - .priv_class = &roberts_opencl_class, .init = &ff_opencl_filter_init, .uninit = &convolution_opencl_uninit, FILTER_INPUTS(convolution_opencl_inputs), FILTER_OUTPUTS(convolution_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; #endif /* CONFIG_ROBERTS_OPENCL_FILTER */ diff --git a/libavfilter/vf_convolve.c b/libavfilter/vf_convolve.c index 1c1e0ba08f..ea9cc45882 100644 --- a/libavfilter/vf_convolve.c +++ b/libavfilter/vf_convolve.c @@ -874,19 +874,19 @@ FRAMESYNC_AUXILIARY_FUNCS(convolve, ConvolveContext, fs) FRAMESYNC_DEFINE_PURE_CLASS(convolve, "convolve", convolve, convolve_options); -const AVFilter ff_vf_convolve = { - .name = "convolve", - .description = NULL_IF_CONFIG_SMALL("Convolve first video stream with second video stream."), +const FFFilter ff_vf_convolve = { + .p.name = "convolve", + .p.description = NULL_IF_CONFIG_SMALL("Convolve first video stream with second video stream."), + .p.priv_class = &convolve_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .preinit = convolve_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(ConvolveContext), - .priv_class = &convolve_class, FILTER_INPUTS(convolve_inputs), FILTER_OUTPUTS(convolve_outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts_fftfilt), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; #endif /* CONFIG_CONVOLVE_FILTER */ @@ -904,19 +904,19 @@ static const AVOption deconvolve_options[] = { FRAMESYNC_DEFINE_PURE_CLASS(deconvolve, "deconvolve", convolve, deconvolve_options); -const AVFilter ff_vf_deconvolve = { - .name = "deconvolve", - .description = NULL_IF_CONFIG_SMALL("Deconvolve first video stream with second video stream."), +const FFFilter ff_vf_deconvolve = { + .p.name = "deconvolve", + .p.description = NULL_IF_CONFIG_SMALL("Deconvolve first video stream with second video stream."), + .p.priv_class = &deconvolve_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .preinit = convolve_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(ConvolveContext), - .priv_class = &deconvolve_class, FILTER_INPUTS(convolve_inputs), FILTER_OUTPUTS(convolve_outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts_fftfilt), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; #endif /* CONFIG_DECONVOLVE_FILTER */ @@ -960,19 +960,19 @@ static const AVFilterPad xcorrelate_inputs[] = { #define xcorrelate_outputs convolve_outputs -const AVFilter ff_vf_xcorrelate = { - .name = "xcorrelate", - .description = NULL_IF_CONFIG_SMALL("Cross-correlate first video stream with second video stream."), +const FFFilter ff_vf_xcorrelate = { + .p.name = "xcorrelate", + .p.description = NULL_IF_CONFIG_SMALL("Cross-correlate first video stream with second video stream."), + .p.priv_class = &xcorrelate_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .preinit = convolve_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(ConvolveContext), - .priv_class = &xcorrelate_class, FILTER_INPUTS(xcorrelate_inputs), FILTER_OUTPUTS(xcorrelate_outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts_fftfilt), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; #endif /* CONFIG_XCORRELATE_FILTER */ diff --git a/libavfilter/vf_copy.c b/libavfilter/vf_copy.c index 87cb9e9bd2..c6d5191901 100644 --- a/libavfilter/vf_copy.c +++ b/libavfilter/vf_copy.c @@ -69,10 +69,10 @@ static const AVFilterPad avfilter_vf_copy_inputs[] = { }, }; -const AVFilter ff_vf_copy = { - .name = "copy", - .description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."), - .flags = AVFILTER_FLAG_METADATA_ONLY, +const FFFilter ff_vf_copy = { + .p.name = "copy", + .p.description = NULL_IF_CONFIG_SMALL("Copy the input video unchanged to the output."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_copy_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), diff --git a/libavfilter/vf_coreimage.m b/libavfilter/vf_coreimage.m index b660d4373a..ec7eaa4b80 100644 --- a/libavfilter/vf_coreimage.m +++ b/libavfilter/vf_coreimage.m @@ -617,13 +617,13 @@ static const AVOption coreimage_options[] = { AVFILTER_DEFINE_CLASS(coreimage); -const AVFilter ff_vf_coreimage = { - .name = "coreimage", - .description = NULL_IF_CONFIG_SMALL("Video filtering using CoreImage API."), +const FFFilter ff_vf_coreimage = { + .p.name = "coreimage", + .p.description = NULL_IF_CONFIG_SMALL("Video filtering using CoreImage API."), + .p.priv_class = &coreimage_class, .init = init, .uninit = uninit, .priv_size = sizeof(CoreImageContext), - .priv_class = &coreimage_class, FILTER_INPUTS(vf_coreimage_inputs), FILTER_OUTPUTS(vf_coreimage_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_ARGB), @@ -638,14 +638,14 @@ static const AVOption coreimagesrc_options[] = { AVFILTER_DEFINE_CLASS(coreimagesrc); -const AVFilter ff_vsrc_coreimagesrc = { - .name = "coreimagesrc", - .description = NULL_IF_CONFIG_SMALL("Video source using image generators of CoreImage API."), +const FFFilter ff_vsrc_coreimagesrc = { + .p.name = "coreimagesrc", + .p.description = NULL_IF_CONFIG_SMALL("Video source using image generators of CoreImage API."), + .p.priv_class = &coreimagesrc_class, + .p.inputs = NULL, .init = init_src, .uninit = uninit, .priv_size = sizeof(CoreImageContext), - .priv_class = &coreimagesrc_class, - .inputs = NULL, FILTER_OUTPUTS(vsrc_coreimagesrc_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_ARGB), }; diff --git a/libavfilter/vf_corr.c b/libavfilter/vf_corr.c index 9df1826c9b..7b87fa2c48 100644 --- a/libavfilter/vf_corr.c +++ b/libavfilter/vf_corr.c @@ -417,19 +417,19 @@ static const AVOption options[] = { #define corr_options options FRAMESYNC_DEFINE_CLASS(corr, CorrContext, fs); -const AVFilter ff_vf_corr = { - .name = "corr", - .description = NULL_IF_CONFIG_SMALL("Calculate the correlation between two video streams."), +const FFFilter ff_vf_corr = { + .p.name = "corr", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the correlation between two video streams."), + .p.priv_class = &corr_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, .preinit = corr_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(CorrContext), - .priv_class = &corr_class, FILTER_INPUTS(corr_inputs), FILTER_OUTPUTS(corr_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_cover_rect.c b/libavfilter/vf_cover_rect.c index 95df291ba5..410869d9c3 100644 --- a/libavfilter/vf_cover_rect.c +++ b/libavfilter/vf_cover_rect.c @@ -232,14 +232,14 @@ static const AVFilterPad cover_rect_inputs[] = { }, }; -const AVFilter ff_vf_cover_rect = { - .name = "cover_rect", - .description = NULL_IF_CONFIG_SMALL("Find and cover a user specified object."), +const FFFilter ff_vf_cover_rect = { + .p.name = "cover_rect", + .p.description = NULL_IF_CONFIG_SMALL("Find and cover a user specified object."), + .p.priv_class = &cover_rect_class, .priv_size = sizeof(CoverContext), .init = init, .uninit = uninit, FILTER_INPUTS(cover_rect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS(AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P), - .priv_class = &cover_rect_class, }; diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index f3cbc83b8b..fd0750c755 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -400,11 +400,11 @@ static const AVFilterPad avfilter_vf_crop_outputs[] = { }, }; -const AVFilter ff_vf_crop = { - .name = "crop", - .description = NULL_IF_CONFIG_SMALL("Crop the input video."), +const FFFilter ff_vf_crop = { + .p.name = "crop", + .p.description = NULL_IF_CONFIG_SMALL("Crop the input video."), + .p.priv_class = &crop_class, .priv_size = sizeof(CropContext), - .priv_class = &crop_class, .uninit = uninit, FILTER_INPUTS(avfilter_vf_crop_inputs), FILTER_OUTPUTS(avfilter_vf_crop_outputs), diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c index 8b02778037..7c14cd117e 100644 --- a/libavfilter/vf_cropdetect.c +++ b/libavfilter/vf_cropdetect.c @@ -495,16 +495,16 @@ static const AVFilterPad avfilter_vf_cropdetect_inputs[] = { }, }; -const AVFilter ff_vf_cropdetect = { - .name = "cropdetect", - .description = NULL_IF_CONFIG_SMALL("Auto-detect crop size."), +const FFFilter ff_vf_cropdetect = { + .p.name = "cropdetect", + .p.description = NULL_IF_CONFIG_SMALL("Auto-detect crop size."), + .p.priv_class = &cropdetect_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(CropDetectContext), - .priv_class = &cropdetect_class, .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_vf_cropdetect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, .process_command = process_command, }; diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c index dc399cf846..4f302209e6 100644 --- a/libavfilter/vf_curves.c +++ b/libavfilter/vf_curves.c @@ -1008,9 +1008,11 @@ static const AVFilterPad curves_inputs[] = { }, }; -const AVFilter ff_vf_curves = { - .name = "curves", - .description = NULL_IF_CONFIG_SMALL("Adjust components curves."), +const FFFilter ff_vf_curves = { + .p.name = "curves", + .p.description = NULL_IF_CONFIG_SMALL("Adjust components curves."), + .p.priv_class = &curves_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(CurvesContext), .init = curves_init, .uninit = curves_uninit, @@ -1029,7 +1031,5 @@ const AVFilter ff_vf_curves = { AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRAP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_GBRAP16), - .priv_class = &curves_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_datascope.c b/libavfilter/vf_datascope.c index a4f6c69bfd..75dc149fbd 100644 --- a/libavfilter/vf_datascope.c +++ b/libavfilter/vf_datascope.c @@ -451,15 +451,15 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_datascope = { - .name = "datascope", - .description = NULL_IF_CONFIG_SMALL("Video data analysis."), +const FFFilter ff_vf_datascope = { + .p.name = "datascope", + .p.description = NULL_IF_CONFIG_SMALL("Video data analysis."), + .p.priv_class = &datascope_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(DatascopeContext), - .priv_class = &datascope_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -731,15 +731,15 @@ static const AVFilterPad pixscope_inputs[] = { }, }; -const AVFilter ff_vf_pixscope = { - .name = "pixscope", - .description = NULL_IF_CONFIG_SMALL("Pixel data analysis."), +const FFFilter ff_vf_pixscope = { + .p.name = "pixscope", + .p.description = NULL_IF_CONFIG_SMALL("Pixel data analysis."), + .p.priv_class = &pixscope_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(PixscopeContext), - .priv_class = &pixscope_class, FILTER_INPUTS(pixscope_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = pixscope_process_command, }; @@ -1129,15 +1129,15 @@ static const AVFilterPad oscilloscope_inputs[] = { }, }; -const AVFilter ff_vf_oscilloscope = { - .name = "oscilloscope", - .description = NULL_IF_CONFIG_SMALL("2D Video Oscilloscope."), +const FFFilter ff_vf_oscilloscope = { + .p.name = "oscilloscope", + .p.description = NULL_IF_CONFIG_SMALL("2D Video Oscilloscope."), + .p.priv_class = &oscilloscope_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(OscilloscopeContext), - .priv_class = &oscilloscope_class, .uninit = oscilloscope_uninit, FILTER_INPUTS(oscilloscope_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = oscilloscope_process_command, }; diff --git a/libavfilter/vf_dblur.c b/libavfilter/vf_dblur.c index 9ea42f2a52..517d4e5617 100644 --- a/libavfilter/vf_dblur.c +++ b/libavfilter/vf_dblur.c @@ -299,15 +299,15 @@ static const AVFilterPad dblur_inputs[] = { }, }; -const AVFilter ff_vf_dblur = { - .name = "dblur", - .description = NULL_IF_CONFIG_SMALL("Apply Directional Blur filter."), +const FFFilter ff_vf_dblur = { + .p.name = "dblur", + .p.description = NULL_IF_CONFIG_SMALL("Apply Directional Blur filter."), + .p.priv_class = &dblur_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(DBlurContext), - .priv_class = &dblur_class, .uninit = uninit, FILTER_INPUTS(dblur_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c index 9d1247c8f0..50cd18f7ce 100644 --- a/libavfilter/vf_dctdnoiz.c +++ b/libavfilter/vf_dctdnoiz.c @@ -812,15 +812,15 @@ static const AVFilterPad dctdnoiz_inputs[] = { }, }; -const AVFilter ff_vf_dctdnoiz = { - .name = "dctdnoiz", - .description = NULL_IF_CONFIG_SMALL("Denoise frames using 2D DCT."), +const FFFilter ff_vf_dctdnoiz = { + .p.name = "dctdnoiz", + .p.description = NULL_IF_CONFIG_SMALL("Denoise frames using 2D DCT."), + .p.priv_class = &dctdnoiz_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(DCTdnoizContext), .init = init, .uninit = uninit, FILTER_INPUTS(dctdnoiz_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &dctdnoiz_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_deband.c b/libavfilter/vf_deband.c index 4ba22c85a0..043e33669d 100644 --- a/libavfilter/vf_deband.c +++ b/libavfilter/vf_deband.c @@ -463,15 +463,15 @@ static const AVFilterPad avfilter_vf_deband_inputs[] = { }, }; -const AVFilter ff_vf_deband = { - .name = "deband", - .description = NULL_IF_CONFIG_SMALL("Debands video."), +const FFFilter ff_vf_deband = { + .p.name = "deband", + .p.description = NULL_IF_CONFIG_SMALL("Debands video."), + .p.priv_class = &deband_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(DebandContext), - .priv_class = &deband_class, .uninit = uninit, FILTER_INPUTS(avfilter_vf_deband_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_deblock.c b/libavfilter/vf_deblock.c index 3b07856dc7..e3f4c80ae1 100644 --- a/libavfilter/vf_deblock.c +++ b/libavfilter/vf_deblock.c @@ -411,14 +411,14 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(deblock); -const AVFilter ff_vf_deblock = { - .name = "deblock", - .description = NULL_IF_CONFIG_SMALL("Deblock video."), +const FFFilter ff_vf_deblock = { + .p.name = "deblock", + .p.description = NULL_IF_CONFIG_SMALL("Deblock video."), + .p.priv_class = &deblock_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(DeblockContext), - .priv_class = &deblock_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, }; diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c index 2e3dba5e74..9fee8a1472 100644 --- a/libavfilter/vf_decimate.c +++ b/libavfilter/vf_decimate.c @@ -450,15 +450,15 @@ static const AVFilterPad decimate_outputs[] = { }, }; -const AVFilter ff_vf_decimate = { - .name = "decimate", - .description = NULL_IF_CONFIG_SMALL("Decimate frames (post field matching filter)."), +const FFFilter ff_vf_decimate = { + .p.name = "decimate", + .p.description = NULL_IF_CONFIG_SMALL("Decimate frames (post field matching filter)."), + .p.priv_class = &decimate_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .init = decimate_init, .activate = activate, .uninit = decimate_uninit, .priv_size = sizeof(DecimateContext), FILTER_OUTPUTS(decimate_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &decimate_class, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/vf_dedot.c b/libavfilter/vf_dedot.c index 09fd973e5d..69b92141d1 100644 --- a/libavfilter/vf_dedot.c +++ b/libavfilter/vf_dedot.c @@ -382,15 +382,15 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(dedot); -const AVFilter ff_vf_dedot = { - .name = "dedot", - .description = NULL_IF_CONFIG_SMALL("Reduce cross-luminance and cross-color."), +const FFFilter ff_vf_dedot = { + .p.name = "dedot", + .p.description = NULL_IF_CONFIG_SMALL("Reduce cross-luminance and cross-color."), + .p.priv_class = &dedot_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(DedotContext), - .priv_class = &dedot_class, .activate = activate, .uninit = uninit, FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_deflicker.c b/libavfilter/vf_deflicker.c index da16677f6d..38f838f088 100644 --- a/libavfilter/vf_deflicker.c +++ b/libavfilter/vf_deflicker.c @@ -457,11 +457,11 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_deflicker = { - .name = "deflicker", - .description = NULL_IF_CONFIG_SMALL("Remove temporal frame luminance variations."), +const FFFilter ff_vf_deflicker = { + .p.name = "deflicker", + .p.description = NULL_IF_CONFIG_SMALL("Remove temporal frame luminance variations."), + .p.priv_class = &deflicker_class, .priv_size = sizeof(DeflickerContext), - .priv_class = &deflicker_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), diff --git a/libavfilter/vf_deinterlace_vaapi.c b/libavfilter/vf_deinterlace_vaapi.c index 35e68d6e17..e37c2835bb 100644 --- a/libavfilter/vf_deinterlace_vaapi.c +++ b/libavfilter/vf_deinterlace_vaapi.c @@ -417,15 +417,15 @@ static const AVFilterPad deint_vaapi_outputs[] = { }, }; -const AVFilter ff_vf_deinterlace_vaapi = { - .name = "deinterlace_vaapi", - .description = NULL_IF_CONFIG_SMALL("Deinterlacing of VAAPI surfaces"), +const FFFilter ff_vf_deinterlace_vaapi = { + .p.name = "deinterlace_vaapi", + .p.description = NULL_IF_CONFIG_SMALL("Deinterlacing of VAAPI surfaces"), + .p.priv_class = &deint_vaapi_class, .priv_size = sizeof(DeintVAAPIContext), .init = &deint_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, FILTER_INPUTS(deint_vaapi_inputs), FILTER_OUTPUTS(deint_vaapi_outputs), FILTER_QUERY_FUNC2(&ff_vaapi_vpp_query_formats), - .priv_class = &deint_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_dejudder.c b/libavfilter/vf_dejudder.c index 75177e22ae..9d0c4717d2 100644 --- a/libavfilter/vf_dejudder.c +++ b/libavfilter/vf_dejudder.c @@ -174,11 +174,11 @@ static const AVFilterPad dejudder_outputs[] = { }, }; -const AVFilter ff_vf_dejudder = { - .name = "dejudder", - .description = NULL_IF_CONFIG_SMALL("Remove judder produced by pullup."), +const FFFilter ff_vf_dejudder = { + .p.name = "dejudder", + .p.description= NULL_IF_CONFIG_SMALL("Remove judder produced by pullup."), + .p.priv_class= &dejudder_class, .priv_size = sizeof(DejudderContext), - .priv_class = &dejudder_class, FILTER_INPUTS(dejudder_inputs), FILTER_OUTPUTS(dejudder_outputs), .init = dejudder_init, diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index 942deb1c53..bfbf8e6f4c 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -381,15 +381,15 @@ static const AVFilterPad avfilter_vf_delogo_inputs[] = { }, }; -const AVFilter ff_vf_delogo = { - .name = "delogo", - .description = NULL_IF_CONFIG_SMALL("Remove logo from input video."), +const FFFilter ff_vf_delogo = { + .p.name = "delogo", + .p.description = NULL_IF_CONFIG_SMALL("Remove logo from input video."), + .p.priv_class = &delogo_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(DelogoContext), - .priv_class = &delogo_class, .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_vf_delogo_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_derain.c b/libavfilter/vf_derain.c index 6dd179c942..690a797bdb 100644 --- a/libavfilter/vf_derain.c +++ b/libavfilter/vf_derain.c @@ -106,9 +106,11 @@ static const AVFilterPad derain_inputs[] = { }, }; -const AVFilter ff_vf_derain = { - .name = "derain", - .description = NULL_IF_CONFIG_SMALL("Apply derain filter to the input."), +const FFFilter ff_vf_derain = { + .p.name = "derain", + .p.description = NULL_IF_CONFIG_SMALL("Apply derain filter to the input."), + .p.priv_class = &derain_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(DRContext), .preinit = ff_dnn_filter_init_child_class, .init = init, @@ -116,6 +118,4 @@ const AVFilter ff_vf_derain = { FILTER_INPUTS(derain_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_RGB24), - .priv_class = &derain_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index af140b86d2..afd0989e05 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -589,14 +589,14 @@ static const AVFilterPad deshake_inputs[] = { }, }; -const AVFilter ff_vf_deshake = { - .name = "deshake", - .description = NULL_IF_CONFIG_SMALL("Stabilize shaky video."), +const FFFilter ff_vf_deshake = { + .p.name = "deshake", + .p.description = NULL_IF_CONFIG_SMALL("Stabilize shaky video."), + .p.priv_class = &deshake_class, .priv_size = sizeof(DeshakeContext), .init = init, .uninit = uninit, FILTER_INPUTS(deshake_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &deshake_class, }; diff --git a/libavfilter/vf_deshake_opencl.c b/libavfilter/vf_deshake_opencl.c index 6f1d007a83..dc3df0e989 100644 --- a/libavfilter/vf_deshake_opencl.c +++ b/libavfilter/vf_deshake_opencl.c @@ -2151,11 +2151,12 @@ static const AVOption deshake_opencl_options[] = { AVFILTER_DEFINE_CLASS(deshake_opencl); -const AVFilter ff_vf_deshake_opencl = { - .name = "deshake_opencl", - .description = NULL_IF_CONFIG_SMALL("Feature-point based video stabilization filter"), +const FFFilter ff_vf_deshake_opencl = { + .p.name = "deshake_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Feature-point based video stabilization filter"), + .p.priv_class = &deshake_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(DeshakeOpenCLContext), - .priv_class = &deshake_opencl_class, .init = &ff_opencl_filter_init, .uninit = &deshake_opencl_uninit, .activate = activate, @@ -2163,5 +2164,4 @@ const AVFilter ff_vf_deshake_opencl = { FILTER_OUTPUTS(deshake_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_despill.c b/libavfilter/vf_despill.c index 9365114b91..25bdd1acd7 100644 --- a/libavfilter/vf_despill.c +++ b/libavfilter/vf_despill.c @@ -156,14 +156,14 @@ static const AVOption despill_options[] = { AVFILTER_DEFINE_CLASS(despill); -const AVFilter ff_vf_despill = { - .name = "despill", - .description = NULL_IF_CONFIG_SMALL("Despill video."), +const FFFilter ff_vf_despill = { + .p.name = "despill", + .p.description = NULL_IF_CONFIG_SMALL("Despill video."), + .p.priv_class = &despill_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(DespillContext), - .priv_class = &despill_class, FILTER_INPUTS(despill_inputs), FILTER_OUTPUTS(despill_outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), .process_command = ff_filter_process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_detelecine.c b/libavfilter/vf_detelecine.c index cc69194a19..65e4731418 100644 --- a/libavfilter/vf_detelecine.c +++ b/libavfilter/vf_detelecine.c @@ -371,11 +371,11 @@ static const AVFilterPad detelecine_outputs[] = { }, }; -const AVFilter ff_vf_detelecine = { - .name = "detelecine", - .description = NULL_IF_CONFIG_SMALL("Apply an inverse telecine pattern."), +const FFFilter ff_vf_detelecine = { + .p.name = "detelecine", + .p.description = NULL_IF_CONFIG_SMALL("Apply an inverse telecine pattern."), + .p.priv_class = &detelecine_class, .priv_size = sizeof(DetelecineContext), - .priv_class = &detelecine_class, .init = init, .uninit = uninit, FILTER_INPUTS(detelecine_inputs), diff --git a/libavfilter/vf_displace.c b/libavfilter/vf_displace.c index 6e3df139e6..055488e6c9 100644 --- a/libavfilter/vf_displace.c +++ b/libavfilter/vf_displace.c @@ -410,17 +410,17 @@ static const AVFilterPad displace_outputs[] = { }, }; -const AVFilter ff_vf_displace = { - .name = "displace", - .description = NULL_IF_CONFIG_SMALL("Displace pixels."), +const FFFilter ff_vf_displace = { + .p.name = "displace", + .p.description = NULL_IF_CONFIG_SMALL("Displace pixels."), + .p.priv_class = &displace_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(DisplaceContext), .uninit = uninit, .activate = activate, FILTER_INPUTS(displace_inputs), FILTER_OUTPUTS(displace_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &displace_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_dnn_classify.c b/libavfilter/vf_dnn_classify.c index c52e50ca96..f92c41ab76 100644 --- a/libavfilter/vf_dnn_classify.c +++ b/libavfilter/vf_dnn_classify.c @@ -293,9 +293,10 @@ static av_cold void dnn_classify_uninit(AVFilterContext *context) free_classify_labels(ctx); } -const AVFilter ff_vf_dnn_classify = { - .name = "dnn_classify", - .description = NULL_IF_CONFIG_SMALL("Apply DNN classify filter to the input."), +const FFFilter ff_vf_dnn_classify = { + .p.name = "dnn_classify", + .p.description = NULL_IF_CONFIG_SMALL("Apply DNN classify filter to the input."), + .p.priv_class = &dnn_classify_class, .priv_size = sizeof(DnnClassifyContext), .preinit = ff_dnn_filter_init_child_class, .init = dnn_classify_init, @@ -303,6 +304,5 @@ const AVFilter ff_vf_dnn_classify = { FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &dnn_classify_class, .activate = dnn_classify_activate, }; diff --git a/libavfilter/vf_dnn_detect.c b/libavfilter/vf_dnn_detect.c index 09e4c69c18..590e4e256d 100644 --- a/libavfilter/vf_dnn_detect.c +++ b/libavfilter/vf_dnn_detect.c @@ -852,9 +852,10 @@ static const AVFilterPad dnn_detect_inputs[] = { }, }; -const AVFilter ff_vf_dnn_detect = { - .name = "dnn_detect", - .description = NULL_IF_CONFIG_SMALL("Apply DNN detect filter to the input."), +const FFFilter ff_vf_dnn_detect = { + .p.name = "dnn_detect", + .p.description = NULL_IF_CONFIG_SMALL("Apply DNN detect filter to the input."), + .p.priv_class = &dnn_detect_class, .priv_size = sizeof(DnnDetectContext), .preinit = ff_dnn_filter_init_child_class, .init = dnn_detect_init, @@ -862,6 +863,5 @@ const AVFilter ff_vf_dnn_detect = { FILTER_INPUTS(dnn_detect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &dnn_detect_class, .activate = dnn_detect_activate, }; diff --git a/libavfilter/vf_dnn_processing.c b/libavfilter/vf_dnn_processing.c index eb75f06f05..0771ceb5fc 100644 --- a/libavfilter/vf_dnn_processing.c +++ b/libavfilter/vf_dnn_processing.c @@ -367,9 +367,10 @@ static const AVFilterPad dnn_processing_outputs[] = { }, }; -const AVFilter ff_vf_dnn_processing = { - .name = "dnn_processing", - .description = NULL_IF_CONFIG_SMALL("Apply DNN processing filter to the input."), +const FFFilter ff_vf_dnn_processing = { + .p.name = "dnn_processing", + .p.description = NULL_IF_CONFIG_SMALL("Apply DNN processing filter to the input."), + .p.priv_class = &dnn_processing_class, .priv_size = sizeof(DnnProcessingContext), .preinit = ff_dnn_filter_init_child_class, .init = init, @@ -377,6 +378,5 @@ const AVFilter ff_vf_dnn_processing = { FILTER_INPUTS(dnn_processing_inputs), FILTER_OUTPUTS(dnn_processing_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &dnn_processing_class, .activate = activate, }; diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c index 46dfc59ab8..18a0ead167 100644 --- a/libavfilter/vf_drawbox.c +++ b/libavfilter/vf_drawbox.c @@ -470,17 +470,17 @@ static const AVFilterPad drawbox_inputs[] = { }, }; -const AVFilter ff_vf_drawbox = { - .name = "drawbox", - .description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."), +const FFFilter ff_vf_drawbox = { + .p.name = "drawbox", + .p.description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."), + .p.priv_class = &drawbox_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(DrawBoxContext), - .priv_class = &drawbox_class, .init = init, FILTER_INPUTS(drawbox_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; #endif /* CONFIG_DRAWBOX_FILTER */ @@ -545,16 +545,16 @@ static const AVFilterPad drawgrid_inputs[] = { }, }; -const AVFilter ff_vf_drawgrid = { - .name = "drawgrid", - .description = NULL_IF_CONFIG_SMALL("Draw a colored grid on the input video."), +const FFFilter ff_vf_drawgrid = { + .p.name = "drawgrid", + .p.description = NULL_IF_CONFIG_SMALL("Draw a colored grid on the input video."), + .p.priv_class = &drawgrid_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(DrawBoxContext), - .priv_class = &drawgrid_class, .init = init, FILTER_INPUTS(drawgrid_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, }; diff --git a/libavfilter/vf_drawbox_vaapi.c b/libavfilter/vf_drawbox_vaapi.c index aa18f2fd39..e49886d599 100644 --- a/libavfilter/vf_drawbox_vaapi.c +++ b/libavfilter/vf_drawbox_vaapi.c @@ -355,11 +355,11 @@ static const AVFilterPad drawbox_vaapi_outputs[] = { }, }; -const AVFilter ff_vf_drawbox_vaapi = { - .name = "drawbox_vaapi", - .description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."), +const FFFilter ff_vf_drawbox_vaapi = { + .p.name = "drawbox_vaapi", + .p.description = NULL_IF_CONFIG_SMALL("Draw a colored box on the input video."), + .p.priv_class = &drawbox_vaapi_class, .priv_size = sizeof(DrawboxVAAPIContext), - .priv_class = &drawbox_vaapi_class, .init = &drawbox_vaapi_init, .uninit = &drawbox_vaapi_uninit, FILTER_INPUTS(drawbox_vaapi_inputs), diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index 8de24625d6..40e0e9a7ef 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1914,16 +1914,16 @@ static const AVFilterPad avfilter_vf_drawtext_inputs[] = { }, }; -const AVFilter ff_vf_drawtext = { - .name = "drawtext", - .description = NULL_IF_CONFIG_SMALL("Draw text on top of video frames using libfreetype library."), +const FFFilter ff_vf_drawtext = { + .p.name = "drawtext", + .p.description = NULL_IF_CONFIG_SMALL("Draw text on top of video frames using libfreetype library."), + .p.priv_class = &drawtext_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(DrawTextContext), - .priv_class = &drawtext_class, .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_vf_drawtext_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), .process_command = command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c index 1077095fd3..effb049a4c 100644 --- a/libavfilter/vf_edgedetect.c +++ b/libavfilter/vf_edgedetect.c @@ -252,15 +252,15 @@ static const AVFilterPad edgedetect_inputs[] = { }, }; -const AVFilter ff_vf_edgedetect = { - .name = "edgedetect", - .description = NULL_IF_CONFIG_SMALL("Detect and draw edge."), +const FFFilter ff_vf_edgedetect = { + .p.name = "edgedetect", + .p.description = NULL_IF_CONFIG_SMALL("Detect and draw edge."), + .p.priv_class = &edgedetect_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(EdgeDetectContext), .init = init, .uninit = uninit, FILTER_INPUTS(edgedetect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &edgedetect_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_elbg.c b/libavfilter/vf_elbg.c index 5eb5ffed2f..7e3e8cecb2 100644 --- a/libavfilter/vf_elbg.c +++ b/libavfilter/vf_elbg.c @@ -257,11 +257,11 @@ static const AVFilterPad elbg_inputs[] = { }, }; -const AVFilter ff_vf_elbg = { - .name = "elbg", - .description = NULL_IF_CONFIG_SMALL("Apply posterize effect, using the ELBG algorithm."), +const FFFilter ff_vf_elbg = { + .p.name = "elbg", + .p.description = NULL_IF_CONFIG_SMALL("Apply posterize effect, using the ELBG algorithm."), + .p.priv_class = &elbg_class, .priv_size = sizeof(ELBGFilterContext), - .priv_class = &elbg_class, .init = init, .uninit = uninit, FILTER_INPUTS(elbg_inputs), diff --git a/libavfilter/vf_entropy.c b/libavfilter/vf_entropy.c index e8dd7745d5..1d13bb484b 100644 --- a/libavfilter/vf_entropy.c +++ b/libavfilter/vf_entropy.c @@ -175,14 +175,14 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_entropy = { - .name = "entropy", - .description = NULL_IF_CONFIG_SMALL("Measure video frames entropy."), +const FFFilter ff_vf_entropy = { + .p.name = "entropy", + .p.description = NULL_IF_CONFIG_SMALL("Measure video frames entropy."), + .p.priv_class = &entropy_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(EntropyContext), .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixfmts), - .priv_class = &entropy_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_epx.c b/libavfilter/vf_epx.c index 6e66bdda3c..af40917b66 100644 --- a/libavfilter/vf_epx.c +++ b/libavfilter/vf_epx.c @@ -267,13 +267,13 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_epx = { - .name = "epx", - .description = NULL_IF_CONFIG_SMALL("Scale the input using EPX algorithm."), +const FFFilter ff_vf_epx = { + .p.name = "epx", + .p.description = NULL_IF_CONFIG_SMALL("Scale the input using EPX algorithm."), + .p.priv_class = &epx_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), .priv_size = sizeof(EPXContext), - .priv_class = &epx_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c index f3855f66a3..2d6822348f 100644 --- a/libavfilter/vf_eq.c +++ b/libavfilter/vf_eq.c @@ -345,16 +345,16 @@ static const AVOption eq_options[] = { AVFILTER_DEFINE_CLASS(eq); -const AVFilter ff_vf_eq = { - .name = "eq", - .description = NULL_IF_CONFIG_SMALL("Adjust brightness, contrast, gamma, and saturation."), +const FFFilter ff_vf_eq = { + .p.name = "eq", + .p.description = NULL_IF_CONFIG_SMALL("Adjust brightness, contrast, gamma, and saturation."), + .p.priv_class = &eq_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(EQContext), - .priv_class = &eq_class, FILTER_INPUTS(eq_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts_eq), .process_command = process_command, .init = initialize, .uninit = uninit, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_estdif.c b/libavfilter/vf_estdif.c index 477b8f8f90..08360533d1 100644 --- a/libavfilter/vf_estdif.c +++ b/libavfilter/vf_estdif.c @@ -580,15 +580,15 @@ static const AVFilterPad estdif_outputs[] = { }, }; -const AVFilter ff_vf_estdif = { - .name = "estdif", - .description = NULL_IF_CONFIG_SMALL("Apply Edge Slope Tracing deinterlace."), +const FFFilter ff_vf_estdif = { + .p.name = "estdif", + .p.description = NULL_IF_CONFIG_SMALL("Apply Edge Slope Tracing deinterlace."), + .p.priv_class = &estdif_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ESTDIFContext), - .priv_class = &estdif_class, .uninit = uninit, FILTER_INPUTS(estdif_inputs), FILTER_OUTPUTS(estdif_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_exposure.c b/libavfilter/vf_exposure.c index efdae40e00..833aa953d5 100644 --- a/libavfilter/vf_exposure.c +++ b/libavfilter/vf_exposure.c @@ -142,14 +142,14 @@ static const AVOption exposure_options[] = { AVFILTER_DEFINE_CLASS(exposure); -const AVFilter ff_vf_exposure = { - .name = "exposure", - .description = NULL_IF_CONFIG_SMALL("Adjust exposure of the video stream."), +const FFFilter ff_vf_exposure = { + .p.name = "exposure", + .p.description = NULL_IF_CONFIG_SMALL("Adjust exposure of the video stream."), + .p.priv_class = &exposure_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ExposureContext), - .priv_class = &exposure_class, FILTER_INPUTS(exposure_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c index 8873abf84b..337ad12ac7 100644 --- a/libavfilter/vf_extractplanes.c +++ b/libavfilter/vf_extractplanes.c @@ -416,17 +416,17 @@ static const AVFilterPad extractplanes_inputs[] = { }, }; -const AVFilter ff_vf_extractplanes = { - .name = "extractplanes", - .description = NULL_IF_CONFIG_SMALL("Extract planes as grayscale frames."), +const FFFilter ff_vf_extractplanes = { + .p.name = "extractplanes", + .p.description = NULL_IF_CONFIG_SMALL("Extract planes as grayscale frames."), + .p.priv_class = &extractplanes_class, + .p.outputs = NULL, + .p.flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, .priv_size = sizeof(ExtractPlanesContext), - .priv_class = &extractplanes_class, .init = init, .activate = activate, FILTER_INPUTS(extractplanes_inputs), - .outputs = NULL, FILTER_QUERY_FUNC(query_formats), - .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; #if CONFIG_ALPHAEXTRACT_FILTER @@ -449,9 +449,9 @@ static const AVFilterPad alphaextract_outputs[] = { }, }; -const AVFilter ff_vf_alphaextract = { - .name = "alphaextract", - .description = NULL_IF_CONFIG_SMALL("Extract an alpha channel as a " +const FFFilter ff_vf_alphaextract = { + .p.name = "alphaextract", + .p.description = NULL_IF_CONFIG_SMALL("Extract an alpha channel as a " "grayscale image component."), .priv_size = sizeof(ExtractPlanesContext), .init = init_alphaextract, diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c index 39f16b0b3a..69198ea1d1 100644 --- a/libavfilter/vf_fade.c +++ b/libavfilter/vf_fade.c @@ -560,15 +560,15 @@ static const AVFilterPad avfilter_vf_fade_inputs[] = { }, }; -const AVFilter ff_vf_fade = { - .name = "fade", - .description = NULL_IF_CONFIG_SMALL("Fade in/out input video."), +const FFFilter ff_vf_fade = { + .p.name = "fade", + .p.description = NULL_IF_CONFIG_SMALL("Fade in/out input video."), + .p.priv_class = &fade_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .init = init, .priv_size = sizeof(FadeContext), - .priv_class = &fade_class, FILTER_INPUTS(avfilter_vf_fade_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_feedback.c b/libavfilter/vf_feedback.c index 0b701ed9ea..6667ddfd16 100644 --- a/libavfilter/vf_feedback.c +++ b/libavfilter/vf_feedback.c @@ -325,10 +325,11 @@ static const AVOption feedback_options[] = { AVFILTER_DEFINE_CLASS(feedback); -const AVFilter ff_vf_feedback = { - .name = "feedback", - .description = NULL_IF_CONFIG_SMALL("Apply feedback video filter."), - .priv_class = &feedback_class, +const FFFilter ff_vf_feedback = { + .p.name = "feedback", + .p.description = NULL_IF_CONFIG_SMALL("Apply feedback video filter."), + .p.priv_class = &feedback_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(FeedbackContext), .activate = activate, .init = init, @@ -336,6 +337,5 @@ const AVFilter ff_vf_feedback = { FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_fftdnoiz.c b/libavfilter/vf_fftdnoiz.c index cbc49fe9a1..13afbf0377 100644 --- a/libavfilter/vf_fftdnoiz.c +++ b/libavfilter/vf_fftdnoiz.c @@ -747,16 +747,16 @@ static const AVFilterPad fftdnoiz_outputs[] = { }, }; -const AVFilter ff_vf_fftdnoiz = { - .name = "fftdnoiz", - .description = NULL_IF_CONFIG_SMALL("Denoise frames using 3D FFT."), +const FFFilter ff_vf_fftdnoiz = { + .p.name = "fftdnoiz", + .p.description = NULL_IF_CONFIG_SMALL("Denoise frames using 3D FFT."), + .p.priv_class = &fftdnoiz_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(FFTdnoizContext), .uninit = uninit, FILTER_INPUTS(fftdnoiz_inputs), FILTER_OUTPUTS(fftdnoiz_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &fftdnoiz_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_fftfilt.c b/libavfilter/vf_fftfilt.c index b60d47edcc..b94008fc15 100644 --- a/libavfilter/vf_fftfilt.c +++ b/libavfilter/vf_fftfilt.c @@ -592,15 +592,15 @@ static const AVFilterPad fftfilt_inputs[] = { }, }; -const AVFilter ff_vf_fftfilt = { - .name = "fftfilt", - .description = NULL_IF_CONFIG_SMALL("Apply arbitrary expressions to pixels in frequency domain."), +const FFFilter ff_vf_fftfilt = { + .p.name = "fftfilt", + .p.description = NULL_IF_CONFIG_SMALL("Apply arbitrary expressions to pixels in frequency domain."), + .p.priv_class = &fftfilt_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(FFTFILTContext), - .priv_class = &fftfilt_class, FILTER_INPUTS(fftfilt_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts_fftfilt), .init = initialize, .uninit = uninit, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_field.c b/libavfilter/vf_field.c index 2d730b3dd5..801fc42ce5 100644 --- a/libavfilter/vf_field.c +++ b/libavfilter/vf_field.c @@ -104,11 +104,11 @@ static const AVFilterPad field_outputs[] = { }, }; -const AVFilter ff_vf_field = { - .name = "field", - .description = NULL_IF_CONFIG_SMALL("Extract a field from the input video."), +const FFFilter ff_vf_field = { + .p.name = "field", + .p.description = NULL_IF_CONFIG_SMALL("Extract a field from the input video."), + .p.priv_class = &field_class, .priv_size = sizeof(FieldContext), FILTER_INPUTS(field_inputs), FILTER_OUTPUTS(field_outputs), - .priv_class = &field_class, }; diff --git a/libavfilter/vf_fieldhint.c b/libavfilter/vf_fieldhint.c index d1f05562c2..20f13e34d3 100644 --- a/libavfilter/vf_fieldhint.c +++ b/libavfilter/vf_fieldhint.c @@ -323,11 +323,11 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_fieldhint = { - .name = "fieldhint", - .description = NULL_IF_CONFIG_SMALL("Field matching using hints."), +const FFFilter ff_vf_fieldhint = { + .p.name = "fieldhint", + .p.description = NULL_IF_CONFIG_SMALL("Field matching using hints."), + .p.priv_class = &fieldhint_class, .priv_size = sizeof(FieldHintContext), - .priv_class = &fieldhint_class, .init = init, .uninit = uninit, FILTER_INPUTS(inputs), diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c index c3ff909b1b..5e68ad0e49 100644 --- a/libavfilter/vf_fieldmatch.c +++ b/libavfilter/vf_fieldmatch.c @@ -1073,16 +1073,15 @@ static const AVFilterPad fieldmatch_outputs[] = { }, }; -const AVFilter ff_vf_fieldmatch = { - .name = "fieldmatch", - .description = NULL_IF_CONFIG_SMALL("Field matching for inverse telecine."), +const FFFilter ff_vf_fieldmatch = { + .p.name = "fieldmatch", + .p.description = NULL_IF_CONFIG_SMALL("Field matching for inverse telecine."), + .p.priv_class = &fieldmatch_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(FieldMatchContext), .init = fieldmatch_init, .activate = activate, .uninit = fieldmatch_uninit, - .inputs = NULL, FILTER_OUTPUTS(fieldmatch_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &fieldmatch_class, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index 5b0c723e8d..dc5cb87517 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -178,13 +178,13 @@ static const AVFilterPad avfilter_vf_fieldorder_inputs[] = { }, }; -const AVFilter ff_vf_fieldorder = { - .name = "fieldorder", - .description = NULL_IF_CONFIG_SMALL("Set the field order."), +const FFFilter ff_vf_fieldorder = { + .p.name = "fieldorder", + .p.description = NULL_IF_CONFIG_SMALL("Set the field order."), + .p.priv_class = &fieldorder_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(FieldOrderContext), - .priv_class = &fieldorder_class, FILTER_INPUTS(avfilter_vf_fieldorder_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_fillborders.c b/libavfilter/vf_fillborders.c index 619b2cf75e..0ee4f14ab9 100644 --- a/libavfilter/vf_fillborders.c +++ b/libavfilter/vf_fillborders.c @@ -706,14 +706,14 @@ static const AVFilterPad fillborders_inputs[] = { }, }; -const AVFilter ff_vf_fillborders = { - .name = "fillborders", - .description = NULL_IF_CONFIG_SMALL("Fill borders of the input video."), +const FFFilter ff_vf_fillborders = { + .p.name = "fillborders", + .p.description = NULL_IF_CONFIG_SMALL("Fill borders of the input video."), + .p.priv_class = &fillborders_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(FillBordersContext), - .priv_class = &fillborders_class, FILTER_INPUTS(fillborders_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = process_command, }; diff --git a/libavfilter/vf_find_rect.c b/libavfilter/vf_find_rect.c index 1b11fbbb93..037be36fc5 100644 --- a/libavfilter/vf_find_rect.c +++ b/libavfilter/vf_find_rect.c @@ -284,15 +284,15 @@ static const AVFilterPad foc_inputs[] = { }, }; -const AVFilter ff_vf_find_rect = { - .name = "find_rect", - .description = NULL_IF_CONFIG_SMALL("Find a user specified object."), +const FFFilter ff_vf_find_rect = { + .p.name = "find_rect", + .p.description = NULL_IF_CONFIG_SMALL("Find a user specified object."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, + .p.priv_class = &find_rect_class, .priv_size = sizeof(FOCContext), .init = init, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(foc_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS(AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P), - .priv_class = &find_rect_class, }; diff --git a/libavfilter/vf_flip_vulkan.c b/libavfilter/vf_flip_vulkan.c index a8e5358ba5..2cf793cfe8 100644 --- a/libavfilter/vf_flip_vulkan.c +++ b/libavfilter/vf_flip_vulkan.c @@ -233,16 +233,16 @@ static const AVFilterPad hflip_vulkan_inputs[] = { } }; -const AVFilter ff_vf_hflip_vulkan = { - .name = "hflip_vulkan", - .description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video in Vulkan"), +const FFFilter ff_vf_hflip_vulkan = { + .p.name = "hflip_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video in Vulkan"), + .p.priv_class = &hflip_vulkan_class, .priv_size = sizeof(FlipVulkanContext), .init = &ff_vk_filter_init, .uninit = &flip_vulkan_uninit, FILTER_INPUTS(hflip_vulkan_inputs), FILTER_OUTPUTS(flip_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &hflip_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; @@ -261,16 +261,16 @@ static const AVFilterPad vflip_vulkan_inputs[] = { } }; -const AVFilter ff_vf_vflip_vulkan = { - .name = "vflip_vulkan", - .description = NULL_IF_CONFIG_SMALL("Vertically flip the input video in Vulkan"), +const FFFilter ff_vf_vflip_vulkan = { + .p.name = "vflip_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Vertically flip the input video in Vulkan"), + .p.priv_class = &vflip_vulkan_class, .priv_size = sizeof(FlipVulkanContext), .init = &ff_vk_filter_init, .uninit = &flip_vulkan_uninit, FILTER_INPUTS(vflip_vulkan_inputs), FILTER_OUTPUTS(flip_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &vflip_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; @@ -289,16 +289,16 @@ static const AVFilterPad flip_vulkan_inputs[] = { } }; -const AVFilter ff_vf_flip_vulkan = { - .name = "flip_vulkan", - .description = NULL_IF_CONFIG_SMALL("Flip both horizontally and vertically"), +const FFFilter ff_vf_flip_vulkan = { + .p.name = "flip_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Flip both horizontally and vertically"), + .p.priv_class = &flip_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(FlipVulkanContext), .init = &ff_vk_filter_init, .uninit = &flip_vulkan_uninit, FILTER_INPUTS(flip_vulkan_inputs), FILTER_OUTPUTS(flip_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &flip_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_floodfill.c b/libavfilter/vf_floodfill.c index 0d4c86173a..6d89963e71 100644 --- a/libavfilter/vf_floodfill.c +++ b/libavfilter/vf_floodfill.c @@ -403,14 +403,14 @@ static const AVOption floodfill_options[] = { AVFILTER_DEFINE_CLASS(floodfill); -const AVFilter ff_vf_floodfill = { - .name = "floodfill", - .description = NULL_IF_CONFIG_SMALL("Fill area with same color with another color."), +const FFFilter ff_vf_floodfill = { + .p.name = "floodfill", + .p.description = NULL_IF_CONFIG_SMALL("Fill area with same color with another color."), + .p.priv_class = &floodfill_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(FloodfillContext), - .priv_class = &floodfill_class, .uninit = uninit, FILTER_INPUTS(floodfill_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index 9dbb174c42..ae91b9655a 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -184,17 +184,17 @@ static const AVFilterPad inputs[] = { }; #if CONFIG_FORMAT_FILTER -const AVFilter ff_vf_format = { - .name = "format", - .description = NULL_IF_CONFIG_SMALL("Convert the input video to one of the specified pixel formats."), +const FFFilter ff_vf_format = { + .p.name = "format", + .p.description = NULL_IF_CONFIG_SMALL("Convert the input video to one of the specified pixel formats."), + .p.priv_class = &format_class, + + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .init = init, .uninit = uninit, .priv_size = sizeof(FormatContext), - .priv_class = &format_class, - - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), @@ -204,18 +204,18 @@ const AVFilter ff_vf_format = { #endif /* CONFIG_FORMAT_FILTER */ #if CONFIG_NOFORMAT_FILTER -const AVFilter ff_vf_noformat = { - .name = "noformat", - .description = NULL_IF_CONFIG_SMALL("Force libavfilter not to use any of the specified pixel formats for the input to the next filter."), - .priv_class = &format_class, +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.flags = AVFILTER_FLAG_METADATA_ONLY, .init = init, .uninit = uninit, .priv_size = sizeof(FormatContext), - .flags = AVFILTER_FLAG_METADATA_ONLY, - FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index 3eb43c0b26..0257a8ef78 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -386,15 +386,15 @@ static const AVFilterPad avfilter_vf_fps_outputs[] = { }, }; -const AVFilter ff_vf_fps = { - .name = "fps", - .description = NULL_IF_CONFIG_SMALL("Force constant framerate."), +const FFFilter ff_vf_fps = { + .p.name = "fps", + .p.description = NULL_IF_CONFIG_SMALL("Force constant framerate."), + .p.priv_class = &fps_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .init = init, .uninit = uninit, .priv_size = sizeof(FPSContext), - .priv_class = &fps_class, .activate = activate, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(avfilter_vf_fps_outputs), }; diff --git a/libavfilter/vf_framepack.c b/libavfilter/vf_framepack.c index daab49cfff..2c393d7f43 100644 --- a/libavfilter/vf_framepack.c +++ b/libavfilter/vf_framepack.c @@ -454,11 +454,11 @@ static const AVFilterPad framepack_outputs[] = { }, }; -const AVFilter ff_vf_framepack = { - .name = "framepack", - .description = NULL_IF_CONFIG_SMALL("Generate a frame packed stereoscopic video."), +const FFFilter ff_vf_framepack = { + .p.name = "framepack", + .p.description = NULL_IF_CONFIG_SMALL("Generate a frame packed stereoscopic video."), + .p.priv_class = &framepack_class, .priv_size = sizeof(FramepackContext), - .priv_class = &framepack_class, FILTER_INPUTS(framepack_inputs), FILTER_OUTPUTS(framepack_outputs), FILTER_PIXFMTS_ARRAY(formats_supported), diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c index 9e7cac660f..9976db8d93 100644 --- a/libavfilter/vf_framerate.c +++ b/libavfilter/vf_framerate.c @@ -432,16 +432,16 @@ static const AVFilterPad framerate_outputs[] = { }, }; -const AVFilter ff_vf_framerate = { - .name = "framerate", - .description = NULL_IF_CONFIG_SMALL("Upsamples or downsamples progressive source between specified frame rates."), +const FFFilter ff_vf_framerate = { + .p.name = "framerate", + .p.description = NULL_IF_CONFIG_SMALL("Upsamples or downsamples progressive source between specified frame rates."), + .p.priv_class = &framerate_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(FrameRateContext), - .priv_class = &framerate_class, .init = init, .uninit = uninit, FILTER_INPUTS(framerate_inputs), FILTER_OUTPUTS(framerate_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SLICE_THREADS, .activate = activate, }; diff --git a/libavfilter/vf_framestep.c b/libavfilter/vf_framestep.c index 98cbf05405..02beda6cf3 100644 --- a/libavfilter/vf_framestep.c +++ b/libavfilter/vf_framestep.c @@ -90,12 +90,12 @@ static const AVFilterPad framestep_outputs[] = { }, }; -const AVFilter ff_vf_framestep = { - .name = "framestep", - .description = NULL_IF_CONFIG_SMALL("Select one frame every N frames."), +const FFFilter ff_vf_framestep = { + .p.name = "framestep", + .p.description = NULL_IF_CONFIG_SMALL("Select one frame every N frames."), + .p.priv_class = &framestep_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(FrameStepContext), - .priv_class = &framestep_class, FILTER_INPUTS(framestep_inputs), FILTER_OUTPUTS(framestep_outputs), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_freezedetect.c b/libavfilter/vf_freezedetect.c index ef04a2764c..ce67eed3ae 100644 --- a/libavfilter/vf_freezedetect.c +++ b/libavfilter/vf_freezedetect.c @@ -205,13 +205,13 @@ static const AVFilterPad freezedetect_inputs[] = { }, }; -const AVFilter ff_vf_freezedetect = { - .name = "freezedetect", - .description = NULL_IF_CONFIG_SMALL("Detects frozen video input."), +const FFFilter ff_vf_freezedetect = { + .p.name = "freezedetect", + .p.description = NULL_IF_CONFIG_SMALL("Detects frozen video input."), + .p.priv_class = &freezedetect_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(FreezeDetectContext), - .priv_class = &freezedetect_class, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(freezedetect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_freezeframes.c b/libavfilter/vf_freezeframes.c index ff8112ce1e..b351aaa12e 100644 --- a/libavfilter/vf_freezeframes.c +++ b/libavfilter/vf_freezeframes.c @@ -155,11 +155,11 @@ static const AVFilterPad freezeframes_outputs[] = { }, }; -const AVFilter ff_vf_freezeframes = { - .name = "freezeframes", - .description = NULL_IF_CONFIG_SMALL("Freeze video frames."), +const FFFilter ff_vf_freezeframes = { + .p.name = "freezeframes", + .p.description = NULL_IF_CONFIG_SMALL("Freeze video frames."), + .p.priv_class = &freezeframes_class, .priv_size = sizeof(FreezeFramesContext), - .priv_class = &freezeframes_class, FILTER_INPUTS(freezeframes_inputs), FILTER_OUTPUTS(freezeframes_outputs), .activate = activate, diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index d3d7b33c4d..1284e27310 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -425,18 +425,18 @@ static const AVFilterPad avfilter_vf_frei0r_inputs[] = { }, }; -const AVFilter ff_vf_frei0r = { - .name = "frei0r", - .description = NULL_IF_CONFIG_SMALL("Apply a frei0r effect."), +const FFFilter ff_vf_frei0r = { + .p.name = "frei0r", + .p.description = NULL_IF_CONFIG_SMALL("Apply a frei0r effect."), + .p.priv_class = &frei0r_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .init = filter_init, .uninit = uninit, .priv_size = sizeof(Frei0rContext), - .priv_class = &frei0r_class, FILTER_INPUTS(avfilter_vf_frei0r_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), .process_command = process_command, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; static av_cold int source_init(AVFilterContext *ctx) @@ -514,14 +514,14 @@ static const AVFilterPad avfilter_vsrc_frei0r_src_outputs[] = { }, }; -const AVFilter ff_vsrc_frei0r_src = { - .name = "frei0r_src", - .description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."), +const FFFilter ff_vsrc_frei0r_src = { + .p.name = "frei0r_src", + .p.description = NULL_IF_CONFIG_SMALL("Generate a frei0r source."), + .p.priv_class = &frei0r_src_class, + .p.inputs = NULL, .priv_size = sizeof(Frei0rContext), - .priv_class = &frei0r_src_class, .init = source_init, .uninit = uninit, - .inputs = NULL, FILTER_OUTPUTS(avfilter_vsrc_frei0r_src_outputs), FILTER_QUERY_FUNC2(query_formats), }; diff --git a/libavfilter/vf_fspp.c b/libavfilter/vf_fspp.c index c35217e9f1..8ff048aeb1 100644 --- a/libavfilter/vf_fspp.c +++ b/libavfilter/vf_fspp.c @@ -655,14 +655,14 @@ static const AVFilterPad fspp_inputs[] = { }, }; -const AVFilter ff_vf_fspp = { - .name = "fspp", - .description = NULL_IF_CONFIG_SMALL("Apply Fast Simple Post-processing filter."), +const FFFilter ff_vf_fspp = { + .p.name = "fspp", + .p.description = NULL_IF_CONFIG_SMALL("Apply Fast Simple Post-processing filter."), + .p.priv_class = &fspp_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(FSPPContext), .uninit = uninit, FILTER_INPUTS(fspp_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &fspp_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_fsync.c b/libavfilter/vf_fsync.c index 8636ada0f8..02f10a9bd8 100644 --- a/libavfilter/vf_fsync.c +++ b/libavfilter/vf_fsync.c @@ -288,16 +288,16 @@ static const AVFilterPad fsync_outputs[] = { }, }; -const AVFilter ff_vf_fsync = { - .name = "fsync", - .description = NULL_IF_CONFIG_SMALL("Synchronize video frames from external source."), +const FFFilter ff_vf_fsync = { + .p.name = "fsync", + .p.description = NULL_IF_CONFIG_SMALL("Synchronize video frames from external source."), + .p.priv_class = &fsync_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .init = fsync_init, .uninit = fsync_uninit, .priv_size = sizeof(FsyncContext), - .priv_class = &fsync_class, .activate = activate, .formats_state = FF_FILTER_FORMATS_PASSTHROUGH, FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(fsync_outputs), - .flags = AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_gblur.c b/libavfilter/vf_gblur.c index a994ee5dd3..0b37562663 100644 --- a/libavfilter/vf_gblur.c +++ b/libavfilter/vf_gblur.c @@ -314,15 +314,15 @@ static const AVFilterPad gblur_inputs[] = { }, }; -const AVFilter ff_vf_gblur = { - .name = "gblur", - .description = NULL_IF_CONFIG_SMALL("Apply Gaussian Blur filter."), +const FFFilter ff_vf_gblur = { + .p.name = "gblur", + .p.description = NULL_IF_CONFIG_SMALL("Apply Gaussian Blur filter."), + .p.priv_class = &gblur_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(GBlurContext), - .priv_class = &gblur_class, .uninit = uninit, FILTER_INPUTS(gblur_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_gblur_vulkan.c b/libavfilter/vf_gblur_vulkan.c index 404b432849..58251c4a17 100644 --- a/libavfilter/vf_gblur_vulkan.c +++ b/libavfilter/vf_gblur_vulkan.c @@ -375,16 +375,16 @@ static const AVFilterPad gblur_vulkan_outputs[] = { } }; -const AVFilter ff_vf_gblur_vulkan = { - .name = "gblur_vulkan", - .description = NULL_IF_CONFIG_SMALL("Gaussian Blur in Vulkan"), +const FFFilter ff_vf_gblur_vulkan = { + .p.name = "gblur_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Gaussian Blur in Vulkan"), + .p.priv_class = &gblur_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(GBlurVulkanContext), .init = &ff_vk_filter_init, .uninit = &gblur_vulkan_uninit, FILTER_INPUTS(gblur_vulkan_inputs), FILTER_OUTPUTS(gblur_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &gblur_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c index 3f5f3796ba..bec1ac2ba3 100644 --- a/libavfilter/vf_geq.c +++ b/libavfilter/vf_geq.c @@ -526,15 +526,15 @@ static const AVFilterPad geq_inputs[] = { }, }; -const AVFilter ff_vf_geq = { - .name = "geq", - .description = NULL_IF_CONFIG_SMALL("Apply generic equation to each pixel."), +const FFFilter ff_vf_geq = { + .p.name = "geq", + .p.description = NULL_IF_CONFIG_SMALL("Apply generic equation to each pixel."), + .p.priv_class = &geq_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(GEQContext), .init = geq_init, .uninit = geq_uninit, FILTER_INPUTS(geq_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(geq_query_formats), - .priv_class = &geq_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index 6b52e09f23..088b3c9143 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -237,15 +237,15 @@ static const AVFilterPad avfilter_vf_gradfun_inputs[] = { }, }; -const AVFilter ff_vf_gradfun = { - .name = "gradfun", - .description = NULL_IF_CONFIG_SMALL("Debands video quickly using gradients."), +const FFFilter ff_vf_gradfun = { + .p.name = "gradfun", + .p.description = NULL_IF_CONFIG_SMALL("Debands video quickly using gradients."), + .p.priv_class = &gradfun_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(GradFunContext), - .priv_class = &gradfun_class, .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_vf_gradfun_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_grayworld.c b/libavfilter/vf_grayworld.c index 91b097a4b8..21d6aafd9a 100644 --- a/libavfilter/vf_grayworld.c +++ b/libavfilter/vf_grayworld.c @@ -297,13 +297,13 @@ static const AVFilterPad grayworld_inputs[] = { } }; -const AVFilter ff_vf_grayworld = { - .name = "grayworld", - .description = NULL_IF_CONFIG_SMALL("Adjust white balance using LAB gray world algorithm"), +const FFFilter ff_vf_grayworld = { + .p.name = "grayworld", + .p.description = NULL_IF_CONFIG_SMALL("Adjust white balance using LAB gray world algorithm"), + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(GrayWorldContext), FILTER_INPUTS(grayworld_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .uninit = uninit, }; diff --git a/libavfilter/vf_guided.c b/libavfilter/vf_guided.c index f0d9d8f9d3..4749beab48 100644 --- a/libavfilter/vf_guided.c +++ b/libavfilter/vf_guided.c @@ -486,18 +486,18 @@ static const AVFilterPad guided_outputs[] = { }, }; -const AVFilter ff_vf_guided = { - .name = "guided", - .description = NULL_IF_CONFIG_SMALL("Apply Guided filter."), +const FFFilter ff_vf_guided = { + .p.name = "guided", + .p.description = NULL_IF_CONFIG_SMALL("Apply Guided filter."), + .p.priv_class = &guided_class, + .p.inputs = NULL, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .init = init, .uninit = uninit, .priv_size = sizeof(GuidedContext), - .priv_class = &guided_class, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(guided_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c index 1f60e79bd7..8f8dd14240 100644 --- a/libavfilter/vf_hflip.c +++ b/libavfilter/vf_hflip.c @@ -146,12 +146,12 @@ static const AVFilterPad avfilter_vf_hflip_inputs[] = { }, }; -const AVFilter ff_vf_hflip = { - .name = "hflip", - .description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video."), +const FFFilter ff_vf_hflip = { + .p.name = "hflip", + .p.description = NULL_IF_CONFIG_SMALL("Horizontally flip the input video."), + .p.flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(FlipContext), FILTER_INPUTS(avfilter_vf_hflip_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_histeq.c b/libavfilter/vf_histeq.c index 6af96b6353..790e0d39d9 100644 --- a/libavfilter/vf_histeq.c +++ b/libavfilter/vf_histeq.c @@ -253,14 +253,14 @@ static const AVFilterPad histeq_inputs[] = { }, }; -const AVFilter ff_vf_histeq = { - .name = "histeq", - .description = NULL_IF_CONFIG_SMALL("Apply global color histogram equalization."), +const FFFilter ff_vf_histeq = { + .p.name = "histeq", + .p.description = NULL_IF_CONFIG_SMALL("Apply global color histogram equalization."), + .p.priv_class = &histeq_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(HisteqContext), .init = init, FILTER_INPUTS(histeq_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &histeq_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c index 73fd78caf8..f77148cdfe 100644 --- a/libavfilter/vf_histogram.c +++ b/libavfilter/vf_histogram.c @@ -636,14 +636,14 @@ static const AVFilterPad outputs[] = { #if CONFIG_HISTOGRAM_FILTER -const AVFilter ff_vf_histogram = { - .name = "histogram", - .description = NULL_IF_CONFIG_SMALL("Compute and draw a histogram."), +const FFFilter ff_vf_histogram = { + .p.name = "histogram", + .p.description = NULL_IF_CONFIG_SMALL("Compute and draw a histogram."), + .p.priv_class = &histogram_class, .priv_size = sizeof(HistogramContext), FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC(query_formats), - .priv_class = &histogram_class, }; #endif /* CONFIG_HISTOGRAM_FILTER */ @@ -678,15 +678,15 @@ static const AVOption thistogram_options[] = { AVFILTER_DEFINE_CLASS(thistogram); -const AVFilter ff_vf_thistogram = { - .name = "thistogram", - .description = NULL_IF_CONFIG_SMALL("Compute and draw a temporal histogram."), +const FFFilter ff_vf_thistogram = { + .p.name = "thistogram", + .p.description = NULL_IF_CONFIG_SMALL("Compute and draw a temporal histogram."), + .p.priv_class = &thistogram_class, .priv_size = sizeof(HistogramContext), FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC(query_formats), .uninit = uninit, - .priv_class = &thistogram_class, }; #endif /* CONFIG_THISTOGRAM_FILTER */ diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 3ba1c539ac..1136931b9b 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -384,16 +384,16 @@ static const AVFilterPad avfilter_vf_hqdn3d_inputs[] = { }; -const AVFilter ff_vf_hqdn3d = { - .name = "hqdn3d", - .description = NULL_IF_CONFIG_SMALL("Apply a High Quality 3D Denoiser."), +const FFFilter ff_vf_hqdn3d = { + .p.name = "hqdn3d", + .p.description = NULL_IF_CONFIG_SMALL("Apply a High Quality 3D Denoiser."), + .p.priv_class = &hqdn3d_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(HQDN3DContext), - .priv_class = &hqdn3d_class, .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_vf_hqdn3d_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_hqx.c b/libavfilter/vf_hqx.c index 20a78f2dcf..4dcd03514f 100644 --- a/libavfilter/vf_hqx.c +++ b/libavfilter/vf_hqx.c @@ -544,14 +544,14 @@ static const AVFilterPad hqx_outputs[] = { }, }; -const AVFilter ff_vf_hqx = { - .name = "hqx", - .description = NULL_IF_CONFIG_SMALL("Scale the input by 2, 3 or 4 using the hq*x magnification algorithm."), +const FFFilter ff_vf_hqx = { + .p.name = "hqx", + .p.description = NULL_IF_CONFIG_SMALL("Scale the input by 2, 3 or 4 using the hq*x magnification algorithm."), + .p.priv_class = &hqx_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(HQXContext), .init = init, FILTER_INPUTS(hqx_inputs), FILTER_OUTPUTS(hqx_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_RGB32), - .priv_class = &hqx_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_hsvkey.c b/libavfilter/vf_hsvkey.c index c5badd82c0..9a1a897a94 100644 --- a/libavfilter/vf_hsvkey.c +++ b/libavfilter/vf_hsvkey.c @@ -297,15 +297,15 @@ static const AVOption hsvkey_options[] = { AVFILTER_DEFINE_CLASS(hsvkey); -const AVFilter ff_vf_hsvkey = { - .name = "hsvkey", - .description = NULL_IF_CONFIG_SMALL("Turns a certain HSV range into transparency. Operates on YUV colors."), +const FFFilter ff_vf_hsvkey = { + .p.name = "hsvkey", + .p.description = NULL_IF_CONFIG_SMALL("Turns a certain HSV range into transparency. Operates on YUV colors."), + .p.priv_class = &hsvkey_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(HSVKeyContext), - .priv_class = &hsvkey_class, 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, }; @@ -339,14 +339,14 @@ static const AVOption hsvhold_options[] = { AVFILTER_DEFINE_CLASS(hsvhold); -const AVFilter ff_vf_hsvhold = { - .name = "hsvhold", - .description = NULL_IF_CONFIG_SMALL("Turns a certain HSV range into gray."), +const FFFilter ff_vf_hsvhold = { + .p.name = "hsvhold", + .p.description = NULL_IF_CONFIG_SMALL("Turns a certain HSV range into gray."), + .p.priv_class = &hsvhold_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(HSVKeyContext), - .priv_class = &hsvhold_class, 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, }; diff --git a/libavfilter/vf_hue.c b/libavfilter/vf_hue.c index 56899a9775..bc38efc93f 100644 --- a/libavfilter/vf_hue.c +++ b/libavfilter/vf_hue.c @@ -502,9 +502,11 @@ static const AVFilterPad hue_inputs[] = { }, }; -const AVFilter ff_vf_hue = { - .name = "hue", - .description = NULL_IF_CONFIG_SMALL("Adjust the hue and saturation of the input video."), +const FFFilter ff_vf_hue = { + .p.name = "hue", + .p.description = NULL_IF_CONFIG_SMALL("Adjust the hue and saturation of the input video."), + .p.priv_class = &hue_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(HueContext), .init = init, .uninit = uninit, @@ -512,6 +514,4 @@ const AVFilter ff_vf_hue = { FILTER_INPUTS(hue_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &hue_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_huesaturation.c b/libavfilter/vf_huesaturation.c index af58b114b7..7e1b4d1e9d 100644 --- a/libavfilter/vf_huesaturation.c +++ b/libavfilter/vf_huesaturation.c @@ -458,14 +458,14 @@ static const AVOption huesaturation_options[] = { AVFILTER_DEFINE_CLASS(huesaturation); -const AVFilter ff_vf_huesaturation = { - .name = "huesaturation", - .description = NULL_IF_CONFIG_SMALL("Apply hue-saturation-intensity adjustments."), +const FFFilter ff_vf_huesaturation = { + .p.name = "huesaturation", + .p.description = NULL_IF_CONFIG_SMALL("Apply hue-saturation-intensity adjustments."), + .p.priv_class = &huesaturation_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(HueSaturationContext), - .priv_class = &huesaturation_class, FILTER_INPUTS(huesaturation_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c index 4a8a1a1d91..e4c5c41fac 100644 --- a/libavfilter/vf_hwdownload.c +++ b/libavfilter/vf_hwdownload.c @@ -192,12 +192,12 @@ static const AVFilterPad hwdownload_outputs[] = { }, }; -const AVFilter ff_vf_hwdownload = { - .name = "hwdownload", - .description = NULL_IF_CONFIG_SMALL("Download a hardware frame to a normal frame"), +const FFFilter ff_vf_hwdownload = { + .p.name = "hwdownload", + .p.description = NULL_IF_CONFIG_SMALL("Download a hardware frame to a normal frame"), + .p.priv_class = &hwdownload_class, .uninit = hwdownload_uninit, .priv_size = sizeof(HWDownloadContext), - .priv_class = &hwdownload_class, FILTER_INPUTS(hwdownload_inputs), FILTER_OUTPUTS(hwdownload_outputs), FILTER_QUERY_FUNC2(hwdownload_query_formats), diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index f32a566b74..5d37e1551f 100644 --- a/libavfilter/vf_hwmap.c +++ b/libavfilter/vf_hwmap.c @@ -422,15 +422,15 @@ static const AVFilterPad hwmap_outputs[] = { }, }; -const AVFilter ff_vf_hwmap = { - .name = "hwmap", - .description = NULL_IF_CONFIG_SMALL("Map hardware frames"), +const FFFilter ff_vf_hwmap = { + .p.name = "hwmap", + .p.description = NULL_IF_CONFIG_SMALL("Map hardware frames"), + .p.priv_class = &hwmap_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .uninit = hwmap_uninit, .priv_size = sizeof(HWMapContext), - .priv_class = &hwmap_class, FILTER_INPUTS(hwmap_inputs), FILTER_OUTPUTS(hwmap_outputs), FILTER_QUERY_FUNC2(hwmap_query_formats), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_hwupload.c b/libavfilter/vf_hwupload.c index 97d50d7877..6aafac4d4d 100644 --- a/libavfilter/vf_hwupload.c +++ b/libavfilter/vf_hwupload.c @@ -257,16 +257,16 @@ static const AVFilterPad hwupload_outputs[] = { }, }; -const AVFilter ff_vf_hwupload = { - .name = "hwupload", - .description = NULL_IF_CONFIG_SMALL("Upload a normal frame to a hardware frame"), +const FFFilter ff_vf_hwupload = { + .p.name = "hwupload", + .p.description = NULL_IF_CONFIG_SMALL("Upload a normal frame to a hardware frame"), + .p.priv_class = &hwupload_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .init = hwupload_init, .uninit = hwupload_uninit, .priv_size = sizeof(HWUploadContext), - .priv_class = &hwupload_class, FILTER_INPUTS(hwupload_inputs), FILTER_OUTPUTS(hwupload_outputs), FILTER_QUERY_FUNC2(hwupload_query_formats), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_hwupload_cuda.c b/libavfilter/vf_hwupload_cuda.c index 1b99b3fa60..b505f8b298 100644 --- a/libavfilter/vf_hwupload_cuda.c +++ b/libavfilter/vf_hwupload_cuda.c @@ -185,15 +185,16 @@ static const AVFilterPad cudaupload_outputs[] = { }, }; -const AVFilter ff_vf_hwupload_cuda = { - .name = "hwupload_cuda", - .description = NULL_IF_CONFIG_SMALL("Upload a system memory frame to a CUDA device."), +const FFFilter ff_vf_hwupload_cuda = { + .p.name = "hwupload_cuda", + .p.description = NULL_IF_CONFIG_SMALL("Upload a system memory frame to a CUDA device."), + + .p.priv_class = &cudaupload_class, .init = cudaupload_init, .uninit = cudaupload_uninit, .priv_size = sizeof(CudaUploadContext), - .priv_class = &cudaupload_class, FILTER_INPUTS(cudaupload_inputs), FILTER_OUTPUTS(cudaupload_outputs), diff --git a/libavfilter/vf_hysteresis.c b/libavfilter/vf_hysteresis.c index d2b85764f5..c4e8b1ba63 100644 --- a/libavfilter/vf_hysteresis.c +++ b/libavfilter/vf_hysteresis.c @@ -365,9 +365,11 @@ static const AVFilterPad hysteresis_outputs[] = { }, }; -const AVFilter ff_vf_hysteresis = { - .name = "hysteresis", - .description = NULL_IF_CONFIG_SMALL("Grow first stream into second stream by connecting components."), +const FFFilter ff_vf_hysteresis = { + .p.name = "hysteresis", + .p.description = NULL_IF_CONFIG_SMALL("Grow first stream into second stream by connecting components."), + .p.priv_class = &hysteresis_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .preinit = hysteresis_framesync_preinit, .priv_size = sizeof(HysteresisContext), .uninit = uninit, @@ -375,6 +377,4 @@ const AVFilter ff_vf_hysteresis = { FILTER_INPUTS(hysteresis_inputs), FILTER_OUTPUTS(hysteresis_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &hysteresis_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_iccdetect.c b/libavfilter/vf_iccdetect.c index 044a92ee0f..6af7132c5c 100644 --- a/libavfilter/vf_iccdetect.c +++ b/libavfilter/vf_iccdetect.c @@ -126,12 +126,12 @@ static const AVFilterPad iccdetect_inputs[] = { }, }; -const AVFilter ff_vf_iccdetect = { - .name = "iccdetect", - .description = NULL_IF_CONFIG_SMALL("Detect and parse ICC profiles."), +const FFFilter ff_vf_iccdetect = { + .p.name = "iccdetect", + .p.description = NULL_IF_CONFIG_SMALL("Detect and parse ICC profiles."), + .p.priv_class = &iccdetect_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(IccDetectContext), - .priv_class = &iccdetect_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, .init = &iccdetect_init, .uninit = &iccdetect_uninit, FILTER_INPUTS(iccdetect_inputs), diff --git a/libavfilter/vf_iccgen.c b/libavfilter/vf_iccgen.c index 35c571d31c..06c5b4ebdc 100644 --- a/libavfilter/vf_iccgen.c +++ b/libavfilter/vf_iccgen.c @@ -162,12 +162,12 @@ static const AVFilterPad iccgen_inputs[] = { }, }; -const AVFilter ff_vf_iccgen = { - .name = "iccgen", - .description = NULL_IF_CONFIG_SMALL("Generate and attach ICC profiles."), +const FFFilter ff_vf_iccgen = { + .p.name = "iccgen", + .p.description = NULL_IF_CONFIG_SMALL("Generate and attach ICC profiles."), + .p.priv_class = &iccgen_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(IccGenContext), - .priv_class = &iccgen_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, .init = &iccgen_init, .uninit = &iccgen_uninit, FILTER_INPUTS(iccgen_inputs), diff --git a/libavfilter/vf_identity.c b/libavfilter/vf_identity.c index d06e9f3d68..fc44bfaea0 100644 --- a/libavfilter/vf_identity.c +++ b/libavfilter/vf_identity.c @@ -403,21 +403,21 @@ static const AVOption options[] = { #define identity_options options FRAMESYNC_DEFINE_CLASS(identity, IdentityContext, fs); -const AVFilter ff_vf_identity = { - .name = "identity", - .description = NULL_IF_CONFIG_SMALL("Calculate the Identity between two video streams."), +const FFFilter ff_vf_identity = { + .p.name = "identity", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the Identity between two video streams."), + .p.priv_class = &identity_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, .preinit = identity_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(IdentityContext), - .priv_class = &identity_class, FILTER_INPUTS(identity_inputs), FILTER_OUTPUTS(identity_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_IDENTITY_FILTER */ @@ -427,21 +427,21 @@ const AVFilter ff_vf_identity = { #define msad_options options FRAMESYNC_DEFINE_CLASS(msad, IdentityContext, fs); -const AVFilter ff_vf_msad = { - .name = "msad", - .description = NULL_IF_CONFIG_SMALL("Calculate the MSAD between two video streams."), +const FFFilter ff_vf_msad = { + .p.name = "msad", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the MSAD between two video streams."), + .p.priv_class = &msad_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, .preinit = msad_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(IdentityContext), - .priv_class = &msad_class, FILTER_INPUTS(identity_inputs), FILTER_OUTPUTS(identity_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_METADATA_ONLY, }; #endif /* CONFIG_MSAD_FILTER */ diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index c57e7ccb20..15ed489eb6 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -465,15 +465,15 @@ static const AVFilterPad idet_outputs[] = { }, }; -const AVFilter ff_vf_idet = { - .name = "idet", - .description = NULL_IF_CONFIG_SMALL("Interlace detect Filter."), +const FFFilter ff_vf_idet = { + .p.name = "idet", + .p.description = NULL_IF_CONFIG_SMALL("Interlace detect Filter."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, + .p.priv_class = &idet_class, .priv_size = sizeof(IDETContext), .init = init, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(idet_inputs), FILTER_OUTPUTS(idet_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &idet_class, }; diff --git a/libavfilter/vf_il.c b/libavfilter/vf_il.c index 5e5d4c16e8..230cbd0cff 100644 --- a/libavfilter/vf_il.c +++ b/libavfilter/vf_il.c @@ -188,14 +188,14 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_il = { - .name = "il", - .description = NULL_IF_CONFIG_SMALL("Deinterleave or interleave fields."), +const FFFilter ff_vf_il = { + .p.name = "il", + .p.description = NULL_IF_CONFIG_SMALL("Deinterleave or interleave fields."), + .p.priv_class = &il_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(IlContext), FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &il_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_kerndeint.c b/libavfilter/vf_kerndeint.c index 6114a58a5b..d6f65a2dc4 100644 --- a/libavfilter/vf_kerndeint.c +++ b/libavfilter/vf_kerndeint.c @@ -296,11 +296,11 @@ static const AVFilterPad kerndeint_inputs[] = { }; -const AVFilter ff_vf_kerndeint = { - .name = "kerndeint", - .description = NULL_IF_CONFIG_SMALL("Apply kernel deinterlacing to the input."), +const FFFilter ff_vf_kerndeint = { + .p.name = "kerndeint", + .p.description = NULL_IF_CONFIG_SMALL("Apply kernel deinterlacing to the input."), + .p.priv_class = &kerndeint_class, .priv_size = sizeof(KerndeintContext), - .priv_class = &kerndeint_class, .uninit = uninit, FILTER_INPUTS(kerndeint_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), diff --git a/libavfilter/vf_lagfun.c b/libavfilter/vf_lagfun.c index b3020c28a9..9ec936212c 100644 --- a/libavfilter/vf_lagfun.c +++ b/libavfilter/vf_lagfun.c @@ -218,15 +218,15 @@ static const AVFilterPad outputs[] = { AVFILTER_DEFINE_CLASS(lagfun); -const AVFilter ff_vf_lagfun = { - .name = "lagfun", - .description = NULL_IF_CONFIG_SMALL("Slowly update darker pixels."), +const FFFilter ff_vf_lagfun = { + .p.name = "lagfun", + .p.description = NULL_IF_CONFIG_SMALL("Slowly update darker pixels."), + .p.priv_class = &lagfun_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(LagfunContext), - .priv_class = &lagfun_class, .uninit = uninit, FILTER_OUTPUTS(outputs), FILTER_INPUTS(inputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_lcevc.c b/libavfilter/vf_lcevc.c index b83dc94e02..8ac2b212c3 100644 --- a/libavfilter/vf_lcevc.c +++ b/libavfilter/vf_lcevc.c @@ -417,9 +417,9 @@ static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_NONE }; -const AVFilter ff_vf_lcevc = { - .name = "lcevc", - .description = NULL_IF_CONFIG_SMALL("LCEVC"), +const FFFilter ff_vf_lcevc = { + .p.name = "lcevc", + .p.description = NULL_IF_CONFIG_SMALL("LCEVC"), .activate = activate, FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(lcevc_outputs), diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c index db80cdb4eb..15c2e99e4b 100644 --- a/libavfilter/vf_lenscorrection.c +++ b/libavfilter/vf_lenscorrection.c @@ -349,15 +349,15 @@ static const AVFilterPad lenscorrection_outputs[] = { }, }; -const AVFilter ff_vf_lenscorrection = { - .name = "lenscorrection", - .description = NULL_IF_CONFIG_SMALL("Rectify the image by correcting for lens distortion."), +const FFFilter ff_vf_lenscorrection = { + .p.name = "lenscorrection", + .p.description = NULL_IF_CONFIG_SMALL("Rectify the image by correcting for lens distortion."), + .p.priv_class = &lenscorrection_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(LenscorrectionCtx), FILTER_INPUTS(lenscorrection_inputs), FILTER_OUTPUTS(lenscorrection_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &lenscorrection_class, .uninit = uninit, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_lensfun.c b/libavfilter/vf_lensfun.c index 7c428e3ca7..668c68562c 100644 --- a/libavfilter/vf_lensfun.c +++ b/libavfilter/vf_lensfun.c @@ -519,15 +519,15 @@ static const AVFilterPad lensfun_inputs[] = { }, }; -const AVFilter ff_vf_lensfun = { - .name = "lensfun", - .description = NULL_IF_CONFIG_SMALL("Apply correction to an image based on info derived from the lensfun database."), +const FFFilter ff_vf_lensfun = { + .p.name = "lensfun", + .p.description = NULL_IF_CONFIG_SMALL("Apply correction to an image based on info derived from the lensfun database."), + .p.priv_class = &lensfun_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(LensfunContext), .init = init, .uninit = uninit, FILTER_INPUTS(lensfun_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_RGB24), - .priv_class = &lensfun_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c index 0250a54835..7dc27144fe 100644 --- a/libavfilter/vf_libopencv.c +++ b/libavfilter/vf_libopencv.c @@ -415,11 +415,11 @@ static const AVFilterPad avfilter_vf_ocv_outputs[] = { }, }; -const AVFilter ff_vf_ocv = { - .name = "ocv", - .description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."), +const FFFilter ff_vf_ocv = { + .p.name = "ocv", + .p.description = NULL_IF_CONFIG_SMALL("Apply transform using libopencv."), + .p.priv_class = &ocv_class, .priv_size = sizeof(OCVContext), - .priv_class = &ocv_class, .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_vf_ocv_inputs), diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index 77271ef083..c884c621c8 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c @@ -1446,9 +1446,11 @@ static const AVFilterPad libplacebo_outputs[] = { }, }; -const AVFilter ff_vf_libplacebo = { - .name = "libplacebo", - .description = NULL_IF_CONFIG_SMALL("Apply various GPU filters from libplacebo"), +const FFFilter ff_vf_libplacebo = { + .p.name = "libplacebo", + .p.description = NULL_IF_CONFIG_SMALL("Apply various GPU filters from libplacebo"), + .p.priv_class = &libplacebo_class, + .p.flags = AVFILTER_FLAG_HWDEVICE | AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(LibplaceboContext), .init = &libplacebo_init, .uninit = &libplacebo_uninit, @@ -1456,7 +1458,5 @@ const AVFilter ff_vf_libplacebo = { .process_command = &libplacebo_process_command, FILTER_OUTPUTS(libplacebo_outputs), FILTER_QUERY_FUNC2(libplacebo_query_format), - .priv_class = &libplacebo_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE | AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/vf_libvmaf.c b/libavfilter/vf_libvmaf.c index f655092b20..10d5b7f59b 100644 --- a/libavfilter/vf_libvmaf.c +++ b/libavfilter/vf_libvmaf.c @@ -617,15 +617,15 @@ static const AVFilterPad libvmaf_outputs[] = { }, }; -const AVFilter ff_vf_libvmaf = { - .name = "libvmaf", - .description = NULL_IF_CONFIG_SMALL("Calculate the VMAF between two video streams."), +const FFFilter ff_vf_libvmaf = { + .p.name = "libvmaf", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the VMAF between two video streams."), + .p.priv_class = &libvmaf_class, .preinit = libvmaf_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(LIBVMAFContext), - .priv_class = &libvmaf_class, FILTER_INPUTS(libvmaf_inputs), FILTER_OUTPUTS(libvmaf_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), @@ -811,15 +811,15 @@ static const AVFilterPad libvmaf_outputs_cuda[] = { }, }; -const AVFilter ff_vf_libvmaf_cuda = { - .name = "libvmaf_cuda", - .description = NULL_IF_CONFIG_SMALL("Calculate the VMAF between two video streams."), +const FFFilter ff_vf_libvmaf_cuda = { + .p.name = "libvmaf_cuda", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the VMAF between two video streams."), + .p.priv_class = &libvmaf_class, .preinit = libvmaf_framesync_preinit, .init = init_cuda, .uninit = uninit, .activate = activate, .priv_size = sizeof(LIBVMAFContext), - .priv_class = &libvmaf_class, FILTER_INPUTS(libvmaf_inputs), FILTER_OUTPUTS(libvmaf_outputs_cuda), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA), diff --git a/libavfilter/vf_limitdiff.c b/libavfilter/vf_limitdiff.c index a54942ad52..d823275528 100644 --- a/libavfilter/vf_limitdiff.c +++ b/libavfilter/vf_limitdiff.c @@ -354,18 +354,18 @@ static const AVFilterPad limitdiff_outputs[] = { AVFILTER_DEFINE_CLASS(limitdiff); -const AVFilter ff_vf_limitdiff = { - .name = "limitdiff", - .description = NULL_IF_CONFIG_SMALL("Apply filtering with limiting difference."), - .priv_class = &limitdiff_class, +const FFFilter ff_vf_limitdiff = { + .p.name = "limitdiff", + .p.description = NULL_IF_CONFIG_SMALL("Apply filtering with limiting difference."), + .p.priv_class = &limitdiff_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(LimitDiffContext), .init = init, .uninit = uninit, .activate = activate, FILTER_OUTPUTS(limitdiff_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_DYNAMIC_INPUTS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_limiter.c b/libavfilter/vf_limiter.c index 6826b4c308..61f6c9e1bf 100644 --- a/libavfilter/vf_limiter.c +++ b/libavfilter/vf_limiter.c @@ -230,15 +230,16 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_limiter = { - .name = "limiter", - .description = NULL_IF_CONFIG_SMALL("Limit pixels components to the specified range."), +const FFFilter ff_vf_limiter = { + .p.name = "limiter", + .p.description = NULL_IF_CONFIG_SMALL("Limit pixels components to the specified range."), + .p.priv_class = &limiter_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(LimiterContext), - .priv_class = &limiter_class, .init = init, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_lumakey.c b/libavfilter/vf_lumakey.c index 773fe5df61..a827d31b48 100644 --- a/libavfilter/vf_lumakey.c +++ b/libavfilter/vf_lumakey.c @@ -184,14 +184,15 @@ static const AVOption lumakey_options[] = { AVFILTER_DEFINE_CLASS(lumakey); -const AVFilter ff_vf_lumakey = { - .name = "lumakey", - .description = NULL_IF_CONFIG_SMALL("Turns a certain luma into transparency."), +const FFFilter ff_vf_lumakey = { + .p.name = "lumakey", + .p.description = NULL_IF_CONFIG_SMALL("Turns a certain luma into transparency."), + .p.priv_class = &lumakey_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(LumakeyContext), - .priv_class = &lumakey_class, FILTER_INPUTS(lumakey_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index c227ebc45c..d15fb85c4e 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -590,18 +590,18 @@ static const AVFilterPad inputs[] = { }; #define DEFINE_LUT_FILTER(name_, description_, priv_class_) \ - const AVFilter ff_vf_##name_ = { \ - .name = #name_, \ - .description = NULL_IF_CONFIG_SMALL(description_), \ - .priv_class = &priv_class_ ## _class, \ + const FFFilter ff_vf_##name_ = { \ + .p.name = #name_, \ + .p.description = NULL_IF_CONFIG_SMALL(description_), \ + .p.priv_class = &priv_class_ ## _class, \ + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | \ + AVFILTER_FLAG_SLICE_THREADS, \ .priv_size = sizeof(LutContext), \ .init = name_##_init, \ .uninit = uninit, \ FILTER_INPUTS(inputs), \ FILTER_OUTPUTS(ff_video_default_filterpad), \ FILTER_QUERY_FUNC2(query_formats), \ - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | \ - AVFILTER_FLAG_SLICE_THREADS, \ .process_command = process_command, \ } diff --git a/libavfilter/vf_lut2.c b/libavfilter/vf_lut2.c index 2bbdd0a288..a37c0db949 100644 --- a/libavfilter/vf_lut2.c +++ b/libavfilter/vf_lut2.c @@ -564,19 +564,19 @@ static int process_command(AVFilterContext *ctx, const char *cmd, const char *ar FRAMESYNC_DEFINE_CLASS(lut2, LUT2Context, fs); -const AVFilter ff_vf_lut2 = { - .name = "lut2", - .description = NULL_IF_CONFIG_SMALL("Compute and apply a lookup table from two video inputs."), +const FFFilter ff_vf_lut2 = { + .p.name = "lut2", + .p.description = NULL_IF_CONFIG_SMALL("Compute and apply a lookup table from two video inputs."), + .p.priv_class = &lut2_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .preinit = lut2_framesync_preinit, .priv_size = sizeof(LUT2Context), - .priv_class = &lut2_class, .uninit = uninit, .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; @@ -663,18 +663,18 @@ static const AVFilterPad tlut2_outputs[] = { }, }; -const AVFilter ff_vf_tlut2 = { - .name = "tlut2", - .description = NULL_IF_CONFIG_SMALL("Compute and apply a lookup table from two successive frames."), +const FFFilter ff_vf_tlut2 = { + .p.name = "tlut2", + .p.description = NULL_IF_CONFIG_SMALL("Compute and apply a lookup table from two successive frames."), + .p.priv_class = &tlut2_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(LUT2Context), - .priv_class = &tlut2_class, .init = init, .uninit = uninit, FILTER_INPUTS(tlut2_inputs), FILTER_OUTPUTS(tlut2_outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c index 3c2a8812e8..5f6bfc65b3 100644 --- a/libavfilter/vf_lut3d.c +++ b/libavfilter/vf_lut3d.c @@ -1306,17 +1306,18 @@ static const AVFilterPad lut3d_inputs[] = { }, }; -const AVFilter ff_vf_lut3d = { - .name = "lut3d", - .description = NULL_IF_CONFIG_SMALL("Adjust colors using a 3D LUT."), +const FFFilter ff_vf_lut3d = { + .p.name = "lut3d", + .p.description = NULL_IF_CONFIG_SMALL("Adjust colors using a 3D LUT."), + .p.priv_class = &lut3d_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(LUT3DContext), .init = lut3d_init, .uninit = lut3d_uninit, FILTER_INPUTS(lut3d_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &lut3d_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; #endif @@ -1571,9 +1572,12 @@ static const AVFilterPad haldclut_outputs[] = { }, }; -const AVFilter ff_vf_haldclut = { - .name = "haldclut", - .description = NULL_IF_CONFIG_SMALL("Adjust colors using a Hald CLUT."), +const FFFilter ff_vf_haldclut = { + .p.name = "haldclut", + .p.description = NULL_IF_CONFIG_SMALL("Adjust colors using a Hald CLUT."), + .p.priv_class = &haldclut_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(LUT3DContext), .preinit = haldclut_framesync_preinit, .init = haldclut_init, @@ -1582,8 +1586,6 @@ const AVFilter ff_vf_haldclut = { FILTER_INPUTS(haldclut_inputs), FILTER_OUTPUTS(haldclut_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &haldclut_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; #endif @@ -2232,16 +2234,17 @@ static const AVFilterPad lut1d_inputs[] = { }, }; -const AVFilter ff_vf_lut1d = { - .name = "lut1d", - .description = NULL_IF_CONFIG_SMALL("Adjust colors using a 1D LUT."), +const FFFilter ff_vf_lut1d = { + .p.name = "lut1d", + .p.description = NULL_IF_CONFIG_SMALL("Adjust colors using a 1D LUT."), + .p.priv_class = &lut1d_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(LUT1DContext), .init = lut1d_init, FILTER_INPUTS(lut1d_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &lut1d_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = lut1d_process_command, }; #endif diff --git a/libavfilter/vf_maskedclamp.c b/libavfilter/vf_maskedclamp.c index 2e9778fe24..39bd596827 100644 --- a/libavfilter/vf_maskedclamp.c +++ b/libavfilter/vf_maskedclamp.c @@ -306,16 +306,17 @@ static const AVFilterPad maskedclamp_outputs[] = { }, }; -const AVFilter ff_vf_maskedclamp = { - .name = "maskedclamp", - .description = NULL_IF_CONFIG_SMALL("Clamp first stream with second stream and third stream."), +const FFFilter ff_vf_maskedclamp = { + .p.name = "maskedclamp", + .p.description = NULL_IF_CONFIG_SMALL("Clamp first stream with second stream and third stream."), + .p.priv_class = &maskedclamp_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MaskedClampContext), .uninit = uninit, .activate = activate, FILTER_INPUTS(maskedclamp_inputs), FILTER_OUTPUTS(maskedclamp_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &maskedclamp_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_maskedmerge.c b/libavfilter/vf_maskedmerge.c index a6dfb2d830..93da0a0edf 100644 --- a/libavfilter/vf_maskedmerge.c +++ b/libavfilter/vf_maskedmerge.c @@ -302,16 +302,17 @@ static const AVFilterPad maskedmerge_outputs[] = { }, }; -const AVFilter ff_vf_maskedmerge = { - .name = "maskedmerge", - .description = NULL_IF_CONFIG_SMALL("Merge first stream with second stream using third stream as mask."), +const FFFilter ff_vf_maskedmerge = { + .p.name = "maskedmerge", + .p.description = NULL_IF_CONFIG_SMALL("Merge first stream with second stream using third stream as mask."), + .p.priv_class = &maskedmerge_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MaskedMergeContext), .uninit = uninit, .activate = activate, FILTER_INPUTS(maskedmerge_inputs), FILTER_OUTPUTS(maskedmerge_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &maskedmerge_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_maskedminmax.c b/libavfilter/vf_maskedminmax.c index b9582d1539..b6762e16bf 100644 --- a/libavfilter/vf_maskedminmax.c +++ b/libavfilter/vf_maskedminmax.c @@ -306,10 +306,12 @@ static const AVFilterPad maskedminmax_outputs[] = { AVFILTER_DEFINE_CLASS_EXT(maskedminmax, "masked(min|max)", maskedminmax_options); -const AVFilter ff_vf_maskedmin = { - .name = "maskedmin", - .description = NULL_IF_CONFIG_SMALL("Apply filtering with minimum difference of two streams."), - .priv_class = &maskedminmax_class, +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.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MaskedMinMaxContext), .init = maskedmin_init, .uninit = uninit, @@ -317,20 +319,20 @@ const AVFilter ff_vf_maskedmin = { FILTER_INPUTS(maskedminmax_inputs), FILTER_OUTPUTS(maskedminmax_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; -const AVFilter ff_vf_maskedmax = { - .name = "maskedmax", - .description = NULL_IF_CONFIG_SMALL("Apply filtering with maximum difference of two streams."), - .priv_class = &maskedminmax_class, +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.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MaskedMinMaxContext), .uninit = uninit, .activate = activate, FILTER_INPUTS(maskedminmax_inputs), FILTER_OUTPUTS(maskedminmax_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_maskedthreshold.c b/libavfilter/vf_maskedthreshold.c index 5d2038564d..41c204f6f5 100644 --- a/libavfilter/vf_maskedthreshold.c +++ b/libavfilter/vf_maskedthreshold.c @@ -295,16 +295,17 @@ static const AVFilterPad maskedthreshold_outputs[] = { AVFILTER_DEFINE_CLASS(maskedthreshold); -const AVFilter ff_vf_maskedthreshold = { - .name = "maskedthreshold", - .description = NULL_IF_CONFIG_SMALL("Pick pixels comparing absolute difference of two streams with threshold."), - .priv_class = &maskedthreshold_class, +const FFFilter ff_vf_maskedthreshold = { + .p.name = "maskedthreshold", + .p.description = NULL_IF_CONFIG_SMALL("Pick pixels comparing absolute difference of two streams with threshold."), + .p.priv_class = &maskedthreshold_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MaskedThresholdContext), .uninit = uninit, .activate = activate, FILTER_INPUTS(maskedthreshold_inputs), FILTER_OUTPUTS(maskedthreshold_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_maskfun.c b/libavfilter/vf_maskfun.c index cd74d2669c..9869ae4e33 100644 --- a/libavfilter/vf_maskfun.c +++ b/libavfilter/vf_maskfun.c @@ -316,15 +316,15 @@ static const AVFilterPad maskfun_inputs[] = { }, }; -const AVFilter ff_vf_maskfun = { - .name = "maskfun", - .description = NULL_IF_CONFIG_SMALL("Create Mask."), +const FFFilter ff_vf_maskfun = { + .p.name = "maskfun", + .p.description = NULL_IF_CONFIG_SMALL("Create Mask."), + .p.priv_class = &maskfun_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MaskFunContext), .uninit = uninit, FILTER_INPUTS(maskfun_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &maskfun_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c index 05c9105f7d..82048b51d0 100644 --- a/libavfilter/vf_mcdeint.c +++ b/libavfilter/vf_mcdeint.c @@ -299,13 +299,13 @@ static const AVFilterPad mcdeint_inputs[] = { }, }; -const AVFilter ff_vf_mcdeint = { - .name = "mcdeint", - .description = NULL_IF_CONFIG_SMALL("Apply motion compensating deinterlacing."), +const FFFilter ff_vf_mcdeint = { + .p.name = "mcdeint", + .p.description = NULL_IF_CONFIG_SMALL("Apply motion compensating deinterlacing."), + .p.priv_class = &mcdeint_class, .priv_size = sizeof(MCDeintContext), .uninit = uninit, FILTER_INPUTS(mcdeint_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_YUV420P), - .priv_class = &mcdeint_class, }; diff --git a/libavfilter/vf_median.c b/libavfilter/vf_median.c index a5c51621d2..6e00cdf885 100644 --- a/libavfilter/vf_median.c +++ b/libavfilter/vf_median.c @@ -270,15 +270,15 @@ static const AVFilterPad median_inputs[] = { }, }; -const AVFilter ff_vf_median = { - .name = "median", - .description = NULL_IF_CONFIG_SMALL("Apply Median filter."), +const FFFilter ff_vf_median = { + .p.name = "median", + .p.description = NULL_IF_CONFIG_SMALL("Apply Median filter."), + .p.priv_class = &median_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MedianContext), - .priv_class = &median_class, .uninit = uninit, FILTER_INPUTS(median_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_mergeplanes.c b/libavfilter/vf_mergeplanes.c index d97438a2c4..0073e46665 100644 --- a/libavfilter/vf_mergeplanes.c +++ b/libavfilter/vf_mergeplanes.c @@ -310,16 +310,16 @@ static const AVFilterPad mergeplanes_outputs[] = { }, }; -const AVFilter ff_vf_mergeplanes = { - .name = "mergeplanes", - .description = NULL_IF_CONFIG_SMALL("Merge planes."), +const FFFilter ff_vf_mergeplanes = { + .p.name = "mergeplanes", + .p.description = NULL_IF_CONFIG_SMALL("Merge planes."), + .p.priv_class = &mergeplanes_class, + .p.inputs = NULL, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(MergePlanesContext), - .priv_class = &mergeplanes_class, .init = init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(mergeplanes_outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/vf_mestimate.c b/libavfilter/vf_mestimate.c index 8662b5f660..413838e956 100644 --- a/libavfilter/vf_mestimate.c +++ b/libavfilter/vf_mestimate.c @@ -348,13 +348,13 @@ static const AVFilterPad mestimate_inputs[] = { }, }; -const AVFilter ff_vf_mestimate = { - .name = "mestimate", - .description = NULL_IF_CONFIG_SMALL("Generate motion vectors."), +const FFFilter ff_vf_mestimate = { + .p.name = "mestimate", + .p.description = NULL_IF_CONFIG_SMALL("Generate motion vectors."), + .p.priv_class = &mestimate_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(MEContext), - .priv_class = &mestimate_class, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(mestimate_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_midequalizer.c b/libavfilter/vf_midequalizer.c index 9afbeb6f11..9720cefdf2 100644 --- a/libavfilter/vf_midequalizer.c +++ b/libavfilter/vf_midequalizer.c @@ -365,15 +365,15 @@ static const AVFilterPad midequalizer_outputs[] = { }, }; -const AVFilter ff_vf_midequalizer = { - .name = "midequalizer", - .description = NULL_IF_CONFIG_SMALL("Apply Midway Equalization."), +const FFFilter ff_vf_midequalizer = { + .p.name = "midequalizer", + .p.description = NULL_IF_CONFIG_SMALL("Apply Midway Equalization."), + .p.priv_class = &midequalizer_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(MidEqualizerContext), .uninit = uninit, .activate = activate, FILTER_INPUTS(midequalizer_inputs), FILTER_OUTPUTS(midequalizer_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &midequalizer_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_minterpolate.c b/libavfilter/vf_minterpolate.c index 39a3f55f41..93d331f2ff 100644 --- a/libavfilter/vf_minterpolate.c +++ b/libavfilter/vf_minterpolate.c @@ -1252,11 +1252,11 @@ static const AVFilterPad minterpolate_outputs[] = { }, }; -const AVFilter ff_vf_minterpolate = { - .name = "minterpolate", - .description = NULL_IF_CONFIG_SMALL("Frame rate conversion using Motion Interpolation."), +const FFFilter ff_vf_minterpolate = { + .p.name = "minterpolate", + .p.description = NULL_IF_CONFIG_SMALL("Frame rate conversion using Motion Interpolation."), + .p.priv_class = &minterpolate_class, .priv_size = sizeof(MIContext), - .priv_class = &minterpolate_class, .uninit = uninit, FILTER_INPUTS(minterpolate_inputs), FILTER_OUTPUTS(minterpolate_outputs), diff --git a/libavfilter/vf_misc_vaapi.c b/libavfilter/vf_misc_vaapi.c index 981fcc878d..58704aa464 100644 --- a/libavfilter/vf_misc_vaapi.c +++ b/libavfilter/vf_misc_vaapi.c @@ -241,28 +241,28 @@ static const AVFilterPad misc_vaapi_outputs[] = { }, }; -const AVFilter ff_vf_denoise_vaapi = { - .name = "denoise_vaapi", - .description = NULL_IF_CONFIG_SMALL("VAAPI VPP for de-noise"), +const FFFilter ff_vf_denoise_vaapi = { + .p.name = "denoise_vaapi", + .p.description = NULL_IF_CONFIG_SMALL("VAAPI VPP for de-noise"), + .p.priv_class = &denoise_vaapi_class, .priv_size = sizeof(DenoiseVAAPIContext), .init = &denoise_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, FILTER_INPUTS(misc_vaapi_inputs), FILTER_OUTPUTS(misc_vaapi_outputs), FILTER_QUERY_FUNC2(&ff_vaapi_vpp_query_formats), - .priv_class = &denoise_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; -const AVFilter ff_vf_sharpness_vaapi = { - .name = "sharpness_vaapi", - .description = NULL_IF_CONFIG_SMALL("VAAPI VPP for sharpness"), +const FFFilter ff_vf_sharpness_vaapi = { + .p.name = "sharpness_vaapi", + .p.description = NULL_IF_CONFIG_SMALL("VAAPI VPP for sharpness"), + .p.priv_class = &sharpness_vaapi_class, .priv_size = sizeof(SharpnessVAAPIContext), .init = &sharpness_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, FILTER_INPUTS(misc_vaapi_inputs), FILTER_OUTPUTS(misc_vaapi_outputs), FILTER_QUERY_FUNC2(&ff_vaapi_vpp_query_formats), - .priv_class = &sharpness_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_mix.c b/libavfilter/vf_mix.c index f1e0cf617c..517bb2450f 100644 --- a/libavfilter/vf_mix.c +++ b/libavfilter/vf_mix.c @@ -459,18 +459,18 @@ static const AVFilterPad outputs[] = { #if CONFIG_MIX_FILTER AVFILTER_DEFINE_CLASS(mix); -const AVFilter ff_vf_mix = { - .name = "mix", - .description = NULL_IF_CONFIG_SMALL("Mix video inputs."), +const FFFilter ff_vf_mix = { + .p.name = "mix", + .p.description = NULL_IF_CONFIG_SMALL("Mix video inputs."), + .p.priv_class = &mix_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(MixContext), - .priv_class = &mix_class, FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), .init = init, .uninit = uninit, .activate = activate, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = process_command, }; @@ -543,17 +543,17 @@ static const AVFilterPad inputs[] = { AVFILTER_DEFINE_CLASS(tmix); -const AVFilter ff_vf_tmix = { - .name = "tmix", - .description = NULL_IF_CONFIG_SMALL("Mix successive video frames."), +const FFFilter ff_vf_tmix = { + .p.name = "tmix", + .p.description = NULL_IF_CONFIG_SMALL("Mix successive video frames."), + .p.priv_class = &tmix_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MixContext), - .priv_class = &tmix_class, FILTER_OUTPUTS(outputs), FILTER_INPUTS(inputs), FILTER_QUERY_FUNC2(query_formats), .init = init, .uninit = uninit, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_monochrome.c b/libavfilter/vf_monochrome.c index b8242c045f..4718642921 100644 --- a/libavfilter/vf_monochrome.c +++ b/libavfilter/vf_monochrome.c @@ -280,14 +280,14 @@ static const AVOption monochrome_options[] = { AVFILTER_DEFINE_CLASS(monochrome); -const AVFilter ff_vf_monochrome = { - .name = "monochrome", - .description = NULL_IF_CONFIG_SMALL("Convert video to gray using custom color filter."), +const FFFilter ff_vf_monochrome = { + .p.name = "monochrome", + .p.description = NULL_IF_CONFIG_SMALL("Convert video to gray using custom color filter."), + .p.priv_class = &monochrome_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MonochromeContext), - .priv_class = &monochrome_class, FILTER_INPUTS(monochrome_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_morpho.c b/libavfilter/vf_morpho.c index 02e731cc46..098d00dfd1 100644 --- a/libavfilter/vf_morpho.c +++ b/libavfilter/vf_morpho.c @@ -1076,18 +1076,18 @@ static const AVFilterPad morpho_outputs[] = { }, }; -const AVFilter ff_vf_morpho = { - .name = "morpho", - .description = NULL_IF_CONFIG_SMALL("Apply Morphological filter."), +const FFFilter ff_vf_morpho = { + .p.name = "morpho", + .p.description = NULL_IF_CONFIG_SMALL("Apply Morphological filter."), + .p.priv_class = &morpho_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .preinit = morpho_framesync_preinit, .priv_size = sizeof(MorphoContext), - .priv_class = &morpho_class, .activate = activate, .uninit = uninit, FILTER_INPUTS(morpho_inputs), FILTER_OUTPUTS(morpho_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_mpdecimate.c b/libavfilter/vf_mpdecimate.c index e101565f6d..d4851c1540 100644 --- a/libavfilter/vf_mpdecimate.c +++ b/libavfilter/vf_mpdecimate.c @@ -237,13 +237,13 @@ static const AVFilterPad mpdecimate_inputs[] = { }, }; -const AVFilter ff_vf_mpdecimate = { - .name = "mpdecimate", - .description = NULL_IF_CONFIG_SMALL("Remove near-duplicate frames."), +const FFFilter ff_vf_mpdecimate = { + .p.name = "mpdecimate", + .p.description = NULL_IF_CONFIG_SMALL("Remove near-duplicate frames."), + .p.priv_class = &mpdecimate_class, .init = init, .uninit = uninit, .priv_size = sizeof(DecimateContext), - .priv_class = &mpdecimate_class, FILTER_INPUTS(mpdecimate_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_multiply.c b/libavfilter/vf_multiply.c index fd8ab1092b..f7db2195db 100644 --- a/libavfilter/vf_multiply.c +++ b/libavfilter/vf_multiply.c @@ -239,16 +239,16 @@ static const AVFilterPad multiply_outputs[] = { AVFILTER_DEFINE_CLASS(multiply); -const AVFilter ff_vf_multiply = { - .name = "multiply", - .description = NULL_IF_CONFIG_SMALL("Multiply first video stream with second video stream."), - .priv_class = &multiply_class, +const FFFilter ff_vf_multiply = { + .p.name = "multiply", + .p.description = NULL_IF_CONFIG_SMALL("Multiply first video stream with second video stream."), + .p.priv_class = &multiply_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(MultiplyContext), .uninit = uninit, .activate = activate, FILTER_INPUTS(multiply_inputs), FILTER_OUTPUTS(multiply_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_negate.c b/libavfilter/vf_negate.c index f857415ee8..f61f7ebbbb 100644 --- a/libavfilter/vf_negate.c +++ b/libavfilter/vf_negate.c @@ -355,14 +355,14 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_negate = { - .name = "negate", - .description = NULL_IF_CONFIG_SMALL("Negate input video."), +const FFFilter ff_vf_negate = { + .p.name = "negate", + .p.description = NULL_IF_CONFIG_SMALL("Negate input video."), + .p.priv_class = &negate_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(NegateContext), - .priv_class = &negate_class, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_neighbor.c b/libavfilter/vf_neighbor.c index 29772ccb11..7bdc2ab91f 100644 --- a/libavfilter/vf_neighbor.c +++ b/libavfilter/vf_neighbor.c @@ -344,16 +344,16 @@ static const AVFilterPad neighbor_inputs[] = { #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM #define DEFINE_NEIGHBOR_FILTER(name_, description_, priv_class_) \ -const AVFilter ff_vf_##name_ = { \ - .name = #name_, \ - .description = NULL_IF_CONFIG_SMALL(description_), \ - .priv_class = &priv_class_##_class, \ +const FFFilter ff_vf_##name_ = { \ + .p.name = #name_, \ + .p.description = NULL_IF_CONFIG_SMALL(description_), \ + .p.priv_class = &priv_class_##_class, \ + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC| \ + AVFILTER_FLAG_SLICE_THREADS, \ .priv_size = sizeof(NContext), \ FILTER_INPUTS(neighbor_inputs), \ FILTER_OUTPUTS(ff_video_default_filterpad), \ FILTER_PIXFMTS_ARRAY(pix_fmts), \ - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC| \ - AVFILTER_FLAG_SLICE_THREADS, \ .process_command = ff_filter_process_command, \ } diff --git a/libavfilter/vf_neighbor_opencl.c b/libavfilter/vf_neighbor_opencl.c index d8238a138e..38a1b7821e 100644 --- a/libavfilter/vf_neighbor_opencl.c +++ b/libavfilter/vf_neighbor_opencl.c @@ -273,11 +273,11 @@ static const AVOption erosion_opencl_options[] = { AVFILTER_DEFINE_CLASS(erosion_opencl); -const AVFilter ff_vf_erosion_opencl = { - .name = "erosion_opencl", - .description = NULL_IF_CONFIG_SMALL("Apply erosion effect"), +const FFFilter ff_vf_erosion_opencl = { + .p.name = "erosion_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Apply erosion effect"), + .p.priv_class = &erosion_opencl_class, .priv_size = sizeof(NeighborOpenCLContext), - .priv_class = &erosion_opencl_class, .init = &ff_opencl_filter_init, .uninit = &neighbor_opencl_uninit, FILTER_INPUTS(neighbor_opencl_inputs), @@ -301,18 +301,18 @@ static const AVOption dilation_opencl_options[] = { AVFILTER_DEFINE_CLASS(dilation_opencl); -const AVFilter ff_vf_dilation_opencl = { - .name = "dilation_opencl", - .description = NULL_IF_CONFIG_SMALL("Apply dilation effect"), +const FFFilter ff_vf_dilation_opencl = { + .p.name = "dilation_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Apply dilation effect"), + .p.priv_class = &dilation_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(NeighborOpenCLContext), - .priv_class = &dilation_opencl_class, .init = &ff_opencl_filter_init, .uninit = &neighbor_opencl_uninit, FILTER_INPUTS(neighbor_opencl_inputs), FILTER_OUTPUTS(neighbor_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; #endif /* CONFIG_DILATION_OPENCL_FILTER */ diff --git a/libavfilter/vf_nlmeans.c b/libavfilter/vf_nlmeans.c index 86bf5b8e0a..2679e5fee4 100644 --- a/libavfilter/vf_nlmeans.c +++ b/libavfilter/vf_nlmeans.c @@ -472,15 +472,15 @@ static const AVFilterPad nlmeans_inputs[] = { }, }; -const AVFilter ff_vf_nlmeans = { - .name = "nlmeans", - .description = NULL_IF_CONFIG_SMALL("Non-local means denoiser."), +const FFFilter ff_vf_nlmeans = { + .p.name = "nlmeans", + .p.description = NULL_IF_CONFIG_SMALL("Non-local means denoiser."), + .p.priv_class = &nlmeans_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(NLMeansContext), .init = init, .uninit = uninit, FILTER_INPUTS(nlmeans_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &nlmeans_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_nlmeans_opencl.c b/libavfilter/vf_nlmeans_opencl.c index b224280088..ae64429efc 100644 --- a/libavfilter/vf_nlmeans_opencl.c +++ b/libavfilter/vf_nlmeans_opencl.c @@ -427,16 +427,16 @@ static const AVFilterPad nlmeans_opencl_outputs[] = { }, }; -const AVFilter ff_vf_nlmeans_opencl = { - .name = "nlmeans_opencl", - .description = NULL_IF_CONFIG_SMALL("Non-local means denoiser through OpenCL"), +const FFFilter ff_vf_nlmeans_opencl = { + .p.name = "nlmeans_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Non-local means denoiser through OpenCL"), + .p.priv_class = &nlmeans_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(NLMeansOpenCLContext), - .priv_class = &nlmeans_opencl_class, .init = &ff_opencl_filter_init, .uninit = &nlmeans_opencl_uninit, FILTER_INPUTS(nlmeans_opencl_inputs), FILTER_OUTPUTS(nlmeans_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_nlmeans_vulkan.c b/libavfilter/vf_nlmeans_vulkan.c index c7ce696993..67360dc745 100644 --- a/libavfilter/vf_nlmeans_vulkan.c +++ b/libavfilter/vf_nlmeans_vulkan.c @@ -1113,16 +1113,16 @@ static const AVFilterPad nlmeans_vulkan_outputs[] = { }, }; -const AVFilter ff_vf_nlmeans_vulkan = { - .name = "nlmeans_vulkan", - .description = NULL_IF_CONFIG_SMALL("Non-local means denoiser (Vulkan)"), +const FFFilter ff_vf_nlmeans_vulkan = { + .p.name = "nlmeans_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Non-local means denoiser (Vulkan)"), + .p.priv_class = &nlmeans_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(NLMeansVulkanContext), .init = &ff_vk_filter_init, .uninit = &nlmeans_vulkan_uninit, FILTER_INPUTS(nlmeans_vulkan_inputs), FILTER_OUTPUTS(nlmeans_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &nlmeans_vulkan_class, - .flags = AVFILTER_FLAG_HWDEVICE, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_nnedi.c b/libavfilter/vf_nnedi.c index 1b1f9e8b42..113252ebd0 100644 --- a/libavfilter/vf_nnedi.c +++ b/libavfilter/vf_nnedi.c @@ -1158,16 +1158,16 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_nnedi = { - .name = "nnedi", - .description = NULL_IF_CONFIG_SMALL("Apply neural network edge directed interpolation intra-only deinterlacer."), +const FFFilter ff_vf_nnedi = { + .p.name = "nnedi", + .p.description = NULL_IF_CONFIG_SMALL("Apply neural network edge directed interpolation intra-only deinterlacer."), + .p.priv_class = &nnedi_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(NNEDIContext), - .priv_class = &nnedi_class, .init = init, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c index 5a4ed9795d..a6613f663e 100644 --- a/libavfilter/vf_noise.c +++ b/libavfilter/vf_noise.c @@ -333,15 +333,15 @@ static const AVFilterPad noise_inputs[] = { }, }; -const AVFilter ff_vf_noise = { - .name = "noise", - .description = NULL_IF_CONFIG_SMALL("Add noise."), +const FFFilter ff_vf_noise = { + .p.name = "noise", + .p.description = NULL_IF_CONFIG_SMALL("Add noise."), + .p.priv_class = &noise_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(NoiseContext), .init = init, .uninit = uninit, FILTER_INPUTS(noise_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &noise_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_normalize.c b/libavfilter/vf_normalize.c index 613edd532f..6d32bc85fc 100644 --- a/libavfilter/vf_normalize.c +++ b/libavfilter/vf_normalize.c @@ -510,15 +510,15 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_normalize = { - .name = "normalize", - .description = NULL_IF_CONFIG_SMALL("Normalize RGB video."), +const FFFilter ff_vf_normalize = { + .p.name = "normalize", + .p.description = NULL_IF_CONFIG_SMALL("Normalize RGB video."), + .p.priv_class = &normalize_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(NormalizeContext), - .priv_class = &normalize_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_null.c b/libavfilter/vf_null.c index 372503a084..7071cc959f 100644 --- a/libavfilter/vf_null.c +++ b/libavfilter/vf_null.c @@ -26,10 +26,10 @@ #include "filters.h" #include "video.h" -const AVFilter ff_vf_null = { - .name = "null", - .description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), - .flags = AVFILTER_FLAG_METADATA_ONLY, +const FFFilter ff_vf_null = { + .p.name = "null", + .p.description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(ff_video_default_filterpad), }; diff --git a/libavfilter/vf_ocr.c b/libavfilter/vf_ocr.c index f0b4b24288..16266373bf 100644 --- a/libavfilter/vf_ocr.c +++ b/libavfilter/vf_ocr.c @@ -128,14 +128,14 @@ static const AVFilterPad ocr_inputs[] = { }, }; -const AVFilter ff_vf_ocr = { - .name = "ocr", - .description = NULL_IF_CONFIG_SMALL("Optical Character Recognition."), +const FFFilter ff_vf_ocr = { + .p.name = "ocr", + .p.description = NULL_IF_CONFIG_SMALL("Optical Character Recognition."), + .p.priv_class = &ocr_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(OCRContext), - .priv_class = &ocr_class, .init = init, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(ocr_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index c30fa4327b..528b845c6c 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -1001,19 +1001,19 @@ static const AVFilterPad avfilter_vf_overlay_outputs[] = { }, }; -const AVFilter ff_vf_overlay = { - .name = "overlay", - .description = NULL_IF_CONFIG_SMALL("Overlay a video source on top of the input."), +const FFFilter ff_vf_overlay = { + .p.name = "overlay", + .p.description = NULL_IF_CONFIG_SMALL("Overlay a video source on top of the input."), + .p.priv_class = &overlay_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .preinit = overlay_framesync_preinit, .init = init, .uninit = uninit, .priv_size = sizeof(OverlayContext), - .priv_class = &overlay_class, .activate = activate, .process_command = process_command, FILTER_INPUTS(avfilter_vf_overlay_inputs), FILTER_OUTPUTS(avfilter_vf_overlay_outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_overlay_cuda.c b/libavfilter/vf_overlay_cuda.c index a35f6eda6e..8680fc0c4a 100644 --- a/libavfilter/vf_overlay_cuda.c +++ b/libavfilter/vf_overlay_cuda.c @@ -579,11 +579,11 @@ static const AVFilterPad overlay_cuda_outputs[] = { }, }; -const AVFilter ff_vf_overlay_cuda = { - .name = "overlay_cuda", - .description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another using CUDA"), +const FFFilter ff_vf_overlay_cuda = { + .p.name = "overlay_cuda", + .p.description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another using CUDA"), + .p.priv_class = &overlay_cuda_class, .priv_size = sizeof(OverlayCUDAContext), - .priv_class = &overlay_cuda_class, .init = &overlay_cuda_init, .uninit = &overlay_cuda_uninit, .activate = &overlay_cuda_activate, diff --git a/libavfilter/vf_overlay_opencl.c b/libavfilter/vf_overlay_opencl.c index c8c9d8bf1d..e930aced04 100644 --- a/libavfilter/vf_overlay_opencl.c +++ b/libavfilter/vf_overlay_opencl.c @@ -310,11 +310,12 @@ static const AVFilterPad overlay_opencl_outputs[] = { }, }; -const AVFilter ff_vf_overlay_opencl = { - .name = "overlay_opencl", - .description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another"), +const FFFilter ff_vf_overlay_opencl = { + .p.name = "overlay_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another"), + .p.priv_class = &overlay_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(OverlayOpenCLContext), - .priv_class = &overlay_opencl_class, .init = &overlay_opencl_init, .uninit = &overlay_opencl_uninit, .activate = &overlay_opencl_activate, @@ -322,5 +323,4 @@ const AVFilter ff_vf_overlay_opencl = { FILTER_OUTPUTS(overlay_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c index 17da4a4d1a..1e80622671 100644 --- a/libavfilter/vf_overlay_qsv.c +++ b/libavfilter/vf_overlay_qsv.c @@ -423,9 +423,11 @@ static const AVFilterPad overlay_qsv_outputs[] = { }, }; -const AVFilter ff_vf_overlay_qsv = { - .name = "overlay_qsv", - .description = NULL_IF_CONFIG_SMALL("Quick Sync Video overlay."), +const FFFilter ff_vf_overlay_qsv = { + .p.name = "overlay_qsv", + .p.description = NULL_IF_CONFIG_SMALL("Quick Sync Video overlay."), + .p.priv_class = &overlay_qsv_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(QSVOverlayContext), .preinit = overlay_qsv_framesync_preinit, .init = overlay_qsv_init, @@ -434,7 +436,5 @@ const AVFilter ff_vf_overlay_qsv = { FILTER_INPUTS(overlay_qsv_inputs), FILTER_OUTPUTS(overlay_qsv_outputs), FILTER_QUERY_FUNC2(overlay_qsv_query_formats), - .priv_class = &overlay_qsv_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_overlay_vaapi.c b/libavfilter/vf_overlay_vaapi.c index dde7f00a67..2c1c6b8755 100644 --- a/libavfilter/vf_overlay_vaapi.c +++ b/libavfilter/vf_overlay_vaapi.c @@ -414,11 +414,11 @@ static const AVFilterPad overlay_vaapi_outputs[] = { }, }; -const AVFilter ff_vf_overlay_vaapi = { - .name = "overlay_vaapi", - .description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another"), +const FFFilter ff_vf_overlay_vaapi = { + .p.name = "overlay_vaapi", + .p.description = NULL_IF_CONFIG_SMALL("Overlay one video on top of another"), + .p.priv_class = &overlay_vaapi_class, .priv_size = sizeof(OverlayVAAPIContext), - .priv_class = &overlay_vaapi_class, .init = &overlay_vaapi_init, .uninit = &overlay_vaapi_uninit, .activate = &overlay_vaapi_activate, diff --git a/libavfilter/vf_overlay_vulkan.c b/libavfilter/vf_overlay_vulkan.c index 0f783acf16..7d5c201cb5 100644 --- a/libavfilter/vf_overlay_vulkan.c +++ b/libavfilter/vf_overlay_vulkan.c @@ -336,9 +336,11 @@ static const AVFilterPad overlay_vulkan_outputs[] = { }, }; -const AVFilter ff_vf_overlay_vulkan = { - .name = "overlay_vulkan", - .description = NULL_IF_CONFIG_SMALL("Overlay a source on top of another"), +const FFFilter ff_vf_overlay_vulkan = { + .p.name = "overlay_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Overlay a source on top of another"), + .p.priv_class = &overlay_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(OverlayVulkanContext), .init = &overlay_vulkan_init, .uninit = &overlay_vulkan_uninit, @@ -346,7 +348,5 @@ const AVFilter ff_vf_overlay_vulkan = { FILTER_INPUTS(overlay_vulkan_inputs), FILTER_OUTPUTS(overlay_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &overlay_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_owdenoise.c b/libavfilter/vf_owdenoise.c index 624e2d8cf1..746c55a6e5 100644 --- a/libavfilter/vf_owdenoise.c +++ b/libavfilter/vf_owdenoise.c @@ -356,14 +356,14 @@ static const AVFilterPad owdenoise_inputs[] = { }, }; -const AVFilter ff_vf_owdenoise = { - .name = "owdenoise", - .description = NULL_IF_CONFIG_SMALL("Denoise using wavelets."), +const FFFilter ff_vf_owdenoise = { + .p.name = "owdenoise", + .p.description = NULL_IF_CONFIG_SMALL("Denoise using wavelets."), + .p.priv_class = &owdenoise_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(OWDenoiseContext), .uninit = uninit, FILTER_INPUTS(owdenoise_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &owdenoise_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_pad.c b/libavfilter/vf_pad.c index dc9ffaa46d..49fb272b24 100644 --- a/libavfilter/vf_pad.c +++ b/libavfilter/vf_pad.c @@ -454,11 +454,11 @@ static const AVFilterPad avfilter_vf_pad_outputs[] = { }, }; -const AVFilter ff_vf_pad = { - .name = "pad", - .description = NULL_IF_CONFIG_SMALL("Pad the input video."), +const FFFilter ff_vf_pad = { + .p.name = "pad", + .p.description = NULL_IF_CONFIG_SMALL("Pad the input video."), + .p.priv_class = &pad_class, .priv_size = sizeof(PadContext), - .priv_class = &pad_class, FILTER_INPUTS(avfilter_vf_pad_inputs), FILTER_OUTPUTS(avfilter_vf_pad_outputs), FILTER_QUERY_FUNC2(query_formats), diff --git a/libavfilter/vf_pad_opencl.c b/libavfilter/vf_pad_opencl.c index d5447a9978..9dc0290c19 100644 --- a/libavfilter/vf_pad_opencl.c +++ b/libavfilter/vf_pad_opencl.c @@ -380,16 +380,16 @@ static const AVOption pad_opencl_options[] = { AVFILTER_DEFINE_CLASS(pad_opencl); -const AVFilter ff_vf_pad_opencl = { - .name = "pad_opencl", - .description = NULL_IF_CONFIG_SMALL("Pad the input video."), +const FFFilter ff_vf_pad_opencl = { + .p.name = "pad_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Pad the input video."), + .p.priv_class = &pad_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(PadOpenCLContext), - .priv_class = &pad_opencl_class, .init = &ff_opencl_filter_init, .uninit = &pad_opencl_uninit, FILTER_INPUTS(pad_opencl_inputs), FILTER_OUTPUTS(pad_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_pad_vaapi.c b/libavfilter/vf_pad_vaapi.c index 478b89d117..5e9dad3065 100644 --- a/libavfilter/vf_pad_vaapi.c +++ b/libavfilter/vf_pad_vaapi.c @@ -269,11 +269,11 @@ static const AVFilterPad pad_vaapi_outputs[] = { }, }; -const AVFilter ff_vf_pad_vaapi = { - .name = "pad_vaapi", - .description = NULL_IF_CONFIG_SMALL("Pad the input video."), +const FFFilter ff_vf_pad_vaapi = { + .p.name = "pad_vaapi", + .p.description = NULL_IF_CONFIG_SMALL("Pad the input video."), + .p.priv_class = &pad_vaapi_class, .priv_size = sizeof(PadVAAPIContext), - .priv_class = &pad_vaapi_class, .init = &pad_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, FILTER_INPUTS(pad_vaapi_inputs), diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index d1ac5fcf34..2012e987e6 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -573,14 +573,14 @@ static const AVFilterPad palettegen_outputs[] = { }, }; -const AVFilter ff_vf_palettegen = { - .name = "palettegen", - .description = NULL_IF_CONFIG_SMALL("Find the optimal palette for a given stream."), +const FFFilter ff_vf_palettegen = { + .p.name = "palettegen", + .p.description = NULL_IF_CONFIG_SMALL("Find the optimal palette for a given stream."), + .p.priv_class = &palettegen_class, .priv_size = sizeof(PaletteGenContext), .init = init, .uninit = uninit, FILTER_INPUTS(palettegen_inputs), FILTER_OUTPUTS(palettegen_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &palettegen_class, }; diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c index 100f462750..72711f96ef 100644 --- a/libavfilter/vf_paletteuse.c +++ b/libavfilter/vf_paletteuse.c @@ -997,9 +997,10 @@ static const AVFilterPad paletteuse_outputs[] = { }, }; -const AVFilter ff_vf_paletteuse = { - .name = "paletteuse", - .description = NULL_IF_CONFIG_SMALL("Use a palette to downsample an input video stream."), +const FFFilter ff_vf_paletteuse = { + .p.name = "paletteuse", + .p.description = NULL_IF_CONFIG_SMALL("Use a palette to downsample an input video stream."), + .p.priv_class = &paletteuse_class, .priv_size = sizeof(PaletteUseContext), .init = init, .uninit = uninit, @@ -1007,5 +1008,4 @@ const AVFilter ff_vf_paletteuse = { FILTER_INPUTS(paletteuse_inputs), FILTER_OUTPUTS(paletteuse_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &paletteuse_class, }; diff --git a/libavfilter/vf_perspective.c b/libavfilter/vf_perspective.c index 5dd56a7dff..58510f6f13 100644 --- a/libavfilter/vf_perspective.c +++ b/libavfilter/vf_perspective.c @@ -497,15 +497,15 @@ static const AVFilterPad perspective_inputs[] = { }, }; -const AVFilter ff_vf_perspective = { - .name = "perspective", - .description = NULL_IF_CONFIG_SMALL("Correct the perspective of video."), +const FFFilter ff_vf_perspective = { + .p.name = "perspective", + .p.description = NULL_IF_CONFIG_SMALL("Correct the perspective of video."), + .p.priv_class = &perspective_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(PerspectiveContext), .init = init, .uninit = uninit, FILTER_INPUTS(perspective_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &perspective_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_phase.c b/libavfilter/vf_phase.c index 6cd8d8bb9d..e021009794 100644 --- a/libavfilter/vf_phase.c +++ b/libavfilter/vf_phase.c @@ -217,15 +217,15 @@ static const AVFilterPad phase_inputs[] = { }, }; -const AVFilter ff_vf_phase = { - .name = "phase", - .description = NULL_IF_CONFIG_SMALL("Phase shift fields."), +const FFFilter ff_vf_phase = { + .p.name = "phase", + .p.description = NULL_IF_CONFIG_SMALL("Phase shift fields."), + .p.priv_class = &phase_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(PhaseContext), - .priv_class = &phase_class, .uninit = uninit, FILTER_INPUTS(phase_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_photosensitivity.c b/libavfilter/vf_photosensitivity.c index 5ea987379a..7c8476b446 100644 --- a/libavfilter/vf_photosensitivity.c +++ b/libavfilter/vf_photosensitivity.c @@ -306,11 +306,11 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_photosensitivity = { - .name = "photosensitivity", - .description = NULL_IF_CONFIG_SMALL("Filter out photosensitive epilepsy seizure-inducing flashes."), +const FFFilter ff_vf_photosensitivity = { + .p.name = "photosensitivity", + .p.description = NULL_IF_CONFIG_SMALL("Filter out photosensitive epilepsy seizure-inducing flashes."), + .p.priv_class = &photosensitivity_class, .priv_size = sizeof(PhotosensitivityContext), - .priv_class = &photosensitivity_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), diff --git a/libavfilter/vf_pixdesctest.c b/libavfilter/vf_pixdesctest.c index 5e418238b0..994fe1db93 100644 --- a/libavfilter/vf_pixdesctest.c +++ b/libavfilter/vf_pixdesctest.c @@ -116,9 +116,9 @@ static const AVFilterPad avfilter_vf_pixdesctest_inputs[] = { }, }; -const AVFilter ff_vf_pixdesctest = { - .name = "pixdesctest", - .description = NULL_IF_CONFIG_SMALL("Test pixel format definitions."), +const FFFilter ff_vf_pixdesctest = { + .p.name = "pixdesctest", + .p.description = NULL_IF_CONFIG_SMALL("Test pixel format definitions."), .priv_size = sizeof(PixdescTestContext), .uninit = uninit, FILTER_INPUTS(avfilter_vf_pixdesctest_inputs), diff --git a/libavfilter/vf_pixelize.c b/libavfilter/vf_pixelize.c index bf92818633..a6f0e38dd7 100644 --- a/libavfilter/vf_pixelize.c +++ b/libavfilter/vf_pixelize.c @@ -338,14 +338,14 @@ static const AVFilterPad pixelize_outputs[] = { }, }; -const AVFilter ff_vf_pixelize = { - .name = "pixelize", - .description = NULL_IF_CONFIG_SMALL("Pixelize video."), +const FFFilter ff_vf_pixelize = { + .p.name = "pixelize", + .p.description = NULL_IF_CONFIG_SMALL("Pixelize video."), + .p.priv_class = &pixelize_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(PixelizeContext), - .priv_class = &pixelize_class, FILTER_INPUTS(pixelize_inputs), FILTER_OUTPUTS(pixelize_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_pp.c b/libavfilter/vf_pp.c index 85ac795583..9e9903eb97 100644 --- a/libavfilter/vf_pp.c +++ b/libavfilter/vf_pp.c @@ -176,9 +176,11 @@ static const AVFilterPad pp_inputs[] = { }, }; -const AVFilter ff_vf_pp = { - .name = "pp", - .description = NULL_IF_CONFIG_SMALL("Filter video using libpostproc."), +const FFFilter ff_vf_pp = { + .p.name = "pp", + .p.description = NULL_IF_CONFIG_SMALL("Filter video using libpostproc."), + .p.priv_class = &pp_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(PPFilterContext), .init = pp_init, .uninit = pp_uninit, @@ -186,6 +188,4 @@ const AVFilter ff_vf_pp = { FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), .process_command = pp_process_command, - .priv_class = &pp_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_pp7.c b/libavfilter/vf_pp7.c index 6fe243bbaa..e7aae87df0 100644 --- a/libavfilter/vf_pp7.c +++ b/libavfilter/vf_pp7.c @@ -389,14 +389,14 @@ static const AVFilterPad pp7_inputs[] = { }, }; -const AVFilter ff_vf_pp7 = { - .name = "pp7", - .description = NULL_IF_CONFIG_SMALL("Apply Postprocessing 7 filter."), +const FFFilter ff_vf_pp7 = { + .p.name = "pp7", + .p.description = NULL_IF_CONFIG_SMALL("Apply Postprocessing 7 filter."), + .p.priv_class = &pp7_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(PP7Context), .uninit = uninit, FILTER_INPUTS(pp7_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &pp7_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c index 22dfbd52c4..322fc39094 100644 --- a/libavfilter/vf_premultiply.c +++ b/libavfilter/vf_premultiply.c @@ -824,40 +824,38 @@ static const AVFilterPad premultiply_outputs[] = { #if CONFIG_PREMULTIPLY_FILTER -const AVFilter ff_vf_premultiply = { - .name = "premultiply", - .description = NULL_IF_CONFIG_SMALL("PreMultiply first stream with first plane of second stream."), +const FFFilter ff_vf_premultiply = { + .p.name = "premultiply", + .p.description = NULL_IF_CONFIG_SMALL("PreMultiply first stream with first plane of second stream."), + .p.priv_class = &premultiply_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_DYNAMIC_INPUTS | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(PreMultiplyContext), .init = init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(premultiply_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &premultiply_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_DYNAMIC_INPUTS | - AVFILTER_FLAG_SLICE_THREADS, }; #endif /* CONFIG_PREMULTIPLY_FILTER */ #if CONFIG_UNPREMULTIPLY_FILTER -const AVFilter ff_vf_unpremultiply = { - .name = "unpremultiply", - .description = NULL_IF_CONFIG_SMALL("UnPreMultiply first stream with first plane of second stream."), - .priv_class = &premultiply_class, +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.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_DYNAMIC_INPUTS | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(PreMultiplyContext), .init = init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(premultiply_outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_DYNAMIC_INPUTS | - AVFILTER_FLAG_SLICE_THREADS, }; #endif /* CONFIG_UNPREMULTIPLY_FILTER */ diff --git a/libavfilter/vf_procamp_vaapi.c b/libavfilter/vf_procamp_vaapi.c index a9e589f1b6..2191ca2f4c 100644 --- a/libavfilter/vf_procamp_vaapi.c +++ b/libavfilter/vf_procamp_vaapi.c @@ -239,15 +239,15 @@ static const AVFilterPad procamp_vaapi_outputs[] = { }, }; -const AVFilter ff_vf_procamp_vaapi = { - .name = "procamp_vaapi", - .description = NULL_IF_CONFIG_SMALL("ProcAmp (color balance) adjustments for hue, saturation, brightness, contrast"), +const FFFilter ff_vf_procamp_vaapi = { + .p.name = "procamp_vaapi", + .p.description = NULL_IF_CONFIG_SMALL("ProcAmp (color balance) adjustments for hue, saturation, brightness, contrast"), + .p.priv_class = &procamp_vaapi_class, .priv_size = sizeof(ProcampVAAPIContext), .init = &procamp_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, FILTER_INPUTS(procamp_vaapi_inputs), FILTER_OUTPUTS(procamp_vaapi_outputs), FILTER_QUERY_FUNC2(&ff_vaapi_vpp_query_formats), - .priv_class = &procamp_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_program_opencl.c b/libavfilter/vf_program_opencl.c index 3b49829161..c0c10045db 100644 --- a/libavfilter/vf_program_opencl.c +++ b/libavfilter/vf_program_opencl.c @@ -357,18 +357,18 @@ static const AVFilterPad program_opencl_outputs[] = { }, }; -const AVFilter ff_vf_program_opencl = { - .name = "program_opencl", - .description = NULL_IF_CONFIG_SMALL("Filter video using an OpenCL program"), - .priv_size = sizeof(ProgramOpenCLContext), - .priv_class = &program_opencl_class, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | +const FFFilter ff_vf_program_opencl = { + .p.name = "program_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Filter video using an OpenCL program"), + .p.priv_class = &program_opencl_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_HWDEVICE, + .p.inputs = NULL, + .priv_size = sizeof(ProgramOpenCLContext), .preinit = &program_opencl_framesync_preinit, .init = &program_opencl_init, .uninit = &program_opencl_uninit, .activate = &program_opencl_activate, - .inputs = NULL, FILTER_OUTPUTS(program_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, @@ -411,18 +411,18 @@ static const AVFilterPad openclsrc_outputs[] = { }, }; -const AVFilter ff_vsrc_openclsrc = { - .name = "openclsrc", - .description = NULL_IF_CONFIG_SMALL("Generate video using an OpenCL program"), +const FFFilter ff_vsrc_openclsrc = { + .p.name = "openclsrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate video using an OpenCL program"), + .p.priv_class = &openclsrc_class, + .p.inputs = NULL, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(ProgramOpenCLContext), - .priv_class = &openclsrc_class, .init = &program_opencl_init, .uninit = &program_opencl_uninit, - .inputs = NULL, FILTER_OUTPUTS(openclsrc_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; #endif diff --git a/libavfilter/vf_pseudocolor.c b/libavfilter/vf_pseudocolor.c index 46c65da383..7d5657f26c 100644 --- a/libavfilter/vf_pseudocolor.c +++ b/libavfilter/vf_pseudocolor.c @@ -1055,15 +1055,15 @@ static av_cold void uninit(AVFilterContext *ctx) AVFILTER_DEFINE_CLASS(pseudocolor); -const AVFilter ff_vf_pseudocolor = { - .name = "pseudocolor", - .description = NULL_IF_CONFIG_SMALL("Make pseudocolored video frames."), +const FFFilter ff_vf_pseudocolor = { + .p.name = "pseudocolor", + .p.description = NULL_IF_CONFIG_SMALL("Make pseudocolored video frames."), + .p.priv_class = &pseudocolor_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(PseudoColorContext), - .priv_class = &pseudocolor_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_psnr.c b/libavfilter/vf_psnr.c index 1e8f24fc52..4a173c73d9 100644 --- a/libavfilter/vf_psnr.c +++ b/libavfilter/vf_psnr.c @@ -435,19 +435,19 @@ static const AVFilterPad psnr_outputs[] = { }, }; -const AVFilter ff_vf_psnr = { - .name = "psnr", - .description = NULL_IF_CONFIG_SMALL("Calculate the PSNR between two video streams."), +const FFFilter ff_vf_psnr = { + .p.name = "psnr", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the PSNR between two video streams."), + .p.priv_class = &psnr_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, .preinit = psnr_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(PSNRContext), - .priv_class = &psnr_class, FILTER_INPUTS(psnr_inputs), FILTER_OUTPUTS(psnr_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c index 9c8ac7f914..1e4289aab1 100644 --- a/libavfilter/vf_pullup.c +++ b/libavfilter/vf_pullup.c @@ -750,11 +750,11 @@ static const AVFilterPad pullup_inputs[] = { }, }; -const AVFilter ff_vf_pullup = { - .name = "pullup", - .description = NULL_IF_CONFIG_SMALL("Pullup from field sequence to frames."), +const FFFilter ff_vf_pullup = { + .p.name = "pullup", + .p.description = NULL_IF_CONFIG_SMALL("Pullup from field sequence to frames."), + .p.priv_class = &pullup_class, .priv_size = sizeof(PullupContext), - .priv_class = &pullup_class, .uninit = uninit, FILTER_INPUTS(pullup_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), diff --git a/libavfilter/vf_qp.c b/libavfilter/vf_qp.c index bc881ca6dd..a148a86e8c 100644 --- a/libavfilter/vf_qp.c +++ b/libavfilter/vf_qp.c @@ -181,13 +181,13 @@ static const AVFilterPad qp_inputs[] = { }, }; -const AVFilter ff_vf_qp = { - .name = "qp", - .description = NULL_IF_CONFIG_SMALL("Change video quantization parameters."), +const FFFilter ff_vf_qp = { + .p.name = "qp", + .p.description = NULL_IF_CONFIG_SMALL("Change video quantization parameters."), + .p.priv_class = &qp_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(QPContext), FILTER_INPUTS(qp_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .priv_class = &qp_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_quirc.c b/libavfilter/vf_quirc.c index d44233af5c..ddb443f3dd 100644 --- a/libavfilter/vf_quirc.c +++ b/libavfilter/vf_quirc.c @@ -164,17 +164,17 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_quirc = { - .name = "quirc", - .description = NULL_IF_CONFIG_SMALL("Decode and show QR codes content."), +const FFFilter ff_vf_quirc = { + .p.name = "quirc", + .p.description = NULL_IF_CONFIG_SMALL("Decode and show QR codes content."), + .p.priv_class = &quirc_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(QuircContext), - .priv_class = &quirc_class, .init = init, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_random.c b/libavfilter/vf_random.c index 032153a05f..ca95ca2c10 100644 --- a/libavfilter/vf_random.c +++ b/libavfilter/vf_random.c @@ -141,11 +141,11 @@ static const AVFilterPad random_outputs[] = { }, }; -const AVFilter ff_vf_random = { - .name = "random", - .description = NULL_IF_CONFIG_SMALL("Return random frames."), +const FFFilter ff_vf_random = { + .p.name = "random", + .p.description = NULL_IF_CONFIG_SMALL("Return random frames."), + .p.priv_class = &random_class, .priv_size = sizeof(RandomContext), - .priv_class = &random_class, .init = init, .uninit = uninit, FILTER_INPUTS(random_inputs), diff --git a/libavfilter/vf_readeia608.c b/libavfilter/vf_readeia608.c index 84ed2a27ef..605ca86d17 100644 --- a/libavfilter/vf_readeia608.c +++ b/libavfilter/vf_readeia608.c @@ -538,17 +538,17 @@ static const AVFilterPad readeia608_inputs[] = { }, }; -const AVFilter ff_vf_readeia608 = { - .name = "readeia608", - .description = NULL_IF_CONFIG_SMALL("Read EIA-608 Closed Caption codes from input video and write them to frame metadata."), +const FFFilter ff_vf_readeia608 = { + .p.name = "readeia608", + .p.description = NULL_IF_CONFIG_SMALL("Read EIA-608 Closed Caption codes from input video and write them to frame metadata."), + .p.priv_class = &readeia608_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(ReadEIA608Context), - .priv_class = &readeia608_class, FILTER_INPUTS(readeia608_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), .uninit = uninit, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_METADATA_ONLY, .process_command = process_command, }; diff --git a/libavfilter/vf_readvitc.c b/libavfilter/vf_readvitc.c index 303703894a..fa3953a426 100644 --- a/libavfilter/vf_readvitc.c +++ b/libavfilter/vf_readvitc.c @@ -229,12 +229,12 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_readvitc = { - .name = "readvitc", - .description = NULL_IF_CONFIG_SMALL("Read vertical interval timecode and write it to frame metadata."), +const FFFilter ff_vf_readvitc = { + .p.name = "readvitc", + .p.description = NULL_IF_CONFIG_SMALL("Read vertical interval timecode and write it to frame metadata."), + .p.priv_class = &readvitc_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(ReadVitcContext), - .priv_class = &readvitc_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), diff --git a/libavfilter/vf_remap.c b/libavfilter/vf_remap.c index cc83aa7ffe..8146159d93 100644 --- a/libavfilter/vf_remap.c +++ b/libavfilter/vf_remap.c @@ -397,15 +397,15 @@ static const AVFilterPad remap_outputs[] = { }, }; -const AVFilter ff_vf_remap = { - .name = "remap", - .description = NULL_IF_CONFIG_SMALL("Remap pixels."), +const FFFilter ff_vf_remap = { + .p.name = "remap", + .p.description = NULL_IF_CONFIG_SMALL("Remap pixels."), + .p.priv_class = &remap_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(RemapContext), .uninit = uninit, .activate = activate, FILTER_INPUTS(remap_inputs), FILTER_OUTPUTS(remap_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &remap_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_remap_opencl.c b/libavfilter/vf_remap_opencl.c index 89d3efd53b..bb83944b2f 100644 --- a/libavfilter/vf_remap_opencl.c +++ b/libavfilter/vf_remap_opencl.c @@ -339,9 +339,11 @@ static const AVFilterPad remap_opencl_outputs[] = { }, }; -const AVFilter ff_vf_remap_opencl = { - .name = "remap_opencl", - .description = NULL_IF_CONFIG_SMALL("Remap pixels using OpenCL."), +const FFFilter ff_vf_remap_opencl = { + .p.name = "remap_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Remap pixels using OpenCL."), + .p.priv_class = &remap_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(RemapOpenCLContext), .init = remap_opencl_init, .uninit = remap_opencl_uninit, @@ -349,7 +351,5 @@ const AVFilter ff_vf_remap_opencl = { FILTER_INPUTS(remap_opencl_inputs), FILTER_OUTPUTS(remap_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), - .priv_class = &remap_opencl_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_removegrain.c b/libavfilter/vf_removegrain.c index 5a02670235..3209c7db86 100644 --- a/libavfilter/vf_removegrain.c +++ b/libavfilter/vf_removegrain.c @@ -631,13 +631,13 @@ static const AVFilterPad removegrain_inputs[] = { }, }; -const AVFilter ff_vf_removegrain = { - .name = "removegrain", - .description = NULL_IF_CONFIG_SMALL("Remove grain."), +const FFFilter ff_vf_removegrain = { + .p.name = "removegrain", + .p.description = NULL_IF_CONFIG_SMALL("Remove grain."), + .p.priv_class = &removegrain_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(RemoveGrainContext), FILTER_INPUTS(removegrain_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &removegrain_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_removelogo.c b/libavfilter/vf_removelogo.c index f17487eac8..49259026ff 100644 --- a/libavfilter/vf_removelogo.c +++ b/libavfilter/vf_removelogo.c @@ -555,15 +555,15 @@ static const AVFilterPad removelogo_inputs[] = { }, }; -const AVFilter ff_vf_removelogo = { - .name = "removelogo", - .description = NULL_IF_CONFIG_SMALL("Remove a TV logo based on a mask image."), +const FFFilter ff_vf_removelogo = { + .p.name = "removelogo", + .p.description = NULL_IF_CONFIG_SMALL("Remove a TV logo based on a mask image."), + .p.priv_class = &removelogo_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(RemovelogoContext), .init = init, .uninit = uninit, FILTER_INPUTS(removelogo_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_YUV420P), - .priv_class = &removelogo_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_repeatfields.c b/libavfilter/vf_repeatfields.c index a89a295cca..579323cd20 100644 --- a/libavfilter/vf_repeatfields.c +++ b/libavfilter/vf_repeatfields.c @@ -184,9 +184,9 @@ static const AVFilterPad repeatfields_inputs[] = { }, }; -const AVFilter ff_vf_repeatfields = { - .name = "repeatfields", - .description = NULL_IF_CONFIG_SMALL("Hard repeat fields based on MPEG repeat field flag."), +const FFFilter ff_vf_repeatfields = { + .p.name = "repeatfields", + .p.description = NULL_IF_CONFIG_SMALL("Hard repeat fields based on MPEG repeat field flag."), .priv_size = sizeof(RepeatFieldsContext), .uninit = uninit, FILTER_INPUTS(repeatfields_inputs), diff --git a/libavfilter/vf_rotate.c b/libavfilter/vf_rotate.c index 0a41946480..3dc57bbb08 100644 --- a/libavfilter/vf_rotate.c +++ b/libavfilter/vf_rotate.c @@ -593,9 +593,11 @@ static const AVFilterPad rotate_outputs[] = { }, }; -const AVFilter ff_vf_rotate = { - .name = "rotate", - .description = NULL_IF_CONFIG_SMALL("Rotate the input image."), +const FFFilter ff_vf_rotate = { + .p.name = "rotate", + .p.description = NULL_IF_CONFIG_SMALL("Rotate the input image."), + .p.priv_class = &rotate_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(RotContext), .init = init, .uninit = uninit, @@ -603,6 +605,4 @@ const AVFilter ff_vf_rotate = { FILTER_INPUTS(rotate_inputs), FILTER_OUTPUTS(rotate_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &rotate_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_sab.c b/libavfilter/vf_sab.c index d6fcb73a08..f40903be21 100644 --- a/libavfilter/vf_sab.c +++ b/libavfilter/vf_sab.c @@ -308,15 +308,15 @@ static const AVFilterPad sab_inputs[] = { }, }; -const AVFilter ff_vf_sab = { - .name = "sab", - .description = NULL_IF_CONFIG_SMALL("Apply shape adaptive blur."), +const FFFilter ff_vf_sab = { + .p.name = "sab", + .p.description = NULL_IF_CONFIG_SMALL("Apply shape adaptive blur."), + .p.priv_class = &sab_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(SabContext), .init = init, .uninit = uninit, FILTER_INPUTS(sab_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &sab_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index af55c3b7ef..14ce1fbbd8 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -181,7 +181,8 @@ typedef struct ScaleContext { } ScaleContext; -const AVFilter ff_vf_scale2ref; +const FFFilter ff_vf_scale2ref; +#define IS_SCALE2REF(ctx) ((ctx)->filter == &ff_vf_scale2ref.p) static int config_props(AVFilterLink *outlink); @@ -229,7 +230,7 @@ static int check_exprs(AVFilterContext *ctx) scale->uses_ref = 1; } - if (ctx->filter != &ff_vf_scale2ref && + if (!IS_SCALE2REF(ctx) && (vars_w[VAR_S2R_MAIN_W] || vars_h[VAR_S2R_MAIN_W] || vars_w[VAR_S2R_MAIN_H] || vars_h[VAR_S2R_MAIN_H] || vars_w[VAR_S2R_MAIN_A] || vars_h[VAR_S2R_MAIN_A] || @@ -245,7 +246,7 @@ static int check_exprs(AVFilterContext *ctx) return AVERROR(EINVAL); } - if (ctx->filter != &ff_vf_scale2ref && + if (!IS_SCALE2REF(ctx) && (vars_w[VAR_S2R_MAIN_W] || vars_h[VAR_S2R_MAIN_W] || vars_w[VAR_S2R_MAIN_H] || vars_h[VAR_S2R_MAIN_H] || vars_w[VAR_S2R_MAIN_A] || vars_h[VAR_S2R_MAIN_A] || @@ -353,7 +354,7 @@ static av_cold int init(AVFilterContext *ctx) ScaleContext *scale = ctx->priv; int ret; - if (ctx->filter == &ff_vf_scale2ref) + if (IS_SCALE2REF(ctx)) av_log(ctx, AV_LOG_WARNING, "scale2ref is deprecated, use scale=rw:rh instead\n"); if (scale->size_str && (scale->w_expr || scale->h_expr)) { @@ -448,7 +449,7 @@ static av_cold int init(AVFilterContext *ctx) if (!scale->sws->threads) scale->sws->threads = ff_filter_get_nb_threads(ctx); - if (ctx->filter != &ff_vf_scale2ref && scale->uses_ref) { + if (!IS_SCALE2REF(ctx) && scale->uses_ref) { AVFilterPad pad = { .name = "ref", .type = AVMEDIA_TYPE_VIDEO, @@ -549,7 +550,7 @@ static int query_formats(const AVFilterContext *ctx, static int scale_eval_dimensions(AVFilterContext *ctx) { ScaleContext *scale = ctx->priv; - const char scale2ref = ctx->filter == &ff_vf_scale2ref; + const char scale2ref = IS_SCALE2REF(ctx); const AVFilterLink *inlink = scale2ref ? ctx->inputs[1] : ctx->inputs[0]; const AVFilterLink *outlink = ctx->outputs[0]; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); @@ -639,7 +640,7 @@ static int config_props(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; AVFilterLink *inlink0 = outlink->src->inputs[0]; - AVFilterLink *inlink = ctx->filter == &ff_vf_scale2ref ? + AVFilterLink *inlink = IS_SCALE2REF(ctx) ? outlink->src->inputs[1] : outlink->src->inputs[0]; ScaleContext *scale = ctx->priv; @@ -683,7 +684,7 @@ static int config_props(AVFilterLink *outlink) flags_val); av_freep(&flags_val); - if (ctx->filter != &ff_vf_scale2ref) { + if (!IS_SCALE2REF(ctx)) { ff_framesync_uninit(&scale->fs); ret = ff_framesync_init(&scale->fs, ctx, ctx->nb_inputs); if (ret < 0) @@ -770,7 +771,7 @@ static int scale_frame(AVFilterLink *link, AVFrame **frame_in, if (scale->eval_mode == EVAL_MODE_FRAME && !frame_changed && - ctx->filter != &ff_vf_scale2ref && + !IS_SCALE2REF(ctx) && !(vars_w[VAR_N] || vars_w[VAR_T] #if FF_API_FRAME_PKT || vars_w[VAR_POS] @@ -799,7 +800,7 @@ static int scale_frame(AVFilterLink *link, AVFrame **frame_in, goto err; } - if (ctx->filter == &ff_vf_scale2ref) { + if (IS_SCALE2REF(ctx)) { scale->var_values[VAR_S2R_MAIN_N] = inl->frame_count_out; scale->var_values[VAR_S2R_MAIN_T] = TS2T(in->pts, link->time_base); #if FF_API_FRAME_PKT @@ -1207,20 +1208,20 @@ static const AVFilterPad avfilter_vf_scale_outputs[] = { }, }; -const AVFilter ff_vf_scale = { - .name = "scale", - .description = NULL_IF_CONFIG_SMALL("Scale the input video size and/or convert the image format."), +const FFFilter ff_vf_scale = { + .p.name = "scale", + .p.description = NULL_IF_CONFIG_SMALL("Scale the input video size and/or convert the image format."), + .p.priv_class = &scale_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .preinit = preinit, .init = init, .uninit = uninit, .priv_size = sizeof(ScaleContext), - .priv_class = &scale_class, FILTER_INPUTS(avfilter_vf_scale_inputs), FILTER_OUTPUTS(avfilter_vf_scale_outputs), FILTER_QUERY_FUNC2(query_formats), .activate = activate, .process_command = process_command, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; static const AVClass *scale2ref_child_class_iterate(void **iter) @@ -1276,14 +1277,14 @@ static const AVFilterPad avfilter_vf_scale2ref_outputs[] = { }, }; -const AVFilter ff_vf_scale2ref = { - .name = "scale2ref", - .description = NULL_IF_CONFIG_SMALL("Scale the input video size and/or convert the image format to the given reference."), +const FFFilter ff_vf_scale2ref = { + .p.name = "scale2ref", + .p.description = NULL_IF_CONFIG_SMALL("Scale the input video size and/or convert the image format to the given reference."), + .p.priv_class = &scale2ref_class, .preinit = preinit, .init = init, .uninit = uninit, .priv_size = sizeof(ScaleContext), - .priv_class = &scale2ref_class, FILTER_INPUTS(avfilter_vf_scale2ref_inputs), FILTER_OUTPUTS(avfilter_vf_scale2ref_outputs), FILTER_QUERY_FUNC2(query_formats), diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c index b9a30e6de9..5f9fd59118 100644 --- a/libavfilter/vf_scale_cuda.c +++ b/libavfilter/vf_scale_cuda.c @@ -641,15 +641,16 @@ static const AVFilterPad cudascale_outputs[] = { }, }; -const AVFilter ff_vf_scale_cuda = { - .name = "scale_cuda", - .description = NULL_IF_CONFIG_SMALL("GPU accelerated video resizer"), +const FFFilter ff_vf_scale_cuda = { + .p.name = "scale_cuda", + .p.description = NULL_IF_CONFIG_SMALL("GPU accelerated video resizer"), + + .p.priv_class = &cudascale_class, .init = cudascale_init, .uninit = cudascale_uninit, .priv_size = sizeof(CUDAScaleContext), - .priv_class = &cudascale_class, FILTER_INPUTS(cudascale_inputs), FILTER_OUTPUTS(cudascale_outputs), diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c index 89ed709903..ec3267801b 100644 --- a/libavfilter/vf_scale_npp.c +++ b/libavfilter/vf_scale_npp.c @@ -173,7 +173,8 @@ typedef struct NPPScaleContext { int eval_mode; } NPPScaleContext; -const AVFilter ff_vf_scale2ref_npp; +const FFFilter ff_vf_scale2ref_npp; +#define IS_SCALE2REF(ctx) ((ctx)->filter == &ff_vf_scale2ref_npp.p) static int config_props(AVFilterLink *outlink); @@ -205,7 +206,7 @@ static int check_exprs(AVFilterContext* ctx) av_log(ctx, AV_LOG_WARNING, "Circular references detected for width '%s' and height '%s' - possibly invalid.\n", scale->w_expr, scale->h_expr); } - if (ctx->filter != &ff_vf_scale2ref_npp && + if (!IS_SCALE2REF(ctx) && (vars_w[VAR_S2R_MAIN_W] || vars_h[VAR_S2R_MAIN_W] || vars_w[VAR_S2R_MAIN_H] || vars_h[VAR_S2R_MAIN_H] || vars_w[VAR_S2R_MAIN_A] || vars_h[VAR_S2R_MAIN_A] || @@ -375,7 +376,7 @@ static av_cold int nppscale_init(AVFilterContext* ctx) static int nppscale_eval_dimensions(AVFilterContext* ctx) { NPPScaleContext* scale = ctx->priv; - const char scale2ref = ctx->filter == &ff_vf_scale2ref_npp; + const char scale2ref = IS_SCALE2REF(ctx); const AVFilterLink* inlink = ctx->inputs[scale2ref ? 1 : 0]; char* expr; int eval_w, eval_h; @@ -645,7 +646,7 @@ static int config_props(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; AVFilterLink *inlink0 = outlink->src->inputs[0]; - AVFilterLink *inlink = ctx->filter == &ff_vf_scale2ref_npp ? + AVFilterLink *inlink = IS_SCALE2REF(ctx) ? outlink->src->inputs[1] : outlink->src->inputs[0]; NPPScaleContext *s = ctx->priv; @@ -811,7 +812,7 @@ static int nppscale_scale(AVFilterLink *link, AVFrame *out, AVFrame *in) av_expr_count_vars(s->w_pexpr, vars_w, VARS_NB); av_expr_count_vars(s->h_pexpr, vars_h, VARS_NB); - if (s->eval_mode == EVAL_MODE_FRAME && !frame_changed && ctx->filter != &ff_vf_scale2ref_npp && + if (s->eval_mode == EVAL_MODE_FRAME && !frame_changed && !IS_SCALE2REF(ctx) && !(vars_w[VAR_N] || vars_w[VAR_T] #if FF_API_FRAME_PKT || vars_w[VAR_POS] @@ -839,7 +840,7 @@ static int nppscale_scale(AVFilterLink *link, AVFrame *out, AVFrame *in) return ret; } - if (ctx->filter == &ff_vf_scale2ref_npp) { + if (IS_SCALE2REF(ctx)) { s->var_values[VAR_S2R_MAIN_N] = inl->frame_count_out; s->var_values[VAR_S2R_MAIN_T] = TS2T(in->pts, link->time_base); #if FF_API_FRAME_PKT @@ -1048,16 +1049,16 @@ static const AVFilterPad nppscale_outputs[] = { } }; -const AVFilter ff_vf_scale_npp = { - .name = "scale_npp", - .description = NULL_IF_CONFIG_SMALL("NVIDIA Performance Primitives video " - "scaling and format conversion"), +const FFFilter ff_vf_scale_npp = { + .p.name = "scale_npp", + .p.description = NULL_IF_CONFIG_SMALL("NVIDIA Performance Primitives video " + "scaling and format conversion"), + .p.priv_class = &nppscale_class, .init = nppscale_init, .uninit = nppscale_uninit, .priv_size = sizeof(NPPScaleContext), - .priv_class = &nppscale_class, FILTER_INPUTS(nppscale_inputs), FILTER_OUTPUTS(nppscale_outputs), @@ -1095,17 +1096,17 @@ static const AVFilterPad nppscale2ref_outputs[] = { } }; -const AVFilter ff_vf_scale2ref_npp = { - .name = "scale2ref_npp", - .description = NULL_IF_CONFIG_SMALL("NVIDIA Performance Primitives video " +const FFFilter ff_vf_scale2ref_npp = { + .p.name = "scale2ref_npp", + .p.description = NULL_IF_CONFIG_SMALL("NVIDIA Performance Primitives video " "scaling and format conversion to the " "given reference."), + .p.priv_class = &nppscale_class, .init = nppscale_init, .uninit = nppscale_uninit, .priv_size = sizeof(NPPScaleContext), - .priv_class = &nppscale_class, FILTER_INPUTS(nppscale2ref_inputs), FILTER_OUTPUTS(nppscale2ref_outputs), diff --git a/libavfilter/vf_scale_vaapi.c b/libavfilter/vf_scale_vaapi.c index 78406bbcf3..0f2d617996 100644 --- a/libavfilter/vf_scale_vaapi.c +++ b/libavfilter/vf_scale_vaapi.c @@ -297,15 +297,15 @@ static const AVFilterPad scale_vaapi_outputs[] = { }, }; -const AVFilter ff_vf_scale_vaapi = { - .name = "scale_vaapi", - .description = NULL_IF_CONFIG_SMALL("Scale to/from VAAPI surfaces."), +const FFFilter ff_vf_scale_vaapi = { + .p.name = "scale_vaapi", + .p.description = NULL_IF_CONFIG_SMALL("Scale to/from VAAPI surfaces."), + .p.priv_class = &scale_vaapi_class, .priv_size = sizeof(ScaleVAAPIContext), .init = &scale_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, FILTER_INPUTS(scale_vaapi_inputs), FILTER_OUTPUTS(scale_vaapi_outputs), FILTER_QUERY_FUNC2(&ff_vaapi_vpp_query_formats), - .priv_class = &scale_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_scale_vt.c b/libavfilter/vf_scale_vt.c index 0d612d5338..162ea8fcec 100644 --- a/libavfilter/vf_scale_vt.c +++ b/libavfilter/vf_scale_vt.c @@ -320,16 +320,16 @@ static const AVFilterPad scale_vt_outputs[] = { }, }; -const AVFilter ff_vf_scale_vt = { - .name = "scale_vt", - .description = NULL_IF_CONFIG_SMALL("Scale Videotoolbox frames"), +const FFFilter ff_vf_scale_vt = { + .p.name = "scale_vt", + .p.description = NULL_IF_CONFIG_SMALL("Scale Videotoolbox frames"), + .p.priv_class = &scale_vt_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(ScaleVtContext), .init = scale_vt_init, .uninit = scale_vt_uninit, FILTER_INPUTS(scale_vt_inputs), FILTER_OUTPUTS(scale_vt_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VIDEOTOOLBOX), - .priv_class = &scale_vt_class, - .flags = AVFILTER_FLAG_HWDEVICE, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_scale_vulkan.c b/libavfilter/vf_scale_vulkan.c index fd036248b2..6f99769d81 100644 --- a/libavfilter/vf_scale_vulkan.c +++ b/libavfilter/vf_scale_vulkan.c @@ -426,16 +426,16 @@ static const AVFilterPad scale_vulkan_outputs[] = { }, }; -const AVFilter ff_vf_scale_vulkan = { - .name = "scale_vulkan", - .description = NULL_IF_CONFIG_SMALL("Scale Vulkan frames"), +const FFFilter ff_vf_scale_vulkan = { + .p.name = "scale_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Scale Vulkan frames"), + .p.priv_class = &scale_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(ScaleVulkanContext), .init = &ff_vk_filter_init, .uninit = &scale_vulkan_uninit, FILTER_INPUTS(scale_vulkan_inputs), FILTER_OUTPUTS(scale_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &scale_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_scdet.c b/libavfilter/vf_scdet.c index 705bdf9777..1568a0a496 100644 --- a/libavfilter/vf_scdet.c +++ b/libavfilter/vf_scdet.c @@ -193,13 +193,13 @@ static const AVFilterPad scdet_inputs[] = { }, }; -const AVFilter ff_vf_scdet = { - .name = "scdet", - .description = NULL_IF_CONFIG_SMALL("Detect video scene change"), +const FFFilter ff_vf_scdet = { + .p.name = "scdet", + .p.description = NULL_IF_CONFIG_SMALL("Detect video scene change"), + .p.priv_class = &scdet_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SCDetContext), - .priv_class = &scdet_class, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(scdet_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), diff --git a/libavfilter/vf_scroll.c b/libavfilter/vf_scroll.c index c5646264f0..cd728a4968 100644 --- a/libavfilter/vf_scroll.c +++ b/libavfilter/vf_scroll.c @@ -194,14 +194,14 @@ static const AVFilterPad scroll_inputs[] = { }, }; -const AVFilter ff_vf_scroll = { - .name = "scroll", - .description = NULL_IF_CONFIG_SMALL("Scroll input video."), +const FFFilter ff_vf_scroll = { + .p.name = "scroll", + .p.description = NULL_IF_CONFIG_SMALL("Scroll input video."), + .p.priv_class = &scroll_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ScrollContext), - .priv_class = &scroll_class, FILTER_INPUTS(scroll_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_selectivecolor.c b/libavfilter/vf_selectivecolor.c index fce9f67ac4..a45ca398dd 100644 --- a/libavfilter/vf_selectivecolor.c +++ b/libavfilter/vf_selectivecolor.c @@ -473,13 +473,13 @@ static const AVFilterPad selectivecolor_inputs[] = { }, }; -const AVFilter ff_vf_selectivecolor = { - .name = "selectivecolor", - .description = NULL_IF_CONFIG_SMALL("Apply CMYK adjustments to specific color ranges."), +const FFFilter ff_vf_selectivecolor = { + .p.name = "selectivecolor", + .p.description = NULL_IF_CONFIG_SMALL("Apply CMYK adjustments to specific color ranges."), + .p.priv_class = &selectivecolor_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(SelectiveColorContext), FILTER_INPUTS(selectivecolor_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &selectivecolor_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_separatefields.c b/libavfilter/vf_separatefields.c index 54c112bf60..2933570358 100644 --- a/libavfilter/vf_separatefields.c +++ b/libavfilter/vf_separatefields.c @@ -171,9 +171,9 @@ static const AVFilterPad separatefields_outputs[] = { }, }; -const AVFilter ff_vf_separatefields = { - .name = "separatefields", - .description = NULL_IF_CONFIG_SMALL("Split input video frames into fields."), +const FFFilter ff_vf_separatefields = { + .p.name = "separatefields", + .p.description = NULL_IF_CONFIG_SMALL("Split input video frames into fields."), .priv_size = sizeof(SeparateFieldsContext), .activate = activate, .uninit = uninit, diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c index 3943fd3c2d..34583b1d10 100644 --- a/libavfilter/vf_setparams.c +++ b/libavfilter/vf_setparams.c @@ -210,12 +210,12 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_setparams = { - .name = "setparams", - .description = NULL_IF_CONFIG_SMALL("Force field, or color property for the output video frame."), +const FFFilter ff_vf_setparams = { + .p.name = "setparams", + .p.description = NULL_IF_CONFIG_SMALL("Force field, or color property for the output video frame."), + .p.priv_class = &setparams_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SetParamsContext), - .priv_class = &setparams_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), @@ -250,13 +250,13 @@ static av_cold int init_setrange(AVFilterContext *ctx) return 0; } -const AVFilter ff_vf_setrange = { - .name = "setrange", - .description = NULL_IF_CONFIG_SMALL("Force color range for the output video frame."), +const FFFilter ff_vf_setrange = { + .p.name = "setrange", + .p.description = NULL_IF_CONFIG_SMALL("Force color range for the output video frame."), + .p.priv_class = &setrange_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SetParamsContext), .init = init_setrange, - .priv_class = &setrange_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), @@ -286,13 +286,13 @@ static av_cold int init_setfield(AVFilterContext *ctx) return 0; } -const AVFilter ff_vf_setfield = { - .name = "setfield", - .description = NULL_IF_CONFIG_SMALL("Force field for the output video frame."), +const FFFilter ff_vf_setfield = { + .p.name = "setfield", + .p.description = NULL_IF_CONFIG_SMALL("Force field for the output video frame."), + .p.priv_class = &setfield_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SetParamsContext), .init = init_setfield, - .priv_class = &setfield_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), }; diff --git a/libavfilter/vf_sharpen_npp.c b/libavfilter/vf_sharpen_npp.c index 4989126eda..c7769f5837 100644 --- a/libavfilter/vf_sharpen_npp.c +++ b/libavfilter/vf_sharpen_npp.c @@ -256,16 +256,16 @@ static const AVFilterPad nppsharpen_outputs[] = {{ .config_props = nppsharpen_config_props, }}; -const AVFilter ff_vf_sharpen_npp = { - .name = "sharpen_npp", - .description = NULL_IF_CONFIG_SMALL("NVIDIA Performance Primitives video " - "sharpening filter."), +const FFFilter ff_vf_sharpen_npp = { + .p.name = "sharpen_npp", + .p.description = NULL_IF_CONFIG_SMALL("NVIDIA Performance Primitives video " + "sharpening filter."), + .p.priv_class = &nppsharpen_class, .init = nppsharpen_init, .uninit = nppsharpen_uninit, .priv_size = sizeof(NPPSharpenContext), - .priv_class = &nppsharpen_class, FILTER_INPUTS(nppsharpen_inputs), FILTER_OUTPUTS(nppsharpen_outputs), diff --git a/libavfilter/vf_shear.c b/libavfilter/vf_shear.c index 067d38286b..f76ed1e4d5 100644 --- a/libavfilter/vf_shear.c +++ b/libavfilter/vf_shear.c @@ -307,15 +307,15 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_shear = { - .name = "shear", - .description = NULL_IF_CONFIG_SMALL("Shear transform the input image."), +const FFFilter ff_vf_shear = { + .p.name = "shear", + .p.description = NULL_IF_CONFIG_SMALL("Shear transform the input image."), + .p.priv_class = &shear_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ShearContext), .init = init, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &shear_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 1c9cf6c6a1..8109ca7fce 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -919,12 +919,12 @@ static const AVFilterPad avfilter_vf_showinfo_outputs[] = { }, }; -const AVFilter ff_vf_showinfo = { - .name = "showinfo", - .description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."), +const FFFilter ff_vf_showinfo = { + .p.name = "showinfo", + .p.description = NULL_IF_CONFIG_SMALL("Show textual information for each video frame."), + .p.priv_class = &showinfo_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_showinfo_inputs), FILTER_OUTPUTS(avfilter_vf_showinfo_outputs), .priv_size = sizeof(ShowInfoContext), - .priv_class = &showinfo_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_showpalette.c b/libavfilter/vf_showpalette.c index db1a224f04..847b448f96 100644 --- a/libavfilter/vf_showpalette.c +++ b/libavfilter/vf_showpalette.c @@ -112,12 +112,12 @@ static const AVFilterPad showpalette_outputs[] = { }, }; -const AVFilter ff_vf_showpalette = { - .name = "showpalette", - .description = NULL_IF_CONFIG_SMALL("Display frame palette."), +const FFFilter ff_vf_showpalette = { + .p.name = "showpalette", + .p.description = NULL_IF_CONFIG_SMALL("Display frame palette."), + .p.priv_class = &showpalette_class, .priv_size = sizeof(ShowPaletteContext), FILTER_INPUTS(showpalette_inputs), FILTER_OUTPUTS(showpalette_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &showpalette_class, }; diff --git a/libavfilter/vf_shuffleframes.c b/libavfilter/vf_shuffleframes.c index 77ce6d9759..7d16fcc497 100644 --- a/libavfilter/vf_shuffleframes.c +++ b/libavfilter/vf_shuffleframes.c @@ -147,14 +147,14 @@ static const AVFilterPad shuffleframes_inputs[] = { }, }; -const AVFilter ff_vf_shuffleframes = { - .name = "shuffleframes", - .description = NULL_IF_CONFIG_SMALL("Shuffle video frames."), +const FFFilter ff_vf_shuffleframes = { + .p.name = "shuffleframes", + .p.description = NULL_IF_CONFIG_SMALL("Shuffle video frames."), + .p.priv_class = &shuffleframes_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(ShuffleFramesContext), - .priv_class = &shuffleframes_class, .init = init, .uninit = uninit, FILTER_INPUTS(shuffleframes_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_shufflepixels.c b/libavfilter/vf_shufflepixels.c index 875601a987..3ba950f7b6 100644 --- a/libavfilter/vf_shufflepixels.c +++ b/libavfilter/vf_shufflepixels.c @@ -440,14 +440,14 @@ static const AVFilterPad shufflepixels_outputs[] = { }, }; -const AVFilter ff_vf_shufflepixels = { - .name = "shufflepixels", - .description = NULL_IF_CONFIG_SMALL("Shuffle video pixels."), +const FFFilter ff_vf_shufflepixels = { + .p.name = "shufflepixels", + .p.description = NULL_IF_CONFIG_SMALL("Shuffle video pixels."), + .p.priv_class = &shufflepixels_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ShufflePixelsContext), - .priv_class = &shufflepixels_class, .uninit = uninit, FILTER_INPUTS(shufflepixels_inputs), FILTER_OUTPUTS(shufflepixels_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_shuffleplanes.c b/libavfilter/vf_shuffleplanes.c index 7bfa4fe782..41888cd401 100644 --- a/libavfilter/vf_shuffleplanes.c +++ b/libavfilter/vf_shuffleplanes.c @@ -156,13 +156,13 @@ static const AVFilterPad shuffleplanes_inputs[] = { }, }; -const AVFilter ff_vf_shuffleplanes = { - .name = "shuffleplanes", - .description = NULL_IF_CONFIG_SMALL("Shuffle video planes."), +const FFFilter ff_vf_shuffleplanes = { + .p.name = "shuffleplanes", + .p.description = NULL_IF_CONFIG_SMALL("Shuffle video planes."), + .p.priv_class = &shuffleplanes_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(ShufflePlanesContext), - .priv_class = &shuffleplanes_class, FILTER_INPUTS(shuffleplanes_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_signalstats.c b/libavfilter/vf_signalstats.c index 8dca3cb444..b1451cc465 100644 --- a/libavfilter/vf_signalstats.c +++ b/libavfilter/vf_signalstats.c @@ -827,15 +827,15 @@ static const AVFilterPad signalstats_outputs[] = { }, }; -const AVFilter ff_vf_signalstats = { - .name = "signalstats", - .description = "Generate statistics from video analysis.", +const FFFilter ff_vf_signalstats = { + .p.name = "signalstats", + .p.description = "Generate statistics from video analysis.", + .p.priv_class = &signalstats_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .init = init, .uninit = uninit, .priv_size = sizeof(SignalstatsContext), FILTER_INPUTS(signalstats_inputs), FILTER_OUTPUTS(signalstats_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &signalstats_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_signature.c b/libavfilter/vf_signature.c index f419522ac6..3b6e9f9955 100644 --- a/libavfilter/vf_signature.c +++ b/libavfilter/vf_signature.c @@ -743,15 +743,15 @@ static const AVFilterPad signature_outputs[] = { }, }; -const AVFilter ff_vf_signature = { - .name = "signature", - .description = NULL_IF_CONFIG_SMALL("Calculate the MPEG-7 video signature"), +const FFFilter ff_vf_signature = { + .p.name = "signature", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the MPEG-7 video signature"), + .p.priv_class = &signature_class, + .p.inputs = NULL, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS, .priv_size = sizeof(SignatureContext), - .priv_class = &signature_class, .init = init, .uninit = uninit, FILTER_OUTPUTS(signature_outputs), - .inputs = NULL, FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; diff --git a/libavfilter/vf_siti.c b/libavfilter/vf_siti.c index 3c563ac8b7..63c848c1e7 100644 --- a/libavfilter/vf_siti.c +++ b/libavfilter/vf_siti.c @@ -328,14 +328,14 @@ static const AVFilterPad avfilter_vf_siti_inputs[] = { }, }; -const AVFilter ff_vf_siti = { - .name = "siti", - .description = NULL_IF_CONFIG_SMALL("Calculate spatial information (SI) and temporal information (TI)."), +const FFFilter ff_vf_siti = { + .p.name = "siti", + .p.description = NULL_IF_CONFIG_SMALL("Calculate spatial information (SI) and temporal information (TI)."), + .p.priv_class = &siti_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(SiTiContext), - .priv_class = &siti_class, .init = init, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_PIXFMTS_ARRAY(pix_fmts), FILTER_INPUTS(avfilter_vf_siti_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), diff --git a/libavfilter/vf_smartblur.c b/libavfilter/vf_smartblur.c index fe1b591a40..659f70e1b9 100644 --- a/libavfilter/vf_smartblur.c +++ b/libavfilter/vf_smartblur.c @@ -301,15 +301,15 @@ static const AVFilterPad smartblur_inputs[] = { }, }; -const AVFilter ff_vf_smartblur = { - .name = "smartblur", - .description = NULL_IF_CONFIG_SMALL("Blur the input video without impacting the outlines."), +const FFFilter ff_vf_smartblur = { + .p.name = "smartblur", + .p.description = NULL_IF_CONFIG_SMALL("Blur the input video without impacting the outlines."), + .p.priv_class = &smartblur_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(SmartblurContext), .init = init, .uninit = uninit, FILTER_INPUTS(smartblur_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &smartblur_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c index 0c33c263b8..5c5b98f8db 100644 --- a/libavfilter/vf_spp.c +++ b/libavfilter/vf_spp.c @@ -488,9 +488,11 @@ static const AVFilterPad spp_inputs[] = { }, }; -const AVFilter ff_vf_spp = { - .name = "spp", - .description = NULL_IF_CONFIG_SMALL("Apply a simple post processing filter."), +const FFFilter ff_vf_spp = { + .p.name = "spp", + .p.description = NULL_IF_CONFIG_SMALL("Apply a simple post processing filter."), + .p.priv_class = &spp_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(SPPContext), .preinit = preinit, .uninit = uninit, @@ -498,6 +500,4 @@ const AVFilter ff_vf_spp = { FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), .process_command = process_command, - .priv_class = &spp_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_sr.c b/libavfilter/vf_sr.c index 6c33203307..8f1ccee56a 100644 --- a/libavfilter/vf_sr.c +++ b/libavfilter/vf_sr.c @@ -185,9 +185,10 @@ static const AVFilterPad sr_outputs[] = { }, }; -const AVFilter ff_vf_sr = { - .name = "sr", - .description = NULL_IF_CONFIG_SMALL("Apply DNN-based image super resolution to the input."), +const FFFilter ff_vf_sr = { + .p.name = "sr", + .p.description = NULL_IF_CONFIG_SMALL("Apply DNN-based image super resolution to the input."), + .p.priv_class = &sr_class, .priv_size = sizeof(SRContext), .preinit = ff_dnn_filter_init_child_class, .init = init, @@ -195,5 +196,4 @@ const AVFilter ff_vf_sr = { FILTER_INPUTS(sr_inputs), FILTER_OUTPUTS(sr_outputs), FILTER_PIXFMTS_ARRAY(pixel_formats), - .priv_class = &sr_class, }; diff --git a/libavfilter/vf_ssim.c b/libavfilter/vf_ssim.c index 52b22a6870..15c71cf6b9 100644 --- a/libavfilter/vf_ssim.c +++ b/libavfilter/vf_ssim.c @@ -585,19 +585,19 @@ static const AVFilterPad ssim_outputs[] = { }, }; -const AVFilter ff_vf_ssim = { - .name = "ssim", - .description = NULL_IF_CONFIG_SMALL("Calculate the SSIM between two video streams."), +const FFFilter ff_vf_ssim = { + .p.name = "ssim", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the SSIM between two video streams."), + .p.priv_class = &ssim_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, .preinit = ssim_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(SSIMContext), - .priv_class = &ssim_class, FILTER_INPUTS(ssim_inputs), FILTER_OUTPUTS(ssim_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_ssim360.c b/libavfilter/vf_ssim360.c index 42632bcd85..ad357df427 100644 --- a/libavfilter/vf_ssim360.c +++ b/libavfilter/vf_ssim360.c @@ -1745,15 +1745,15 @@ static const AVFilterPad ssim360_outputs[] = { }, }; -const AVFilter ff_vf_ssim360 = { - .name = "ssim360", - .description = NULL_IF_CONFIG_SMALL("Calculate the SSIM between two 360 video streams."), +const FFFilter ff_vf_ssim360 = { + .p.name = "ssim360", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the SSIM between two 360 video streams."), + .p.priv_class = &ssim360_class, .preinit = ssim360_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(SSIM360Context), - .priv_class = &ssim360_class, FILTER_INPUTS(ssim360_inputs), FILTER_OUTPUTS(ssim360_outputs), FILTER_PIXFMTS_ARRAY(ssim360_pixfmts), diff --git a/libavfilter/vf_stack.c b/libavfilter/vf_stack.c index 19c6c2971f..937b87305f 100644 --- a/libavfilter/vf_stack.c +++ b/libavfilter/vf_stack.c @@ -460,34 +460,34 @@ static const AVFilterPad outputs[] = { #if CONFIG_HSTACK_FILTER -const AVFilter ff_vf_hstack = { - .name = "hstack", - .description = NULL_IF_CONFIG_SMALL("Stack video inputs horizontally."), - .priv_class = &stack_class, +const FFFilter ff_vf_hstack = { + .p.name = "hstack", + .p.description = NULL_IF_CONFIG_SMALL("Stack video inputs horizontally."), + .p.priv_class = &stack_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(StackContext), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), .init = init, .uninit = uninit, .activate = activate, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS, }; #endif /* CONFIG_HSTACK_FILTER */ #if CONFIG_VSTACK_FILTER -const AVFilter ff_vf_vstack = { - .name = "vstack", - .description = NULL_IF_CONFIG_SMALL("Stack video inputs vertically."), - .priv_class = &stack_class, +const FFFilter ff_vf_vstack = { + .p.name = "vstack", + .p.description = NULL_IF_CONFIG_SMALL("Stack video inputs vertically."), + .p.priv_class = &stack_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(StackContext), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), .init = init, .uninit = uninit, .activate = activate, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS, }; #endif /* CONFIG_VSTACK_FILTER */ @@ -505,17 +505,17 @@ static const AVOption xstack_options[] = { AVFILTER_DEFINE_CLASS(xstack); -const AVFilter ff_vf_xstack = { - .name = "xstack", - .description = NULL_IF_CONFIG_SMALL("Stack video inputs into custom layout."), +const FFFilter ff_vf_xstack = { + .p.name = "xstack", + .p.description = NULL_IF_CONFIG_SMALL("Stack video inputs into custom layout."), + .p.priv_class = &xstack_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(StackContext), - .priv_class = &xstack_class, FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), .init = init, .uninit = uninit, .activate = activate, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS, }; #endif /* CONFIG_XSTACK_FILTER */ diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c index 95e750d1c6..8e1fdc5eb3 100644 --- a/libavfilter/vf_stereo3d.c +++ b/libavfilter/vf_stereo3d.c @@ -1111,14 +1111,14 @@ static const AVFilterPad stereo3d_outputs[] = { }, }; -const AVFilter ff_vf_stereo3d = { - .name = "stereo3d", - .description = NULL_IF_CONFIG_SMALL("Convert video stereoscopic 3D view."), +const FFFilter ff_vf_stereo3d = { + .p.name = "stereo3d", + .p.description = NULL_IF_CONFIG_SMALL("Convert video stereoscopic 3D view."), + .p.priv_class = &stereo3d_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(Stereo3DContext), .uninit = uninit, FILTER_INPUTS(stereo3d_inputs), FILTER_OUTPUTS(stereo3d_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &stereo3d_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 9eaaf2eb90..9f573ec4ed 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -286,16 +286,16 @@ static av_cold int init_ass(AVFilterContext *ctx) return 0; } -const AVFilter ff_vf_ass = { - .name = "ass", - .description = NULL_IF_CONFIG_SMALL("Render ASS subtitles onto input video using the libass library."), +const FFFilter ff_vf_ass = { + .p.name = "ass", + .p.description = NULL_IF_CONFIG_SMALL("Render ASS subtitles onto input video using the libass library."), + .p.priv_class = &ass_class, .priv_size = sizeof(AssContext), .init = init_ass, .uninit = uninit, FILTER_INPUTS(ass_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &ass_class, }; #endif @@ -541,15 +541,15 @@ end: return ret; } -const AVFilter ff_vf_subtitles = { - .name = "subtitles", - .description = NULL_IF_CONFIG_SMALL("Render text subtitles onto input video using the libass library."), +const FFFilter ff_vf_subtitles = { + .p.name = "subtitles", + .p.description = NULL_IF_CONFIG_SMALL("Render text subtitles onto input video using the libass library."), + .p.priv_class = &subtitles_class, .priv_size = sizeof(AssContext), .init = init_subtitles, .uninit = uninit, FILTER_INPUTS(ass_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &subtitles_class, }; #endif diff --git a/libavfilter/vf_super2xsai.c b/libavfilter/vf_super2xsai.c index 8f3fd84788..cf3aaebd64 100644 --- a/libavfilter/vf_super2xsai.c +++ b/libavfilter/vf_super2xsai.c @@ -349,12 +349,12 @@ static const AVFilterPad super2xsai_outputs[] = { }, }; -const AVFilter ff_vf_super2xsai = { - .name = "super2xsai", - .description = NULL_IF_CONFIG_SMALL("Scale the input by 2x using the Super2xSaI pixel art algorithm."), +const FFFilter ff_vf_super2xsai = { + .p.name = "super2xsai", + .p.description = NULL_IF_CONFIG_SMALL("Scale the input by 2x using the Super2xSaI pixel art algorithm."), + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(Super2xSaIContext), FILTER_INPUTS(super2xsai_inputs), FILTER_OUTPUTS(super2xsai_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c index 95214132d7..83afe49ec1 100644 --- a/libavfilter/vf_swaprect.c +++ b/libavfilter/vf_swaprect.c @@ -246,15 +246,15 @@ static const AVFilterPad inputs[] = { }, }; -const AVFilter ff_vf_swaprect = { - .name = "swaprect", - .description = NULL_IF_CONFIG_SMALL("Swap 2 rectangular objects in video."), +const FFFilter ff_vf_swaprect = { + .p.name = "swaprect", + .p.description = NULL_IF_CONFIG_SMALL("Swap 2 rectangular objects in video."), + .p.priv_class = &swaprect_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(SwapRectContext), - .priv_class = &swaprect_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c index 866d0824f4..b7649c2e0e 100644 --- a/libavfilter/vf_swapuv.c +++ b/libavfilter/vf_swapuv.c @@ -92,11 +92,11 @@ static const AVFilterPad swapuv_inputs[] = { }, }; -const AVFilter ff_vf_swapuv = { - .name = "swapuv", - .description = NULL_IF_CONFIG_SMALL("Swap U and V components."), +const FFFilter ff_vf_swapuv = { + .p.name = "swapuv", + .p.description = NULL_IF_CONFIG_SMALL("Swap U and V components."), + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, FILTER_INPUTS(swapuv_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c index 107d379c66..e64e400d9f 100644 --- a/libavfilter/vf_telecine.c +++ b/libavfilter/vf_telecine.c @@ -320,11 +320,11 @@ static const AVFilterPad telecine_outputs[] = { }, }; -const AVFilter ff_vf_telecine = { - .name = "telecine", - .description = NULL_IF_CONFIG_SMALL("Apply a telecine pattern."), +const FFFilter ff_vf_telecine = { + .p.name = "telecine", + .p.description = NULL_IF_CONFIG_SMALL("Apply a telecine pattern."), + .p.priv_class = &telecine_class, .priv_size = sizeof(TelecineContext), - .priv_class = &telecine_class, .init = init, .uninit = uninit, FILTER_INPUTS(telecine_inputs), diff --git a/libavfilter/vf_threshold.c b/libavfilter/vf_threshold.c index b8e794f0b0..633deb9474 100644 --- a/libavfilter/vf_threshold.c +++ b/libavfilter/vf_threshold.c @@ -279,16 +279,16 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_threshold = { - .name = "threshold", - .description = NULL_IF_CONFIG_SMALL("Threshold first video stream using other video streams."), +const FFFilter ff_vf_threshold = { + .p.name = "threshold", + .p.description = NULL_IF_CONFIG_SMALL("Threshold first video stream using other video streams."), + .p.priv_class = &threshold_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ThresholdContext), - .priv_class = &threshold_class, .uninit = uninit, .activate = activate, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_thumbnail.c b/libavfilter/vf_thumbnail.c index 6cf791b654..90125a879c 100644 --- a/libavfilter/vf_thumbnail.c +++ b/libavfilter/vf_thumbnail.c @@ -324,16 +324,16 @@ static const AVFilterPad thumbnail_outputs[] = { }, }; -const AVFilter ff_vf_thumbnail = { - .name = "thumbnail", - .description = NULL_IF_CONFIG_SMALL("Select the most representative frame in a given sequence of consecutive frames."), +const FFFilter ff_vf_thumbnail = { + .p.name = "thumbnail", + .p.description = NULL_IF_CONFIG_SMALL("Select the most representative frame in a given sequence of consecutive frames."), + .p.priv_class = &thumbnail_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(ThumbContext), .init = init, .uninit = uninit, FILTER_INPUTS(thumbnail_inputs), FILTER_OUTPUTS(thumbnail_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &thumbnail_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | - AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_thumbnail_cuda.c b/libavfilter/vf_thumbnail_cuda.c index d70df03f1e..ee09f7fa3e 100644 --- a/libavfilter/vf_thumbnail_cuda.c +++ b/libavfilter/vf_thumbnail_cuda.c @@ -436,15 +436,15 @@ static const AVFilterPad thumbnail_cuda_outputs[] = { }, }; -const AVFilter ff_vf_thumbnail_cuda = { - .name = "thumbnail_cuda", - .description = NULL_IF_CONFIG_SMALL("Select the most representative frame in a given sequence of consecutive frames."), +const FFFilter ff_vf_thumbnail_cuda = { + .p.name = "thumbnail_cuda", + .p.description = NULL_IF_CONFIG_SMALL("Select the most representative frame in a given sequence of consecutive frames."), + .p.priv_class = &thumbnail_cuda_class, .priv_size = sizeof(ThumbnailCudaContext), .init = init, .uninit = uninit, FILTER_INPUTS(thumbnail_cuda_inputs), FILTER_OUTPUTS(thumbnail_cuda_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA), - .priv_class = &thumbnail_cuda_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_tile.c b/libavfilter/vf_tile.c index 312a9826ae..9305123b33 100644 --- a/libavfilter/vf_tile.c +++ b/libavfilter/vf_tile.c @@ -287,14 +287,14 @@ static const AVFilterPad tile_outputs[] = { }, }; -const AVFilter ff_vf_tile = { - .name = "tile", - .description = NULL_IF_CONFIG_SMALL("Tile several successive frames together."), +const FFFilter ff_vf_tile = { + .p.name = "tile", + .p.description = NULL_IF_CONFIG_SMALL("Tile several successive frames together."), + .p.priv_class = &tile_class, .init = init, .uninit = uninit, .priv_size = sizeof(TileContext), FILTER_INPUTS(tile_inputs), FILTER_OUTPUTS(tile_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &tile_class, }; diff --git a/libavfilter/vf_tiltandshift.c b/libavfilter/vf_tiltandshift.c index 72475bbaab..d7bce064bb 100644 --- a/libavfilter/vf_tiltandshift.c +++ b/libavfilter/vf_tiltandshift.c @@ -356,11 +356,11 @@ static const AVFilterPad tiltandshift_outputs[] = { }, }; -const AVFilter ff_vf_tiltandshift = { - .name = "tiltandshift", - .description = NULL_IF_CONFIG_SMALL("Generate a tilt-and-shift'd video."), +const FFFilter ff_vf_tiltandshift = { + .p.name = "tiltandshift", + .p.description = NULL_IF_CONFIG_SMALL("Generate a tilt-and-shift'd video."), + .p.priv_class = &tiltandshift_class, .priv_size = sizeof(TiltandshiftContext), - .priv_class = &tiltandshift_class, .uninit = uninit, FILTER_INPUTS(tiltandshift_inputs), FILTER_OUTPUTS(tiltandshift_outputs), diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c index 3e2111d9aa..de7cd88103 100644 --- a/libavfilter/vf_tinterlace.c +++ b/libavfilter/vf_tinterlace.c @@ -603,26 +603,26 @@ static const AVFilterPad tinterlace_outputs[] = { }, }; -const AVFilter ff_vf_tinterlace = { - .name = "tinterlace", - .description = NULL_IF_CONFIG_SMALL("Perform temporal field interlacing."), +const FFFilter ff_vf_tinterlace = { + .p.name = "tinterlace", + .p.description = NULL_IF_CONFIG_SMALL("Perform temporal field interlacing."), + .p.priv_class = &tinterlace_class, .priv_size = sizeof(TInterlaceContext), .uninit = uninit, FILTER_INPUTS(tinterlace_inputs), FILTER_OUTPUTS(tinterlace_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &tinterlace_class, }; -const AVFilter ff_vf_interlace = { - .name = "interlace", - .description = NULL_IF_CONFIG_SMALL("Convert progressive video into interlaced."), +const FFFilter ff_vf_interlace = { + .p.name = "interlace", + .p.description = NULL_IF_CONFIG_SMALL("Convert progressive video into interlaced."), + .p.priv_class = &interlace_class, .priv_size = sizeof(TInterlaceContext), .init = init_interlace, .uninit = uninit, FILTER_INPUTS(tinterlace_inputs), FILTER_OUTPUTS(tinterlace_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &interlace_class, }; diff --git a/libavfilter/vf_tmidequalizer.c b/libavfilter/vf_tmidequalizer.c index f17b2090cd..102d7c244f 100644 --- a/libavfilter/vf_tmidequalizer.c +++ b/libavfilter/vf_tmidequalizer.c @@ -422,14 +422,14 @@ static const AVFilterPad tmidequalizer_outputs[] = { }, }; -const AVFilter ff_vf_tmidequalizer = { - .name = "tmidequalizer", - .description = NULL_IF_CONFIG_SMALL("Apply Temporal Midway Equalization."), +const FFFilter ff_vf_tmidequalizer = { + .p.name = "tmidequalizer", + .p.description = NULL_IF_CONFIG_SMALL("Apply Temporal Midway Equalization."), + .p.priv_class = &tmidequalizer_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(TMidEqualizerContext), .uninit = uninit, FILTER_INPUTS(tmidequalizer_inputs), FILTER_OUTPUTS(tmidequalizer_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &tmidequalizer_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, }; diff --git a/libavfilter/vf_tonemap.c b/libavfilter/vf_tonemap.c index d8322f45b9..e0be8181c9 100644 --- a/libavfilter/vf_tonemap.c +++ b/libavfilter/vf_tonemap.c @@ -305,14 +305,14 @@ static const AVFilterPad tonemap_inputs[] = { }, }; -const AVFilter ff_vf_tonemap = { - .name = "tonemap", - .description = NULL_IF_CONFIG_SMALL("Conversion to/from different dynamic ranges."), +const FFFilter ff_vf_tonemap = { + .p.name = "tonemap", + .p.description = NULL_IF_CONFIG_SMALL("Conversion to/from different dynamic ranges."), + .p.priv_class = &tonemap_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .init = init, .priv_size = sizeof(TonemapContext), - .priv_class = &tonemap_class, FILTER_INPUTS(tonemap_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS(AV_PIX_FMT_GBRPF32, AV_PIX_FMT_GBRAPF32), - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_tonemap_opencl.c b/libavfilter/vf_tonemap_opencl.c index 2f2eeac333..758c0e5e94 100644 --- a/libavfilter/vf_tonemap_opencl.c +++ b/libavfilter/vf_tonemap_opencl.c @@ -536,16 +536,16 @@ static const AVFilterPad tonemap_opencl_outputs[] = { }, }; -const AVFilter ff_vf_tonemap_opencl = { - .name = "tonemap_opencl", - .description = NULL_IF_CONFIG_SMALL("Perform HDR to SDR conversion with tonemapping."), +const FFFilter ff_vf_tonemap_opencl = { + .p.name = "tonemap_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Perform HDR to SDR conversion with tonemapping."), + .p.priv_class = &tonemap_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(TonemapOpenCLContext), - .priv_class = &tonemap_opencl_class, .init = &ff_opencl_filter_init, .uninit = &tonemap_opencl_uninit, FILTER_INPUTS(tonemap_opencl_inputs), FILTER_OUTPUTS(tonemap_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_tonemap_vaapi.c b/libavfilter/vf_tonemap_vaapi.c index 62e251224c..9fe82cbb1b 100644 --- a/libavfilter/vf_tonemap_vaapi.c +++ b/libavfilter/vf_tonemap_vaapi.c @@ -559,15 +559,15 @@ static const AVFilterPad tonemap_vaapi_outputs[] = { }, }; -const AVFilter ff_vf_tonemap_vaapi = { - .name = "tonemap_vaapi", - .description = NULL_IF_CONFIG_SMALL("VAAPI VPP for tone-mapping"), +const FFFilter ff_vf_tonemap_vaapi = { + .p.name = "tonemap_vaapi", + .p.description = NULL_IF_CONFIG_SMALL("VAAPI VPP for tone-mapping"), + .p.priv_class = &tonemap_vaapi_class, .priv_size = sizeof(HDRVAAPIContext), .init = &tonemap_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, FILTER_INPUTS(tonemap_vaapi_inputs), FILTER_OUTPUTS(tonemap_vaapi_outputs), FILTER_QUERY_FUNC2(&ff_vaapi_vpp_query_formats), - .priv_class = &tonemap_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c index 73449147ea..7ba6fe72bf 100644 --- a/libavfilter/vf_tpad.c +++ b/libavfilter/vf_tpad.c @@ -235,11 +235,11 @@ static const AVFilterPad tpad_inputs[] = { }, }; -const AVFilter ff_vf_tpad = { - .name = "tpad", - .description = NULL_IF_CONFIG_SMALL("Temporarily pad video frames."), +const FFFilter ff_vf_tpad = { + .p.name = "tpad", + .p.description = NULL_IF_CONFIG_SMALL("Temporarily pad video frames."), + .p.priv_class = &tpad_class, .priv_size = sizeof(TPadContext), - .priv_class = &tpad_class, .activate = activate, .uninit = uninit, FILTER_INPUTS(tpad_inputs), diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c index 79e80cb000..88cc008f69 100644 --- a/libavfilter/vf_transpose.c +++ b/libavfilter/vf_transpose.c @@ -407,13 +407,13 @@ static const AVFilterPad avfilter_vf_transpose_outputs[] = { }, }; -const AVFilter ff_vf_transpose = { - .name = "transpose", - .description = NULL_IF_CONFIG_SMALL("Transpose input video."), +const FFFilter ff_vf_transpose = { + .p.name = "transpose", + .p.description = NULL_IF_CONFIG_SMALL("Transpose input video."), + .p.priv_class = &transpose_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(TransContext), - .priv_class = &transpose_class, FILTER_INPUTS(avfilter_vf_transpose_inputs), FILTER_OUTPUTS(avfilter_vf_transpose_outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_transpose_npp.c b/libavfilter/vf_transpose_npp.c index 1706267b16..e781d7c58b 100644 --- a/libavfilter/vf_transpose_npp.c +++ b/libavfilter/vf_transpose_npp.c @@ -466,13 +466,13 @@ static const AVFilterPad npptranspose_outputs[] = { }, }; -const AVFilter ff_vf_transpose_npp = { - .name = "transpose_npp", - .description = NULL_IF_CONFIG_SMALL("NVIDIA Performance Primitives video transpose"), +const FFFilter ff_vf_transpose_npp = { + .p.name = "transpose_npp", + .p.description = NULL_IF_CONFIG_SMALL("NVIDIA Performance Primitives video transpose"), + .p.priv_class = &npptranspose_class, .init = npptranspose_init, .uninit = npptranspose_uninit, .priv_size = sizeof(NPPTransposeContext), - .priv_class = &npptranspose_class, FILTER_INPUTS(npptranspose_inputs), FILTER_OUTPUTS(npptranspose_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA), diff --git a/libavfilter/vf_transpose_opencl.c b/libavfilter/vf_transpose_opencl.c index 063c5b3cf5..51201a9a71 100644 --- a/libavfilter/vf_transpose_opencl.c +++ b/libavfilter/vf_transpose_opencl.c @@ -272,16 +272,16 @@ static const AVFilterPad transpose_opencl_outputs[] = { }, }; -const AVFilter ff_vf_transpose_opencl = { - .name = "transpose_opencl", - .description = NULL_IF_CONFIG_SMALL("Transpose input video"), +const FFFilter ff_vf_transpose_opencl = { + .p.name = "transpose_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Transpose input video"), + .p.priv_class = &transpose_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(TransposeOpenCLContext), - .priv_class = &transpose_opencl_class, .init = &ff_opencl_filter_init, .uninit = &transpose_opencl_uninit, FILTER_INPUTS(transpose_opencl_inputs), FILTER_OUTPUTS(transpose_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_transpose_vaapi.c b/libavfilter/vf_transpose_vaapi.c index d49c44b9d1..b069e8571e 100644 --- a/libavfilter/vf_transpose_vaapi.c +++ b/libavfilter/vf_transpose_vaapi.c @@ -272,15 +272,15 @@ static const AVFilterPad transpose_vaapi_outputs[] = { }, }; -const AVFilter ff_vf_transpose_vaapi = { - .name = "transpose_vaapi", - .description = NULL_IF_CONFIG_SMALL("VAAPI VPP for transpose"), +const FFFilter ff_vf_transpose_vaapi = { + .p.name = "transpose_vaapi", + .p.description = NULL_IF_CONFIG_SMALL("VAAPI VPP for transpose"), + .p.priv_class = &transpose_vaapi_class, .priv_size = sizeof(TransposeVAAPIContext), .init = &transpose_vaapi_init, .uninit = &ff_vaapi_vpp_ctx_uninit, FILTER_INPUTS(transpose_vaapi_inputs), FILTER_OUTPUTS(transpose_vaapi_outputs), FILTER_QUERY_FUNC2(&ff_vaapi_vpp_query_formats), - .priv_class = &transpose_vaapi_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_transpose_vt.c b/libavfilter/vf_transpose_vt.c index 8193340865..f204030825 100644 --- a/libavfilter/vf_transpose_vt.c +++ b/libavfilter/vf_transpose_vt.c @@ -276,16 +276,16 @@ static const AVFilterPad transpose_vt_outputs[] = { }, }; -const AVFilter ff_vf_transpose_vt = { - .name = "transpose_vt", - .description = NULL_IF_CONFIG_SMALL("Transpose Videotoolbox frames"), +const FFFilter ff_vf_transpose_vt = { + .p.name = "transpose_vt", + .p.description = NULL_IF_CONFIG_SMALL("Transpose Videotoolbox frames"), + .p.priv_class = &transpose_vt_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(TransposeVtContext), .init = transpose_vt_init, .uninit = transpose_vt_uninit, FILTER_INPUTS(transpose_vt_inputs), FILTER_OUTPUTS(transpose_vt_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VIDEOTOOLBOX), - .priv_class = &transpose_vt_class, - .flags = AVFILTER_FLAG_HWDEVICE, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_transpose_vulkan.c b/libavfilter/vf_transpose_vulkan.c index fa21704a62..0169804fbb 100644 --- a/libavfilter/vf_transpose_vulkan.c +++ b/libavfilter/vf_transpose_vulkan.c @@ -266,16 +266,16 @@ static const AVFilterPad transpose_vulkan_outputs[] = { } }; -const AVFilter ff_vf_transpose_vulkan = { - .name = "transpose_vulkan", - .description = NULL_IF_CONFIG_SMALL("Transpose Vulkan Filter"), +const FFFilter ff_vf_transpose_vulkan = { + .p.name = "transpose_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Transpose Vulkan Filter"), + .p.priv_class = &transpose_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(TransposeVulkanContext), .init = &ff_vk_filter_init, .uninit = &transpose_vulkan_uninit, FILTER_INPUTS(transpose_vulkan_inputs), FILTER_OUTPUTS(transpose_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &transpose_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c index b5dd468b6f..71d40447c0 100644 --- a/libavfilter/vf_unsharp.c +++ b/libavfilter/vf_unsharp.c @@ -394,15 +394,15 @@ static const AVFilterPad avfilter_vf_unsharp_inputs[] = { }, }; -const AVFilter ff_vf_unsharp = { - .name = "unsharp", - .description = NULL_IF_CONFIG_SMALL("Sharpen or blur the input video."), +const FFFilter ff_vf_unsharp = { + .p.name = "unsharp", + .p.description = NULL_IF_CONFIG_SMALL("Sharpen or blur the input video."), + .p.priv_class = &unsharp_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(UnsharpContext), - .priv_class = &unsharp_class, .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_vf_unsharp_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_unsharp_opencl.c b/libavfilter/vf_unsharp_opencl.c index c36997f69c..15853e8db3 100644 --- a/libavfilter/vf_unsharp_opencl.c +++ b/libavfilter/vf_unsharp_opencl.c @@ -396,16 +396,16 @@ static const AVFilterPad unsharp_opencl_outputs[] = { }, }; -const AVFilter ff_vf_unsharp_opencl = { - .name = "unsharp_opencl", - .description = NULL_IF_CONFIG_SMALL("Apply unsharp mask to input video"), +const FFFilter ff_vf_unsharp_opencl = { + .p.name = "unsharp_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Apply unsharp mask to input video"), + .p.priv_class = &unsharp_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(UnsharpOpenCLContext), - .priv_class = &unsharp_opencl_class, .init = &ff_opencl_filter_init, .uninit = &unsharp_opencl_uninit, FILTER_INPUTS(unsharp_opencl_inputs), FILTER_OUTPUTS(unsharp_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_untile.c b/libavfilter/vf_untile.c index 0feedc7a05..6c1bfbabdc 100644 --- a/libavfilter/vf_untile.c +++ b/libavfilter/vf_untile.c @@ -176,9 +176,10 @@ static const AVFilterPad untile_outputs[] = { }, }; -const AVFilter ff_vf_untile = { - .name = "untile", - .description = NULL_IF_CONFIG_SMALL("Untile a frame into a sequence of frames."), +const FFFilter ff_vf_untile = { + .p.name = "untile", + .p.description = NULL_IF_CONFIG_SMALL("Untile a frame into a sequence of frames."), + .p.priv_class = &untile_class, .init = init, .uninit = uninit, .activate = activate, @@ -186,5 +187,4 @@ const AVFilter ff_vf_untile = { FILTER_INPUTS(ff_video_default_filterpad), FILTER_OUTPUTS(untile_outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &untile_class, }; diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c index f8e506aa27..8b3b75dc19 100644 --- a/libavfilter/vf_uspp.c +++ b/libavfilter/vf_uspp.c @@ -549,14 +549,14 @@ static const AVFilterPad uspp_inputs[] = { }, }; -const AVFilter ff_vf_uspp = { - .name = "uspp", - .description = NULL_IF_CONFIG_SMALL("Apply Ultra Simple / Slow Post-processing filter."), +const FFFilter ff_vf_uspp = { + .p.name = "uspp", + .p.description = NULL_IF_CONFIG_SMALL("Apply Ultra Simple / Slow Post-processing filter."), + .p.priv_class = &uspp_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(USPPContext), .uninit = uninit, FILTER_INPUTS(uspp_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &uspp_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index 04dc03bee7..8c1602b33e 100644 --- a/libavfilter/vf_v360.c +++ b/libavfilter/vf_v360.c @@ -4995,16 +4995,16 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_v360 = { - .name = "v360", - .description = NULL_IF_CONFIG_SMALL("Convert 360 projection of video."), +const FFFilter ff_vf_v360 = { + .p.name = "v360", + .p.description = NULL_IF_CONFIG_SMALL("Convert 360 projection of video."), + .p.priv_class = &v360_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(V360Context), .init = init, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(query_formats), - .priv_class = &v360_class, - .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = process_command, }; diff --git a/libavfilter/vf_vaguedenoiser.c b/libavfilter/vf_vaguedenoiser.c index 9321356853..9a9bf77233 100644 --- a/libavfilter/vf_vaguedenoiser.c +++ b/libavfilter/vf_vaguedenoiser.c @@ -593,15 +593,15 @@ static const AVFilterPad vaguedenoiser_inputs[] = { }; -const AVFilter ff_vf_vaguedenoiser = { - .name = "vaguedenoiser", - .description = NULL_IF_CONFIG_SMALL("Apply a Wavelet based Denoiser."), +const FFFilter ff_vf_vaguedenoiser = { + .p.name = "vaguedenoiser", + .p.description = NULL_IF_CONFIG_SMALL("Apply a Wavelet based Denoiser."), + .p.priv_class = &vaguedenoiser_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(VagueDenoiserContext), - .priv_class = &vaguedenoiser_class, .init = init, .uninit = uninit, FILTER_INPUTS(vaguedenoiser_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_varblur.c b/libavfilter/vf_varblur.c index 8c5aebdcf0..6a9aa89ce1 100644 --- a/libavfilter/vf_varblur.c +++ b/libavfilter/vf_varblur.c @@ -397,18 +397,18 @@ static const AVFilterPad varblur_outputs[] = { }, }; -const AVFilter ff_vf_varblur = { - .name = "varblur", - .description = NULL_IF_CONFIG_SMALL("Apply Variable Blur filter."), +const FFFilter ff_vf_varblur = { + .p.name = "varblur", + .p.description = NULL_IF_CONFIG_SMALL("Apply Variable Blur filter."), + .p.priv_class = &varblur_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(VarBlurContext), - .priv_class = &varblur_class, .activate = activate, .preinit = varblur_framesync_preinit, .uninit = uninit, FILTER_INPUTS(varblur_inputs), FILTER_OUTPUTS(varblur_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_vectorscope.c b/libavfilter/vf_vectorscope.c index efaf7d9279..2143f9dcc2 100644 --- a/libavfilter/vf_vectorscope.c +++ b/libavfilter/vf_vectorscope.c @@ -1587,11 +1587,11 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_vectorscope = { - .name = "vectorscope", - .description = NULL_IF_CONFIG_SMALL("Video vectorscope."), +const FFFilter ff_vf_vectorscope = { + .p.name = "vectorscope", + .p.description = NULL_IF_CONFIG_SMALL("Video vectorscope."), + .p.priv_class = &vectorscope_class, .priv_size = sizeof(VectorscopeContext), - .priv_class = &vectorscope_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c index 1b7e1e4d7d..4e0411a457 100644 --- a/libavfilter/vf_vflip.c +++ b/libavfilter/vf_vflip.c @@ -127,11 +127,11 @@ static const AVFilterPad avfilter_vf_vflip_inputs[] = { }, }; -const AVFilter ff_vf_vflip = { - .name = "vflip", - .description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."), +const FFFilter ff_vf_vflip = { + .p.name = "vflip", + .p.description = NULL_IF_CONFIG_SMALL("Flip the input video vertically."), + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(FlipContext), FILTER_INPUTS(avfilter_vf_vflip_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_vfrdet.c b/libavfilter/vf_vfrdet.c index 049e87b3e1..f99bc71de7 100644 --- a/libavfilter/vf_vfrdet.c +++ b/libavfilter/vf_vfrdet.c @@ -97,13 +97,13 @@ static const AVFilterPad vfrdet_inputs[] = { }, }; -const AVFilter ff_vf_vfrdet = { - .name = "vfrdet", - .description = NULL_IF_CONFIG_SMALL("Variable frame rate detect filter."), +const FFFilter ff_vf_vfrdet = { + .p.name = "vfrdet", + .p.description = NULL_IF_CONFIG_SMALL("Variable frame rate detect filter."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .priv_size = sizeof(VFRDETContext), .init = init, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(vfrdet_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), }; diff --git a/libavfilter/vf_vibrance.c b/libavfilter/vf_vibrance.c index 3be620e696..960b7e1b13 100644 --- a/libavfilter/vf_vibrance.c +++ b/libavfilter/vf_vibrance.c @@ -432,14 +432,14 @@ static const AVOption vibrance_options[] = { AVFILTER_DEFINE_CLASS(vibrance); -const AVFilter ff_vf_vibrance = { - .name = "vibrance", - .description = NULL_IF_CONFIG_SMALL("Boost or alter saturation."), +const FFFilter ff_vf_vibrance = { + .p.name = "vibrance", + .p.description = NULL_IF_CONFIG_SMALL("Boost or alter saturation."), + .p.priv_class = &vibrance_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(VibranceContext), - .priv_class = &vibrance_class, FILTER_INPUTS(vibrance_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pixel_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_vidstabdetect.c b/libavfilter/vf_vidstabdetect.c index 7b52f36dd6..1456fef94b 100644 --- a/libavfilter/vf_vidstabdetect.c +++ b/libavfilter/vf_vidstabdetect.c @@ -201,17 +201,17 @@ static const AVFilterPad avfilter_vf_vidstabdetect_inputs[] = { }, }; -const AVFilter ff_vf_vidstabdetect = { - .name = "vidstabdetect", - .description = NULL_IF_CONFIG_SMALL("Extract relative transformations, " +const FFFilter ff_vf_vidstabdetect = { + .p.name = "vidstabdetect", + .p.description = NULL_IF_CONFIG_SMALL("Extract relative transformations, " "pass 1 of 2 for stabilization " "(see vidstabtransform for pass 2)."), + .p.flags = AVFILTER_FLAG_METADATA_ONLY, + .p.priv_class = &vidstabdetect_class, .priv_size = sizeof(StabData), .init = init, .uninit = uninit, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(avfilter_vf_vidstabdetect_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(ff_vidstab_pix_fmts), - .priv_class = &vidstabdetect_class, }; diff --git a/libavfilter/vf_vidstabtransform.c b/libavfilter/vf_vidstabtransform.c index d2b771591e..55a5c9960d 100644 --- a/libavfilter/vf_vidstabtransform.c +++ b/libavfilter/vf_vidstabtransform.c @@ -283,16 +283,16 @@ static const AVFilterPad avfilter_vf_vidstabtransform_inputs[] = { }, }; -const AVFilter ff_vf_vidstabtransform = { - .name = "vidstabtransform", - .description = NULL_IF_CONFIG_SMALL("Transform the frames, " +const FFFilter ff_vf_vidstabtransform = { + .p.name = "vidstabtransform", + .p.description = NULL_IF_CONFIG_SMALL("Transform the frames, " "pass 2 of 2 for stabilization " "(see vidstabdetect for pass 1)."), + .p.priv_class = &vidstabtransform_class, .priv_size = sizeof(TransformContext), .init = init, .uninit = uninit, FILTER_INPUTS(avfilter_vf_vidstabtransform_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(ff_vidstab_pix_fmts), - .priv_class = &vidstabtransform_class, }; diff --git a/libavfilter/vf_vif.c b/libavfilter/vf_vif.c index ee62723ae0..6ec8a8d066 100644 --- a/libavfilter/vf_vif.c +++ b/libavfilter/vf_vif.c @@ -627,18 +627,18 @@ static const AVFilterPad vif_outputs[] = { }, }; -const AVFilter ff_vf_vif = { - .name = "vif", - .description = NULL_IF_CONFIG_SMALL("Calculate the VIF between two video streams."), +const FFFilter ff_vf_vif = { + .p.name = "vif", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the VIF between two video streams."), + .p.priv_class = &vif_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | + AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_METADATA_ONLY, .preinit = vif_framesync_preinit, .uninit = uninit, .priv_size = sizeof(VIFContext), - .priv_class = &vif_class, .activate = activate, FILTER_INPUTS(vif_inputs), FILTER_OUTPUTS(vif_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | - AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_METADATA_ONLY, }; diff --git a/libavfilter/vf_vignette.c b/libavfilter/vf_vignette.c index 5b4b9c7389..972ef7879d 100644 --- a/libavfilter/vf_vignette.c +++ b/libavfilter/vf_vignette.c @@ -327,15 +327,15 @@ static const AVFilterPad vignette_inputs[] = { }, }; -const AVFilter ff_vf_vignette = { - .name = "vignette", - .description = NULL_IF_CONFIG_SMALL("Make or reverse a vignette effect."), +const FFFilter ff_vf_vignette = { + .p.name = "vignette", + .p.description = NULL_IF_CONFIG_SMALL("Make or reverse a vignette effect."), + .p.priv_class = &vignette_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, .priv_size = sizeof(VignetteContext), .init = init, .uninit = uninit, FILTER_INPUTS(vignette_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .priv_class = &vignette_class, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, }; diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c index 7c18473a3c..b1f8381043 100644 --- a/libavfilter/vf_vmafmotion.c +++ b/libavfilter/vf_vmafmotion.c @@ -351,14 +351,14 @@ static const AVFilterPad vmafmotion_inputs[] = { }, }; -const AVFilter ff_vf_vmafmotion = { - .name = "vmafmotion", - .description = NULL_IF_CONFIG_SMALL("Calculate the VMAF Motion score."), +const FFFilter ff_vf_vmafmotion = { + .p.name = "vmafmotion", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the VMAF Motion score."), + .p.priv_class = &vmafmotion_class, + .p.flags = AVFILTER_FLAG_METADATA_ONLY, .init = init, .uninit = uninit, .priv_size = sizeof(VMAFMotionContext), - .priv_class = &vmafmotion_class, - .flags = AVFILTER_FLAG_METADATA_ONLY, FILTER_INPUTS(vmafmotion_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_QUERY_FUNC2(query_formats), diff --git a/libavfilter/vf_vpp_qsv.c b/libavfilter/vf_vpp_qsv.c index 37d41aa44b..0a33c377c8 100644 --- a/libavfilter/vf_vpp_qsv.c +++ b/libavfilter/vf_vpp_qsv.c @@ -832,20 +832,20 @@ static const AVClass x##_class = { \ .option = x##_options, \ .version = LIBAVUTIL_VERSION_INT, \ }; \ -const AVFilter ff_vf_##sn##_qsv = { \ - .name = #sn "_qsv", \ - .description = NULL_IF_CONFIG_SMALL("Quick Sync Video " #ln), \ +const FFFilter ff_vf_##sn##_qsv = { \ + .p.name = #sn "_qsv", \ + .p.description = NULL_IF_CONFIG_SMALL("Quick Sync Video " #ln), \ + .p.priv_class = &x##_class, \ + .p.flags = AVFILTER_FLAG_HWDEVICE, \ .preinit = x##_preinit, \ .init = vpp_init, \ .uninit = vpp_uninit, \ .priv_size = sizeof(VPPContext), \ - .priv_class = &x##_class, \ FILTER_INPUTS(vpp_inputs), \ FILTER_OUTPUTS(vpp_outputs), \ fmts, \ .activate = activate, \ .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, \ - .flags = AVFILTER_FLAG_HWDEVICE, \ }; #if CONFIG_VPP_QSV_FILTER diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c index 33ebc4d6c6..0635edc7f0 100644 --- a/libavfilter/vf_w3fdif.c +++ b/libavfilter/vf_w3fdif.c @@ -616,15 +616,15 @@ static const AVFilterPad w3fdif_outputs[] = { }, }; -const AVFilter ff_vf_w3fdif = { - .name = "w3fdif", - .description = NULL_IF_CONFIG_SMALL("Apply Martin Weston three field deinterlace."), +const FFFilter ff_vf_w3fdif = { + .p.name = "w3fdif", + .p.description = NULL_IF_CONFIG_SMALL("Apply Martin Weston three field deinterlace."), + .p.priv_class = &w3fdif_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(W3FDIFContext), - .priv_class = &w3fdif_class, .uninit = uninit, FILTER_INPUTS(w3fdif_inputs), FILTER_OUTPUTS(w3fdif_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_waveform.c b/libavfilter/vf_waveform.c index 8b54e12e3d..6d2b529e88 100644 --- a/libavfilter/vf_waveform.c +++ b/libavfilter/vf_waveform.c @@ -3517,15 +3517,15 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_waveform = { - .name = "waveform", - .description = NULL_IF_CONFIG_SMALL("Video waveform monitor."), +const FFFilter ff_vf_waveform = { + .p.name = "waveform", + .p.description = NULL_IF_CONFIG_SMALL("Video waveform monitor."), + .p.priv_class = &waveform_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(WaveformContext), - .priv_class = &waveform_class, .uninit = uninit, FILTER_INPUTS(inputs), FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC(query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_weave.c b/libavfilter/vf_weave.c index 9595865320..c978c47ad4 100644 --- a/libavfilter/vf_weave.c +++ b/libavfilter/vf_weave.c @@ -204,16 +204,16 @@ static const AVFilterPad weave_outputs[] = { }, }; -const AVFilter ff_vf_weave = { - .name = "weave", - .description = NULL_IF_CONFIG_SMALL("Weave input video fields into frames."), +const FFFilter ff_vf_weave = { + .p.name = "weave", + .p.description = NULL_IF_CONFIG_SMALL("Weave input video fields into frames."), + .p.priv_class = &weave_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(WeaveContext), - .priv_class = &weave_class, .uninit = uninit, FILTER_INPUTS(weave_inputs), FILTER_OUTPUTS(weave_outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS, }; static av_cold int init(AVFilterContext *ctx) @@ -226,15 +226,15 @@ static av_cold int init(AVFilterContext *ctx) return 0; } -const AVFilter ff_vf_doubleweave = { - .name = "doubleweave", - .description = NULL_IF_CONFIG_SMALL("Weave input video fields into double number of frames."), - .priv_class = &weave_class, +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.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(WeaveContext), .init = init, .uninit = uninit, FILTER_INPUTS(weave_inputs), FILTER_OUTPUTS(weave_outputs), FILTER_QUERY_FUNC2(query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_xbr.c b/libavfilter/vf_xbr.c index 47d11be44a..c9a4bc5be7 100644 --- a/libavfilter/vf_xbr.c +++ b/libavfilter/vf_xbr.c @@ -413,14 +413,14 @@ static const AVFilterPad xbr_outputs[] = { }, }; -const AVFilter ff_vf_xbr = { - .name = "xbr", - .description = NULL_IF_CONFIG_SMALL("Scale the input using xBR algorithm."), +const FFFilter ff_vf_xbr = { + .p.name = "xbr", + .p.description = NULL_IF_CONFIG_SMALL("Scale the input using xBR algorithm."), + .p.priv_class = &xbr_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, FILTER_INPUTS(xbr_inputs), FILTER_OUTPUTS(xbr_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_0RGB32), .priv_size = sizeof(XBRContext), - .priv_class = &xbr_class, .init = init, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_xfade.c b/libavfilter/vf_xfade.c index 639904cabc..4517e4e6b3 100644 --- a/libavfilter/vf_xfade.c +++ b/libavfilter/vf_xfade.c @@ -2390,15 +2390,15 @@ static const AVFilterPad xfade_outputs[] = { }, }; -const AVFilter ff_vf_xfade = { - .name = "xfade", - .description = NULL_IF_CONFIG_SMALL("Cross fade one video with another video."), +const FFFilter ff_vf_xfade = { + .p.name = "xfade", + .p.description = NULL_IF_CONFIG_SMALL("Cross fade one video with another video."), + .p.priv_class = &xfade_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(XFadeContext), - .priv_class = &xfade_class, .activate = xfade_activate, .uninit = uninit, FILTER_INPUTS(xfade_inputs), FILTER_OUTPUTS(xfade_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_xfade_opencl.c b/libavfilter/vf_xfade_opencl.c index 856a300c38..96dc7e4554 100644 --- a/libavfilter/vf_xfade_opencl.c +++ b/libavfilter/vf_xfade_opencl.c @@ -430,11 +430,12 @@ static const AVFilterPad xfade_opencl_outputs[] = { }, }; -const AVFilter ff_vf_xfade_opencl = { - .name = "xfade_opencl", - .description = NULL_IF_CONFIG_SMALL("Cross fade one video with another video."), +const FFFilter ff_vf_xfade_opencl = { + .p.name = "xfade_opencl", + .p.description = NULL_IF_CONFIG_SMALL("Cross fade one video with another video."), + .p.priv_class = &xfade_opencl_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(XFadeOpenCLContext), - .priv_class = &xfade_opencl_class, .init = &ff_opencl_filter_init, .uninit = &xfade_opencl_uninit, .activate = &xfade_opencl_activate, @@ -442,5 +443,4 @@ const AVFilter ff_vf_xfade_opencl = { FILTER_OUTPUTS(xfade_opencl_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_OPENCL), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_xfade_vulkan.c b/libavfilter/vf_xfade_vulkan.c index 7dd80c7baa..58e8797733 100644 --- a/libavfilter/vf_xfade_vulkan.c +++ b/libavfilter/vf_xfade_vulkan.c @@ -709,9 +709,11 @@ static const AVFilterPad xfade_vulkan_outputs[] = { }, }; -const AVFilter ff_vf_xfade_vulkan = { - .name = "xfade_vulkan", - .description = NULL_IF_CONFIG_SMALL("Cross fade one video with another video."), +const FFFilter ff_vf_xfade_vulkan = { + .p.name = "xfade_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Cross fade one video with another video."), + .p.priv_class = &xfade_vulkan_class, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(XFadeVulkanContext), .init = &ff_vk_filter_init, .uninit = &uninit, @@ -719,7 +721,5 @@ const AVFilter ff_vf_xfade_vulkan = { FILTER_INPUTS(xfade_vulkan_inputs), FILTER_OUTPUTS(xfade_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &xfade_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_xmedian.c b/libavfilter/vf_xmedian.c index 492fd0fe5e..f411d063f1 100644 --- a/libavfilter/vf_xmedian.c +++ b/libavfilter/vf_xmedian.c @@ -376,19 +376,19 @@ static const AVOption xmedian_options[] = { FRAMESYNC_DEFINE_CLASS(xmedian, XMedianContext, fs); -const AVFilter ff_vf_xmedian = { - .name = "xmedian", - .description = NULL_IF_CONFIG_SMALL("Pick median pixels from several video inputs."), +const FFFilter ff_vf_xmedian = { + .p.name = "xmedian", + .p.description = NULL_IF_CONFIG_SMALL("Pick median pixels from several video inputs."), + .p.priv_class = &xmedian_class, + .p.flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS | + AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(XMedianContext), - .priv_class = &xmedian_class, FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), .preinit = xmedian_framesync_preinit, .init = xmedian_init, .uninit = uninit, .activate = activate, - .flags = AVFILTER_FLAG_DYNAMIC_INPUTS | AVFILTER_FLAG_SLICE_THREADS | - AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .process_command = ff_filter_process_command, }; @@ -453,17 +453,17 @@ static const AVFilterPad tmedian_inputs[] = { AVFILTER_DEFINE_CLASS(tmedian); -const AVFilter ff_vf_tmedian = { - .name = "tmedian", - .description = NULL_IF_CONFIG_SMALL("Pick median pixels from successive frames."), +const FFFilter ff_vf_tmedian = { + .p.name = "tmedian", + .p.description = NULL_IF_CONFIG_SMALL("Pick median pixels from successive frames."), + .p.priv_class = &tmedian_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(XMedianContext), - .priv_class = &tmedian_class, FILTER_INPUTS(tmedian_inputs), FILTER_OUTPUTS(outputs), FILTER_PIXFMTS_ARRAY(pixel_fmts), .init = init, .uninit = uninit, - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_xpsnr.c b/libavfilter/vf_xpsnr.c index f8557dc8f2..d4bcb1c431 100644 --- a/libavfilter/vf_xpsnr.c +++ b/libavfilter/vf_xpsnr.c @@ -727,17 +727,17 @@ static const AVFilterPad xpsnr_outputs[] = { } }; -const AVFilter ff_vf_xpsnr = { - .name = "xpsnr", - .description = NULL_IF_CONFIG_SMALL("Calculate the extended perceptually weighted peak signal-to-noise ratio (XPSNR) between two video streams."), +const FFFilter ff_vf_xpsnr = { + .p.name = "xpsnr", + .p.description = NULL_IF_CONFIG_SMALL("Calculate the extended perceptually weighted peak signal-to-noise ratio (XPSNR) between two video streams."), + .p.priv_class = &xpsnr_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_METADATA_ONLY, .preinit = xpsnr_framesync_preinit, .init = init, .uninit = uninit, .activate = activate, .priv_size = sizeof(XPSNRContext), - .priv_class = &xpsnr_class, FILTER_INPUTS (xpsnr_inputs), FILTER_OUTPUTS(xpsnr_outputs), FILTER_PIXFMTS_ARRAY(xpsnr_formats), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_METADATA_ONLY }; diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 2bf58aa487..6e0e500886 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -322,14 +322,14 @@ static const AVFilterPad avfilter_vf_yadif_outputs[] = { }, }; -const AVFilter ff_vf_yadif = { - .name = "yadif", - .description = NULL_IF_CONFIG_SMALL("Deinterlace the input image."), +const FFFilter ff_vf_yadif = { + .p.name = "yadif", + .p.description = NULL_IF_CONFIG_SMALL("Deinterlace the input image."), + .p.priv_class = &yadif_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(YADIFContext), - .priv_class = &yadif_class, .uninit = ff_yadif_uninit, FILTER_INPUTS(avfilter_vf_yadif_inputs), FILTER_OUTPUTS(avfilter_vf_yadif_outputs), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vf_yadif_cuda.c b/libavfilter/vf_yadif_cuda.c index 2575237884..50ac61ad8a 100644 --- a/libavfilter/vf_yadif_cuda.c +++ b/libavfilter/vf_yadif_cuda.c @@ -343,15 +343,15 @@ static const AVFilterPad deint_cuda_outputs[] = { }, }; -const AVFilter ff_vf_yadif_cuda = { - .name = "yadif_cuda", - .description = NULL_IF_CONFIG_SMALL("Deinterlace CUDA frames"), +const FFFilter ff_vf_yadif_cuda = { + .p.name = "yadif_cuda", + .p.description = NULL_IF_CONFIG_SMALL("Deinterlace CUDA frames"), + .p.priv_class = &yadif_cuda_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = sizeof(DeintCUDAContext), - .priv_class = &yadif_cuda_class, .uninit = deint_cuda_uninit, FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA), FILTER_INPUTS(deint_cuda_inputs), FILTER_OUTPUTS(deint_cuda_outputs), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_yadif_videotoolbox.m b/libavfilter/vf_yadif_videotoolbox.m index f9e8326565..f8eb0c6bfa 100644 --- a/libavfilter/vf_yadif_videotoolbox.m +++ b/libavfilter/vf_yadif_videotoolbox.m @@ -432,16 +432,16 @@ static const AVFilterPad yadif_videotoolbox_outputs[] = { }, }; -const AVFilter ff_vf_yadif_videotoolbox = { - .name = "yadif_videotoolbox", - .description = NULL_IF_CONFIG_SMALL("YADIF for VideoToolbox frames using Metal compute"), +const FFFilter ff_vf_yadif_videotoolbox = { + .p.name = "yadif_videotoolbox", + .p.description = NULL_IF_CONFIG_SMALL("YADIF for VideoToolbox frames using Metal compute"), + .p.priv_class = &yadif_videotoolbox_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .priv_size = YADIF_VT_CTX_SIZE, - .priv_class = &yadif_videotoolbox_class, .init = yadif_videotoolbox_init, .uninit = yadif_videotoolbox_uninit, FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VIDEOTOOLBOX), FILTER_INPUTS(yadif_videotoolbox_inputs), FILTER_OUTPUTS(yadif_videotoolbox_outputs), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, }; diff --git a/libavfilter/vf_yaepblur.c b/libavfilter/vf_yaepblur.c index 513404734f..50fe78df5a 100644 --- a/libavfilter/vf_yaepblur.c +++ b/libavfilter/vf_yaepblur.c @@ -326,15 +326,15 @@ static const AVOption yaepblur_options[] = { AVFILTER_DEFINE_CLASS(yaepblur); -const AVFilter ff_vf_yaepblur = { - .name = "yaepblur", - .description = NULL_IF_CONFIG_SMALL("Yet another edge preserving blur filter."), +const FFFilter ff_vf_yaepblur = { + .p.name = "yaepblur", + .p.description = NULL_IF_CONFIG_SMALL("Yet another edge preserving blur filter."), + .p.priv_class = &yaepblur_class, + .p.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(YAEPContext), - .priv_class = &yaepblur_class, .uninit = uninit, FILTER_INPUTS(yaep_inputs), FILTER_OUTPUTS(ff_video_default_filterpad), FILTER_PIXFMTS_ARRAY(pix_fmts), - .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vf_zoompan.c b/libavfilter/vf_zoompan.c index 8a4d57b7ab..762f1d213d 100644 --- a/libavfilter/vf_zoompan.c +++ b/libavfilter/vf_zoompan.c @@ -361,11 +361,11 @@ static const AVFilterPad outputs[] = { }, }; -const AVFilter ff_vf_zoompan = { - .name = "zoompan", - .description = NULL_IF_CONFIG_SMALL("Apply Zoom & Pan effect."), +const FFFilter ff_vf_zoompan = { + .p.name = "zoompan", + .p.description = NULL_IF_CONFIG_SMALL("Apply Zoom & Pan effect."), + .p.priv_class = &zoompan_class, .priv_size = sizeof(ZPContext), - .priv_class = &zoompan_class, .init = init, .uninit = uninit, .activate = activate, diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c index 569d0382ca..7e66c3d6e2 100644 --- a/libavfilter/vf_zscale.c +++ b/libavfilter/vf_zscale.c @@ -1130,16 +1130,16 @@ static const AVFilterPad avfilter_vf_zscale_outputs[] = { }, }; -const AVFilter ff_vf_zscale = { - .name = "zscale", - .description = NULL_IF_CONFIG_SMALL("Apply resizing, colorspace and bit depth conversion."), +const FFFilter ff_vf_zscale = { + .p.name = "zscale", + .p.description = NULL_IF_CONFIG_SMALL("Apply resizing, colorspace and bit depth conversion."), + .p.priv_class = &zscale_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .init = init, .priv_size = sizeof(ZScaleContext), - .priv_class = &zscale_class, .uninit = uninit, FILTER_INPUTS(avfilter_vf_zscale_inputs), FILTER_OUTPUTS(avfilter_vf_zscale_outputs), FILTER_QUERY_FUNC2(query_formats), .process_command = process_command, - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vsink_nullsink.c b/libavfilter/vsink_nullsink.c index cc8cf1a13c..2a671e1402 100644 --- a/libavfilter/vsink_nullsink.c +++ b/libavfilter/vsink_nullsink.c @@ -34,10 +34,10 @@ static const AVFilterPad avfilter_vsink_nullsink_inputs[] = { }, }; -const AVFilter ff_vsink_nullsink = { - .name = "nullsink", - .description = NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input video."), +const FFFilter ff_vsink_nullsink = { + .p.name = "nullsink", + .p.description= NULL_IF_CONFIG_SMALL("Do absolutely nothing with the input video."), + .p.outputs = NULL, .priv_size = 0, FILTER_INPUTS(avfilter_vsink_nullsink_inputs), - .outputs = NULL, }; diff --git a/libavfilter/vsrc_cellauto.c b/libavfilter/vsrc_cellauto.c index c831072df8..a8ab73fe75 100644 --- a/libavfilter/vsrc_cellauto.c +++ b/libavfilter/vsrc_cellauto.c @@ -319,14 +319,14 @@ static const AVFilterPad cellauto_outputs[] = { }, }; -const AVFilter ff_vsrc_cellauto = { - .name = "cellauto", - .description = NULL_IF_CONFIG_SMALL("Create pattern generated by an elementary cellular automaton."), +const FFFilter ff_vsrc_cellauto = { + .p.name = "cellauto", + .p.description = NULL_IF_CONFIG_SMALL("Create pattern generated by an elementary cellular automaton."), + .p.priv_class = &cellauto_class, + .p.inputs = NULL, .priv_size = sizeof(CellAutoContext), - .priv_class = &cellauto_class, .init = init, .uninit = uninit, - .inputs = NULL, FILTER_OUTPUTS(cellauto_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_MONOBLACK), }; diff --git a/libavfilter/vsrc_ddagrab.c b/libavfilter/vsrc_ddagrab.c index 302c558d9f..49d5873c2f 100644 --- a/libavfilter/vsrc_ddagrab.c +++ b/libavfilter/vsrc_ddagrab.c @@ -1243,16 +1243,16 @@ static const AVFilterPad ddagrab_outputs[] = { }, }; -const AVFilter ff_vsrc_ddagrab = { - .name = "ddagrab", - .description = NULL_IF_CONFIG_SMALL("Grab Windows Desktop images using Desktop Duplication API"), +const FFFilter ff_vsrc_ddagrab = { + .p.name = "ddagrab", + .p.description = NULL_IF_CONFIG_SMALL("Grab Windows Desktop images using Desktop Duplication API"), + .p.priv_class = &ddagrab_class, + .p.inputs = NULL, + .p.flags = AVFILTER_FLAG_HWDEVICE, .priv_size = sizeof(DdagrabContext), - .priv_class = &ddagrab_class, .init = ddagrab_init, .uninit = ddagrab_uninit, - .inputs = NULL, FILTER_OUTPUTS(ddagrab_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_D3D11), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, - .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vsrc_gradients.c b/libavfilter/vsrc_gradients.c index 201ca8f86e..0c5a9dbf53 100644 --- a/libavfilter/vsrc_gradients.c +++ b/libavfilter/vsrc_gradients.c @@ -443,15 +443,15 @@ static const AVFilterPad gradients_outputs[] = { }, }; -const AVFilter ff_vsrc_gradients = { - .name = "gradients", - .description = NULL_IF_CONFIG_SMALL("Draw a gradients."), +const FFFilter ff_vsrc_gradients = { + .p.name = "gradients", + .p.description = NULL_IF_CONFIG_SMALL("Draw a gradients."), + .p.priv_class = &gradients_class, + .p.inputs = NULL, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(GradientsContext), - .priv_class = &gradients_class, - .inputs = NULL, FILTER_OUTPUTS(gradients_outputs), FILTER_PIXFMTS(AV_PIX_FMT_RGBA, AV_PIX_FMT_RGBA64, AV_PIX_FMT_GBRAPF32), .activate = activate, - .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c index 5506e3bc90..cacdcfd963 100644 --- a/libavfilter/vsrc_life.c +++ b/libavfilter/vsrc_life.c @@ -444,14 +444,14 @@ static const AVFilterPad life_outputs[] = { }, }; -const AVFilter ff_vsrc_life = { - .name = "life", - .description = NULL_IF_CONFIG_SMALL("Create life."), +const FFFilter ff_vsrc_life = { + .p.name = "life", + .p.description = NULL_IF_CONFIG_SMALL("Create life."), + .p.priv_class = &life_class, + .p.inputs = NULL, .priv_size = sizeof(LifeContext), - .priv_class = &life_class, .init = init, .uninit = uninit, - .inputs = NULL, FILTER_OUTPUTS(life_outputs), FILTER_QUERY_FUNC2(query_formats), }; diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c index 46b6854bf2..3f14f1e7f9 100644 --- a/libavfilter/vsrc_mandelbrot.c +++ b/libavfilter/vsrc_mandelbrot.c @@ -410,14 +410,14 @@ static const AVFilterPad mandelbrot_outputs[] = { }, }; -const AVFilter ff_vsrc_mandelbrot = { - .name = "mandelbrot", - .description = NULL_IF_CONFIG_SMALL("Render a Mandelbrot fractal."), +const FFFilter ff_vsrc_mandelbrot = { + .p.name = "mandelbrot", + .p.description = NULL_IF_CONFIG_SMALL("Render a Mandelbrot fractal."), + .p.priv_class = &mandelbrot_class, + .p.inputs = NULL, .priv_size = sizeof(MBContext), - .priv_class = &mandelbrot_class, .init = init, .uninit = uninit, - .inputs = NULL, FILTER_OUTPUTS(mandelbrot_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_0BGR32), }; diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c index b431656f61..2eb9a46d88 100644 --- a/libavfilter/vsrc_mptestsrc.c +++ b/libavfilter/vsrc_mptestsrc.c @@ -345,13 +345,13 @@ static const AVFilterPad mptestsrc_outputs[] = { }, }; -const AVFilter ff_vsrc_mptestsrc = { - .name = "mptestsrc", - .description = NULL_IF_CONFIG_SMALL("Generate various test pattern."), +const FFFilter ff_vsrc_mptestsrc = { + .p.name = "mptestsrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate various test pattern."), + .p.priv_class = &mptestsrc_class, + .p.inputs = NULL, .priv_size = sizeof(MPTestContext), - .priv_class = &mptestsrc_class, .init = init, - .inputs = NULL, FILTER_OUTPUTS(mptestsrc_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_YUV420P), }; diff --git a/libavfilter/vsrc_perlin.c b/libavfilter/vsrc_perlin.c index 9f6f000da5..f98496e5d3 100644 --- a/libavfilter/vsrc_perlin.c +++ b/libavfilter/vsrc_perlin.c @@ -160,13 +160,13 @@ static const AVFilterPad perlin_outputs[] = { }, }; -const AVFilter ff_vsrc_perlin = { - .name = "perlin", - .description = NULL_IF_CONFIG_SMALL("Generate Perlin noise"), +const FFFilter ff_vsrc_perlin = { + .p.name = "perlin", + .p.description = NULL_IF_CONFIG_SMALL("Generate Perlin noise"), + .p.priv_class = &perlin_class, + .p.inputs = NULL, .priv_size = sizeof(PerlinContext), - .priv_class = &perlin_class, .init = init, - .inputs = NULL, FILTER_OUTPUTS(perlin_outputs), FILTER_QUERY_FUNC2(query_formats), }; diff --git a/libavfilter/vsrc_sierpinski.c b/libavfilter/vsrc_sierpinski.c index 8cc6142a1e..c9134184a5 100644 --- a/libavfilter/vsrc_sierpinski.c +++ b/libavfilter/vsrc_sierpinski.c @@ -211,13 +211,13 @@ static const AVFilterPad sierpinski_outputs[] = { }, }; -const AVFilter ff_vsrc_sierpinski = { - .name = "sierpinski", - .description = NULL_IF_CONFIG_SMALL("Render a Sierpinski fractal."), +const FFFilter ff_vsrc_sierpinski = { + .p.name = "sierpinski", + .p.description = NULL_IF_CONFIG_SMALL("Render a Sierpinski fractal."), + .p.priv_class = &sierpinski_class, + .p.inputs = NULL, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(SierpinskiContext), - .priv_class = &sierpinski_class, - .inputs = NULL, FILTER_OUTPUTS(sierpinski_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_0BGR32), - .flags = AVFILTER_FLAG_SLICE_THREADS, }; diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index e9a3a29c0d..c842cacceb 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -298,15 +298,14 @@ static const AVFilterPad color_outputs[] = { }, }; -const AVFilter ff_vsrc_color = { - .name = "color", - .description = NULL_IF_CONFIG_SMALL("Provide an uniformly colored input."), - .priv_class = &color_class, +const FFFilter ff_vsrc_color = { + .p.name = "color", + .p.description = NULL_IF_CONFIG_SMALL("Provide an uniformly colored input."), + .p.priv_class = &color_class, .priv_size = sizeof(TestSourceContext), .init = color_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(color_outputs), FILTER_QUERY_FUNC2(color_query_formats), .process_command = color_process_command, @@ -443,15 +442,14 @@ static const AVFilterPad haldclutsrc_outputs[] = { }, }; -const AVFilter ff_vsrc_haldclutsrc = { - .name = "haldclutsrc", - .description = NULL_IF_CONFIG_SMALL("Provide an identity Hald CLUT."), - .priv_class = &haldclutsrc_class, +const FFFilter ff_vsrc_haldclutsrc = { + .p.name = "haldclutsrc", + .p.description = NULL_IF_CONFIG_SMALL("Provide an identity Hald CLUT."), + .p.priv_class = &haldclutsrc_class, .priv_size = sizeof(TestSourceContext), .init = haldclutsrc_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(haldclutsrc_outputs), FILTER_PIXFMTS_ARRAY(haldclutsrc_pix_fmts), }; @@ -471,15 +469,14 @@ static av_cold int nullsrc_init(AVFilterContext *ctx) return init(ctx); } -const AVFilter ff_vsrc_nullsrc = { - .name = "nullsrc", - .description = NULL_IF_CONFIG_SMALL("Null video source, return unprocessed video frames."), - .priv_class = &nullsrc_yuvtestsrc_class, +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, .init = nullsrc_init, .uninit = uninit, .activate = activate, .priv_size = sizeof(TestSourceContext), - .inputs = NULL, FILTER_OUTPUTS(outputs), }; @@ -686,15 +683,14 @@ static av_cold int test_init(AVFilterContext *ctx) return init(ctx); } -const AVFilter ff_vsrc_testsrc = { - .name = "testsrc", - .description = NULL_IF_CONFIG_SMALL("Generate test pattern."), +const FFFilter ff_vsrc_testsrc = { + .p.name = "testsrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate test pattern."), + .p.priv_class = &testsrc_class, .priv_size = sizeof(TestSourceContext), - .priv_class = &testsrc_class, .init = test_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_RGB24), }; @@ -961,15 +957,14 @@ static const AVFilterPad avfilter_vsrc_testsrc2_outputs[] = { }, }; -const AVFilter ff_vsrc_testsrc2 = { - .name = "testsrc2", - .description = NULL_IF_CONFIG_SMALL("Generate another test pattern."), +const FFFilter ff_vsrc_testsrc2 = { + .p.name = "testsrc2", + .p.description = NULL_IF_CONFIG_SMALL("Generate another test pattern."), + .p.priv_class = &testsrc2_class, .priv_size = sizeof(TestSourceContext), - .priv_class = &testsrc2_class, .init = test2_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(avfilter_vsrc_testsrc2_outputs), FILTER_QUERY_FUNC2(test2_query_formats), }; @@ -1158,15 +1153,14 @@ static const AVFilterPad avfilter_vsrc_rgbtestsrc_outputs[] = { }, }; -const AVFilter ff_vsrc_rgbtestsrc = { - .name = "rgbtestsrc", - .description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."), +const FFFilter ff_vsrc_rgbtestsrc = { + .p.name = "rgbtestsrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate RGB test pattern."), + .p.priv_class = &rgbtestsrc_class, .priv_size = sizeof(TestSourceContext), - .priv_class = &rgbtestsrc_class, .init = rgbtest_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(avfilter_vsrc_rgbtestsrc_outputs), FILTER_PIXFMTS_ARRAY(rgbtest_pix_fmts), }; @@ -1297,15 +1291,14 @@ static const AVFilterPad avfilter_vsrc_yuvtestsrc_outputs[] = { }, }; -const AVFilter ff_vsrc_yuvtestsrc = { - .name = "yuvtestsrc", - .description = NULL_IF_CONFIG_SMALL("Generate YUV test pattern."), +const FFFilter ff_vsrc_yuvtestsrc = { + .p.name = "yuvtestsrc", + .p.description = NULL_IF_CONFIG_SMALL("Generate YUV test pattern."), + .p.priv_class = &nullsrc_yuvtestsrc_class, .priv_size = sizeof(TestSourceContext), - .priv_class = &nullsrc_yuvtestsrc_class, .init = yuvtest_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(avfilter_vsrc_yuvtestsrc_outputs), FILTER_PIXFMTS_ARRAY(yuvtest_pix_fmts), }; @@ -1480,15 +1473,14 @@ static av_cold int pal75bars_init(AVFilterContext *ctx) return init(ctx); } -const AVFilter ff_vsrc_pal75bars = { - .name = "pal75bars", - .description = NULL_IF_CONFIG_SMALL("Generate PAL 75% color bars."), - .priv_class = &palbars_class, +const FFFilter ff_vsrc_pal75bars = { + .p.name = "pal75bars", + .p.description = NULL_IF_CONFIG_SMALL("Generate PAL 75% color bars."), + .p.priv_class = &palbars_class, .priv_size = sizeof(TestSourceContext), .init = pal75bars_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(smptebars_query_formats), }; @@ -1521,15 +1513,14 @@ static av_cold int pal100bars_init(AVFilterContext *ctx) return init(ctx); } -const AVFilter ff_vsrc_pal100bars = { - .name = "pal100bars", - .description = NULL_IF_CONFIG_SMALL("Generate PAL 100% color bars."), - .priv_class = &palbars_class, +const FFFilter ff_vsrc_pal100bars = { + .p.name = "pal100bars", + .p.description = NULL_IF_CONFIG_SMALL("Generate PAL 100% color bars."), + .p.priv_class = &palbars_class, .priv_size = sizeof(TestSourceContext), .init = pal100bars_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(smptebars_query_formats), }; @@ -1586,15 +1577,14 @@ static av_cold int smptebars_init(AVFilterContext *ctx) return init(ctx); } -const AVFilter ff_vsrc_smptebars = { - .name = "smptebars", - .description = NULL_IF_CONFIG_SMALL("Generate SMPTE color bars."), +const FFFilter ff_vsrc_smptebars = { + .p.name = "smptebars", + .p.description = NULL_IF_CONFIG_SMALL("Generate SMPTE color bars."), + .p.priv_class = &smptebars_class, .priv_size = sizeof(TestSourceContext), - .priv_class = &smptebars_class, .init = smptebars_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(smptebars_query_formats), }; @@ -1687,15 +1677,14 @@ static av_cold int smptehdbars_init(AVFilterContext *ctx) return init(ctx); } -const AVFilter ff_vsrc_smptehdbars = { - .name = "smptehdbars", - .description = NULL_IF_CONFIG_SMALL("Generate SMPTE HD color bars."), - .priv_class = &smptebars_class, +const FFFilter ff_vsrc_smptehdbars = { + .p.name = "smptehdbars", + .p.description = NULL_IF_CONFIG_SMALL("Generate SMPTE HD color bars."), + .p.priv_class = &smptebars_class, .priv_size = sizeof(TestSourceContext), .init = smptehdbars_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(outputs), FILTER_QUERY_FUNC2(smptebars_query_formats), }; @@ -1743,15 +1732,14 @@ static av_cold int allyuv_init(AVFilterContext *ctx) return init(ctx); } -const AVFilter ff_vsrc_allyuv = { - .name = "allyuv", - .description = NULL_IF_CONFIG_SMALL("Generate all yuv colors."), +const FFFilter ff_vsrc_allyuv = { + .p.name = "allyuv", + .p.description = NULL_IF_CONFIG_SMALL("Generate all yuv colors."), + .p.priv_class = &allyuv_allrgb_class, .priv_size = sizeof(TestSourceContext), - .priv_class = &allyuv_allrgb_class, .init = allyuv_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(outputs), FILTER_PIXFMTS(AV_PIX_FMT_YUV444P, AV_PIX_FMT_GBRP), }; @@ -1804,15 +1792,14 @@ static const AVFilterPad avfilter_vsrc_allrgb_outputs[] = { }, }; -const AVFilter ff_vsrc_allrgb = { - .name = "allrgb", - .description = NULL_IF_CONFIG_SMALL("Generate all RGB colors."), +const FFFilter ff_vsrc_allrgb = { + .p.name = "allrgb", + .p.description = NULL_IF_CONFIG_SMALL("Generate all RGB colors."), + .p.priv_class = &allyuv_allrgb_class, .priv_size = sizeof(TestSourceContext), - .priv_class = &allyuv_allrgb_class, .init = allrgb_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(avfilter_vsrc_allrgb_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_RGB24), }; @@ -1885,15 +1872,14 @@ static av_cold int colorspectrum_init(AVFilterContext *ctx) return init(ctx); } -const AVFilter ff_vsrc_colorspectrum = { - .name = "colorspectrum", - .description = NULL_IF_CONFIG_SMALL("Generate colors spectrum."), +const FFFilter ff_vsrc_colorspectrum = { + .p.name = "colorspectrum", + .p.description = NULL_IF_CONFIG_SMALL("Generate colors spectrum."), + .p.priv_class = &colorspectrum_class, .priv_size = sizeof(TestSourceContext), - .priv_class = &colorspectrum_class, .init = colorspectrum_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_GBRPF32), }; @@ -2038,15 +2024,14 @@ static const AVFilterPad avfilter_vsrc_colorchart_outputs[] = { }, }; -const AVFilter ff_vsrc_colorchart = { - .name = "colorchart", - .description = NULL_IF_CONFIG_SMALL("Generate color checker chart."), +const FFFilter ff_vsrc_colorchart = { + .p.name = "colorchart", + .p.description = NULL_IF_CONFIG_SMALL("Generate color checker chart."), + .p.priv_class = &colorchart_class, .priv_size = sizeof(TestSourceContext), - .priv_class = &colorchart_class, .init = colorchart_init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(avfilter_vsrc_colorchart_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_GBRP), }; @@ -2234,18 +2219,17 @@ static const AVFilterPad avfilter_vsrc_zoneplate_outputs[] = { }, }; -const AVFilter ff_vsrc_zoneplate = { - .name = "zoneplate", - .description = NULL_IF_CONFIG_SMALL("Generate zone-plate."), +const FFFilter ff_vsrc_zoneplate = { + .p.name = "zoneplate", + .p.description = NULL_IF_CONFIG_SMALL("Generate zone-plate."), + .p.priv_class = &zoneplate_class, + .p.flags = AVFILTER_FLAG_SLICE_THREADS, .priv_size = sizeof(TestSourceContext), - .priv_class = &zoneplate_class, .init = init, .uninit = uninit, .activate = activate, - .inputs = NULL, FILTER_OUTPUTS(avfilter_vsrc_zoneplate_outputs), FILTER_QUERY_FUNC2(zoneplate_query_formats), - .flags = AVFILTER_FLAG_SLICE_THREADS, .process_command = ff_filter_process_command, }; diff --git a/libavfilter/vsrc_testsrc_vulkan.c b/libavfilter/vsrc_testsrc_vulkan.c index a7a801aabe..cb3c787213 100644 --- a/libavfilter/vsrc_testsrc_vulkan.c +++ b/libavfilter/vsrc_testsrc_vulkan.c @@ -364,17 +364,17 @@ static const AVFilterPad testsrc_vulkan_outputs[] = { }, }; -const AVFilter ff_vsrc_color_vulkan = { - .name = "color_vulkan", - .description = NULL_IF_CONFIG_SMALL("Generate a constant color (Vulkan)"), +const FFFilter ff_vsrc_color_vulkan = { + .p.name = "color_vulkan", + .p.description = NULL_IF_CONFIG_SMALL("Generate a constant color (Vulkan)"), + .p.inputs = NULL, + .p.flags = AVFILTER_FLAG_HWDEVICE, + .p.priv_class = &color_vulkan_class, .priv_size = sizeof(TestSrcVulkanContext), .init = &ff_vk_filter_init, .uninit = &testsrc_vulkan_uninit, - .inputs = NULL, - .flags = AVFILTER_FLAG_HWDEVICE, .activate = testsrc_vulkan_activate, FILTER_OUTPUTS(testsrc_vulkan_outputs), FILTER_SINGLE_PIXFMT(AV_PIX_FMT_VULKAN), - .priv_class = &color_vulkan_class, .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, };