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