diff options
Diffstat (limited to 'libavfilter/vf_alphamerge.c')
-rw-r--r-- | libavfilter/vf_alphamerge.c | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c index 51868de..1ec9d00 100644 --- a/libavfilter/vf_alphamerge.c +++ b/libavfilter/vf_alphamerge.c @@ -176,6 +176,37 @@ static int request_frame(AVFilterLink *outlink) return 0; } +static const AVFilterPad alphamerge_inputs[] = { + { + .name = "main", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_input_main, + .get_video_buffer = ff_null_get_video_buffer, + .start_frame = start_frame, + .draw_slice = draw_slice, + .end_frame = end_frame, + .min_perms = AV_PERM_READ | AV_PERM_WRITE | AV_PERM_PRESERVE, + },{ + .name = "alpha", + .type = AVMEDIA_TYPE_VIDEO, + .start_frame = start_frame, + .draw_slice = draw_slice, + .end_frame = end_frame, + .min_perms = AV_PERM_READ | AV_PERM_PRESERVE, + }, + { NULL } +}; + +static const AVFilterPad alphamerge_outputs[] = { + { + .name = "default", + .type = AVMEDIA_TYPE_VIDEO, + .config_props = config_output, + .request_frame = request_frame, + }, + { NULL } +}; + AVFilter avfilter_vf_alphamerge = { .name = "alphamerge", .description = NULL_IF_CONFIG_SMALL("Copy the luma value of the second " @@ -183,29 +214,6 @@ AVFilter avfilter_vf_alphamerge = { .uninit = uninit, .priv_size = sizeof(AlphaMergeContext), .query_formats = query_formats, - - .inputs = (const AVFilterPad[]) { - { .name = "main", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_input_main, - .get_video_buffer = ff_null_get_video_buffer, - .start_frame = start_frame, - .draw_slice = draw_slice, - .end_frame = end_frame, - .min_perms = AV_PERM_READ | AV_PERM_WRITE | AV_PERM_PRESERVE }, - { .name = "alpha", - .type = AVMEDIA_TYPE_VIDEO, - .start_frame = start_frame, - .draw_slice = draw_slice, - .end_frame = end_frame, - .min_perms = AV_PERM_READ | AV_PERM_PRESERVE }, - { .name = NULL } - }, - .outputs = (const AVFilterPad[]) { - { .name = "default", - .type = AVMEDIA_TYPE_VIDEO, - .config_props = config_output, - .request_frame = request_frame }, - { .name = NULL } - }, + .inputs = alphamerge_inputs, + .outputs = alphamerge_outputs, }; |