mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
frontends/va: Don't check header type for packed header buffers
Applications should not send types that were not enabled when creating config and even if they do it will not cause any unexpected issues. Remove the checks as it is another place that would need to be updated when adding support for new packed header types. Reviewed-By: Sil Vilerino <sivileri@microsoft.com> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30585>
This commit is contained in:
parent
f8dcf15ed2
commit
ba1bc7c495
1 changed files with 2 additions and 29 deletions
|
|
@ -903,33 +903,12 @@ handleVAEncSliceParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaB
|
|||
static VAStatus
|
||||
handleVAEncPackedHeaderParameterBufferType(vlVaContext *context, vlVaBuffer *buf)
|
||||
{
|
||||
VAStatus status = VA_STATUS_SUCCESS;
|
||||
VAEncPackedHeaderParameterBuffer *param = buf->data;
|
||||
|
||||
context->packed_header_emulation_bytes = param->has_emulation_bytes;
|
||||
context->packed_header_type = param->type;
|
||||
|
||||
switch (u_reduce_video_profile(context->templat.profile)) {
|
||||
case PIPE_VIDEO_FORMAT_MPEG4_AVC:
|
||||
if (param->type == VAEncPackedHeaderSequence)
|
||||
context->packed_header_type = param->type;
|
||||
else
|
||||
status = VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
break;
|
||||
case PIPE_VIDEO_FORMAT_HEVC:
|
||||
if (param->type == VAEncPackedHeaderSequence)
|
||||
context->packed_header_type = param->type;
|
||||
else
|
||||
status = VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
break;
|
||||
case PIPE_VIDEO_FORMAT_AV1:
|
||||
context->packed_header_type = param->type;
|
||||
break;
|
||||
|
||||
default:
|
||||
return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
}
|
||||
|
||||
return status;
|
||||
return VA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static VAStatus
|
||||
|
|
@ -939,16 +918,10 @@ handleVAEncPackedHeaderDataBufferType(vlVaContext *context, vlVaBuffer *buf)
|
|||
|
||||
switch (u_reduce_video_profile(context->templat.profile)) {
|
||||
case PIPE_VIDEO_FORMAT_MPEG4_AVC:
|
||||
if (context->packed_header_type != VAEncPackedHeaderSequence)
|
||||
return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
|
||||
status = vlVaHandleVAEncPackedHeaderDataBufferTypeH264(context, buf);
|
||||
break;
|
||||
|
||||
case PIPE_VIDEO_FORMAT_HEVC:
|
||||
if (context->packed_header_type != VAEncPackedHeaderSequence)
|
||||
return VA_STATUS_ERROR_UNIMPLEMENTED;
|
||||
|
||||
status = vlVaHandleVAEncPackedHeaderDataBufferTypeHEVC(context, buf);
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue