meson: Add all, all_free (default) options for video-codecs option.
- Adds new 'all' value to the video-codecs option - Adds 'all_free' value to video-codecs and sets it as default value for non patent-encumbered codecs, restoring the behavior for these codecs before existing as options in commit7b22dd8bfdFixes:7b22dd8bfd("meson: add vp9 and av1 codec support options") Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26320>
This commit is contained in:
parent
e126e82c79
commit
d0c3556011
4 changed files with 22 additions and 7 deletions
17
meson.build
17
meson.build
|
|
@ -338,7 +338,22 @@ if with_vulkan_beta
|
|||
endif
|
||||
|
||||
_codecs = get_option('video-codecs')
|
||||
foreach c : ['vc1dec', 'h264dec', 'h264enc', 'h265dec', 'h265enc', 'av1dec', 'av1enc', 'vp9dec']
|
||||
patent_codecs = ['vc1dec', 'h264dec', 'h264enc', 'h265dec', 'h265enc']
|
||||
free_codecs = ['av1dec', 'av1enc', 'vp9dec']
|
||||
all_codecs = patent_codecs + free_codecs
|
||||
|
||||
if _codecs.contains('all')
|
||||
_codecs = all_codecs
|
||||
elif _codecs.contains('all_free')
|
||||
selected_codecs = _codecs
|
||||
_codecs = free_codecs
|
||||
foreach c : patent_codecs
|
||||
if selected_codecs.contains(c)
|
||||
_codecs += c
|
||||
endif
|
||||
endforeach
|
||||
endif
|
||||
foreach c : all_codecs
|
||||
pre_args += '-DVIDEO_CODEC_@0@=@1@'.format(c.to_upper(), _codecs.contains(c).to_int())
|
||||
endforeach
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue