View | Details | Raw Unified | Return to bug 274526 | Differences between
and this patch

Collapse All | Expand All

(-)./Makefile (-24 / +21 lines)
Lines 1-6 Link Here
1
PORTNAME=	x265
1
PORTNAME=	x265
2
PORTVERSION=	3.4
2
DISTVERSION=	3.5
3
PORTREVISION=	2
4
CATEGORIES=	multimedia
3
CATEGORIES=	multimedia
5
MASTER_SITES=	https://bitbucket.org/multicoreware/x265_git/get/${BB_TAG}.tar.gz?meow=/
4
MASTER_SITES=	https://bitbucket.org/multicoreware/x265_git/get/${BB_TAG}.tar.gz?meow=/
6
5
Lines 13-36 LICENSE_FILE= ${WRKSRC:H}/COPYING Link Here
13
12
14
USES=		cmake compiler:c++14-lang cpe pathfix dos2unix
13
USES=		cmake compiler:c++14-lang cpe pathfix dos2unix
15
14
16
CPE_VENDOR=		multicorewareinc
15
CPE_VENDOR=	multicorewareinc
16
DOS2UNIX_FILES=	abrEncApp.cpp
17
USE_LDCONFIG=	yes
18
CMAKE_ARGS=	-DENABLE_TESTS=on -DENABLE_HDR10_PLUS:BOOL=true
19
LDFLAGS_i386=	-Wl,-znotext
20
EXTRACT_AFTER_ARGS+=	--exclude compat --strip-components=1
21
PATCH_WRKSRC=	${WRKSRC:H}
22
WRKSRC=		${WRKDIR}/source
17
23
18
BB_TAG=	25b2c07035ff	# Top of the Release_3.4 branch at this time
24
BB_TAG=		8f18e3a	# Top of the Release_3.5 branch at this time
19
25
20
OPTIONS_DEFINE=		DEBUG OPTIMIZED_FLAGS VMAF
26
OPTIONS_DEFINE=		DEBUG OPTIMIZED_FLAGS VMAF
21
OPTIONS_DEFAULT=	OPTIMIZED_FLAGS HI8P HI10P HI12P
22
OPTIONS_DEFINE_aarch64=	ASM
27
OPTIONS_DEFINE_aarch64=	ASM
23
OPTIONS_DEFINE_amd64=	ASM SVTHEVC
28
OPTIONS_DEFINE_amd64=	ASM SVTHEVC
24
OPTIONS_DEFINE_i386=	ASM
29
OPTIONS_DEFINE_i386=	ASM
25
OPTIONS_DEFINE_powerpc64=	ASM
30
OPTIONS_DEFINE_powerpc64=	ASM
26
OPTIONS_DEFINE_powerpc64le=	ASM
31
OPTIONS_DEFINE_powerpc64le=	ASM
32
OPTIONS_DEFAULT=	OPTIMIZED_FLAGS HI8P HI10P HI12P
27
OPTIONS_DEFAULT_amd64=	ASM
33
OPTIONS_DEFAULT_amd64=	ASM
28
OPTIONS_DEFAULT_powerpc64le=	ASM
34
OPTIONS_DEFAULT_powerpc64le=	ASM
29
30
OPTIONS_MULTI=		PixelWidth
35
OPTIONS_MULTI=		PixelWidth
31
OPTIONS_MULTI_PixelWidth=HI8P HI10P HI12P
36
OPTIONS_MULTI_PixelWidth=HI8P HI10P HI12P
32
37
33
DOS2UNIX_FILES=		abrEncApp.cpp
38
DEBUG_DESC=	Enable debugging
39
HI10P_DESC=	Enable 10-bit pixels (may break on i386)
40
HI12P_DESC=	Enable 12-bit pixels (may break on i386)
41
HI8P_DESC=	Enable 8-bit pixel-width (you, probably, want this)
42
OPTIMIZED_FLAGS_DESC=	Enable O3 optimization
43
SVTHEVC_DESC=	HEVC encoding via SVT-HEVC
44
VMAF_DESC=	Per frame and aggregate VMAF score
45
34
DEBUG_PREVENTS=		OPTIMIZED_FLAGS
46
DEBUG_PREVENTS=		OPTIMIZED_FLAGS
35
DEBUG_PREVENTS_MSG=	Optimizations are incompatible with debugging code
47
DEBUG_PREVENTS_MSG=	Optimizations are incompatible with debugging code
36
DEBUG_CMAKE_ON=		-DCMAKE_ASM_NASM_FLAGS:STRING="-g -O0"
48
DEBUG_CMAKE_ON=		-DCMAKE_ASM_NASM_FLAGS:STRING="-g -O0"
Lines 43-63 VMAF_USES= localbase:ldflags Link Here
43
VMAF_CMAKE_BOOL=	ENABLE_LIBVMAF
55
VMAF_CMAKE_BOOL=	ENABLE_LIBVMAF
44
VMAF_CMAKE_ON=	-DVMAF_INCLUDE_DIR:PATH="${LOCALBASE}/include/libvmaf"
56
VMAF_CMAKE_ON=	-DVMAF_INCLUDE_DIR:PATH="${LOCALBASE}/include/libvmaf"
45
57
46
DEBUG_DESC=	Enable debugging
47
HI8P_DESC=	Enable 8-bit pixel-width (you, probably, want this)
48
HI10P_DESC=	Enable 10-bit pixels (may break on i386)
49
HI12P_DESC=	Enable 12-bit pixels (may break on i386)
50
OPTIMIZED_FLAGS_DESC=	Enable O3 optimization
51
SVTHEVC_DESC=	HEVC encoding via SVT-HEVC
52
VMAF_DESC=	Per frame and aggregate VMAF score
53
54
USE_LDCONFIG=	yes
55
CMAKE_ARGS=	-DENABLE_TESTS=on -DENABLE_HDR10_PLUS:BOOL=true
56
LDFLAGS_i386=	-Wl,-znotext
57
EXTRACT_AFTER_ARGS+=	--exclude compat --strip-components=1
58
PATCH_WRKSRC=	${WRKSRC:H}
59
WRKSRC=		${WRKDIR}/source
60
61
.include <bsd.port.options.mk>
58
.include <bsd.port.options.mk>
62
59
63
.if ${ARCH} == aarch64 && ${PORT_OPTIONS:MASM}
60
.if ${ARCH} == aarch64 && ${PORT_OPTIONS:MASM}
Lines 103-111 ASSEMBLY=true Link Here
103
.endif
100
.endif
104
101
105
.if ${PORT_OPTIONS:MASM}
102
.if ${PORT_OPTIONS:MASM}
106
POWER8=	true
103
POWER8=true
107
.else
104
.else
108
POWER8=	false
105
POWER8=false
109
.endif
106
.endif
110
107
111
pre-build::
108
pre-build::
(-)./distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1600662771
1
TIMESTAMP = 1688956851
2
SHA256 (x265-3.4.tar.gz) = 01f17d94689ef79807fa2b4bd7f5f58bb18416e72a135c7f56c30162a980cfb8
2
SHA256 (x265-3.5.tar.gz) = 3c660f30f49ecf734252c7b4bc8464ebca0b34609f85a1bf04d5af12b87f7ffd
3
SIZE (x265-3.4.tar.gz) = 1532396
3
SIZE (x265-3.5.tar.gz) = 1625431
(-)./files/patch-source_CMakeLists.txt (-7 / +7 lines)
Lines 1-15 Link Here
1
--- source/CMakeLists.txt.orig	2021-10-31 01:46:10 UTC
1
--- source/CMakeLists.txt.orig	2023-06-27 14:11:49 UTC
2
+++ source/CMakeLists.txt
2
+++ source/CMakeLists.txt
3
@@ -43,7 +43,7 @@ set(X86_ALIASES x86 i386 i686 x86_64 amd64)
3
@@ -49,7 +49,7 @@ set(ARM64_ALIASES arm64 arm64e aarch64)
4
 set(ARM_ALIASES armv6l armv7l aarch64)
5
 list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
4
 list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
6
 list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
5
 list(FIND ARM_ALIASES "${SYSPROC}" ARMMATCH)
6
 list(FIND ARM64_ALIASES "${SYSPROC}" ARM64MATCH)
7
-set(POWER_ALIASES ppc64 ppc64le)
7
-set(POWER_ALIASES ppc64 ppc64le)
8
+set(POWER_ALIASES powerpc64 powerpc64le ppc64 ppc64le)
8
+set(POWER_ALIASES powerpc64 powerpc64le ppc64 ppc64le)
9
 list(FIND POWER_ALIASES "${SYSPROC}" POWERMATCH)
9
 list(FIND POWER_ALIASES "${SYSPROC}" POWERMATCH)
10
 if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
10
 if(X86MATCH GREATER "-1")
11
     set(X86 1)
11
     set(X86 1)
12
@@ -121,6 +121,7 @@ if(UNIX)
12
@@ -130,6 +130,7 @@ if(UNIX)
13
     option(ENABLE_LIBVMAF "Enable VMAF" OFF)
13
     option(ENABLE_LIBVMAF "Enable VMAF" OFF)
14
     if(ENABLE_LIBVMAF)
14
     if(ENABLE_LIBVMAF)
15
         add_definitions(-DENABLE_LIBVMAF)
