mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-31 20:02:07 +00:00
avfilter/vf_neighbor: Deduplicate AVClasses
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
31adb960b7
commit
443706d937
@ -354,14 +354,12 @@ static const AVFilterPad neighbor_outputs[] = {
|
||||
#define OFFSET(x) offsetof(NContext, x)
|
||||
#define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
|
||||
|
||||
#define DEFINE_NEIGHBOR_FILTER(name_, description_) \
|
||||
AVFILTER_DEFINE_CLASS(name_); \
|
||||
\
|
||||
#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, \
|
||||
.priv_size = sizeof(NContext), \
|
||||
.priv_class = &name_##_class, \
|
||||
.query_formats = query_formats, \
|
||||
FILTER_INPUTS(neighbor_inputs), \
|
||||
FILTER_OUTPUTS(neighbor_outputs), \
|
||||
@ -384,30 +382,31 @@ static const AVOption options[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
AVFILTER_DEFINE_CLASS_EXT(erosion_dilation, "erosion/dilation", options);
|
||||
|
||||
#if CONFIG_EROSION_FILTER
|
||||
|
||||
#define erosion_options options
|
||||
DEFINE_NEIGHBOR_FILTER(erosion, "Apply erosion effect.");
|
||||
DEFINE_NEIGHBOR_FILTER(erosion, "Apply erosion effect.", erosion_dilation);
|
||||
|
||||
#endif /* CONFIG_EROSION_FILTER */
|
||||
|
||||
#if CONFIG_DILATION_FILTER
|
||||
|
||||
#define dilation_options options
|
||||
DEFINE_NEIGHBOR_FILTER(dilation, "Apply dilation effect.");
|
||||
DEFINE_NEIGHBOR_FILTER(dilation, "Apply dilation effect.", erosion_dilation);
|
||||
|
||||
#endif /* CONFIG_DILATION_FILTER */
|
||||
|
||||
AVFILTER_DEFINE_CLASS_EXT(deflate_inflate, "deflate/inflate",
|
||||
&options[DEINFLATE_OPTIONS_OFFSET]);
|
||||
|
||||
#if CONFIG_DEFLATE_FILTER
|
||||
|
||||
#define deflate_options &options[DEINFLATE_OPTIONS_OFFSET]
|
||||
DEFINE_NEIGHBOR_FILTER(deflate, "Apply deflate effect.");
|
||||
DEFINE_NEIGHBOR_FILTER(deflate, "Apply deflate effect.", deflate_inflate);
|
||||
|
||||
#endif /* CONFIG_DEFLATE_FILTER */
|
||||
|
||||
#if CONFIG_INFLATE_FILTER
|
||||
|
||||
#define inflate_options &options[DEINFLATE_OPTIONS_OFFSET]
|
||||
DEFINE_NEIGHBOR_FILTER(inflate, "Apply inflate effect.");
|
||||
DEFINE_NEIGHBOR_FILTER(inflate, "Apply inflate effect.", deflate_inflate);
|
||||
|
||||
#endif /* CONFIG_INFLATE_FILTER */
|
||||
|
Loading…
Reference in New Issue
Block a user