radv/video: Fix force_integer_mv=1 on intra frame

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.

Cc: mesa-stable
Reviewed-by: David Rosca <david.rosca@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38716>
This commit is contained in:
Benjamin Cheng 2025-11-28 13:46:44 -05:00 committed by Marge Bot
parent 076a383437
commit fa1fd2413f

View file

@ -840,12 +840,11 @@ radv_enc_spec_misc_av1(struct radv_cmd_buffer *cmd_buffer, const struct VkVideoE
tile_config->tile_groups[0].end = tile_config->num_tile_cols * tile_config->num_tile_rows - 1;
tile_config->tile_size_bytes_minus_1 = 3;
uint32_t precision = RENCODE_AV1_MV_PRECISION_ALLOW_HIGH_PRECISION;
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;
av1_state->skip_mode_allowed =
seq->flags.enable_order_hint &&