[FFmpeg-devel] [PATCH 3/5] avfilter/libplacebo: only mark frame fields when deinterlacing
Niklas Haas
ffmpeg at haasn.xyz
Sun Feb 16 17:58:53 EET 2025
From: Niklas Haas <git at haasn.dev>
Avoids an unnecessary copy of the frame in the frame queue when not
deinterlacing anyways.
---
libavfilter/vf_libplacebo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index fbbc9d5cb7..933b086b69 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -972,7 +972,7 @@ static int handle_input(AVFilterContext *ctx, LibplaceboInput *input)
pl_queue_push(input->queue, &(struct pl_source_frame) {
.pts = in->pts * av_q2d(inlink->time_base),
.duration = in->duration * av_q2d(inlink->time_base),
- .first_field = pl_field_from_avframe(in),
+ .first_field = s->deinterlace ? pl_field_from_avframe(in) : PL_FIELD_NONE,
.frame_data = in,
.map = map_frame,
.unmap = unmap_frame,
--
2.47.0
More information about the ffmpeg-devel
mailing list