diff options
author | James Almer <jamrial@gmail.com> | 2023-04-12 11:38:46 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2023-05-04 18:14:11 -0300 |
commit | 36827ea783afbb39e5b75e8a982e316739009773 (patch) | |
tree | 745980f298dd29d5e56f5d0480e3d837cc8cc0e5 /libavfilter/vf_w3fdif.c | |
parent | 2f561ba953e23887ddb25ab1b6739aab04ff9115 (diff) | |
download | ffmpeg-36827ea783afbb39e5b75e8a982e316739009773.tar.gz |
avfilter: use the new AVFrame interlace flags in all filters
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter/vf_w3fdif.c')
-rw-r--r-- | libavfilter/vf_w3fdif.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c index 512c8070c7..7c3ffbc5f0 100644 --- a/libavfilter/vf_w3fdif.c +++ b/libavfilter/vf_w3fdif.c @@ -379,8 +379,8 @@ static int deinterlace_plane_slice(AVFilterContext *ctx, void *arg, const int start = (height * jobnr) / nb_jobs; const int end = (height * (jobnr+1)) / nb_jobs; const int max = s->max; - const int interlaced = cur->interlaced_frame; - const int tff = s->field == (s->parity == -1 ? interlaced ? cur->top_field_first : 1 : + const int interlaced = !!(cur->flags & AV_FRAME_FLAG_INTERLACED); + const int tff = s->field == (s->parity == -1 ? interlaced ? !!(cur->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) : 1 : s->parity ^ 1); int j, y_in, y_out; @@ -487,6 +487,7 @@ static int filter(AVFilterContext *ctx, int is_second) return AVERROR(ENOMEM); av_frame_copy_props(out, s->cur); out->interlaced_frame = 0; + out->flags &= ~AV_FRAME_FLAG_INTERLACED; if (!is_second) { if (out->pts != AV_NOPTS_VALUE) @@ -533,7 +534,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) if (!s->prev) return 0; - if ((s->deint && !s->cur->interlaced_frame) || ctx->is_disabled) { + if ((s->deint && !(s->cur->flags & AV_FRAME_FLAG_INTERLACED)) || ctx->is_disabled) { AVFrame *out = av_frame_clone(s->cur); if (!out) return AVERROR(ENOMEM); |