diff options
author | Dave Airlie <airlied@redhat.com> | 2023-03-03 12:57:16 +1000 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-03-15 05:08:49 +0000 |
commit | 30ccf31aaea55933fbc601245b7fa2f72e70e38b (patch) | |
tree | 0c13a29ec2dbf514c21373d70e7e7869ceefa019 | |
parent | 761bbb2c6ff747d00412a36aace3974dd3630585 (diff) |
radv/video: fix h264 frame heights when field images are in use
This was breaking MBAFF decoding.
Fixes: 8a29291dbe6c ("radv/video: add h264 support for uvd")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21671>
-rw-r--r-- | src/amd/vulkan/radv_video.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_video.c b/src/amd/vulkan/radv_video.c index c348fac3af4..1bd53643c07 100644 --- a/src/amd/vulkan/radv_video.c +++ b/src/amd/vulkan/radv_video.c @@ -627,6 +627,8 @@ static rvcn_dec_message_avc_t get_h264_msg(struct radv_video_session *vid, *width_in_samples = (sps->pic_width_in_mbs_minus1 + 1) * 16; *height_in_samples = (sps->pic_height_in_map_units_minus1 + 1) * 16; + if (!sps->flags.frame_mbs_only_flag) + *height_in_samples *= 2; result.level = sps->level_idc; result.sps_info_flags = 0; @@ -1088,6 +1090,8 @@ static struct ruvd_h264 get_uvd_h264_msg(struct radv_video_session *vid, *width_in_samples = (sps->pic_width_in_mbs_minus1 + 1) * 16; *height_in_samples = (sps->pic_height_in_map_units_minus1 + 1) * 16; + if (!sps->flags.frame_mbs_only_flag) + *height_in_samples *= 2; result.level = sps->level_idc; result.sps_info_flags = 0; |