pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

svt-av1: upgrade candidate



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By:	wiz
Date:		Mon Aug 4 15:00:16 2025 +0200
Changeset:	278ec5190dc86d0ba81d450343cc5862f3f65e4f

Added Files:
	svt-av1/COMMIT_MSG
	svt-av1/DESCR
	svt-av1/Makefile
	svt-av1/PLIST
	svt-av1/buildlink3.mk
	svt-av1/distinfo
	svt-av1/hacks.mk
	svt-av1/patches/patch-CMakeLists.txt
	svt-av1/patches/patch-Source_App_app__config.c
	svt-av1/patches/patch-Source_App_app__config.h

Log Message:
svt-av1: upgrade candidate

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=278ec5190dc86d0ba81d450343cc5862f3f65e4f

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 svt-av1/COMMIT_MSG                             | 21 +++++++++++++++++++
 svt-av1/DESCR                                  | 11 ++++++++++
 svt-av1/Makefile                               | 29 ++++++++++++++++++++++++++
 svt-av1/PLIST                                  | 12 +++++++++++
 svt-av1/buildlink3.mk                          | 14 +++++++++++++
 svt-av1/distinfo                               |  8 +++++++
 svt-av1/hacks.mk                               | 18 ++++++++++++++++
 svt-av1/patches/patch-CMakeLists.txt           | 15 +++++++++++++
 svt-av1/patches/patch-Source_App_app__config.c | 27 ++++++++++++++++++++++++
 svt-av1/patches/patch-Source_App_app__config.h | 14 +++++++++++++
 10 files changed, 169 insertions(+)

