[FFmpeg-cvslog] avfilter/libplacebo: only mark frame fields when deinterlacing

Niklas Haas git at videolan.org
Thu Feb 27 20:02:24 EET 2025


ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Sun Feb 16 16:22:07 2025 +0100| [123cccb62104e3cdbe992aa6c55643fcfbdf7993] | committer: Niklas Haas

avfilter/libplacebo: only mark frame fields when deinterlacing

Avoids an unnecessary copy of the frame in the frame queue when not
deinterlacing anyways.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=123cccb62104e3cdbe992aa6c55643fcfbdf7993
---

 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 6330725134..70351131a8 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -969,7 +969,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,



More information about the ffmpeg-cvslog mailing list