Unified · Split
| @@ -354,14 +354,12 @@ static const AVFilterPad neighbor_outputs[] = { · 353 unmodified lines | ||
| 354 | 354 | #define OFFSET(x) offsetof(NContext, x) |
| 355 | 355 | #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM |
| 356 | 356 | |
| 357 | −#define DEFINE_NEIGHBOR_FILTER(name_, description_) \ | |
| 358 | −AVFILTER_DEFINE_CLASS(name_); \ | |
| 359 | − \ | |
| 357 | +#define DEFINE_NEIGHBOR_FILTER(name_, description_, priv_class_) \ | |
| 360 | 358 | const AVFilter ff_vf_##name_ = { \ |
| 361 | 359 | .name = #name_, \ |
| 362 | 360 | .description = NULL_IF_CONFIG_SMALL(description_), \ |
| 361 | + .priv_class = &priv_class_##_class, \ | |
| 363 | 362 | .priv_size = sizeof(NContext), \ |
| 364 | − .priv_class = &name_##_class, \ | |
| 365 | 363 | .query_formats = query_formats, \ |
| 366 | 364 | FILTER_INPUTS(neighbor_inputs), \ |
| 367 | 365 | FILTER_OUTPUTS(neighbor_outputs), \ |
| @@ -384,30 +382,31 @@ static const AVOption options[] = { · 16 unmodified lines | ||
| 384 | 382 | { NULL } |
| 385 | 383 | }; |
| 386 | 384 | |
| 385 | +AVFILTER_DEFINE_CLASS_EXT(erosion_dilation, "erosion/dilation", options); | |
| 386 | + | |
| 387 | 387 | #if CONFIG_EROSION_FILTER |
| 388 | 388 | |
| 389 | −#define erosion_options options | |
| 390 | −DEFINE_NEIGHBOR_FILTER(erosion, "Apply erosion effect."); | |
| 389 | +DEFINE_NEIGHBOR_FILTER(erosion, "Apply erosion effect.", erosion_dilation); | |
| 391 | 390 | |
| 392 | 391 | #endif /* CONFIG_EROSION_FILTER */ |
| 393 | 392 | |
| 394 | 393 | #if CONFIG_DILATION_FILTER |
| 395 | 394 | |
| 396 | −#define dilation_options options | |
| 397 | −DEFINE_NEIGHBOR_FILTER(dilation, "Apply dilation effect."); | |
| 395 | +DEFINE_NEIGHBOR_FILTER(dilation, "Apply dilation effect.", erosion_dilation); | |
| 398 | 396 | |
| 399 | 397 | #endif /* CONFIG_DILATION_FILTER */ |
| 400 | 398 | |
| 399 | +AVFILTER_DEFINE_CLASS_EXT(deflate_inflate, "deflate/inflate", | |
| 400 | + &options[DEINFLATE_OPTIONS_OFFSET]); | |
| 401 | + | |
| 401 | 402 | #if CONFIG_DEFLATE_FILTER |
| 402 | 403 | |
| 403 | −#define deflate_options &options[DEINFLATE_OPTIONS_OFFSET] | |
| 404 | −DEFINE_NEIGHBOR_FILTER(deflate, "Apply deflate effect."); | |
| 404 | +DEFINE_NEIGHBOR_FILTER(deflate, "Apply deflate effect.", deflate_inflate); | |
| 405 | 405 | |
| 406 | 406 | #endif /* CONFIG_DEFLATE_FILTER */ |
| 407 | 407 | |
| 408 | 408 | #if CONFIG_INFLATE_FILTER |
| 409 | 409 | |
| 410 | −#define inflate_options &options[DEINFLATE_OPTIONS_OFFSET] | |
| 411 | −DEFINE_NEIGHBOR_FILTER(inflate, "Apply inflate effect."); | |
| 410 | +DEFINE_NEIGHBOR_FILTER(inflate, "Apply inflate effect.", deflate_inflate); | |
| 412 | 411 | |
| 413 | 412 | #endif /* CONFIG_INFLATE_FILTER */ |