diff --git a/.pick_status.json b/.pick_status.json index 39a62732a2a..a558d023cd1 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2084,7 +2084,7 @@ "description": "radv/video: fix h265 decode with unaligned w/h", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "db62c38091a3b244b1d720a6aa47bf1d1855db55", "notes": null diff --git a/src/amd/vulkan/radv_video.c b/src/amd/vulkan/radv_video.c index 7cf354b675d..c9728ccec41 100644 --- a/src/amd/vulkan/radv_video.c +++ b/src/amd/vulkan/radv_video.c @@ -934,7 +934,10 @@ update_h265_scaling(void *it_ptr, const StdVideoH265ScalingLists *scaling_lists) static rvcn_dec_message_hevc_t get_h265_msg(struct radv_device *device, struct radv_video_session *vid, struct radv_video_session_params *params, - const struct VkVideoDecodeInfoKHR *frame_info, void *it_ptr) + const struct VkVideoDecodeInfoKHR *frame_info, + uint32_t *width_in_samples, + uint32_t *height_in_samples, + void *it_ptr) { rvcn_dec_message_hevc_t result; int i, j; @@ -966,6 +969,8 @@ get_h265_msg(struct radv_device *device, struct radv_video_session *vid, struct } result.st_rps_bits = h265_pic_info->pStdPictureInfo->NumBitsForSTRefPicSetInSlice; + *width_in_samples = sps->pic_width_in_luma_samples; + *height_in_samples = sps->pic_height_in_luma_samples; result.chroma_format = sps->chroma_format_idc; result.bit_depth_luma_minus8 = sps->bit_depth_luma_minus8; result.bit_depth_chroma_minus8 = sps->bit_depth_chroma_minus8; @@ -1220,7 +1225,8 @@ rvcn_dec_message_decode(struct radv_cmd_buffer *cmd_buffer, struct radv_video_se break; } case VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR: { - rvcn_dec_message_hevc_t hevc = get_h265_msg(device, vid, params, frame_info, it_ptr); + rvcn_dec_message_hevc_t hevc = + get_h265_msg(device, vid, params, frame_info, &decode->width_in_samples, &decode->height_in_samples, it_ptr); memcpy(codec, (void *)&hevc, sizeof(rvcn_dec_message_hevc_t)); index_codec->message_id = RDECODE_MESSAGE_HEVC; break; @@ -1377,7 +1383,8 @@ get_uvd_h264_msg(struct radv_video_session *vid, struct radv_video_session_param static struct ruvd_h265 get_uvd_h265_msg(struct radv_device *device, struct radv_video_session *vid, struct radv_video_session_params *params, - const struct VkVideoDecodeInfoKHR *frame_info, void *it_ptr) + const struct VkVideoDecodeInfoKHR *frame_info, uint32_t *width_in_samples, + uint32_t *height_in_samples, void *it_ptr) { struct ruvd_h265 result; int i, j; @@ -1405,6 +1412,8 @@ get_uvd_h265_msg(struct radv_device *device, struct radv_video_session *vid, str if (device->physical_device->rad_info.family == CHIP_CARRIZO) result.sps_info_flags |= 1 << 9; + *width_in_samples = sps->pic_width_in_luma_samples; + *height_in_samples = sps->pic_height_in_luma_samples; result.chroma_format = sps->chroma_format_idc; result.bit_depth_luma_minus8 = sps->bit_depth_luma_minus8; result.bit_depth_chroma_minus8 = sps->bit_depth_chroma_minus8; @@ -1578,7 +1587,10 @@ ruvd_dec_message_decode(struct radv_device *device, struct radv_video_session *v break; } case VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR: { - msg->body.decode.codec.h265 = get_uvd_h265_msg(device, vid, params, frame_info, it_ptr); + msg->body.decode.codec.h265 = get_uvd_h265_msg(device, vid, params, frame_info, + &msg->body.decode.width_in_samples, + &msg->body.decode.height_in_samples, + it_ptr); if (vid->ctx.mem) msg->body.decode.dpb_reserved = vid->ctx.size;