frontends/va: Support VA_PICTURE_H264_NON_EXISTING

Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31368>
This commit is contained in:
David Rosca 2024-09-25 17:53:17 +02:00 committed by Marge Bot
parent f9c646670b
commit e7aaea0e27
2 changed files with 7 additions and 0 deletions

View file

@ -30,6 +30,10 @@
#include "util/u_handle_table.h"
#include "va_private.h"
#ifndef VA_PICTURE_H264_NON_EXISTING
#define VA_PICTURE_H264_NON_EXISTING 0x00000020
#endif
static void resetReferencePictureDesc(struct pipe_h264_picture_desc *h264,
unsigned int i)
{
@ -142,6 +146,8 @@ void vlVaHandlePictureParameterBufferH264(vlVaDriver *drv, vlVaContext *context,
!!(h264->ReferenceFrames[i].flags & VA_PICTURE_H264_TOP_FIELD);
context->desc.h264.bottom_is_reference[i] = !top_or_bottom_field ||
!!(h264->ReferenceFrames[i].flags & VA_PICTURE_H264_BOTTOM_FIELD);
context->desc.h264.is_non_existing[i] =
!!(h264->ReferenceFrames[i].flags & VA_PICTURE_H264_NON_EXISTING);
context->desc.h264.field_order_cnt_list[i][0] =
top_or_bottom_field != VA_PICTURE_H264_BOTTOM_FIELD ?
h264->ReferenceFrames[i].TopFieldOrderCnt: INT_MAX;

View file

@ -454,6 +454,7 @@ struct pipe_h264_picture_desc
bool is_long_term[16];
bool top_is_reference[16];
bool bottom_is_reference[16];
bool is_non_existing[16];
uint32_t field_order_cnt_list[16][2];
uint32_t frame_num_list[16];