Module: Mesa Branch: main Commit: fb82371558a5f8c0293079e2de292e7723c90915 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb82371558a5f8c0293079e2de292e7723c90915
Author: Sil Vilerino <[email protected]> Date: Fri Mar 3 13:00:57 2023 -0500 d3d12: VP9 Decode - Fix use_prev_in_find_mvs_refs calculation Fixes: c8e8ce83 ("d3d12: Add VP9 Decode support") Reviewed-by: Jesse Natalie <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21694> --- src/gallium/drivers/d3d12/d3d12_video_dec_vp9.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/d3d12/d3d12_video_dec_vp9.cpp b/src/gallium/drivers/d3d12/d3d12_video_dec_vp9.cpp index 816343828d6..0e7c5b45c35 100644 --- a/src/gallium/drivers/d3d12/d3d12_video_dec_vp9.cpp +++ b/src/gallium/drivers/d3d12/d3d12_video_dec_vp9.cpp @@ -348,10 +348,16 @@ d3d12_video_decoder_dxva_picparams_from_pipe_picparams_vp9( dxvaStructure.filter_level = pipe_vp9->picture_parameter.filter_level; dxvaStructure.sharpness_level = pipe_vp9->picture_parameter.sharpness_level; - bool use_last_frame_mvs = !pipe_vp9->picture_parameter.pic_fields.error_resilient_mode && pipe_vp9->picture_parameter.pic_fields.show_frame; + bool use_prev_in_find_mv_refs = + !pipe_vp9->picture_parameter.pic_fields.error_resilient_mode && + !(pipe_vp9->picture_parameter.pic_fields.frame_type == 0 /*KEY_FRAME*/ || pipe_vp9->picture_parameter.pic_fields.intra_only) && + pipe_vp9->picture_parameter.pic_fields.prev_show_frame && + pipe_vp9->picture_parameter.frame_width == pipe_vp9->picture_parameter.prev_frame_width && + pipe_vp9->picture_parameter.frame_height == pipe_vp9->picture_parameter.prev_frame_height; + dxvaStructure.wControlInfoFlags = (pipe_vp9->picture_parameter.mode_ref_delta_enabled << 0) | (pipe_vp9->picture_parameter.mode_ref_delta_update << 1) | - (use_last_frame_mvs << 2) | + (use_prev_in_find_mv_refs << 2) | (0 << 3); for (uint32_t i = 0; i < 4; i++)
