[FFmpeg-devel] [PATCH] lavfi: remove alphaextract special code
Paul B Mahol
onemda at gmail.com
Wed May 8 22:04:04 CEST 2013
On 5/8/13, Clement Boesch <ubitux at gmail.com> wrote:
> 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?
Well spotted, added deps for it.
>
>> +#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..."?
Could be added it if its really wanted...
>
>> + 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
>
> --
> Clement B.
>
More information about the ffmpeg-devel
mailing list