From a642ff15a6e6692b31a01a216787e685d70ec63f Mon Sep 17 00:00:00 2001 From: David Rosca Date: Mon, 23 Dec 2024 10:34:47 +0100 Subject: [PATCH] frontends/va: Fix deinterlace filter Deinterlace filter uses interlaced buffer for output which needs to be converted to progressive. Add back code that handles this. Fixes: c324364f392 ("frontends/va: Only use interlaced surfaces when progressive is not supported") Reviewed-by: David (Ming Qiang) Wu Part-of: --- src/gallium/frontends/va/postproc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gallium/frontends/va/postproc.c b/src/gallium/frontends/va/postproc.c index 45b76013b0f..ae24aed17c3 100644 --- a/src/gallium/frontends/va/postproc.c +++ b/src/gallium/frontends/va/postproc.c @@ -415,6 +415,15 @@ static VAStatus vlVaPostProcBlit(vlVaDriver *drv, vlVaContext *context, return VA_STATUS_SUCCESS; } + if (src->interlaced != dst->interlaced) { + deinterlace = deinterlace ? deinterlace : VL_COMPOSITOR_WEAVE; + vl_compositor_yuv_deint_full(&drv->cstate, &drv->compositor, + src, dst, &src_rect, &dst_rect, + deinterlace); + + return VA_STATUS_SUCCESS; + } + for (i = 0; i < VL_MAX_SURFACES; ++i) { struct pipe_surface *from = src_surfaces[i]; struct pipe_blit_info blit;