mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/vf_lagfun: add timeline support
This commit is contained in:
parent
27b5d0e1e4
commit
05b394d537
|
@ -104,8 +104,12 @@ static int lagfun_frame8(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs
|
|||
float v = FFMAX(src[x], osrc[x] * decay);
|
||||
|
||||
osrc[x] = v;
|
||||
if (ctx->is_disabled) {
|
||||
dst[x] = src[x];
|
||||
} else {
|
||||
dst[x] = lrintf(v);
|
||||
}
|
||||
}
|
||||
|
||||
src += in->linesize[p];
|
||||
osrc += s->planewidth[p];
|
||||
|
@ -143,8 +147,12 @@ static int lagfun_frame16(AVFilterContext *ctx, void *arg, int jobnr, int nb_job
|
|||
float v = FFMAX(src[x], osrc[x] * decay);
|
||||
|
||||
osrc[x] = v;
|
||||
if (ctx->is_disabled) {
|
||||
dst[x] = src[x];
|
||||
} else {
|
||||
dst[x] = lrintf(v);
|
||||
}
|
||||
}
|
||||
|
||||
src += in->linesize[p] / 2;
|
||||
osrc += s->planewidth[p];
|
||||
|
@ -256,6 +264,6 @@ AVFilter ff_vf_lagfun = {
|
|||
.uninit = uninit,
|
||||
.outputs = outputs,
|
||||
.inputs = inputs,
|
||||
.flags = AVFILTER_FLAG_SLICE_THREADS,
|
||||
.flags = AVFILTER_FLAG_SLICE_THREADS | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL,
|
||||
.process_command = ff_filter_process_command,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue