mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-22 18:30:31 +01:00
gallium/vl: Check for VP9 and AV1 meson option support flags
Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26223>
This commit is contained in:
parent
7b22dd8bfd
commit
527def0171
1 changed files with 14 additions and 0 deletions
|
|
@ -32,6 +32,20 @@ bool vl_codec_supported(struct pipe_screen *screen,
|
|||
enum pipe_video_profile profile,
|
||||
bool encode)
|
||||
{
|
||||
static_assert(PIPE_VIDEO_PROFILE_MAX == 26, "Update table below when adding new video profiles");
|
||||
if (profile == PIPE_VIDEO_PROFILE_AV1_MAIN) {
|
||||
if (encode) {
|
||||
if (!VIDEO_CODEC_AV1ENC)
|
||||
return false;
|
||||
} else if (!VIDEO_CODEC_AV1DEC) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (profile == PIPE_VIDEO_PROFILE_VP9_PROFILE0 ||
|
||||
profile == PIPE_VIDEO_PROFILE_VP9_PROFILE2) {
|
||||
if (!VIDEO_CODEC_VP9DEC)
|
||||
return false;
|
||||
}
|
||||
if (profile == PIPE_VIDEO_PROFILE_VC1_SIMPLE ||
|
||||
profile == PIPE_VIDEO_PROFILE_VC1_MAIN ||
|
||||
profile == PIPE_VIDEO_PROFILE_VC1_ADVANCED) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue