frontend/va: Keep track of some VP9 previous frame data for current frame use_prev_in...
authorSil Vilerino <sivileri@microsoft.com>
Fri, 3 Mar 2023 18:00:25 +0000 (13:00 -0500)
committerMarge Bot <emma+marge@anholt.net>
Sat, 4 Mar 2023 03:22:48 +0000 (03:22 +0000)
Fixes: c8e8ce83 ("d3d12: Add VP9 Decode support")

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21694>

src/gallium/frontends/va/picture_vp9.c
src/gallium/include/pipe/p_video_state.h

index 3d5189a..ff3da92 100644 (file)
@@ -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;
index 271c1e8..f3fe3d9 100644 (file)
@@ -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;