radv/video: fix h264 frame heights when field images are in use

This was breaking MBAFF decoding.

Fixes: 8a29291dbe ("radv/video: add h264 support for uvd")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21671>
This commit is contained in:
Dave Airlie
2023-03-03 12:57:16 +10:00
committed by Marge Bot
parent 761bbb2c6f
commit 30ccf31aae

View File

@@ -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;