radv/video: Fix force_integer_mv=1 on intra frame
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

According to AV1 spec, force_integer_mv=1 on intra frames. However, VCN
FW does not expect integer mv to be set unless screen content tools are
enabled. This also aligns the code to the radeonsi logic.

(cherry-picked from commit fa1fd2413f)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38812>
This commit is contained in:
Benjamin Cheng 2025-11-28 13:46:44 -05:00 committed by Marge Bot
parent 0cdc3db6c3
commit 3bd0cdbd6a

View file

@ -681,12 +681,11 @@ radv_enc_spec_misc_av1(struct radv_cmd_buffer *cmd_buffer, const struct VkVideoE
const StdVideoEncodeAV1PictureInfo *pic = av1_picture_info->pStdPictureInfo;
const StdVideoAV1SequenceHeader *seq = &params->av1_enc.seq_hdr.base;
uint32_t precision = 0;
if (!pic->flags.allow_high_precision_mv)
precision = RENCODE_AV1_MV_PRECISION_DISALLOW_HIGH_PRECISION;
if (pic->flags.force_integer_mv)
uint32_t precision = RENCODE_AV1_MV_PRECISION_DISALLOW_HIGH_PRECISION;
if (pic->flags.allow_screen_content_tools && pic->flags.force_integer_mv)
precision = RENCODE_AV1_MV_PRECISION_FORCE_INTEGER_MV;
else if (pic->flags.allow_high_precision_mv)
precision = RENCODE_AV1_MV_PRECISION_ALLOW_HIGH_PRECISION;
vid->skip_mode_allowed =
seq->flags.enable_order_hint &&