From: Thong Thai Date: Fri, 28 Feb 2020 15:15:17 +0000 (-0500) Subject: st/va: remove unneeded code X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09323634898ab3efc0150dc7d756bf36b1b89b76;p=mesa.git 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 Reviewed-by: Leo Liu Tested-by: Marge Bot Part-of: --- 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);