15
         add_definitions(-DENABLE_LIBVMAF)
Lines 17-23 Link Here
17
     endif()
17
     endif()
18
 endif(UNIX)
18
 endif(UNIX)
19
 
19
 
20
@@ -592,12 +593,6 @@ if(ENABLE_HDR10_PLUS)
20
@@ -623,12 +624,6 @@ if(ENABLE_HDR10_PLUS)
21
         ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
21
         ARCHIVE DESTINATION ${LIB_INSTALL_DIR})
22
 endif()
22
 endif()
23
 
23
 
Lines 30-36 Link Here
30
 install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
30
 install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
31
 if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))
31
 if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))
32
     if(MSVC_IDE)
32
     if(MSVC_IDE)
33
@@ -649,7 +644,10 @@ if(ENABLE_SHARED)
33
@@ -680,7 +675,10 @@ if(ENABLE_SHARED)
34
     if(EXTRA_LIB)
34
     if(EXTRA_LIB)
35
         target_link_libraries(x265-shared ${EXTRA_LIB})
35
         target_link_libraries(x265-shared ${EXTRA_LIB})
36
     endif()
36
     endif()
(-)./files/patch-source_cmake_Findsvthevc.cmake (-3 / +5 lines)
Lines 1-6 Link Here
1
--- source/cmake/Findsvthevc.cmake	2020-05-29 17:39:35.000000000 +0000
1
--- source/cmake/Findsvthevc.cmake.orig	2023-05-08 09:43:31 UTC
2
+++ source/cmake/Findsvthevc.cmake	2020-08-07 02:26:55.307048000 +0000
2
+++ source/cmake/Findsvthevc.cmake
3
@@ -39,9 +39,5 @@
3
@@ -38,11 +38,7 @@ if(SVT_HEVC_INCLUDE_DIR)
4
         string(REGEX MATCH "SVT_VERSION_PATCHLEVEL  \\(([0-9]*)\\)" _ ${version})
4
         set(SVT_VERSION_PATCHLEVEL ${CMAKE_MATCH_1})
5
         set(SVT_VERSION_PATCHLEVEL ${CMAKE_MATCH_1})
5
 
6
 
6
-        if(NOT ${SVT_VERSION_MAJOR} EQUAL "1" OR NOT ${SVT_VERSION_MINOR} EQUAL "4" OR NOT ${SVT_VERSION_PATCHLEVEL} EQUAL "1")
7
-        if(NOT ${SVT_VERSION_MAJOR} EQUAL "1" OR NOT ${SVT_VERSION_MINOR} EQUAL "4" OR NOT ${SVT_VERSION_PATCHLEVEL} EQUAL "1")
Lines 11-13 Link Here
11
+        message(STATUS "-- Found SVT-HEVC Lib Version: ${SVT_VERSION_MAJOR}.${SVT_VERSION_MINOR}.${SVT_VERSION_PATCHLEVEL}")
12
+        message(STATUS "-- Found SVT-HEVC Lib Version: ${SVT_VERSION_MAJOR}.${SVT_VERSION_MINOR}.${SVT_VERSION_PATCHLEVEL}")
12
     else()
13
     else()
13
         message (SEND_ERROR "-- Required version of SVT-HEVC Lib: ${SVT_VERSION_MAJOR_REQUIRED}.${SVT_VERSION_MINOR_REQUIRED}.${SVT_VERSION_PATCHLEVEL_REQUIRED}; Aborting configure  ")
14
         message (SEND_ERROR "-- Required version of SVT-HEVC Lib: ${SVT_VERSION_MAJOR_REQUIRED}.${SVT_VERSION_MINOR_REQUIRED}.${SVT_VERSION_PATCHLEVEL_REQUIRED}; Aborting configure  ")
15
     endif()
(-)./files/patch-source_common_version.cpp (-10 / +1 lines)
Lines 1-4 Link Here
1
--- source/common/version.cpp.orig	2020-05-29 17:39:35 UTC
1
--- source/common/version.cpp.orig	2023-06-27 14:11:49 UTC
2
+++ source/common/version.cpp
2
+++ source/common/version.cpp
3
@@ -63,6 +63,8 @@
3
@@ -63,6 +63,8 @@
4
 #define ONOS    "[Linux]"
4
 #define ONOS    "[Linux]"
Lines 9-20 Link Here
9
 #elif  __CYGWIN__
9
 #elif  __CYGWIN__
10
 #define ONOS    "[Cygwin]"
10
 #define ONOS    "[Cygwin]"
11
 #elif __APPLE__
11
 #elif __APPLE__
12
@@ -71,7 +73,7 @@
13
 #define ONOS    "[Unk-OS]"
14
 #endif
15
 
16
-#if X86_64
17
+#if defined(X86_64) || X265_ARCH_ARM64
18
 #define BITS    "[64 bit]"
19
 #else
20
 #define BITS    "[32 bit]"
(-)./files/patch-source_encoder_api.cpp (-6 / +13 lines)
Lines 8-16 See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id= Link Here
8
8
9
	-mi
9
	-mi
10
10
11
--- source/encoder/api.cpp	2020-05-29 13:39:35.000000000 -0400
11
--- source/encoder/api.cpp.orig	2023-06-27 14:11:49 UTC
12
+++ source/encoder/api.cpp	2020-08-06 22:51:30.227635000 -0400
12
+++ source/encoder/api.cpp
13
@@ -451,5 +451,7 @@
13
@@ -449,14 +449,18 @@ int x265_encoder_encode(x265_encoder *enc, x265_nal **
14
 
14
                 if (pic_in->rpu.payloadSize)
15
                 if (pic_in->rpu.payloadSize)
15
                 {
16
                 {
16
+#if ! SVT_CHECK_VERSION(1, 5, 0)
17
+#if ! SVT_CHECK_VERSION(1, 5, 0)
Lines 18-24 See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id= Link Here
18
+#endif
19
+#endif
19
                     memcpy(inputData->dolbyVisionRpu.payload, pic_in->rpu.payload, pic_in->rpu.payloadSize);
20
                     memcpy(inputData->dolbyVisionRpu.payload, pic_in->rpu.payload, pic_in->rpu.payloadSize);
20
                     inputData->dolbyVisionRpu.payloadSize = pic_in->rpu.payloadSize;
21
                     inputData->dolbyVisionRpu.payloadSize = pic_in->rpu.payloadSize;
21
@@ -458,5 +460,7 @@
22
                     inputData->dolbyVisionRpu.payloadType = NAL_UNIT_UNSPECIFIED;
23
                 }
22
                 else
24
                 else
23
                 {
25
                 {
24
+#if ! SVT_CHECK_VERSION(1, 5, 0)
26
+#if ! SVT_CHECK_VERSION(1, 5, 0)
Lines 26-32 See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id= Link Here
26
+#endif
28
+#endif
27
                     inputData->dolbyVisionRpu.payloadSize = 0;
29
                     inputData->dolbyVisionRpu.payloadSize = 0;
28
                 }
30
                 }
29
@@ -696,5 +700,7 @@
31
 
32
@@ -702,7 +706,9 @@ void x265_encoder_close(x265_encoder *enc)
33
 
30
             svt_print_summary(enc);
34
             svt_print_summary(enc);
31
             EB_H265_ENC_INPUT *inputData = (EB_H265_ENC_INPUT*)encoder->m_svtAppData->inputPictureBuffer->pBuffer;
35
             EB_H265_ENC_INPUT *inputData = (EB_H265_ENC_INPUT*)encoder->m_svtAppData->inputPictureBuffer->pBuffer;
32
+#if ! SVT_CHECK_VERSION(1, 5, 0)
36
+#if ! SVT_CHECK_VERSION(1, 5, 0)
Lines 34-44 See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id= Link Here
34
+#endif
38
+#endif
35
 
39
 
36
             X265_FREE(inputData);
40
             X265_FREE(inputData);
37
@@ -2052,5 +2058,7 @@
41
             X265_FREE(encoder->m_svtAppData->inputPictureBuffer);
42
@@ -2063,7 +2069,9 @@ int svt_initialise_input_buffer(x265_encoder *enc)
43
     inputPtr->pBuffer = (unsigned char*)x265_malloc(sizeof(EB_H265_ENC_INPUT));
38
 
44
 
39
     EB_H265_ENC_INPUT *inputData = (EB_H265_ENC_INPUT*)inputPtr->pBuffer;
45
     EB_H265_ENC_INPUT *inputData = (EB_H265_ENC_INPUT*)inputPtr->pBuffer;
40
+#if ! SVT_CHECK_VERSION(1, 5, 0)
46
+#if ! SVT_CHECK_VERSION(1, 5, 0)
41
     inputData->dolbyVisionRpu.payload = NULL;
47
     inputData->dolbyVisionRpu.payload = NULL;
42
+#endif
48
+#endif
43
     inputData->dolbyVisionRpu.payloadSize = 0;
49
     inputData->dolbyVisionRpu.payloadSize = 0;
50
 
44
 
51
 
(-)./files/patch-source_x265.h (-4 / +4 lines)
Lines 1-13 Link Here
1
https://github.com/Netflix/vmaf/commit/122089fa3d23
1
https://github.com/Netflix/vmaf/commit/122089fa3d23
2
2
3
--- source/x265.h.orig	2020-09-16 15:52:49 UTC
3
--- source/x265.h.orig	2023-06-27 14:11:49 UTC
4
+++ source/x265.h
4
+++ source/x265.h
5
@@ -733,7 +733,7 @@ typedef struct x265_vmaf_commondata
5
@@ -753,7 +753,7 @@ typedef struct x265_vmaf_commondata
6
     int enable_conf_interval;
6
     int enable_conf_interval;
7
 }x265_vmaf_commondata;
7
 }x265_vmaf_commondata;
8
 
8
 
9
-static const x265_vmaf_commondata vcd[] = { { NULL, (char *)"/usr/local/share/model/vmaf_v0.6.1.pkl", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 1, 0 } };
9
-static const x265_vmaf_commondata vcd[] = { { NULL, (char *)"/usr/local/share/model/vmaf_v0.6.1.pkl", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 1, 0 } };
10
+static const x265_vmaf_commondata vcd[] = { { NULL, (char *)"/usr/local/share/model/vmaf_v0.6.1.json", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 1, 0 } };
10
+static const x265_vmaf_commondata vcd[] = { { NULL, (char *)"/usr/local/share/model/vmaf_v0.6.1.json", NULL, NULL, 0, 0, 0, 0, 0, 0, 0, NULL, 0, 1, 0 } };
11
 
11
 
12
 /* x265 input parameters
12
 typedef struct x265_temporal_layer {
13
  *
13
     int poc_offset;      /* POC offset */
(-)./pkg-plist (-1 / +1 lines)
Lines 6-10 lib/libhdr10plus.a Link Here
6
lib/libhdr10plus.so
6
lib/libhdr10plus.so
7
lib/libx265.a
7
lib/libx265.a
8
lib/libx265.so
8
lib/libx265.so
9
lib/libx265.so.192
9
lib/libx265.so.208
10
libdata/pkgconfig/x265.pc
10
libdata/pkgconfig/x265.pc

Return to bug 274526