Module: Mesa Branch: main Commit: 6fea823dc0a3accfc6e0cdae26ac88a08b806c61 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6fea823dc0a3accfc6e0cdae26ac88a08b806c61
Author: Sil Vilerino <[email protected]> Date: Fri Mar 3 13:00:25 2023 -0500 frontend/va: Keep track of some VP9 previous frame data for current frame use_prev_in_find_mvs_refs 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/frontends/va/picture_vp9.c | 3 +++ src/gallium/include/pipe/p_video_state.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/gallium/frontends/va/picture_vp9.c b/src/gallium/frontends/va/picture_vp9.c index 3d5189a67da..ff3da929f0b 100644 --- a/src/gallium/frontends/va/picture_vp9.c +++ b/src/gallium/frontends/va/picture_vp9.c @@ -37,12 +37,15 @@ void vlVaHandlePictureParameterBufferVP9(vlVaDriver *drv, vlVaContext *context, assert(buf->size >= sizeof(VADecPictureParameterBufferVP9) && buf->num_elements == 1); + context->desc.vp9.picture_parameter.prev_frame_width = context->desc.vp9.picture_parameter.frame_width; + context->desc.vp9.picture_parameter.prev_frame_height = context->desc.vp9.picture_parameter.frame_height; context->desc.vp9.picture_parameter.frame_width = vp9->frame_width; context->desc.vp9.picture_parameter.frame_height = vp9->frame_height; context->desc.vp9.picture_parameter.pic_fields.subsampling_x = vp9->pic_fields.bits.subsampling_x; context->desc.vp9.picture_parameter.pic_fields.subsampling_y = vp9->pic_fields.bits.subsampling_y; context->desc.vp9.picture_parameter.pic_fields.frame_type = vp9->pic_fields.bits.frame_type; + context->desc.vp9.picture_parameter.pic_fields.prev_show_frame = context->desc.vp9.picture_parameter.pic_fields.show_frame; context->desc.vp9.picture_parameter.pic_fields.show_frame = vp9->pic_fields.bits.show_frame; context->desc.vp9.picture_parameter.pic_fields.error_resilient_mode = vp9->pic_fields.bits.error_resilient_mode; context->desc.vp9.picture_parameter.pic_fields.intra_only = vp9->pic_fields.bits.intra_only; diff --git a/src/gallium/include/pipe/p_video_state.h b/src/gallium/include/pipe/p_video_state.h index 271c1e8f756..f3fe3d97789 100644 --- a/src/gallium/include/pipe/p_video_state.h +++ b/src/gallium/include/pipe/p_video_state.h @@ -867,12 +867,15 @@ struct pipe_vp9_picture_desc struct { uint16_t frame_width; uint16_t frame_height; + uint16_t prev_frame_width; + uint16_t prev_frame_height; struct { uint32_t subsampling_x:1; uint32_t subsampling_y:1; uint32_t frame_type:1; uint32_t show_frame:1; + uint32_t prev_show_frame:1; uint32_t error_resilient_mode:1; uint32_t intra_only:1; uint32_t allow_high_precision_mv:1;
