radeon/uvd: fix VC-1 simple/main profile decode v2
authorBoyuan Zhang <boyuan.zhang@amd.com>
Wed, 23 Sep 2015 08:11:08 +0000 (10:11 +0200)
committerChristian König <christian.koenig@amd.com>
Fri, 6 Nov 2015 19:07:23 +0000 (20:07 +0100)
We just needed to set the extra width/height fields to get this working.

v2 (chk): rebased, CC stable added, commit message added, fixed coding style

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/radeon/radeon_uvd.c
src/gallium/drivers/radeon/radeon_video.c

index 33b01361aa5109a0e11c76ad2a0a8b445e6951a3..0c643e5cd594cf6b7142a7049b7d78758c96b2fc 100644 (file)
@@ -947,6 +947,12 @@ static void ruvd_end_frame(struct pipe_video_codec *decoder,
        dec->msg->body.decode.width_in_samples = dec->base.width;
        dec->msg->body.decode.height_in_samples = dec->base.height;
 
+       if ((picture->profile == PIPE_VIDEO_PROFILE_VC1_SIMPLE) ||
+           (picture->profile == PIPE_VIDEO_PROFILE_VC1_MAIN)) {
+               dec->msg->body.decode.width_in_samples = align(dec->msg->body.decode.width_in_samples, 16) / 16;
+               dec->msg->body.decode.height_in_samples = align(dec->msg->body.decode.height_in_samples, 16) / 16;
+       }
+
        dec->msg->body.decode.dpb_size = dec->dpb.res->buf->size;
        dec->msg->body.decode.bsd_size = bs_size;
        dec->msg->body.decode.db_pitch = dec->base.width;
index 32bfc32073b4eb1b9f8c1ee4d4f1410fff421a1c..f56c6cf6cb42ca4841ebd55e732820bf9b7d1584 100644 (file)
@@ -244,8 +244,7 @@ int rvid_get_video_param(struct pipe_screen *screen,
                                return codec != PIPE_VIDEO_FORMAT_MPEG4;
                        return true;
                case PIPE_VIDEO_FORMAT_VC1:
-                       /* FIXME: VC-1 simple/main profile is broken */
-                       return profile == PIPE_VIDEO_PROFILE_VC1_ADVANCED;
+                       return true;
                case PIPE_VIDEO_FORMAT_HEVC:
                        /* Carrizo only supports HEVC Main */
                        return rscreen->family >= CHIP_CARRIZO &&