Mesa (main): radeonsi: add PIPE_FORMAT_P010 for HEVC Main10 profile to encode param

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 8 14:15:50 UTC 2021


Module: Mesa
Branch: main
Commit: 8ddba3b5eade790d6a9d5faeecb0f83b93cdbd3f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ddba3b5eade790d6a9d5faeecb0f83b93cdbd3f

Author: Leo Liu <leo.liu at amd.com>
Date:   Sat Jun  5 17:03:32 2021 -0400

radeonsi: add PIPE_FORMAT_P010 for HEVC Main10 profile to encode param

The format can be queried through the encode entrypoint

Signed-off-by: Leo Liu <leo.liu at amd.com>
Reviewed-by: James Zhu <James.Zhu at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11201>

---

 src/gallium/drivers/radeonsi/si_get.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
index 569515a87d1..a2d3fc3ebe4 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -538,7 +538,10 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil
          else
             return (sscreen->info.family < CHIP_TONGA) ? 1152 : 2304;
       case PIPE_VIDEO_CAP_PREFERED_FORMAT:
-         return PIPE_FORMAT_NV12;
+         if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)
+            return PIPE_FORMAT_P010;
+         else
+            return PIPE_FORMAT_NV12;
       case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
          return false;
       case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED:



More information about the mesa-commit mailing list