radeon/uvd: implement and add flag for VAAPI HEVC decode
authorBoyuan Zhang <boyuan.zhang@amd.com>
Fri, 23 Oct 2015 16:30:33 +0000 (12:30 -0400)
committerLeo Liu <leo.liu@amd.com>
Tue, 27 Oct 2015 23:09:55 +0000 (19:09 -0400)
Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
src/gallium/drivers/radeon/radeon_uvd.c
src/gallium/drivers/radeon/radeon_uvd.h

index c3ac7e7f2ef9f0123890d74acaeb04e82b126909..33b01361aa5109a0e11c76ad2a0a8b445e6951a3 100644 (file)
@@ -478,6 +478,8 @@ static struct ruvd_h265 get_h265_msg(struct ruvd_decoder *dec, struct pipe_video
        result.sps_info_flags |= pic->pps->sps->separate_colour_plane_flag << 8;
        if (((struct r600_common_screen*)dec->screen)->family == CHIP_CARRIZO)
                result.sps_info_flags |= 1 << 9;
+       if (pic->UseRefPicList == true)
+               result.sps_info_flags |= 1 << 10;
 
        result.chroma_format = pic->pps->sps->chroma_format_idc;
        result.bit_depth_luma_minus8 = pic->pps->sps->bit_depth_luma_minus8;
@@ -586,6 +588,11 @@ static struct ruvd_h265 get_h265_msg(struct ruvd_decoder *dec, struct pipe_video
        memcpy(dec->it + 480, pic->pps->sps->ScalingList16x16, 6 * 64);
        memcpy(dec->it + 864, pic->pps->sps->ScalingList32x32, 2 * 64);
 
+       for (i = 0 ; i < 2 ; i++) {
+               for (int j = 0 ; j < 15 ; j++)
+                       result.direct_reflist[i][j] = pic->RefPicList[i][j];
+       }
+
        /* TODO
        result.highestTid;
        result.isNonRef;
index 452fbd60880415937cd89311c2ae59da960b6079..9cc0a694c30a362d99601958090b8a53285cd6b3 100644 (file)
@@ -233,6 +233,15 @@ struct ruvd_h265 {
 
        uint8_t         highestTid;
        uint8_t         isNonRef;
+
+       uint8_t         p010_mode;
+       uint8_t         msb_mode;
+       uint8_t         luma_10to8;
+       uint8_t         chroma_10to8;
+       uint8_t         sclr_luma10to8;
+       uint8_t         sclr_chroma10to8;
+
+       uint8_t         direct_reflist[2][15];
 };
 
 struct ruvd_vc1 {