[FFmpeg-devel] [PATCH] lavfi: remove alphaextract special code
Clément Bœsch
ubitux at gmail.com
Wed May 8 21:58:56 CEST 2013
On Wed, May 08, 2013 at 07:49:55PM +0000, Paul B Mahol wrote:
[...]
> diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c
> index 6000748..78b4c78 100644
> --- a/libavfilter/vf_extractplanes.c
> +++ b/libavfilter/vf_extractplanes.c
> @@ -296,6 +296,8 @@ static const AVFilterPad extractplanes_inputs[] = {
> { NULL }
> };
>
What happened if extractplanes is disabled but alphaextract enabled? Only
unused warnings?
> +#if CONFIG_ALPHAEXTRACT_FILTER
> +
> AVFilter avfilter_vf_extractplanes = {
> .name = "extractplanes",
> .description = NULL_IF_CONFIG_SMALL("Extract planes as grayscale frames."),
> @@ -308,3 +310,26 @@ AVFilter avfilter_vf_extractplanes = {
> .outputs = NULL,
> .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
> };
> +
> +static int init_alphaextract(AVFilterContext *ctx)
> +{
> + ExtractPlanesContext *e = ctx->priv;
> +
> + e->requested_planes = PLANE_A;
> +
av_log "deprecated..."?
> + 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,
Note: I think those filters can support timeline.
> +};
> +#endif /* CONFIG_ALPHAEXTRACT_FILTER */
Thanks for doing this
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130508/c05d3b9a/attachment.asc>
More information about the ffmpeg-devel
mailing list