radv/video: Fix coding allow_screen_content_tools and force_integer_mv

This was copied from radeonsi which expected seq_force_screen_content_tools = 2
and seq_force_integer_mv = 2.

Fixes: 37e71a5cb2 ("radv/video: add support for AV1 encoding")
Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
(cherry picked from commit 3858a6a696)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
This commit is contained in:
David Rosca 2025-11-11 11:09:50 +01:00 committed by Dylan Baker
parent 51a21fa57e
commit b951bbc5bd
2 changed files with 5 additions and 10 deletions

View file

@ -444,7 +444,7 @@
"description": "radv/video: Fix coding allow_screen_content_tools and force_integer_mv",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "37e71a5cb24cd6053603ca64b67352e0c8e2fce8",
"notes": null

View file

@ -2452,15 +2452,10 @@ radv_enc_av1_obu_instruction(struct radv_cmd_buffer *cmd_buffer, const VkVideoEn
/* disable_cdf_update */
radv_enc_code_fixed_bits(cmd_buffer, av1_pic->flags.disable_cdf_update, 1);
bool allow_screen_content_tools = false;
if (seq->flags.reduced_still_picture_header || av1_pic->flags.allow_screen_content_tools) {
/* allow_screen_content_tools */
allow_screen_content_tools = /*av1_pic->av1_spec_misc.palette_mode_enable ||*/
av1_pic->flags.force_integer_mv;
radv_enc_code_fixed_bits(cmd_buffer, allow_screen_content_tools ? 1 : 0, 1);
}
if (seq->seq_force_screen_content_tools == STD_VIDEO_AV1_SELECT_SCREEN_CONTENT_TOOLS)
radv_enc_code_fixed_bits(cmd_buffer, av1_pic->flags.allow_screen_content_tools, 1);
if (allow_screen_content_tools)
if (av1_pic->flags.allow_screen_content_tools && seq->seq_force_integer_mv == STD_VIDEO_AV1_SELECT_INTEGER_MV)
/* force_integer_mv */
radv_enc_code_fixed_bits(cmd_buffer, av1_pic->flags.force_integer_mv, 1);
@ -2507,7 +2502,7 @@ radv_enc_av1_obu_instruction(struct radv_cmd_buffer *cmd_buffer, const VkVideoEn
/* render_height_minus_1 */
radv_enc_code_fixed_bits(cmd_buffer, av1_pic->render_height_minus_1, 16);
}
if (av1_pic->flags.allow_screen_content_tools && av1_pic->flags.force_integer_mv)
if (av1_pic->flags.allow_screen_content_tools)
/* allow_intrabc */
radv_enc_code_fixed_bits(cmd_buffer, 0, 1);
} else {