mirror of https://github.com/microsoft/vcpkg.git
[libvpl] New port [ffmpeg] switch qsv from mfx to vpl [fdk-aac] Fix android support (#51419)
Co-authored-by: Derek Cyrus-Chow <7149253+dcyruschow-cat@users.noreply.github.com>
This commit is contained in:
parent
353415a59f
commit
bc798071f7
|
|
@ -0,0 +1,35 @@
|
|||
diff --git a/libSBRdec/src/lpp_tran.cpp b/libSBRdec/src/lpp_tran.cpp
|
||||
index 68a25bff..01951c8d 100644
|
||||
--- a/libSBRdec/src/lpp_tran.cpp
|
||||
+++ b/libSBRdec/src/lpp_tran.cpp
|
||||
@@ -118,7 +118,11 @@ amm-info@iis.fraunhofer.de
|
||||
\sa lppTransposer(), main_audio.cpp, sbr_scale.h, \ref documentationOverview
|
||||
*/
|
||||
|
||||
-#ifdef __ANDROID__
|
||||
+#if __has_include(<android/ndk-version.h>)
|
||||
+#include <android/ndk-version.h>
|
||||
+#endif
|
||||
+
|
||||
+#if defined __ANDROID__ && !defined __ANDROID_NDK__
|
||||
#include "log/log.h"
|
||||
#endif
|
||||
|
||||
@@ -334,7 +338,7 @@ void lppTransposer(
|
||||
}
|
||||
}
|
||||
}
|
||||
-#ifdef __ANDROID__
|
||||
+#if defined __ANDROID__ && !defined __ANDROID_NDK__
|
||||
else {
|
||||
// Safetynet logging
|
||||
android_errorWriteLog(0x534e4554, "112160868");
|
||||
@@ -930,7 +934,7 @@ void lppTransposerHBE(
|
||||
FDKmemclear(&qmfBufferImag[i][targetStopBand], memSize);
|
||||
}
|
||||
}
|
||||
-#ifdef __ANDROID__
|
||||
+#if defined __ANDROID__ && !defined __ANDROID_NDK__
|
||||
else {
|
||||
// Safetynet logging
|
||||
android_errorWriteLog(0x534e4554, "112160868");
|
||||
|
|
@ -13,6 +13,8 @@ if(HE_AAC)
|
|||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
PATCHES
|
||||
cxx-linkage-pkgconfig.patch
|
||||
# https://github.com/mstorsjo/fdk-aac/commit/1844f0170c8917fe3cd09d662f171908042c0c9c
|
||||
fix-android.patch
|
||||
)
|
||||
else()
|
||||
list(PREPEND legal_notes "README.fedora")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"name": "fdk-aac",
|
||||
"version-semver": "2.0.3",
|
||||
"port-version": 1,
|
||||
"description": "A standalone Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android. Uses a fork without HE-AAC, HE-AACv2, or xHE-AAC support to avoid patent licensing and GPL compatibility issues when built without the he-aac option.",
|
||||
"homepage": "https://gitlab.freedesktop.org/wtaymans/fdk-aac-stripped",
|
||||
"license": "FDK-AAC",
|
||||
|
|
@ -16,8 +17,7 @@
|
|||
],
|
||||
"features": {
|
||||
"he-aac": {
|
||||
"description": "Support patent-encumbered HE-AAC, HE-AACv2, and xHE-AAC codec profiles. Do not distribute binaries with this option without the relevant patent licenses if you are in a jurisdiction that recognizes software patents. Might not be compatible with the GPL depending on legal interpretation. Refer to https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112",
|
||||
"supports": "!android"
|
||||
"description": "Support patent-encumbered HE-AAC, HE-AACv2, and xHE-AAC codec profiles. Do not distribute binaries with this option without the relevant patent licenses if you are in a jurisdiction that recognizes software patents. Might not be compatible with the GPL depending on legal interpretation. Refer to https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -567,11 +567,11 @@ else()
|
|||
endif()
|
||||
|
||||
if ("qsv" IN_LIST FEATURES)
|
||||
set(OPTIONS "${OPTIONS} --enable-libmfx --enable-encoder=h264_qsv --enable-decoder=h264_qsv")
|
||||
set(WITH_MFX ON)
|
||||
set(OPTIONS "${OPTIONS} --enable-libvpl --enable-encoder=h264_qsv --enable-decoder=h264_qsv")
|
||||
set(WITH_VPL ON)
|
||||
else()
|
||||
set(OPTIONS "${OPTIONS} --disable-libmfx")
|
||||
set(WITH_MFX OFF)
|
||||
set(OPTIONS "${OPTIONS} --disable-libvpl")
|
||||
set(WITH_VPL OFF)
|
||||
endif()
|
||||
|
||||
if ("vaapi" IN_LIST FEATURES)
|
||||
|
|
|
|||
|
|
@ -178,14 +178,14 @@ if(@WITH_THEORA@)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(@WITH_MFX@)
|
||||
pkg_check_modules(libmfx IMPORTED_TARGET libmfx)
|
||||
list(APPEND FFMPEG_LIBRARIES PkgConfig::libmfx)
|
||||
if(@WITH_VPL@)
|
||||
pkg_check_modules(libvpl IMPORTED_TARGET vpl)
|
||||
list(APPEND FFMPEG_LIBRARIES PkgConfig::libvpl)
|
||||
if(vcpkg_no_avcodec_target AND TARGET FFmpeg::avcodec)
|
||||
target_link_libraries(FFmpeg::avcodec INTERFACE PkgConfig::libmfx)
|
||||
target_link_libraries(FFmpeg::avcodec INTERFACE PkgConfig::libvpl)
|
||||
endif()
|
||||
if(vcpkg_no_avutil_target AND TARGET FFmpeg::avutil)
|
||||
target_link_libraries(FFmpeg::avutil INTERFACE PkgConfig::libmfx)
|
||||
target_link_libraries(FFmpeg::avutil INTERFACE PkgConfig::libvpl)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "ffmpeg",
|
||||
"version": "8.1",
|
||||
"port-version": 3,
|
||||
"port-version": 4,
|
||||
"description": [
|
||||
"A library to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.",
|
||||
"FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATE across Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations."
|
||||
|
|
@ -198,7 +198,7 @@
|
|||
"features": [
|
||||
"qsv"
|
||||
],
|
||||
"platform": "linux | (!osx & !uwp & !(arm & windows))"
|
||||
"platform": "(x64 | x86) & (windows | linux) & !uwp"
|
||||
},
|
||||
{
|
||||
"name": "ffmpeg",
|
||||
|
|
@ -553,9 +553,9 @@
|
|||
]
|
||||
},
|
||||
"qsv": {
|
||||
"description": "Intel QSV Codec",
|
||||
"description": "Intel QSV Codec via oneVPL",
|
||||
"dependencies": [
|
||||
"mfx-dispatch"
|
||||
"libvpl"
|
||||
]
|
||||
},
|
||||
"rubberband": {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
diff --git a/libvpl/CMakeLists.txt b/libvpl/CMakeLists.txt
|
||||
index 0419980..42a765a 100644
|
||||
--- a/libvpl/CMakeLists.txt
|
||||
+++ b/libvpl/CMakeLists.txt
|
||||
@@ -188,10 +188,22 @@ if(INSTALL_DEV)
|
||||
if(MINGW)
|
||||
# being conservative by restricting to MinGW, these are probably ok for
|
||||
# WIN32 in general
|
||||
- set(MINGW_LIBS "-lole32 -lgdi32 -luuid")
|
||||
+ set(WIN32_LIBS "-lole32 -lgdi32 -luuid")
|
||||
+ elseif(WIN32)
|
||||
+ set(WIN32_LIBS "-ladvapi32 -lole32")
|
||||
endif()
|
||||
+ set(CXX_LIB "")
|
||||
+ foreach(lib IN LISTS CMAKE_CXX_IMPLICIT_LINK_LIBRARIES)
|
||||
+ if(lib IN_LIST CMAKE_C_IMPLICIT_LINK_LIBRARIES)
|
||||
+ continue()
|
||||
+ elseif(EXISTS "${lib}")
|
||||
+ string(APPEND CXX_LIB " ${CMAKE_LINK_LIBRARY_FILE_FLAG}${lib}")
|
||||
+ else()
|
||||
+ string(APPEND CXX_LIB " ${CMAKE_LINK_LIBRARY_FLAG}${lib}")
|
||||
+ endif()
|
||||
+ endforeach()
|
||||
set(VPL_PKGCONFIG_DEPENDENT_LIBS
|
||||
- "${DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${MINGW_LIBS} ${CXX_LIB}")
|
||||
+ "${DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${WIN32_LIBS} ${CXX_LIB}")
|
||||
configure_file("pkgconfig/vpl.pc.in" "pkgconfig/vpl.pc" @ONLY)
|
||||
install(
|
||||
FILES "${CMAKE_CURRENT_BINARY_DIR}/pkgconfig/vpl.pc"
|
||||
diff --git a/libvpl/pkgconfig/vpl.pc.in b/libvpl/pkgconfig/vpl.pc.in
|
||||
index aa9b158..46b2c38 100644
|
||||
--- a/libvpl/pkgconfig/vpl.pc.in
|
||||
+++ b/libvpl/pkgconfig/vpl.pc.in
|
||||
@@ -1,6 +1,6 @@
|
||||
-prefix=@pc_rel_prefix@
|
||||
-libdir=@pc_rel_libdir@
|
||||
-includedir=@pc_rel_incdir@
|
||||
+prefix=${pcfiledir}/../..
|
||||
+libdir=${prefix}/lib
|
||||
+includedir=${prefix}/include
|
||||
|
||||
Name: Intel(R) Video Processing Library
|
||||
Description: Accelerated video decode, encode, and frame processing capabilities on Intel(R) GPUs
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO intel/libvpl
|
||||
REF "v${VERSION}"
|
||||
SHA512 bda6e8387f1e86eee86357a967ae58d9e87e2cada50317913ee8452e116220c5837643ea62c0b04baf9783daeca76d12ca63a34ce6acd6fb3ea2511bb47696bc
|
||||
HEAD_REF main
|
||||
PATCHES
|
||||
001-fix-pkgconfig.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" USE_MSVC_STATIC_RUNTIME)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DUSE_MSVC_STATIC_RUNTIME=${USE_MSVC_STATIC_RUNTIME}
|
||||
-DBUILD_TESTS=OFF
|
||||
-DINSTALL_EXAMPLES=OFF
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DINSTALL_DEV=ON
|
||||
-DINSTALL_LIB=ON
|
||||
-DCMAKE_INSTALL_LIBDIR=lib
|
||||
-DCMAKE_INSTALL_BINDIR=bin
|
||||
"-DVPL_INSTALL_LICENSEDIR=${CURRENT_PACKAGES_DIR}/share/copyright_tmp"
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/vpl" PACKAGE_NAME VPL)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS
|
||||
AND EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/vpl.pc"
|
||||
AND EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/vpld.lib")
|
||||
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/vpl.pc" " -lvpl" " -lvpld")
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/etc")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/etc")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/copyright_tmp")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "libvpl",
|
||||
"version": "2.16.0",
|
||||
"description": "Intel Video Processing Library (oneVPL) dispatcher",
|
||||
"homepage": "https://github.com/intel/libvpl",
|
||||
"license": "MIT",
|
||||
"supports": "(x64 | x86) & (windows | linux) & !uwp",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -284,18 +284,15 @@ fbgemm:arm64-osx=cascade
|
|||
fbgemm:arm64-windows=cascade
|
||||
fbthrift(android)=cascade
|
||||
fcl:arm64-linux=cascade
|
||||
ffmpeg[all](((!x86 & !x64) | (!android & !linux)) & (!windows | uwp) & !osx)=cascade
|
||||
ffmpeg[all-gpl](((!x86 & !x64) | (!android & !linux)) & (!windows | uwp) & !osx)=cascade
|
||||
ffmpeg[all-nonfree](((!x86 & !x64) | (!android & !linux)) & (!windows | uwp) & !osx)=cascade
|
||||
ffmpeg[all,all-gpl](x64 & android)=feature-fails
|
||||
ffmpeg[all](android | (linux & arm64))=feature-fails
|
||||
ffmpeg[all-gpl](android | (linux & arm64))=feature-fails
|
||||
ffmpeg[all-nonfree](android | (linux & arm64))=feature-fails
|
||||
ffmpeg[alsa](!linux & !android)=cascade # alsa supports
|
||||
ffmpeg[amf]:arm64-osx=cascade
|
||||
ffmpeg[avisynthplus]:arm64-windows=cascade
|
||||
ffmpeg[dav1d]:x86-windows=cascade
|
||||
ffmpeg[fdk-aac](android)=cascade
|
||||
ffmpeg[nvcodec,ffplay,opengl](android)=feature-fails
|
||||
ffmpeg[opengl]:arm64-linux=feature-fails
|
||||
ffmpeg[qsv](((!x86 & !x64) | (!android & !linux)) & (!windows | uwp))=cascade
|
||||
ffmpeg[opengl](android | (linux & arm64))=feature-fails
|
||||
ffmpeg[rubberband]:arm64-linux=cascade
|
||||
ffmpeg[tensorflow](windows)=cascade
|
||||
ffmpeg[vaapi]:arm64-linux=cascade
|
||||
|
|
|
|||
|
|
@ -2986,7 +2986,7 @@
|
|||
},
|
||||
"fdk-aac": {
|
||||
"baseline": "2.0.3",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"fdlibm": {
|
||||
"baseline": "5.3",
|
||||
|
|
@ -2998,7 +2998,7 @@
|
|||
},
|
||||
"ffmpeg": {
|
||||
"baseline": "8.1",
|
||||
"port-version": 3
|
||||
"port-version": 4
|
||||
},
|
||||
"ffmpeg-bin2c": {
|
||||
"baseline": "8.1",
|
||||
|
|
@ -5824,6 +5824,10 @@
|
|||
"baseline": "1.3.7",
|
||||
"port-version": 4
|
||||
},
|
||||
"libvpl": {
|
||||
"baseline": "2.16.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"libvpx": {
|
||||
"baseline": "1.16.0",
|
||||
"port-version": 1
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "fdbfb7b0c8ac1b8c4221bdc1fe2d06bd015ebe20",
|
||||
"version-semver": "2.0.3",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "6630e1ad1a78288e05968cb928aec60120540711",
|
||||
"version-semver": "2.0.3",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "3c613502bfbafe7fc10b7504e5bea2e8fb37775e",
|
||||
"version": "8.1",
|
||||
"port-version": 4
|
||||
},
|
||||
{
|
||||
"git-tree": "6b761cfd6d236878bef9bc2684cde2bc21341c6d",
|
||||
"version": "8.1",
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "68c0ca356b8b51646714f4d1be05acadf1cd60a8",
|
||||
"version": "2.16.0",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue