summaryrefslogtreecommitdiff
path: root/libavfilter/vf_idet.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2023-04-12 14:18:50 -0300
committerJames Almer <jamrial@gmail.com>2023-05-04 18:15:00 -0300
commit599abc0f3a0c6a1d9746a3098cd444a45471a160 (patch)
tree651d3f6d2669c2b7f487cccb2e708a481d0213a9 /libavfilter/vf_idet.c
parent3675dd0e0c8892151441a02ed0c5dee72a111c81 (diff)
avutil/frame: deprecate interlaced_frame and top_field_first
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavfilter/vf_idet.c')
-rw-r--r--libavfilter/vf_idet.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c
index 0f150a273d..abd375230a 100644
--- a/libavfilter/vf_idet.c
+++ b/libavfilter/vf_idet.c
@@ -183,16 +183,28 @@ static void filter(AVFilterContext *ctx)
}
if (idet->last_type == TFF){
+#if FF_API_INTERLACED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
idet->cur->top_field_first = 1;
idet->cur->interlaced_frame = 1;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
idet->cur->flags |= (AV_FRAME_FLAG_INTERLACED | AV_FRAME_FLAG_TOP_FIELD_FIRST);
}else if(idet->last_type == BFF){
+#if FF_API_INTERLACED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
idet->cur->top_field_first = 0;
idet->cur->interlaced_frame = 1;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
idet->cur->flags &= ~AV_FRAME_FLAG_TOP_FIELD_FIRST;
idet->cur->flags |= AV_FRAME_FLAG_INTERLACED;
}else if(idet->last_type == PROGRESSIVE){
+#if FF_API_INTERLACED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
idet->cur->interlaced_frame = 0;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
idet->cur->flags &= ~AV_FRAME_FLAG_INTERLACED;
}
@@ -248,7 +260,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
}
if (idet->analyze_interlaced_flag_done) {
if ((picref->flags & AV_FRAME_FLAG_INTERLACED) && idet->interlaced_flag_accuracy < 0) {
+#if FF_API_INTERLACED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
picref->interlaced_frame = 0;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
picref->flags &= ~AV_FRAME_FLAG_INTERLACED;
}
return ff_filter_frame(ctx->outputs[0], picref);
@@ -289,7 +305,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
if (idet->analyze_interlaced_flag) {
if (idet->cur->flags & AV_FRAME_FLAG_INTERLACED) {
+#if FF_API_INTERLACED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
idet->cur->interlaced_frame = 0;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
idet->cur->flags &= ~AV_FRAME_FLAG_INTERLACED;
filter(ctx);
if (idet->last_type == PROGRESSIVE) {
@@ -303,7 +323,11 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref)
ff_filter_frame(ctx->outputs[0], av_frame_clone(idet->cur));
if ((idet->next->flags & AV_FRAME_FLAG_INTERLACED) && idet->interlaced_flag_accuracy < 0) {
+#if FF_API_INTERLACED_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
idet->next->interlaced_frame = 0;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
idet->next->flags &= ~AV_FRAME_FLAG_INTERLACED;
}
idet->analyze_interlaced_flag_done = 1;