Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Oct 2021 13:36:31 GMT
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: 4c4f0e624c82 - 2021Q4 - multimedia/intel-media-sdk: unbreak runtime after f4faca97f05b
Message-ID:  <202110071336.197DaV09073412@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2021Q4 has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4c4f0e624c8251a9e2eea6e1d912426355b1475e

commit 4c4f0e624c8251a9e2eea6e1d912426355b1475e
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2021-10-07 13:21:34 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2021-10-07 13:36:26 +0000

    multimedia/intel-media-sdk: unbreak runtime after f4faca97f05b
    
    $ ffmpeg ... -c:v hevc_qsv ...
    [AVHWDeviceContext @ 0x8062d0140] Error initializing an MFX session: -3.
    Device creation failed: -1313558101.
    
    PR:             258976
    Reported by:    Yuichiro NAITO
    
    (cherry picked from commit 0402cf13b3cc4b3c1fe6bd68b1286c2054f0ee3f)
---
 multimedia/intel-media-sdk/Makefile                |  1 +
 .../intel-media-sdk/files/patch-msdk-default       | 28 ++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/multimedia/intel-media-sdk/Makefile b/multimedia/intel-media-sdk/Makefile
index 80d3668a75bd..8929be7f8013 100644
--- a/multimedia/intel-media-sdk/Makefile
+++ b/multimedia/intel-media-sdk/Makefile
@@ -1,6 +1,7 @@
 PORTNAME=	intel-media-sdk
 DISTVERSIONPREFIX=	intel-mediasdk-
 DISTVERSION=	21.3.5
+PORTREVISION=	1
 CATEGORIES=	multimedia
 
 MAINTAINER=	jbeich@FreeBSD.org
diff --git a/multimedia/intel-media-sdk/files/patch-msdk-default b/multimedia/intel-media-sdk/files/patch-msdk-default
new file mode 100644
index 000000000000..503fcbbf792f
--- /dev/null
+++ b/multimedia/intel-media-sdk/files/patch-msdk-default
@@ -0,0 +1,28 @@
+/sys/class/drm/renderD*/device/device is Linux-only, so default to
+INTEL_MEDIA_RUNTIME=MSDK on other systems.
+
+$ ffmpeg -hide_banner -init_hw_device qsv=auto -i foo.y4m -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -y foo.mkv
+[AVHWDeviceContext @ 0x8062d0140] Error initializing an MFX session: -3.
+Device creation failed: -1313558101.
+Failed to set value 'qsv=auto' for option 'init_hw_device': Unknown error occurred
+Error parsing global options: Unknown error occurred
+
+--- api/mfx_dispatch/linux/mfxloader.cpp.orig	2021-09-29 15:58:50 UTC
++++ api/mfx_dispatch/linux/mfxloader.cpp
+@@ -181,11 +181,16 @@ mfxStatus LoaderCtx::Init(mfxInitParam& par)
+     return MFX_ERR_UNSUPPORTED;
+   }
+ 
++#ifdef __linux__
+   eMFXHWType platform = MFX_HW_UNKNOWN;
+   auto devices = get_devices();
+   if (devices.size()) {
+     platform = devices[devices.size() - 1].platform;
+   }
++#else
++  // Assume a legacy generation not supported by oneVPL-intel-gpu
++  eMFXHWType platform = MFX_HW_SKL;
++#endif
+ 
+   std::vector<std::string> libs;
+ 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202110071336.197DaV09073412>