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