* [ITP] libvpl
@ 2024-02-21 16:41 Takashi Yano
2024-02-22 5:40 ` Marco Atzeri
0 siblings, 1 reply; 2+ messages in thread
From: Takashi Yano @ 2024-02-21 16:41 UTC (permalink / raw)
To: cygwin-apps
[-- Attachment #1: Type: text/plain, Size: 318 bytes --]
I would like to propose new package libvpl.
This is Intel GPU accelerator driver dispatcher, which has
the same function with mfx_dispatch package.
mfx_dispatch is used by ffmpeg package, however, recent
ffmpeg complains that libmfx is deprecated and use libvpl
instead.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
[-- Attachment #2: libvpl.cygport --]
[-- Type: text/plain, Size: 779 bytes --]
NAME="libvpl"
VERSION=2.10.2
RELEASE=1
LICENSE="MIT"
CATEGORY="Libs"
SUMMARY="Intel® Video Processing Library (Intel® VPL) dispatcher"
DESCRIPTION="This package provides the headers and the library which loads Intel MediaSDK dlls dynamically. The codec itself is implemented in the dlls and the Intel GPU."
HOMEPAGE="https://github.com/intel/libvpl/"
SRC_URI="https://github.com/intel/libvpl/archive/refs/tags/v${VERSION}.tar.gz"
inherit cmake
CYGCMAKE_ARGS="
-DBUILD_TOOLS=OFF
-DINSTALL_EXAMPLE_CODE=OFF
"
PKG_NAMES="libvpl libvpl-devel"
libvpl_CONTENTS="usr/bin usr/share"
libvpl_devel_CONTENTS="usr/include/ usr/lib/"
PKG_IGNORE="usr/etc/vpl/vars.sh"
src_install () {
cd ${B}
ninja_install
dosym ../bin/cygvpl-2.dll /usr/lib/libvpl.dll
}
[-- Attachment #3: libvpl-2.10.2-1.src.patch --]
[-- Type: text/plain, Size: 5489 bytes --]
--- origsrc/libvpl-2.10.2/cmake/CompileOptions.cmake 2024-02-21 06:41:06.000000000 +0900
+++ src/libvpl-2.10.2/cmake/CompileOptions.cmake 2024-02-21 16:11:27.826793000 +0900
@@ -51,16 +51,10 @@ else()
add_compile_options("-Werror=format-security")
if(NOT MINGW)
string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
- if(NOT CMAKE_BUILD_TYPE MATCHES debug)
- add_definitions("-D_FORTIFY_SOURCE=2")
- endif()
endif()
if(NOT MINGW)
add_compile_options("-fstack-protector-strong")
endif()
- if(NOT MINGW)
- add_link_options("-Wl,-z,relro,-z,now,-z,noexecstack")
- endif()
add_compile_options("-Wall")
if(ENABLE_WARNING_AS_ERROR)
add_compile_options("-Werror")
--- origsrc/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl.h 2024-02-21 06:41:06.000000000 +0900
+++ src/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl.h 2024-02-21 15:44:48.647479800 +0900
@@ -48,7 +48,7 @@ typedef char CHAR_TYPE;
#define MSDK_LIB_NAME L"libmfxhw64."
#endif
#define ONEVPL_PRIORITY_PATH_VAR L"ONEVPL_PRIORITY_PATH"
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__CYGWIN__)
// Linux x64
#define MSDK_LIB_NAME "libmfxhw64."
#define ONEVPL_PRIORITY_PATH_VAR "ONEVPL_PRIORITY_PATH"
--- origsrc/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_loader.cpp 2024-02-21 06:41:06.000000000 +0900
+++ src/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_loader.cpp 2024-02-21 15:43:05.531476800 +0900
@@ -409,7 +409,7 @@ mfxU32 LoaderCtxVPL::GetSearchPathsLegac
mfxU32 LoaderCtxVPL::GetSearchPathsSystemDefault(std::list<STRING_TYPE> &searchDirs) {
searchDirs.clear();
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
// Add the standard path for libmfx1 install in Ubuntu
searchDirs.push_back("/usr/lib/x86_64-linux-gnu");
--- origsrc/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_lowlatency.cpp 2024-02-21 06:41:06.000000000 +0900
+++ src/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_lowlatency.cpp 2024-02-21 15:46:45.692207300 +0900
@@ -18,6 +18,9 @@
#define LIB_ONEVPL L"libmfx64-gen.dll"
#define LIB_MSDK L"libmfxhw64.dll"
#endif
+#elif defined(__CYGWIN__)
+ #define LIB_ONEVPL "libmfx64-gen.dll"
+ #define LIB_MSDK "libmfxhw64.dll"
#elif defined(__linux__)
// Linux x64
#define LIB_ONEVPL "libmfx-gen.so.1.2"
@@ -191,7 +194,7 @@ mfxStatus LoaderCtxVPL::LoadLibsFromSyst
}
mfxStatus LoaderCtxVPL::LoadLibsFromMultipleDirs(LibType libType) {
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
// clang-format off
// standard paths for RT installation on Linux
--- origsrc/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_msdk.cpp 2024-02-21 06:41:06.000000000 +0900
+++ src/libvpl-2.10.2/libvpl/src/mfx_dispatcher_vpl_msdk.cpp 2024-02-21 15:47:17.135104700 +0900
@@ -11,7 +11,7 @@
#include "src/mfx_dispatcher_vpl_win.h"
#endif
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
#include <pthread.h>
#define strncpy_s(dst, size, src, cnt) strncpy((dst), (src), (cnt)) // NOLINT
#endif
@@ -97,7 +97,7 @@ static const mfxImplementedFunctions msd
(mfxChar**)msdkImplFuncsNames
};
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
// optional extBuf to limit threads created in MSDK session creation
// to enable, set vplParam.NumExtParam and vplParam.ExtParam before calling MFXInitEx2()
static const mfxExtThreadsParam extThreadParam = {
@@ -142,7 +142,7 @@ mfxStatus LoaderCtxMSDK::OpenSession(mfx
mfxInitializationParam vplParam = {};
vplParam.AccelerationMode = accelMode;
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
vplParam.ExtParam = (mfxExtBuffer **)&extParams;
vplParam.NumExtParam = 1;
#else
@@ -183,7 +183,7 @@ mfxAccelerationMode LoaderCtxMSDK::CvtAc
}
mfxStatus LoaderCtxMSDK::GetDefaultAccelType(mfxU32 adapterID, mfxIMPL *implDefault, mfxU64 *luid) {
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
// VAAPI only
*implDefault = MFX_IMPL_VIA_VAAPI;
*luid = 0;
@@ -235,7 +235,7 @@ mfxStatus LoaderCtxMSDK::QueryAPIVersion
vplParam.AccelerationMode =
(mfxAccelerationMode)CvtAccelType(MFX_IMPL_HARDWARE, implDefault & 0xFF00);
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
vplParam.ExtParam = (mfxExtBuffer **)&extParams;
vplParam.NumExtParam = 1;
#else
@@ -279,7 +279,7 @@ mfxStatus LoaderCtxMSDK::QueryMSDKCaps(S
m_libNameFull = libNameFull;
m_deviceID = 0;
-#ifdef __linux__
+#if defined(__linux__) || defined(__CYGWIN__)
// require pthreads to be linked in for MSDK RT to load
pthread_key_t pkey;
if (pthread_key_create(&pkey, NULL) == 0) {
@@ -510,7 +510,7 @@ mfxStatus LoaderCtxMSDK::GetRenderNodeDe
vendorID = 0;
deviceID = 0;
-#if defined(__linux__)
+#if defined(__linux__) || defined(__CYGWIN__)
mfxU32 DRMRenderNodeNum = 128 + adapterID;
std::string nodeStr = std::to_string(DRMRenderNodeNum);
@@ -583,7 +583,7 @@ mfxStatus LoaderCtxMSDK::QueryExtDeviceI
luidArr >>= 8;
}
}
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__CYGWIN__)
extDeviceID->DRMPrimaryNodeNum = adapterID;
extDeviceID->DRMRenderNodeNum = 128 + adapterID;
#endif
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ITP] libvpl
2024-02-21 16:41 [ITP] libvpl Takashi Yano
@ 2024-02-22 5:40 ` Marco Atzeri
0 siblings, 0 replies; 2+ messages in thread
From: Marco Atzeri @ 2024-02-22 5:40 UTC (permalink / raw)
To: cygwin-apps
On 21/02/2024 17:41, Takashi Yano via Cygwin-apps wrote:
> I would like to propose new package libvpl.
>
> This is Intel GPU accelerator driver dispatcher, which has
> the same function with mfx_dispatch package.
>
> mfx_dispatch is used by ffmpeg package, however, recent
> ffmpeg complains that libmfx is deprecated and use libvpl
> instead.
>
+libvpl Takashi Yano
your score is now:
$ grep Yano cygwin-pkg-maint |wc -l
63
:-)
Thanks
Marco
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-22 5:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-21 16:41 [ITP] libvpl Takashi Yano
2024-02-22 5:40 ` Marco Atzeri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).