aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/svt-av1
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/svt-av1
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/svt-av1')
-rw-r--r--vcpkg/ports/svt-av1/no-force-llvm.diff13
-rw-r--r--vcpkg/ports/svt-av1/no-safestringlib.diff13
-rw-r--r--vcpkg/ports/svt-av1/portfile.cmake58
-rw-r--r--vcpkg/ports/svt-av1/unvendor-fastfeat.diff107
-rw-r--r--vcpkg/ports/svt-av1/vcpkg.json15
5 files changed, 206 insertions, 0 deletions
diff --git a/vcpkg/ports/svt-av1/no-force-llvm.diff b/vcpkg/ports/svt-av1/no-force-llvm.diff
new file mode 100644
index 0000000..32c9c02
--- /dev/null
+++ b/vcpkg/ports/svt-av1/no-force-llvm.diff
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 57100575..65b5b775 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -200,7 +200,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_OUTPUT_DIRECTORY})
+ set(REQUIRES_PRIVATE "")
+
+ #Clang support, required to build static with LTO
+-if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND UNIX AND NOT APPLE)
++if(FALSE)
+ find_program(LLVM_LD_EXE llvm-ld)
+ find_program(LLVM_AR_EXE llvm-ar)
+ find_program(LLVM_RANLIB_EXE llvm-ranlib)
diff --git a/vcpkg/ports/svt-av1/no-safestringlib.diff b/vcpkg/ports/svt-av1/no-safestringlib.diff
new file mode 100644
index 0000000..2ea8aa3
--- /dev/null
+++ b/vcpkg/ports/svt-av1/no-safestringlib.diff
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 57100575..d1dbd6f5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -528,7 +528,7 @@ set_property(DIRECTORY .
+ $<$<BOOL:${HAVE_STRNCPY_S}>:HAVE_STRNCPY_S=1>
+ $<$<BOOL:${HAVE_STRCPY_S}>:HAVE_STRCPY_S=1>
+ $<$<BOOL:${WIN32}>:_WIN32_WINNT=0x0601>)
+-if(NOT HAVE_STRCPY_S OR NOT HAVE_STRNCPY_S OR NOT HAVE_STRNLEN_S)
++if(FALSE)
+ add_library(safestringlib OBJECT
+ third_party/safestringlib/safeclib_private.h
+ third_party/safestringlib/safe_lib.h
diff --git a/vcpkg/ports/svt-av1/portfile.cmake b/vcpkg/ports/svt-av1/portfile.cmake
new file mode 100644
index 0000000..5c38f06
--- /dev/null
+++ b/vcpkg/ports/svt-av1/portfile.cmake
@@ -0,0 +1,58 @@
+vcpkg_from_gitlab(
+ GITLAB_URL https://gitlab.com
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO AOMediaCodec/SVT-AV1
+ REF "v${VERSION}"
+ SHA512 4301e923965e3bff30a0fd2f74ae023d19260f91c2361d48ea7bc1718f501dcca73fa17cb8795b23392ca1bfbe1f4d55edcbb5ce06a2fa9e41da36c5166f527d
+ PATCHES
+ no-force-llvm.diff
+ no-safestringlib.diff
+ unvendor-fastfeat.diff
+)
+
+file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/aom/inc/")
+file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/aom_dsp/")
+file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/fastfeat/")
+file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/googletest/")
+file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/safestringlib/")
+
+if (VCPKG_TARGET_ARCHITECTURE MATCHES "^(x86|x64)")
+ vcpkg_find_acquire_program(NASM)
+ set(SIMD_OPTIONS -DCOMPILE_C_ONLY=OFF "-DCMAKE_ASM_NASM_COMPILER=${NASM}")
+else()
+ if(VCPKG_TARGET_ARCHITECTURE MATCHES "^(arm64|arm64ec)$" AND NOT VCPKG_TARGET_IS_WINDOWS)
+ set(SIMD_OPTIONS -DCOMPILE_C_ONLY=OFF)
+ else()
+ set(SIMD_OPTIONS -DCOMPILE_C_ONLY=ON)
+ endif()
+endif()
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${SIMD_OPTIONS}
+ -DBUILD_APPS=OFF
+ -DREPRODUCIBLE_BUILDS=ON
+ -DEXCLUDE_HASH=OFF
+ -DBUILD_TESTING=OFF
+ -DSVT_AV1_LTO=OFF
+ "-DFASTFEAT_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/"
+ OPTIONS_RELEASE
+ "-DFASTFEAT_LIB_DIR=${CURRENT_INSTALLED_DIR}/lib/"
+ "-DCMAKE_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Bin/Release"
+ OPTIONS_DEBUG
+ "-DFASTFEAT_LIB_DIR=${CURRENT_INSTALLED_DIR}/debug/lib/"
+ "-DCMAKE_OUTPUT_DIRECTORY=${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Bin/Debug"
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+vcpkg_fixup_pkgconfig()
+
+if("tool" IN_LIST FEATURES)
+ vcpkg_copy_tools(TOOL_NAMES SvtAv1EncApp AUTO_CLEAN)
+endif()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md")
diff --git a/vcpkg/ports/svt-av1/unvendor-fastfeat.diff b/vcpkg/ports/svt-av1/unvendor-fastfeat.diff
new file mode 100644
index 0000000..3f43936
--- /dev/null
+++ b/vcpkg/ports/svt-av1/unvendor-fastfeat.diff
@@ -0,0 +1,107 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 57100575..47a9e709 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -721,6 +721,5 @@ if(BUILD_TESTING)
+ add_subdirectory(third_party/googletest)
+ endif()
+
+-add_subdirectory(third_party/fastfeat)
+
+ install(DIRECTORY ${PROJECT_SOURCE_DIR}/Source/API/ DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/svt-av1" FILES_MATCHING PATTERN "*.h")
+diff --git a/Source/Lib/CMakeLists.txt b/Source/Lib/CMakeLists.txt
+index 03ffe4e2..43325e91 100644
+--- a/Source/Lib/CMakeLists.txt
++++ b/Source/Lib/CMakeLists.txt
+@@ -47,7 +47,7 @@ endif()
+ include_directories(${PROJECT_SOURCE_DIR}/Source/API/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/Codec/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/C_DEFAULT/
+- ${PROJECT_SOURCE_DIR}/third_party/fastfeat/)
++)
+
+ add_library(SvtAv1Enc)
+ # Required for cmake to be able to tell Xcode how to link all of the object files
+@@ -98,7 +98,6 @@ endif()
+
+ # Encoder Lib Source Files
+ target_sources(SvtAv1Enc PRIVATE
+- $<TARGET_OBJECTS:FASTFEAT>
+ $<TARGET_OBJECTS:GLOBALS>
+ $<TARGET_OBJECTS:CODEC>
+ $<TARGET_OBJECTS:C_DEFAULT>)
+@@ -133,6 +132,14 @@ if(common_lib_source)
+ target_sources(SvtAv1Enc PRIVATE ${common_lib_source})
+ endif()
+
++find_library(FASTFEAT REQUIRED
++ NAMES fastfeat
++ PATHS "${FASTFEAT_LIB_DIR}"
++ NO_DEFAULT_PATH
++)
++list(APPEND PLATFORM_LIBS ${FASTFEAT})
++set(LIBS_PRIVATE "${LIBS_PRIVATE} -lfastfeat")
++
+ set_target_properties(SvtAv1Enc PROPERTIES VERSION ${ENC_VERSION})
+ set_target_properties(SvtAv1Enc PROPERTIES SOVERSION ${ENC_VERSION_MAJOR})
+ set_target_properties(SvtAv1Enc PROPERTIES C_VISIBILITY_PRESET hidden)
+diff --git a/Source/Lib/Codec/CMakeLists.txt b/Source/Lib/Codec/CMakeLists.txt
+index d3e95e4f..63b32eda 100644
+--- a/Source/Lib/Codec/CMakeLists.txt
++++ b/Source/Lib/Codec/CMakeLists.txt
+@@ -39,7 +39,7 @@ include_directories(${PROJECT_SOURCE_DIR}/Source/API/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/ASM_SSE4_1/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/ASM_AVX2/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/ASM_AVX512/
+- ${PROJECT_SOURCE_DIR}/third_party/fastfeat/)
++)
+ elseif(NOT COMPILE_C_ONLY AND HAVE_ARM_PLATFORM)
+ include_directories(${PROJECT_SOURCE_DIR}/Source/API/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/Globals/
+@@ -50,14 +50,14 @@ include_directories(${PROJECT_SOURCE_DIR}/Source/API/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/ASM_NEON_I8MM/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/ASM_SVE/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/ASM_SVE2/
+- ${PROJECT_SOURCE_DIR}/third_party/fastfeat/)
++)
+ else ()
+ # Include Encoder Subdirectories
+ include_directories(${PROJECT_SOURCE_DIR}/Source/API/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/Globals/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/Codec/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/C_DEFAULT/
+- ${PROJECT_SOURCE_DIR}/third_party/fastfeat/)
++)
+ endif ()
+
+ set(all_files
+@@ -292,3 +292,4 @@ set(all_files
+ )
+
+ add_library(CODEC OBJECT ${all_files})
++target_include_directories(CODEC PRIVATE "${FASTFEAT_INCLUDE_DIR}")
+diff --git a/Source/Lib/Codec/corner_detect.c b/Source/Lib/Codec/corner_detect.c
+index 793919be..ca7e8537 100644
+--- a/Source/Lib/Codec/corner_detect.c
++++ b/Source/Lib/Codec/corner_detect.c
+@@ -18,7 +18,7 @@
+ #define FAST_BARRIER 18
+ int svt_av1_fast_corner_detect(unsigned char *buf, int width, int height, int stride, int *points, int max_points) {
+ int num_points;
+- xy *const frm_corners_xy = svt_aom_fast9_detect_nonmax(buf, width, height, stride, FAST_BARRIER, &num_points);
++ xy *const frm_corners_xy = fast9_detect_nonmax(buf, width, height, stride, FAST_BARRIER, &num_points);
+ num_points = (num_points <= max_points ? num_points : max_points);
+ if (num_points > 0 && frm_corners_xy) {
+ svt_memcpy(points, frm_corners_xy, sizeof(*frm_corners_xy) * num_points);
+diff --git a/Source/Lib/Globals/CMakeLists.txt b/Source/Lib/Globals/CMakeLists.txt
+index 47e20736..0d8e99e1 100644
+--- a/Source/Lib/Globals/CMakeLists.txt
++++ b/Source/Lib/Globals/CMakeLists.txt
+@@ -15,7 +15,6 @@
+ include_directories(../../../API
+ ${PROJECT_BINARY_DIR}/Source/Lib/Codec/
+ ${PROJECT_SOURCE_DIR}/Source/Lib/C_DEFAULT/
+- ${PROJECT_SOURCE_DIR}/third_party/fastfeat/
+ )
+
+ if(NOT COMPILE_C_ONLY AND HAVE_X86_PLATFORM)
diff --git a/vcpkg/ports/svt-av1/vcpkg.json b/vcpkg/ports/svt-av1/vcpkg.json
new file mode 100644
index 0000000..c84f97e
--- /dev/null
+++ b/vcpkg/ports/svt-av1/vcpkg.json
@@ -0,0 +1,15 @@
+{
+ "name": "svt-av1",
+ "version-semver": "3.1.2",
+ "description": "AV1 software video encoder library",
+ "homepage": "https://gitlab.com/AOMediaCodec/SVT-AV1",
+ "license": "BSD-3-Clause",
+ "supports": "!x86 & !arm32 & !uwp",
+ "dependencies": [
+ "fastfeat",
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ }
+ ]
+}