Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/mesa3d: Allow building patent encumbered video codecs
@ 2023-08-04 11:12 Tristan van Berkom via buildroot
  2023-08-22  4:07 ` Tristan van Berkom via buildroot
  2023-08-22 21:28 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 4+ messages in thread
From: Tristan van Berkom via buildroot @ 2023-08-04 11:12 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, Bernd Kuhls

This patch adds some options to allow building the patent encumbered
codecs in mesa, such as H.264/H.265 encoders/decoders which are useful
for hardware accelerated decoding via libva/gstreamer.

These codecs are now disabled by default in upstream mesa as per:
  https://gitlab.freedesktop.org/mesa/mesa/-/commit/7d969fe9e91e39e03041cdfac69bf33337bc2c96

Signed-off-by: Tristan van Berkom <tristan.vanberkom@codethink.co.uk>
---
 package/mesa3d/Config.in | 36 ++++++++++++++++++++++++++++++++++++
 package/mesa3d/mesa3d.mk | 11 +++++++++++
 2 files changed, 47 insertions(+)

diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
index c7ee2a8db0..7f1d74fe9a 100644
--- a/package/mesa3d/Config.in
+++ b/package/mesa3d/Config.in
@@ -56,6 +56,42 @@ config BR2_PACKAGE_MESA3D_OPENCL
        select BR2_PACKAGE_LIBCLC
        select BR2_PACKAGE_HAS_LIBOPENCL
 
+# inform the .mk file of video codec selection
+config BR2_PACKAGE_MESA3D_VIDEO_CODEC
+       bool
+
+comment "Patent encumbered video codecs"
+
+config BR2_PACKAGE_MESA3D_VIDEO_CODEC_VC1DEC
+       bool "VC-1 decoder"
+       select BR2_PACKAGE_MESA3D_VIDEO_CODEC
+       help
+         Decoder module for VC-1 video coding
+
+config BR2_PACKAGE_MESA3D_VIDEO_CODEC_H264DEC
+       bool "H.264 decoder"
+       select BR2_PACKAGE_MESA3D_VIDEO_CODEC
+       help
+         Decoder module for H.264 video coding
+
+config BR2_PACKAGE_MESA3D_VIDEO_CODEC_H264ENC
+       bool "H.264 encoder"
+       select BR2_PACKAGE_MESA3D_VIDEO_CODEC
+       help
+         Encoder module for H.264 video coding
+
+config BR2_PACKAGE_MESA3D_VIDEO_CODEC_H265DEC
+       bool "H.265 decoder"
+       select BR2_PACKAGE_MESA3D_VIDEO_CODEC
+       help
+         Decoder module for H.265 video coding
+
+config BR2_PACKAGE_MESA3D_VIDEO_CODEC_H265ENC
+       bool "H.265 encoder"
+       select BR2_PACKAGE_MESA3D_VIDEO_CODEC
+       help
+         Encoder module for H.265 video coding
+
 # inform the .mk file of gallium, dri, dri3 or vulkan driver selection
 config BR2_PACKAGE_MESA3D_DRI3
        bool
diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk
index 6fa5c1c686..149e6c2e7f 100644
--- a/package/mesa3d/mesa3d.mk
+++ b/package/mesa3d/mesa3d.mk
@@ -98,6 +98,17 @@ else
 MESA3D_CONF_OPTS += -Dgallium-vc4-neon=disabled
 endif
 
+# Video codecs (patent encumbered)
+MESA3D_VIDEO_CODECS-$(BR2_PACKAGE_MESA3D_VIDEO_CODEC_VC1DEC)  += vc1dec
+MESA3D_VIDEO_CODECS-$(BR2_PACKAGE_MESA3D_VIDEO_CODEC_H264DEC) += h264dec
+MESA3D_VIDEO_CODECS-$(BR2_PACKAGE_MESA3D_VIDEO_CODEC_H264ENC) += h264enc
+MESA3D_VIDEO_CODECS-$(BR2_PACKAGE_MESA3D_VIDEO_CODEC_H265DEC) += h265dec
+MESA3D_VIDEO_CODECS-$(BR2_PACKAGE_MESA3D_VIDEO_CODEC_H265ENC) += h265enc
+
+ifeq ($(BR2_PACKAGE_MESA3D_VIDEO_CODEC),y)
+MESA3D_CONF_OPTS += -Dvideo-codecs=$(subst $(space),$(comma),$(MESA3D_VIDEO_CODECS-y))
+endif
+
 # Drivers
 
 #Gallium Drivers
-- 
2.25.1


_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-27  7:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-04 11:12 [Buildroot] [PATCH] package/mesa3d: Allow building patent encumbered video codecs Tristan van Berkom via buildroot
2023-08-22  4:07 ` Tristan van Berkom via buildroot
2023-08-22 21:28 ` Thomas Petazzoni via buildroot
2023-08-27  7:45   ` Tristan van Berkom via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox