frontends/va: Don't require exact match for packed headers

Apparently it's valid to create config with any combination of supported
packed headers.

Fixes libva-utils tests:
 GetCreateConfig/VAAPIGetCreateConfig.CreateConfigWithAttributes/235, where GetParam() = (32:VAProfileAV1Profile0, 6:VAEntrypointEncSlice)
 GetCreateConfig/VAAPIGetCreateConfig.CreateConfigPackedHeaders/235, where GetParam() = (32:VAProfileAV1Profile0, 6:VAEntrypointEncSlice)
 QuerySurfaces/VAAPIQuerySurfaces.QuerySurfacesWithConfigAttribs/235, where GetParam() = (32:VAProfileAV1Profile0, 6:VAEntrypointEncSlice)
 CreateSurfaces/VAAPICreateSurfaces.CreateSurfacesWithConfigAttribs/3995, where GetParam() = (32:VAProfileAV1Profile0, 6:VAEntrypointEncSlice, 16x16)

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29934>
This commit is contained in:
David Rosca 2024-06-27 12:09:04 +02:00 committed by Marge Bot
parent a3f35964ba
commit 49eda4d742

View file

@ -722,7 +722,7 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
!= PIPE_VIDEO_FORMAT_MPEG4_AVC) &&
((attrib_list[i].value != 1) || u_reduce_video_profile(ProfileToPipe(profile))
!= PIPE_VIDEO_FORMAT_HEVC) &&
((attrib_list[i].value != 3) || u_reduce_video_profile(ProfileToPipe(profile))
((attrib_list[i].value > 3) || u_reduce_video_profile(ProfileToPipe(profile))
!= PIPE_VIDEO_FORMAT_AV1))) {
FREE(config);
return VA_STATUS_ERROR_INVALID_VALUE;