mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Subject: [ptxdist] [PATCH] mesalib: allow enabling patent encumbered video codecs
Date: Mon, 24 Oct 2022 15:45:05 +0200	[thread overview]
Message-ID: <20221024134505.2041999-1-p.zabel@pengutronix.de> (raw)

Add a menu with options to enable the VC-1, H.264, and H.265 codecs
when VA-API support is enabled.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 rules/mesalib.in   | 28 ++++++++++++++++++++++++++++
 rules/mesalib.make |  8 +++++++-
 2 files changed, 35 insertions(+), 1 deletion(-)

diff --git a/rules/mesalib.in b/rules/mesalib.in
index 1f505b9dcc90..5e89907ed955 100644
--- a/rules/mesalib.in
+++ b/rules/mesalib.in
@@ -156,6 +156,34 @@ config MESALIB_VA
 	depends on MESALIB_DRI_RADEONSI || MESALIB_DRI_R600 || MESALIB_DRI_NOUVEAU
 	prompt "VA"
 
+if MESALIB_VA
+
+menu "Patent encumbered video codecs"
+
+config MESALIB_VIDEO_VC1DEC
+	bool
+	prompt "VC-1 decoding"
+
+config MESALIB_VIDEO_H264DEC
+	bool
+	prompt "H.264 decoding"
+
+config MESALIB_VIDEO_H264ENC
+	bool
+	prompt "H.264 encoding"
+
+config MESALIB_VIDEO_H265DEC
+	bool
+	prompt "H.265 decoding"
+
+config MESALIB_VIDEO_H265ENC
+	bool
+	prompt "H.265 encoding"
+
+endmenu
+
+endif
+
 comment "Platforms"
 
 config MESALIB_EGL_X11
diff --git a/rules/mesalib.make b/rules/mesalib.make
index dfbb0d11ae73..6395e1384261 100644
--- a/rules/mesalib.make
+++ b/rules/mesalib.make
@@ -92,6 +92,12 @@ MESALIB_DRI_GALLIUM_LIBS-y = \
 	,$(MESALIB_GALLIUM_DRIVERS-y) \
 	))))
 
+MESALIB_VIDEO_CODECS-$(PTXCONF_MESALIB_VIDEO_VC1DEC)	+= vc1dec
+MESALIB_VIDEO_CODECS-$(PTXCONF_MESALIB_VIDEO_H264DEC)	+= h264dec
+MESALIB_VIDEO_CODECS-$(PTXCONF_MESALIB_VIDEO_H264ENC)	+= h264enc
+MESALIB_VIDEO_CODECS-$(PTXCONF_MESALIB_VIDEO_H265DEC)	+= h265dec
+MESALIB_VIDEO_CODECS-$(PTXCONF_MESALIB_VIDEO_H265ENC)	+= h265enc
+
 ifdef PTXCONF_ARCH_X86
 MESALIB_VULKAN_DRIVERS-$(PTXCONF_MESALIB_VULKAN_AMD)		+= amd
 MESALIB_VULKAN_DRIVERS-$(PTXCONF_MESALIB_VULKAN_INTEL)		+= intel
@@ -203,7 +209,7 @@ MESALIB_CONF_OPT	:= \
 	-Dva-libs-path=/usr/lib/dri \
 	-Dvalgrind=disabled \
 	-Dvdpau-libs-path=/usr/lib/vdpau \
-	-Dvideo-codecs=[] \
+	-Dvideo-codecs=$(subst $(space),$(comma),$(MESALIB_VIDEO_CODECS-y)) \
 	-Dvmware-mks-stats=false \
 	-Dvulkan-beta=false \
 	-Dvulkan-drivers=$(subst $(space),$(comma),$(MESALIB_VULKAN_DRIVERS-y)) \
-- 
2.30.2




             reply	other threads:[~2022-10-24 13:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 13:45 Philipp Zabel [this message]
2022-11-11 14:31 ` [ptxdist] [APPLIED] " Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221024134505.2041999-1-p.zabel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox