radeonsi: enable uvd encode for HEVC main
authorJames Zhu <James.Zhu@amd.com>
Mon, 5 Feb 2018 17:02:50 +0000 (12:02 -0500)
committerLeo Liu <leo.liu@amd.com>
Wed, 21 Feb 2018 18:53:38 +0000 (13:53 -0500)
Enable UVD encode for HEVC main profile

Signed-off-by: James Zhu <James.Zhu@amd.com>
Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
src/gallium/drivers/radeonsi/si_get.c

index 6e6149a39efb4ae66033890e863b8e80ad182405..ea1ac1134cfaa4a6502bf63f71abc5ab0e67b181 100644 (file)
@@ -24,6 +24,7 @@
 #include "si_pipe.h"
 #include "radeon/radeon_video.h"
 #include "radeon/radeon_vce.h"
+#include "radeon/radeon_uvd_enc.h"
 #include "ac_llvm_util.h"
 #include "vl/vl_decoder.h"
 #include "vl/vl_video_buffer.h"
@@ -582,7 +583,8 @@ static int si_get_video_param(struct pipe_screen *screen,
                                (si_vce_is_fw_version_supported(sscreen) ||
                                sscreen->info.family == CHIP_RAVEN)) ||
                                (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN &&
-                               sscreen->info.family == CHIP_RAVEN);
+                               (sscreen->info.family == CHIP_RAVEN ||
+                               si_radeon_uvd_enc_supported(sscreen)));
                case PIPE_VIDEO_CAP_NPOT_TEXTURES:
                        return 1;
                case PIPE_VIDEO_CAP_MAX_WIDTH: