frontends/va: Add profile param when querying PIPE_VIDEO_CAP_ENC_QUALITY_LEVEL

Pass the specific profile as drivers may only support
quality levels for specific codecs or profiles.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25819>
This commit is contained in:
Sil Vilerino 2023-08-25 13:05:54 -04:00 committed by Marge Bot
parent cd08d331f3
commit 0996ec3fc6

View file

@ -1141,7 +1141,7 @@ vlVaEndPicture(VADriverContextP ctx, VAContextID context_id)
context->desc.h264enc.frame_num_cnt++;
/* keep other path the same way */
if (!screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN,
if (!screen->get_video_param(screen, ProfileToPipe(context->templat.profile),
context->decoder->entrypoint,
PIPE_VIDEO_CAP_ENC_QUALITY_LEVEL)) {