multimedia/ffmpeg: add another HEVC encoder
This commit is contained in:
parent
aa54922a20
commit
a246af30ce
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=493173
@ -401,6 +401,7 @@
|
||||
SUBDIR += subtitleripper
|
||||
SUBDIR += subtools
|
||||
SUBDIR += svt-av1
|
||||
SUBDIR += svt-hevc
|
||||
SUBDIR += svt-vp9
|
||||
SUBDIR += swfdec-gnome
|
||||
SUBDIR += syncplay
|
||||
|
@ -73,7 +73,7 @@ OPTIONS_RADIO_SSL= GNUTLS MBEDTLS OPENSSL
|
||||
OPTIONS_GROUP= LICENSE
|
||||
OPTIONS_GROUP_LICENSE= GPL3 NONFREE
|
||||
|
||||
OPTIONS_DEFINE_amd64= BEIGNET MMX SSE SVTAV1 SVTVP9
|
||||
OPTIONS_DEFINE_amd64= BEIGNET MMX SSE SVTAV1 SVTHEVC SVTVP9
|
||||
OPTIONS_DEFINE_armv6= VFP NEON
|
||||
OPTIONS_DEFINE_i386= BEIGNET MMX SSE
|
||||
OPTIONS_DEFAULT_amd64= MMX SSE
|
||||
@ -108,6 +108,7 @@ RTCPU_DESC= Detect CPU capabilities at runtime
|
||||
RTMP_DESC= RTMP(T)E protocol support
|
||||
SRT_DESC= Haivision SRT protocol via libsrt
|
||||
SVTAV1_DESC= AV1 encoding via SVT-AV1
|
||||
SVTHEVC_DESC= HEVC encoding via SVT-HEVC
|
||||
SVTVP9_DESC= VP9 encoding via SVT-VP9
|
||||
LIBRTMP_DESC= ${RTMP_DESC} via librtmp
|
||||
TENSORFLOW_DESC=TensorFlow as a DNN module backend for DNN based filters like sr
|
||||
@ -417,10 +418,23 @@ SVTAV1_PATCHFILES= 0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch:-p1:svtav1
|
||||
.if make(makesum)
|
||||
.MAKEFLAGS: WITH+=SVTAV1
|
||||
.else
|
||||
SVTAV1_PREVENTS= SVTVP9
|
||||
SVTAV1_PREVENTS= SVTHEVC SVTVP9
|
||||
SVTAV1_PREVENTS_MSG= Only one SVT vendor patch can be applied at the same time
|
||||
.endif
|
||||
|
||||
# svt-hevc
|
||||
SVTHEVC_LIB_DEPENDS= libSvtHevcEnc.so:multimedia/svt-hevc
|
||||
SVTHEVC_CONFIGURE_ON= --enable-libsvthevc
|
||||
SVTHEVC_PATCH_SITES= https://github.com/Intel/SVT-HEVC/raw/v1.3.0/ffmpeg_plugin/:svthevc
|
||||
SVTHEVC_PATCHFILES= 0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch:-p1:svthevc \
|
||||
0002-doc-Add-libsvt_hevc-encoder-docs.patch:-p1:svthevc
|
||||
.if make(makesum)
|
||||
.MAKEFLAGS: WITH+=SVTHEVC
|
||||
.else
|
||||
SVTHEVC_PREVENTS= SVTAV1 SVTVP9
|
||||
SVTHEVC_PREVENTS_MSG= ${SVTAV1_PREVENTS_MSG}
|
||||
.endif
|
||||
|
||||
# svt-vp9
|
||||
SVTVP9_LIB_DEPENDS= libSvtVp9Enc.so:multimedia/svt-vp9
|
||||
SVTVP9_CONFIGURE_ON= --enable-libsvtvp9
|
||||
@ -429,7 +443,7 @@ SVTVP9_PATCHFILES= 0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch:-p1:svtvp9
|
||||
.if make(makesum)
|
||||
.MAKEFLAGS: WITH+=SVTVP9
|
||||
.else
|
||||
SVTVP9_PREVENTS= SVTAV1
|
||||
SVTVP9_PREVENTS= SVTAV1 SVTHEVC
|
||||
SVTVP9_PREVENTS_MSG= ${SVTAV1_PREVENTS_MSG}
|
||||
.endif
|
||||
|
||||
|
@ -3,5 +3,9 @@ SHA256 (ffmpeg-4.1.1.tar.xz) = 373749824dfd334d84e55dff406729edfd1606575ee44dd48
|
||||
SIZE (ffmpeg-4.1.1.tar.xz) = 8893404
|
||||
SHA256 (0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch) = ffe17691750a952591090e6f7396a6063a0c48907bc4023db15e088a7673528a
|
||||
SIZE (0001-Add-ability-for-ffmpeg-to-run-svt-av1.patch) = 20364
|
||||
SHA256 (0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = cc8ba4ff56cdb38a59650203999c4c8c83fc40bdb905b87b678ff68a4538444d
|
||||
SIZE (0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch) = 22815
|
||||
SHA256 (0002-doc-Add-libsvt_hevc-encoder-docs.patch) = 516c5a1b3ab6dc444e2270a1bae90455838fc3b7e3a18de37d7d63e25e79493d
|
||||
SIZE (0002-doc-Add-libsvt_hevc-encoder-docs.patch) = 5602
|
||||
SHA256 (0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch) = c8e8652924887eadbe3455af89f213a89b119d8e172fdad5a12d53fea64d1391
|
||||
SIZE (0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch) = 18613
|
||||
|
52
multimedia/svt-hevc/Makefile
Normal file
52
multimedia/svt-hevc/Makefile
Normal file
@ -0,0 +1,52 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= svt-hevc
|
||||
DISTVERSIONPREFIX= v
|
||||
PORTVERSION= 1.3.0
|
||||
CATEGORIES= multimedia
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
COMMENT= Scalable HEVC encoder
|
||||
|
||||
LICENSE= BSD2CLAUSE+PATENT
|
||||
LICENSE_GROUPS= FSF OSI COPYFREE
|
||||
LICENSE_NAME= BSD-2-Clause Plus Patent License
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE.md
|
||||
LICENSE_PERMS= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
|
||||
|
||||
ONLY_FOR_ARCHS= amd64
|
||||
ONLY_FOR_ARCHS_REASON= uses x86-64 assembly
|
||||
|
||||
BUILD_DEPENDS= nasm:devel/nasm
|
||||
|
||||
USES= cmake
|
||||
USE_GITHUB= yes
|
||||
USE_LDCONFIG= yes
|
||||
GH_ACCOUNT= Intel
|
||||
GH_PROJECT= SVT-HEVC
|
||||
|
||||
post-patch:
|
||||
# Default CFLAGS are already set by USES=cmake
|
||||
@${REINPLACE_CMD} -i .flags -E -e 's/ -march=native//' \
|
||||
-e 's/-O2 -flto //' \
|
||||
-e '/C_FLAGS_(RELEASE|DEBUG)/d' \
|
||||
${WRKSRC}/CMakeLists.txt
|
||||
# Avoid devel/yasm dependency
|
||||
@${REINPLACE_CMD} -i .typo 's/MAKE_ASM_NASM_COMPILER/s&/' \
|
||||
${WRKSRC}/CMakeLists.txt
|
||||
# Avoid lang/gcc* dependency
|
||||
@${REINPLACE_CMD} -i .gcc -e 's/gcc-//' \
|
||||
-e '/CMAKE_C/{ s/STREQUAL/MATCHES/; s/"GNU/&|Clang/; }' \
|
||||
${WRKSRC}/CMakeLists.txt \
|
||||
${WRKSRC}/Source/Lib/*/CMakeLists.txt
|
||||
# Avoid conflict with standard types
|
||||
@${GREP} -Flr '_T_DEFINED' ${WRKSRC} | ${XARGS} \
|
||||
${REINPLACE_CMD} -i .types 's/_T_DEFINED/_DEFINED/'
|
||||
# Avoid platform whitelists for generic non-Windows code
|
||||
@${REINPLACE_CMD} -i .opsys 's/Linux/${OPSYS}/' \
|
||||
${WRKSRC}/CMakeLists.txt \
|
||||
${WRKSRC}/Source/Lib/*/CMakeLists.txt
|
||||
@${GREP} -Flr '__linux' ${WRKSRC} | ${XARGS} \
|
||||
${REINPLACE_CMD} -i .opsys -E 's/__linux(__)?/__${OPSYS}__/'
|
||||
|
||||
.include <bsd.port.mk>
|
3
multimedia/svt-hevc/distinfo
Normal file
3
multimedia/svt-hevc/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1550104614
|
||||
SHA256 (Intel-SVT-HEVC-v1.3.0_GH0.tar.gz) = ef21f3a13e33b4f61af4a0c79337ce9e4f73f6fe13d1c2afe2c3b0712f4158d9
|
||||
SIZE (Intel-SVT-HEVC-v1.3.0_GH0.tar.gz) = 1137878
|
24
multimedia/svt-hevc/files/patch-Source_Lib_Codec_EbThreads.h
Normal file
24
multimedia/svt-hevc/files/patch-Source_Lib_Codec_EbThreads.h
Normal file
@ -0,0 +1,24 @@
|
||||
FreeBSD (unlike DragonFly) didn't try to be compatible with GNU libc at first.
|
||||
|
||||
In file included from Source/Lib/Codec/EbEncDecProcess.c:9:
|
||||
In file included from Source/Lib/Codec/EbTransforms.h:14:
|
||||
In file included from Source/Lib/Codec/EbSequenceControlSet.h:10:
|
||||
Source/Lib/Codec/EbThreads.h:100:11: error: unknown type name 'cpu_set_t'
|
||||
extern cpu_set_t groupAffinity;
|
||||
^
|
||||
|
||||
--- Source/Lib/Codec/EbThreads.h.orig 2019-02-14 00:36:54 UTC
|
||||
+++ Source/Lib/Codec/EbThreads.h
|
||||
@@ -95,7 +95,12 @@ extern EB_BOOL alternateGroups;
|
||||
#else
|
||||
#define __USE_GNU
|
||||
#define _GNU_SOURCE
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <pthread_np.h>
|
||||
+#define cpu_set_t cpuset_t
|
||||
+#else
|
||||
#include <sched.h>
|
||||
+#endif
|
||||
#include <pthread.h>
|
||||
extern cpu_set_t groupAffinity;
|
||||
#define EB_CREATETHREAD(type, pointer, nElements, pointerClass, threadFunction, threadContext) \
|
6
multimedia/svt-hevc/pkg-descr
Normal file
6
multimedia/svt-hevc/pkg-descr
Normal file
@ -0,0 +1,6 @@
|
||||
The Scalable Video Technology for HEVC Encoder (SVT-HEVC Encoder) is
|
||||
an HEVC-compliant encoder library core that achieves excellent
|
||||
density-quality tradeoffs, and is highly optimized for Intel Xeon
|
||||
Scalable Processor and Xeon D processors.
|
||||
|
||||
WWW: https://github.com/Intel/SVT-HEVC
|
8
multimedia/svt-hevc/pkg-plist
Normal file
8
multimedia/svt-hevc/pkg-plist
Normal file
@ -0,0 +1,8 @@
|
||||
bin/SvtHevcEncApp
|
||||
bin/SvtHevcEncSimpleApp
|
||||
include/svt-hevc/EbApi.h
|
||||
include/svt-hevc/EbErrorCodes.h
|
||||
include/svt-hevc/EbTime.h
|
||||
lib/libSvtHevcEnc.so
|
||||
lib/libSvtHevcEnc.so.1
|
||||
libdata/pkgconfig/SvtHevcEnc.pc
|
Loading…
Reference in New Issue
Block a user