frontends/va: enable sao in hevc encoding
authorRuijing Dong <ruijing.dong@amd.com>
Fri, 16 Sep 2022 00:57:52 +0000 (20:57 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 20 Sep 2022 02:54:48 +0000 (02:54 +0000)
enable sao feature from config attribute. by default
from vcn2, hevc encoding enables sao.

Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Reviewed-by: Sil Vilerino <sivileri@microsoft.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18626>

src/gallium/drivers/radeonsi/si_get.c

index 2559cfd..76d89cb 100644 (file)
@@ -625,6 +625,19 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil
             return 0;
       case PIPE_VIDEO_CAP_ENC_SUPPORTS_MAX_FRAME_SIZE:
          return (sscreen->info.family >= CHIP_RAVEN) ? 1 : 0;
+
+      case PIPE_VIDEO_CAP_ENC_HEVC_FEATURE_FLAGS:
+         if ((sscreen->info.family >= CHIP_RENOIR) &&
+                  (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN ||
+                   profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)) {
+            union pipe_h265_enc_cap_features pipe_features;
+            pipe_features.value = 0;
+
+            pipe_features.bits.sao = PIPE_H265_ENC_FEATURE_SUPPORTED;
+            return pipe_features.value;
+         } else
+            return 0;
+
       default:
          return 0;
       }