diff options
Diffstat (limited to 'libavfilter/vf_extractplanes.c')
-rw-r--r-- | libavfilter/vf_extractplanes.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c index 6000748af9..229e3d5ffa 100644 --- a/libavfilter/vf_extractplanes.c +++ b/libavfilter/vf_extractplanes.c @@ -308,3 +308,28 @@ AVFilter avfilter_vf_extractplanes = { .outputs = NULL, .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, }; + +#if CONFIG_ALPHAEXTRACT_FILTER + +static int init_alphaextract(AVFilterContext *ctx) +{ + ExtractPlanesContext *e = ctx->priv; + + e->requested_planes = PLANE_A; + + return init(ctx); +} + +AVFilter avfilter_vf_alphaextract = { + .name = "alphaextract", + .description = NULL_IF_CONFIG_SMALL("Extract an alpha channel as a " + "grayscale image component."), + .priv_size = sizeof(ExtractPlanesContext), + .init = init_alphaextract, + .uninit = uninit, + .query_formats = query_formats, + .inputs = extractplanes_inputs, + .outputs = NULL, + .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS, +}; +#endif /* CONFIG_ALPHAEXTRACT_FILTER */ |