mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 00:10:20 +01:00
frontends/va/av1: handle multiple slice params
Multiple slice params in a single vaRenderPicture function call is not handled. This patch will fix overwriting slice params when multiple slice params received in one buffer. Change-Id: I880df5bc35dfbd64382a178074482548882ee4af Signed-off-by: Sajeesh Sidharthan <sajeesh.sidharthan@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13463>
This commit is contained in:
parent
996e81fb70
commit
cf0bc4fb55
2 changed files with 4 additions and 3 deletions
|
|
@ -562,6 +562,7 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff
|
|||
VAStatus vaStatus = VA_STATUS_SUCCESS;
|
||||
|
||||
unsigned i;
|
||||
unsigned slice_param_idx = 0;
|
||||
|
||||
if (!ctx)
|
||||
return VA_STATUS_ERROR_INVALID_CONTEXT;
|
||||
|
|
@ -602,7 +603,7 @@ vlVaRenderPicture(VADriverContextP ctx, VAContextID context_id, VABufferID *buff
|
|||
break;
|
||||
|
||||
case VASliceParameterBufferType:
|
||||
handleSliceParameterBuffer(context, buf, i);
|
||||
handleSliceParameterBuffer(context, buf, slice_param_idx++);
|
||||
break;
|
||||
|
||||
case VASliceDataBufferType:
|
||||
|
|
|
|||
|
|
@ -351,6 +351,6 @@ void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, un
|
|||
{
|
||||
VASliceParameterBufferAV1 *av1 = buf->data;
|
||||
|
||||
context->desc.av1.slice_parameter.slice_data_size[num >> 1] = av1->slice_data_size;
|
||||
context->desc.av1.slice_parameter.slice_data_offset[num >> 1] = av1->slice_data_offset;
|
||||
context->desc.av1.slice_parameter.slice_data_size[num] = av1->slice_data_size;
|
||||
context->desc.av1.slice_parameter.slice_data_offset[num] = av1->slice_data_offset;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue