mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 20:58:04 +02:00
frontends/va: Assert maximum number of temporal layers
There is a hardcoded limit of 4 layers in all structs, so make sure drivers will not return more. 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/30151>
This commit is contained in:
parent
384057076a
commit
1283f43527
1 changed files with 1 additions and 0 deletions
|
|
@ -281,6 +281,7 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
|
|||
value = pscreen->get_video_param(pscreen, ProfileToPipe(profile),
|
||||
PIPE_VIDEO_ENTRYPOINT_ENCODE,
|
||||
PIPE_VIDEO_CAP_MAX_TEMPORAL_LAYERS);
|
||||
assert(value <= 4);
|
||||
if (value > 0) {
|
||||
value -= 1;
|
||||
value |= (1 << 8); /* temporal_layer_bitrate_control_flag */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue