Here is an update to x265 4.1.
Tested on older amd64. Needs testing on modern amd64 for IBT.
aarch64 currently crashes in the NEON code. Could someone take a
look at this? Is this xonly or something else?
Index: Makefile
===================================================================
RCS file: /cvs/ports/multimedia/x265/Makefile,v
retrieving revision 1.59
diff -u -p -u -p -r1.59 Makefile
--- Makefile 7 May 2024 15:01:27 -0000 1.59
+++ Makefile 24 Nov 2024 06:08:21 -0000
@@ -1,12 +1,12 @@
COMMENT= free H.265/HEVC encoder
-VER= 3.6
+VER= 4.1
DISTNAME= x265_${VER}
PKGNAME= x265-${VER}
CATEGORIES= multimedia
SITES= https://bitbucket.org/multicoreware/x265_git/downloads/
-SHARED_LIBS= x265 24.0
+SHARED_LIBS= x265 25.0
HOMEPAGE= https://x265.org/
@@ -30,10 +30,8 @@ BUILD_DEPENDS+= devel/nasm
CONFIGURE_ARGS+=-DCMAKE_ASM_YASM_FLAGS_DEBUG="-g dwarf2" \
-DENABLE_PIC=On \
- -DENABLE_TESTS=On
-
-CONFIGURE_ARGS+=-DX265_VERSION=${VER} \
- -DX265_LATEST_TAG=${VER}
+ -DENABLE_TESTS=On \
+ -DGIT_ARCHETYPE=1
.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "i386"
CONFIGURE_ARGS+=-DENABLE_ASSEMBLY=Off
Index: distinfo
===================================================================
RCS file: /cvs/ports/multimedia/x265/distinfo,v
retrieving revision 1.27
diff -u -p -u -p -r1.27 distinfo
--- distinfo 7 May 2024 15:01:27 -0000 1.27
+++ distinfo 24 Nov 2024 06:08:21 -0000
@@ -1,2 +1,2 @@
-SHA256 (x265_3.6.tar.gz) = ZjUx80HFOJ9GDXMOYuEKT8yjQoyiyhCWk4Z7xf4uKAc=
-SIZE (x265_3.6.tar.gz) = 1655889
+SHA256 (x265_4.1.tar.gz) = oxaZxqiYBrdLAVHl5qffZd5LSQUEgv5ev4pDedevjyk=
+SIZE (x265_4.1.tar.gz) = 1725279
Index: patches/patch-source_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/multimedia/x265/patches/patch-source_CMakeLists_txt,v
retrieving revision 1.8
diff -u -p -u -p -r1.8 patch-source_CMakeLists_txt
--- patches/patch-source_CMakeLists_txt 7 May 2024 15:01:27 -0000 1.8
+++ patches/patch-source_CMakeLists_txt 24 Nov 2024 06:08:21 -0000
@@ -1,13 +1,29 @@
Index: source/CMakeLists.txt
--- source/CMakeLists.txt.orig
+++ source/CMakeLists.txt
-@@ -523,7 +523,8 @@ if(POWER)
+@@ -88,7 +88,7 @@ elseif(ARM64MATCH GREATER "-1")
+ option(AARCH64_WARNINGS_AS_ERRORS "Build with -Werror for AArch64 Intrinsics files" OFF)
+
+ option(AARCH64_RUNTIME_CPU_DETECT "Enable AArch64 run-time CPU feature detection" ON)
+- if(NOT CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin|Windows")
++ if(NOT CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD|OpenBSD|Darwin|Windows")
+ set(AARCH64_RUNTIME_CPU_DETECT OFF CACHE BOOL "" FORCE)
+ message(STATUS "Run-time CPU feature detection unsupported on this platform")
endif()
- endif()
+@@ -522,6 +522,16 @@ endif()
--include(Version) # determine X265_VERSION and X265_LATEST_TAG
-+set(X265_VERSION "unknown" CACHE STRING "")
-+set(X265_LATEST_TAG "0.0" CACHE STRING "")
- include_directories(. common encoder "${PROJECT_BINARY_DIR}")
+ if(ENABLE_ASSEMBLY)
+ add_definitions(-DENABLE_ASSEMBLY)
++endif()
++
++check_symbol_exists(getauxval sys/auxv.h HAVE_GETAUXVAL)
++if(HAVE_GETAUXVAL)
++ add_definitions(-DHAVE_GETAUXVAL=1)
++endif()
++
++check_symbol_exists(elf_aux_info sys/auxv.h HAVE_ELF_AUX_INFO)
++if(HAVE_ELF_AUX_INFO)
++ add_definitions(-DHAVE_ELF_AUX_INFO=1)
+ endif()
- option(ENABLE_PPA "Enable PPA profiling instrumentation" OFF)
+ option(CHECKED_BUILD "Enable run-time sanity checks (debugging)" OFF)
Index: patches/patch-source_common_aarch64_asm_S
===================================================================
RCS file: /cvs/ports/multimedia/x265/patches/patch-source_common_aarch64_asm_S,v
retrieving revision 1.4
diff -u -p -u -p -r1.4 patch-source_common_aarch64_asm_S
--- patches/patch-source_common_aarch64_asm_S 7 May 2024 15:01:27 -0000 1.4
+++ patches/patch-source_common_aarch64_asm_S 24 Nov 2024 06:08:21 -0000
@@ -1,7 +1,7 @@
Index: source/common/aarch64/asm.S
--- source/common/aarch64/asm.S.orig
+++ source/common/aarch64/asm.S
-@@ -97,6 +97,7 @@ ELF .hidden EXTERN_ASM\name
+@@ -107,6 +107,7 @@ ELF .hidden EXTERN_ASM\name
ELF .type EXTERN_ASM\name, %function
FUNC .func EXTERN_ASM\name
EXTERN_ASM\name:
Index: patches/patch-source_common_aarch64_cpu_h
===================================================================
RCS file: patches/patch-source_common_aarch64_cpu_h
diff -N patches/patch-source_common_aarch64_cpu_h
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-source_common_aarch64_cpu_h 24 Nov 2024 06:08:21 -0000
@@ -0,0 +1,25 @@
+Index: source/common/aarch64/cpu.h
+--- source/common/aarch64/cpu.h.orig
++++ source/common/aarch64/cpu.h
+@@ -119,7 +119,7 @@ static inline int aarch64_get_cpu_flags()
+ return flags;
+ }
+
+-#elif defined(__linux__)
++#elif HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO
+
+ #include <sys/auxv.h>
+
+@@ -133,10 +133,10 @@ static inline int aarch64_get_cpu_flags()
+ int flags = 0;
+
+ #if HAVE_NEON_DOTPROD || HAVE_SVE
+- unsigned long hwcap = getauxval(AT_HWCAP);
++ unsigned long hwcap = x265_getauxval(AT_HWCAP);
+
No comments:
Post a Comment