History

avfilter/vf_amplify: add timeline support

Paul B Mahol committed 6 years ago

Commit 55ca21d1 parent 103effe1 file · +16 −9Browse files

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

Unified · Split

libavfilter/vf_amplify.c+16−9
@@ -259,14 +259,21 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) · 258 unmodified lines
259 s->frames[s->nb_inputs - 1] = in;259 s->frames[s->nb_inputs - 1] = in;
260 }260 }
261 261
262 out = ff_get_video_buffer(outlink, outlink->w, outlink->h);262 if (!ctx->is_disabled) {
263 if (!out)263 out = ff_get_video_buffer(outlink, outlink->w, outlink->h);
264 return AVERROR(ENOMEM);264 if (!out)
265 out->pts = s->frames[0]->pts;265 return AVERROR(ENOMEM);
266 266 av_frame_copy_props(out, s->frames[0]);
267 td.out = out;267
268 td.in = s->frames;268 td.out = out;
269 ctx->internal->execute(ctx, amplify_frame, &td, NULL, FFMIN(s->height[1], ff_filter_get_nb_threads(ctx)));269 td.in = s->frames;
270 ctx->internal->execute(ctx, amplify_frame, &td, NULL, FFMIN(s->height[1], ff_filter_get_nb_threads(ctx)));
271 } else {
272 out = av_frame_clone(s->frames[s->radius]);
273 if (!out)
274 return AVERROR(ENOMEM);
275 out->pts = s->frames[0]->pts;
276 }
270 277
271 return ff_filter_frame(outlink, out);278 return ff_filter_frame(outlink, out);
272}279}
@@ -316,6 +323,6 @@ AVFilter ff_vf_amplify = { · 43 unmodified lines
316 .inputs = inputs,323 .inputs = inputs,
317 .init = init,324 .init = init,
318 .uninit = uninit,325 .uninit = uninit,
319 .flags = AVFILTER_FLAG_SLICE_THREADS,326 .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL | AVFILTER_FLAG_SLICE_THREADS,
320 .process_command = ff_filter_process_command,327 .process_command = ff_filter_process_command,
321};328};

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