Mesa (staging/21.2): frontends/va/postproc: Keep track of deinterlacing method being used

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Aug 9 21:47:00 UTC 2021


Module: Mesa
Branch: staging/21.2
Commit: ae1c19cc9e35603791d686c4cdbe36e5c56b2bad
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae1c19cc9e35603791d686c4cdbe36e5c56b2bad

Author: Thong Thai <thong.thai at amd.com>
Date:   Fri Aug  6 14:42:44 2021 -0400

frontends/va/postproc: Keep track of deinterlacing method being used

When transcoding a video, the context used by decode/postproc process
might be different from that of the encoder, but we encoder needs to
know if deinterlacing was used.

Fixes: c5088b49729 ("gallium: Fix VAAPI postproc blit")
Signed-off-by: Thong Thai <thong.thai at amd.com>
Reviewed-by: Leo Liu <leo.liu at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12251>
(cherry picked from commit 3cafe333e99f8ce77c742543a47f3700852b44ea)

---

 .pick_status.json                   | 2 +-
 src/gallium/frontends/va/postproc.c | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 614c013b2ce..8f7631ded90 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -535,7 +535,7 @@
         "description": "frontends/va/postproc: Keep track of deinterlacing method being used",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "c5088b497290ba1207085899ec635ef851635267"
     },
diff --git a/src/gallium/frontends/va/postproc.c b/src/gallium/frontends/va/postproc.c
index 162994d88fd..88d7d81619d 100644
--- a/src/gallium/frontends/va/postproc.c
+++ b/src/gallium/frontends/va/postproc.c
@@ -222,7 +222,7 @@ static VAStatus vlVaPostProcBlit(vlVaDriver *drv, vlVaContext *context,
 
       if (drv->pipe->screen->get_param(drv->pipe->screen,
                                        PIPE_CAP_PREFER_COMPUTE_FOR_MULTIMEDIA))
-         util_compute_blit(drv->pipe, &blit, &context->blit_cs);
+         util_compute_blit(drv->pipe, &blit, &context->blit_cs, !drv->compositor.deinterlace);
       else
          drv->pipe->blit(drv->pipe, &blit);
    }
@@ -281,7 +281,7 @@ vlVaApplyDeint(vlVaDriver *drv, vlVaContext *context,
 VAStatus
 vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf)
 {
-   enum vl_compositor_deinterlace deinterlace = VL_COMPOSITOR_WEAVE;
+   enum vl_compositor_deinterlace deinterlace = VL_COMPOSITOR_NONE;
    VARectangle def_src_region, def_dst_region;
    const VARectangle *src_region, *dst_region;
    VAProcPipelineParameterBuffer *param;
@@ -349,12 +349,13 @@ vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *contex
          case VAProcDeinterlacingMotionAdaptive:
             src = vlVaApplyDeint(drv, context, param, src,
 				 !!(deint->flags & VA_DEINTERLACING_BOTTOM_FIELD));
+             deinterlace = VL_COMPOSITOR_MOTION_ADAPTIVE;
             break;
 
          default:
             return VA_STATUS_ERROR_UNIMPLEMENTED;
          }
-
+         drv->compositor.deinterlace = deinterlace;
          break;
       }
 



More information about the mesa-commit mailing list