package/mesa3d: add option to enable patented video codecs

By default, mesa uses -Dvideo-codecs=all_free which only includes
royalty-free codecs (AV1, VP9, MPEG-1/2, JPEG).

Add a new BR2_PACKAGE_MESA3D_PATENTED_VIDEO_CODECS option to set
-Dvideo-codecs=all, which additionally enables patent-encumbered
codecs (H.264, H.265, VC-1) for both Gallium VA-API and Vulkan
video decode/encode.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
[Arnout: add PATENTED to the config symbol name]
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
This commit is contained in:
Thomas Devoogdt
2026-05-17 10:53:41 +02:00
committed by Arnout Vandecappelle
parent 460700d38e
commit c4cd1d5240
2 changed files with 20 additions and 0 deletions

View File

@@ -520,6 +520,20 @@ comment "Gallium VA-API needs a gallium driver, incompatible with GLX w/o libglv
depends on !BR2_PACKAGE_MESA3D_GALLIUM_DRIVER || \
(BR2_PACKAGE_MESA3D_OPENGL_GLX && !BR2_PACKAGE_LIBGLVND)
config BR2_PACKAGE_MESA3D_PATENTED_VIDEO_CODECS
bool "patented video codecs (H.264, H.265)"
depends on BR2_PACKAGE_MESA3D_GALLIUM_VA || BR2_PACKAGE_MESA3D_VULKAN_DRIVER
help
Enable patent-encumbered video codec support (H.264, H.265,
VC-1 decode/encode) for Gallium VA-API and/or Vulkan video.
Without this, only royalty-free codecs are supported
(AV1, VP9, MPEG-1/2, JPEG).
comment "patented video codecs need Gallium VA-API or a Vulkan driver"
depends on !BR2_PACKAGE_MESA3D_GALLIUM_VA && \
!BR2_PACKAGE_MESA3D_VULKAN_DRIVER
config BR2_PACKAGE_PROVIDES_LIBGBM
default "mesa3d" if BR2_PACKAGE_MESA3D_GBM

View File

@@ -206,6 +206,12 @@ else
MESA3D_CONF_OPTS += -Dgallium-va=disabled
endif
ifeq ($(BR2_PACKAGE_MESA3D_PATENTED_VIDEO_CODECS),y)
MESA3D_CONF_OPTS += -Dvideo-codecs=all
else
MESA3D_CONF_OPTS += -Dvideo-codecs=all_free
endif
# libGL is only provided for a full xorg stack, without libglvnd
ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_GLX),y)
MESA3D_PROVIDES += $(if $(BR2_PACKAGE_LIBGLVND),,libgl)