radeonsi: enable 8K video decode support for HEVC and VP9
authorLeo Liu <leo.liu@amd.com>
Mon, 28 Oct 2019 17:17:04 +0000 (13:17 -0400)
committerLeo Liu <leo.liu@amd.com>
Wed, 30 Oct 2019 16:43:04 +0000 (12:43 -0400)
HW 8K decode support starts at Renoir

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
src/gallium/drivers/radeonsi/si_get.c

index 4a7b9e3c5fc70da91b0e74faa0ca6a7defe7cc0d..9458f6b959a43afec96a80976d55cfe6f1413ea8 100644 (file)
@@ -667,9 +667,25 @@ static int si_get_video_param(struct pipe_screen *screen,
        case PIPE_VIDEO_CAP_NPOT_TEXTURES:
                return 1;
        case PIPE_VIDEO_CAP_MAX_WIDTH:
-               return (sscreen->info.family < CHIP_TONGA) ? 2048 : 4096;
+               switch (codec) {
+               case PIPE_VIDEO_FORMAT_HEVC:
+               case PIPE_VIDEO_FORMAT_VP9:
+                       return (sscreen->info.family < CHIP_RENOIR) ?
+                              ((sscreen->info.family < CHIP_TONGA) ? 2048 : 4096) :
+                              8192;
+               default:
+                       return (sscreen->info.family < CHIP_TONGA) ? 2048 : 4096;
+               }
        case PIPE_VIDEO_CAP_MAX_HEIGHT:
-               return (sscreen->info.family < CHIP_TONGA) ? 1152 : 4096;
+               switch (codec) {
+               case PIPE_VIDEO_FORMAT_HEVC:
+               case PIPE_VIDEO_FORMAT_VP9:
+                       return (sscreen->info.family < CHIP_RENOIR) ?
+                              ((sscreen->info.family < CHIP_TONGA) ? 1152 : 4096) :
+                              4352;
+               default:
+                       return (sscreen->info.family < CHIP_TONGA) ? 1152 : 4096;
+               }
        case PIPE_VIDEO_CAP_PREFERED_FORMAT:
                if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10 ||
                    profile == PIPE_VIDEO_PROFILE_VP9_PROFILE2)