History

avfilter/vf_alphamerge: add timeline support

Paul B Mahol committed 6 years ago

Commit cbd5a451 parent a8d82cc1 file · +11 −1Browse files

Showing the changes to libavfilter (1 of 1 file). Show all

Unified · Split

libavfilter/vf_alphamerge.c+11−1
@@ -26,6 +26,7 @@ · 25 unmodified lines
26#include <string.h>26#include <string.h>
27 27
28#include "libavutil/imgutils.h"28#include "libavutil/imgutils.h"
29#include "libavutil/opt.h"
29#include "libavutil/pixfmt.h"30#include "libavutil/pixfmt.h"
30#include "avfilter.h"31#include "avfilter.h"
31#include "drawutils.h"32#include "drawutils.h"
@@ -154,7 +155,8 @@ static int activate(AVFilterContext *ctx) · 122 unmodified lines
154 }155 }
155 156
156 if (s->main_frame && s->alpha_frame) {157 if (s->main_frame && s->alpha_frame) {
157 draw_frame(ctx, s->main_frame, s->alpha_frame);158 if (!ctx->is_disabled)
159 draw_frame(ctx, s->main_frame, s->alpha_frame);
158 ret = ff_filter_frame(outlink, s->main_frame);160 ret = ff_filter_frame(outlink, s->main_frame);
159 av_frame_free(&s->alpha_frame);161 av_frame_free(&s->alpha_frame);
160 s->main_frame = NULL;162 s->main_frame = NULL;
@@ -203,13 +205,21 @@ static const AVFilterPad alphamerge_outputs[] = { · 42 unmodified lines
203 { NULL }205 { NULL }
204};206};
205 207
208static const AVOption alphamerge_options[] = {
209 { NULL }
210};
211
212AVFILTER_DEFINE_CLASS(alphamerge);
213
206AVFilter ff_vf_alphamerge = {214AVFilter ff_vf_alphamerge = {
207 .name = "alphamerge",215 .name = "alphamerge",
208 .description = NULL_IF_CONFIG_SMALL("Copy the luma value of the second "216 .description = NULL_IF_CONFIG_SMALL("Copy the luma value of the second "
209 "input into the alpha channel of the first input."),217 "input into the alpha channel of the first input."),
210 .priv_size = sizeof(AlphaMergeContext),218 .priv_size = sizeof(AlphaMergeContext),
219 .priv_class = &alphamerge_class,
211 .query_formats = query_formats,220 .query_formats = query_formats,
212 .inputs = alphamerge_inputs,221 .inputs = alphamerge_inputs,
213 .outputs = alphamerge_outputs,222 .outputs = alphamerge_outputs,
214 .activate = activate,223 .activate = activate,
224 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
215};225};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t