diffs:
diff --git a/svt-av1/COMMIT_MSG b/svt-av1/COMMIT_MSG
new file mode 100644
index 0000000000..392f206331
--- /dev/null
+++ b/svt-av1/COMMIT_MSG
@@ -0,0 +1,21 @@
+## [3.0.0] - 2025-2-18
+
+API updates
+- Refreshed API cleaning up unused fields, use stdbool type and cleanup redundant parameter in `svt_av1_enc_init_handle`
+- Repositioned the presets and removed one preset resulting in a max preset of M10 in the current version
+- Added temporal layer and averageQP fields in output picture structure, along with an option to specify a QP offset for the startup gop
+- The API changes are not backwards compatible, more details about the changes can be found in issue 2217
+
+Encoder
+- Improved mid and high quality presets quality vs speed tradeoffs for fast-decode 2 mode:
+-  ~15-25% speedup for M3-M10 at the same quality levels - (!2376 and !2343)
+-  ~1% BD-rate improvement for presets M0-M2 - (!2376 and !2343)
+- Repositioned the `fast-decode 1` mode to produce ~10% decoder cycle reduction vs `fast-decode 0` while reducing the BD-rate loss to ~1% (!2376)
+- Further Arm Neon and SVE2 optimizations that improve high bitdepth encoding by an average of 10-25% for 480p-1080p resolutions beyond the architecture-agnostic algorithmic improvements since v2.3.0
+- Ported several features from SVT-AV1-SPY fork to further improve the perceptual quality of `tune 0` mode
+- Added an `avif` mode to reduce resource utilization when encoding still images
+
+Cleanup Build and bug fixes and documentation
+- third_party: Removed vendored cpuinfo, will attempt to use one provided by the system. For those without cpuinfo, it will be pulled and compiled into the library, similar to before
+- Improved the unit test coverage for Arm Neon and SVE2 code
+- Updated documentation
diff --git a/svt-av1/DESCR b/svt-av1/DESCR
new file mode 100644
index 0000000000..8e50e8405c
--- /dev/null
+++ b/svt-av1/DESCR
@@ -0,0 +1,11 @@
+The Scalable Video Technology for AV1 (SVT-AV1 Encoder and Decoder) is an
+AV1-compliant software encoder/decoder library. The work on the SVT-AV1
+encoder targets the development of a production-quality AV1-encoder with
+performance levels applicable to a wide range of applications, from premium
+VOD to real-time and live encoding/transcoding. The SVT-AV1 decoder
+implementation targets future codec research activities.
+
+The SVT-AV1 project was initially founded by Intel in partnership with
+Netflix, and was then adopted by the Alliance of Open Media (AOM)
+Software Implementation Working Group (SIWG), in August 2020, to
+carry on the group's mission.
diff --git a/svt-av1/Makefile b/svt-av1/Makefile
new file mode 100644
index 0000000000..4d618c7e71
--- /dev/null
+++ b/svt-av1/Makefile
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.9 2024/11/01 08:05:44 wiz Exp $
+
+DISTNAME=	svt-av1-3.0.0
+CATEGORIES=	multimedia
+MASTER_SITES=	${MASTER_SITE_GITLAB:=AOMediaCodec/}
+#https://gitlab.com/AOMediaCodec/SVT-AV1/-/archive/v3.0.0/SVT-AV1-v3.0.0.tar.bz2
+EXTRACT_SUFX=	.tar.bz2
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://gitlab.com/AOMediaCodec/SVT-AV1/
+COMMENT=	Scalable Video Technology for AV1 (SVT-AV1 Encoder and Decoder)
+LICENSE=	modified-bsd
+
+TOOL_DEPENDS+=	nasm-[0-9]*:../../devel/nasm
+
+GITLAB_PROJECT=	SVT-AV1
+GITLAB_TAG=	v${PKGVERSION_NOREV}
+
+WRKSRC=		${WRKDIR}/${GITLAB_PROJECT}-${GITLAB_TAG}
+
+USE_LANGUAGES=	c c++
+
+CMAKE_CONFIGURE_ARGS+=	-DCMAKE_BUILD_TYPE=Release
+
+PKGCONFIG_OVERRIDE+=	Source/Lib/pkg-config.pc.in
+
+.include "../../devel/cmake/build.mk"
+.include "../../wip/cpuinfo/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/svt-av1/PLIST b/svt-av1/PLIST
new file mode 100644
index 0000000000..0798f4f0c2
--- /dev/null
+++ b/svt-av1/PLIST
@@ -0,0 +1,12 @@
+@comment $NetBSD$
+bin/SvtAv1EncApp
+include/svt-av1/EbDebugMacros.h
+include/svt-av1/EbSvtAv1.h
+include/svt-av1/EbSvtAv1Enc.h
+include/svt-av1/EbSvtAv1ErrorCodes.h
+include/svt-av1/EbSvtAv1Formats.h
+include/svt-av1/EbSvtAv1Metadata.h
+lib/libSvtAv1Enc.so
+lib/libSvtAv1Enc.so.3
+lib/libSvtAv1Enc.so.${PKGVERSION}
+lib/pkgconfig/SvtAv1Enc.pc
diff --git a/svt-av1/buildlink3.mk b/svt-av1/buildlink3.mk
new file mode 100644
index 0000000000..ebef3a46b9
--- /dev/null
+++ b/svt-av1/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.2 2024/08/21 17:00:41 wiz Exp $
+
+BUILDLINK_TREE+=	svt-av1
+
+.if !defined(SVT_AV1_BUILDLINK3_MK)
+SVT_AV1_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.svt-av1+=	svt-av1>=1.4.1
+BUILDLINK_ABI_DEPENDS.svt-av1?=	svt-av1>=3.0.0
+BUILDLINK_PKGSRCDIR.svt-av1?=	../../wip/svt-av1
+
+.endif	# SVT_AV1_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-svt-av1
diff --git a/svt-av1/distinfo b/svt-av1/distinfo
new file mode 100644
index 0000000000..38ad6c5c29
--- /dev/null
+++ b/svt-av1/distinfo
@@ -0,0 +1,8 @@
+$NetBSD: distinfo,v 1.10 2024/11/01 08:05:44 wiz Exp $
+
+BLAKE2s (svt-av1-3.0.0.tar.bz2) = 2bee443d5c8ab43ec6e13af396e4ccd1a52fb8ce8f4cc7696c9850169b936a12
+SHA512 (svt-av1-3.0.0.tar.bz2) = bfe4e2845d6842f48e3e7007a88c6c054b7fe3f20d41a947c05b7f85d0d21cf4e1957624ee5714b805f3b939f9a7d1ae68853fa35f2e45c90faa16abd9711767
+Size (svt-av1-3.0.0.tar.bz2) = 10177183 bytes
+SHA1 (patch-CMakeLists.txt) = c9bf8c9628c51b63f9455706400e348faebd6ba0
+SHA1 (patch-Source_App_app__config.c) = e12eb168735cc99d7c72d5d9ae29650d3f9fc9e7
+SHA1 (patch-Source_App_app__config.h) = e27dcd0af9494be4a400b025780b4058c2deb9a9
diff --git a/svt-av1/hacks.mk b/svt-av1/hacks.mk
new file mode 100644
index 0000000000..b1b9be2005
--- /dev/null
+++ b/svt-av1/hacks.mk
@@ -0,0 +1,18 @@
+# $NetBSD: hacks.mk,v 1.2 2024/12/22 16:50:10 nia Exp $
+
+.if !defined(SVT_AV1_HACKS_MK)
+SVT_AV1_HACKS_MK=		# defined
+
+### [Mon Sun Dec 22 17:37:18 CET 2024 : nia]
+### GCC 9 and earlier lack certain ARM NEON intrinsics such as vld1_s16_x2
+###
+.include "../../mk/compiler.mk"
+
+.if ${MACHINE_ARCH:Maarch64*} && ${CC_VERSION:Mgcc-[0-9]\.*}
+PKG_HACKS+=		neon-intrin
+CMAKE_CONFIGURE_ARGS+=	-DENABLE_NEON=OFF
+CMAKE_CONFIGURE_ARGS+=	-DENABLE_NEON_DOTPROD=OFF
+CMAKE_CONFIGURE_ARGS+=	-DENABLE_NEON_I8MM=OFF
+.endif
+
+.endif
diff --git a/svt-av1/patches/patch-CMakeLists.txt b/svt-av1/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..bffcd12ee9
--- /dev/null
+++ b/svt-av1/patches/patch-CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD: patch-CMakeLists.txt,v 1.1 2023/08/17 07:43:40 jperkin Exp $
+
+Avoid incompatible linker flags on SunOS.
+
+--- CMakeLists.txt.orig	2023-04-26 22:11:56.000000000 +0000
++++ CMakeLists.txt
+@@ -209,7 +209,7 @@ if(UNIX)
+             set(CMAKE_C_ARCHIVE_FINISH   "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
+             set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
+         endif()
+-    else()
++    elseif(NOT CMAKE_SYSTEM_NAME MATCHES "SunOS")
+         set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -z noexecstack -z relro -z now")
+     endif()
+ endif()
diff --git a/svt-av1/patches/patch-Source_App_app__config.c b/svt-av1/patches/patch-Source_App_app__config.c
new file mode 100644
index 0000000000..50bf8875a0
--- /dev/null
+++ b/svt-av1/patches/patch-Source_App_app__config.c
@@ -0,0 +1,27 @@
+$NetBSD: patch-Source_App_app__config.c,v 1.1 2024/09/04 11:59:05 jperkin Exp $
+
+Re-order includes so that FOPEN override works.
+
+--- Source/App/app_config.c.orig	2024-09-04 11:26:07.821209504 +0000
++++ Source/App/app_config.c
+@@ -16,10 +16,6 @@
+ #include <ctype.h>
+ #include <sys/stat.h>
+ 
+-#include "EbSvtAv1Metadata.h"
+-#include "app_config.h"
+-#include "app_context.h"
+-#include "app_input_y4m.h"
+ #ifdef _WIN32
+ #include <windows.h>
+ #include <io.h>
+@@ -28,6 +24,9 @@
+ #include <sys/file.h>
+ #endif
+ 
++#include "EbSvtAv1Metadata.h"
++#include "app_input_y4m.h"
++#include "app_context.h"
+ #include "app_output_ivf.h"
+ 
+ #if !defined(_WIN32) || !defined(HAVE_STRNLEN_S)
diff --git a/svt-av1/patches/patch-Source_App_app__config.h b/svt-av1/patches/patch-Source_App_app__config.h
new file mode 100644
index 0000000000..e6e368c275
--- /dev/null
+++ b/svt-av1/patches/patch-Source_App_app__config.h
@@ -0,0 +1,14 @@
+$NetBSD: patch-Source_App_app__config.h,v 1.1 2024/09/04 11:59:05 jperkin Exp $
+
+Avoid FOPEN conflict with system headers.
+
+--- Source/App/app_config.h.orig	2024-09-04 11:22:30.145799815 +0000
++++ Source/App/app_config.h
+@@ -50,6 +50,7 @@ typedef enum EncPass {
+ #define MAX_CHANNEL_NUMBER 6U
+ #define MAX_NUM_TOKENS 210
+ 
++#undef FOPEN
+ #ifdef _WIN32
+ #define FOPEN(f, s, m) fopen_s(&f, s, m)
+ #else


Home | Main Index | Thread Index | Old Index