Module: Mesa
Branch: master
Commit: 09323634898ab3efc0150dc7d756bf36b1b89b76
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=09323634898ab3efc0150dc7d756bf36b1b89b76

Author: Thong Thai <[email protected]>
Date:   Fri Feb 28 10:15:17 2020 -0500

st/va: remove unneeded code

No need to explicitly set the 10-bit buffer format as the correct
buffer format will be allocated later

Signed-off-by: Thong Thai <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
Tested-by: Marge Bot 
<https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3998>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3998>

---

 src/gallium/state_trackers/va/surface.c | 34 ++++++++++++---------------------
 1 file changed, 12 insertions(+), 22 deletions(-)

diff --git a/src/gallium/state_trackers/va/surface.c 
b/src/gallium/state_trackers/va/surface.c
index 495a68b492c..bfad93f8f3d 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -754,28 +754,18 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int 
format,
 
    memset(&templat, 0, sizeof(templat));
 
-   if (format == VA_RT_FORMAT_YUV420_10BPP)
-   {
-      templat.buffer_format = PIPE_FORMAT_P010;
-      templat.interlaced = false;
-   }
-   else
-   {
-      templat.buffer_format = pscreen->get_video_param(
-         pscreen,
-         PIPE_VIDEO_PROFILE_UNKNOWN,
-         PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
-         PIPE_VIDEO_CAP_PREFERED_FORMAT
-      );
-      templat.interlaced = pscreen->get_video_param(
-         pscreen,
-         PIPE_VIDEO_PROFILE_UNKNOWN,
-         PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
-         PIPE_VIDEO_CAP_PREFERS_INTERLACED
-      );
-   }
-   
-
+   templat.buffer_format = pscreen->get_video_param(
+      pscreen,
+      PIPE_VIDEO_PROFILE_UNKNOWN,
+      PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+      PIPE_VIDEO_CAP_PREFERED_FORMAT
+   );
+   templat.interlaced = pscreen->get_video_param(
+      pscreen,
+      PIPE_VIDEO_PROFILE_UNKNOWN,
+      PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
+      PIPE_VIDEO_CAP_PREFERS_INTERLACED
+   );
 
    if (expected_fourcc) {
       enum pipe_format expected_format = VaFourccToPipeFormat(expected_fourcc);

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to