Github messages for voidlinux
 help / color / mirror / Atom feed
From: zlice <zlice@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] x265: update to 3.6
Date: Sat, 03 Aug 2024 03:27:57 +0200	[thread overview]
Message-ID: <20240803012757.C001C20E62@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-51611@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

There is an updated pull request by zlice against master on the void-packages repository

https://github.com/zlice/void-packages x265-3.6
https://github.com/void-linux/void-packages/pull/51611

x265: update to 3.6
#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, **x86_64**
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - **aarch64-musl**

#### Comments

Part #51478 - handbrake 1.8.1 needs newer x265 with some 'ambient light' patches, newer [libvpl](https://github.com/void-linux/void-packages/pull/51496) (this PR conflicts revbumps with libvpl) and ffmpeg6.0 down patches

When I forgot to update shlibs, xbps-src mentioned `digikam` needing a revbump? Not quite sure why as I don't see x265-devel in the template but I bumped anyway.

A patch file from https://github.com/void-linux/void-packages/pull/51611.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-x265-3.6-51611.patch --]
[-- Type: text/x-diff, Size: 14939 bytes --]

From f4c5ec019a7583728b4c8247a29525bf39e1602b Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:25:28 -0400
Subject: [PATCH 01/11] x265: update to 3.6

---
 common/shlibs                                 |   2 +-
 .../x265/patches/handbrake-ambientlight.patch | 115 ++++++++++++++++++
 srcpkgs/x265/template                         |   4 +-
 3 files changed, 118 insertions(+), 3 deletions(-)
 create mode 100644 srcpkgs/x265/patches/handbrake-ambientlight.patch

diff --git a/common/shlibs b/common/shlibs
index 6f378121d0e4f4..ba31aee3e9b748 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -1952,7 +1952,7 @@ libQt5TextToSpeech.so.5 qt5-speech-5.15.2_3
 libQt5Bodymovin.so.5 qt5-lottie-5.15.2_3
 libQt5WebKit.so.5 qt5-webkit-5.6.0_1
 libQt5WebKitWidgets.so.5 qt5-webkit-5.6.0_1
-libx265.so.199 x265-3.5_1
+libx265.so.209 x265-3.6_1
 libQt6Xdg.so.4 libqtxdg-4.0.0_1
 libQt6XdgIconLoader.so.4 libqtxdg-4.0.0_1
 libqwt-qt5.so.6.2 qwt-6.2.0_2
diff --git a/srcpkgs/x265/patches/handbrake-ambientlight.patch b/srcpkgs/x265/patches/handbrake-ambientlight.patch
new file mode 100644
index 00000000000000..ab36a9c35c9de4
--- /dev/null
+++ b/srcpkgs/x265/patches/handbrake-ambientlight.patch
@@ -0,0 +1,115 @@
+diff --git a/source/common/param.cpp b/source/common/param.cpp
+index 8c32fafa2..0b56235c9 100755
+--- a/source/common/param.cpp
++++ b/source/common/param.cpp
+@@ -378,6 +378,7 @@ void x265_param_default(x265_param* param)
+     param->preferredTransferCharacteristics = -1;
+     param->pictureStructure = -1;
+     param->bEmitCLL = 1;
++    param->bEmitAmbientViewingEnvironment = 0;
+ 
+     param->bEnableFrameDuplication = 0;
+     param->dupThreshold = 70;
+@@ -1880,6 +1881,7 @@ int x265_check_params(x265_param* param)
+                      || param->bEmitIDRRecoverySEI
+                    || !!param->interlaceMode
+                      || param->preferredTransferCharacteristics > 1
++                     || param->bEmitAmbientViewingEnvironment
+                      || param->toneMapFile
+                      || param->naluFile);
+ 
+@@ -2766,6 +2768,10 @@ void x265_copy_params(x265_param* dst, x265_param* src)
+     dst->bEmitCLL = src->bEmitCLL;
+     dst->maxCLL = src->maxCLL;
+     dst->maxFALL = src->maxFALL;
++    dst->ambientIlluminance = src->ambientIlluminance;
++    dst->ambientLightX = src->ambientLightX;
++    dst->ambientLightY = src->ambientLightY;
++    dst->bEmitAmbientViewingEnvironment = src->bEmitAmbientViewingEnvironment;
+     dst->log2MaxPocLsb = src->log2MaxPocLsb;
+     dst->bEmitVUIHRDInfo = src->bEmitVUIHRDInfo;
+     dst->bEmitVUITimingInfo = src->bEmitVUITimingInfo;
+diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp
+index 5950f87e9..545283474 100644
+--- a/source/encoder/encoder.cpp
++++ b/source/encoder/encoder.cpp
+@@ -3276,6 +3276,15 @@ void Encoder::getStreamHeaders(NALList& list, Entropy& sbacCoder, Bitstream& bs)
+         }
+     }
+ 
++    if (m_param->bEmitAmbientViewingEnvironment)
++    {
++        SEIAmbientViewingEnvironment ambientsei;
++        ambientsei.ambientIlluminance = m_param->ambientIlluminance;
++        ambientsei.ambientLightX = m_param->ambientLightX;
++        ambientsei.ambientLightY = m_param->ambientLightY;
++        ambientsei.writeSEImessages(bs, m_sps, NAL_UNIT_PREFIX_SEI, list, m_param->bSingleSeiNal);
++    }
++
+     if (m_param->bEmitInfoSEI)
+     {
+         char *opts = x265_param2string(m_param, m_sps.conformanceWindow.rightOffset, m_sps.conformanceWindow.bottomOffset);
+diff --git a/source/encoder/sei.h b/source/encoder/sei.h
+index 03e210639..712e4efb4 100644
+--- a/source/encoder/sei.h
++++ b/source/encoder/sei.h
+@@ -242,6 +242,25 @@ public:
+     }
+ };
+ 
++class SEIAmbientViewingEnvironment : public SEI
++{
++public:
++    SEIAmbientViewingEnvironment()
++    {
++        m_payloadType = AMBIENT_VIEWING_ENVIRONMENT;
++        m_payloadSize = 8;
++    }
++    uint32_t ambientIlluminance;
++    uint16_t ambientLightX;
++    uint16_t ambientLightY;
++    void writeSEI(const SPS&)
++    {
++        WRITE_CODE(ambientIlluminance, 32, "ambient_illuminance");
++        WRITE_CODE(ambientLightX,      16, "ambient_light_x");
++        WRITE_CODE(ambientLightY,      16, "ambient_light_y");
++    }
++};
++
+ class SEIDecodedPictureHash : public SEI
+ {
+ public:
+diff --git a/source/x265.h b/source/x265.h
+index 9f3abd9d9..b6a4d3fe1 100644
+--- a/source/x265.h
++++ b/source/x265.h
+@@ -371,6 +371,7 @@ typedef enum
+     MASTERING_DISPLAY_INFO               = 137,
+     CONTENT_LIGHT_LEVEL_INFO             = 144,
+     ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,
++    AMBIENT_VIEWING_ENVIRONMENT          = 148,
+ } SEIPayloadType;
+ 
+ typedef struct x265_sei_payload
+@@ -1903,6 +1904,11 @@ typedef struct x265_param
+      * value to that value. */
+     uint16_t maxLuma;
+ 
++    /* ISO/IEC 23008-2:2017, D.2.39 ambient viewing environment SEI message */
++    uint32_t ambientIlluminance;
++    uint16_t ambientLightX;
++    uint16_t ambientLightY;
++
+     /* Maximum of the picture order count */
+     int log2MaxPocLsb;
+ 
+@@ -2114,6 +2120,9 @@ typedef struct x265_param
+     /*Emit content light level info SEI*/
+     int         bEmitCLL;
+ 
++    /* Emit ambient viewing environment SEI */
++    int         bEmitAmbientViewingEnvironment;
++
+     /*
+     * Signals picture structure SEI timing message for every frame
+     * picture structure 7 is signalled for frame doubling
diff --git a/srcpkgs/x265/template b/srcpkgs/x265/template
index b55b56ed28df4c..08a365c512d108 100644
--- a/srcpkgs/x265/template
+++ b/srcpkgs/x265/template
@@ -1,6 +1,6 @@
 # Template file for 'x265'
 pkgname=x265
-version=3.5
+version=3.6
 revision=1
 _commit="f0c1022b6be1"
 build_wrksrc=source
@@ -12,7 +12,7 @@ maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
 homepage="http://x265.org/"
 distfiles="https://bitbucket.org/multicoreware/x265_git/get/${version}.tar.gz"
-checksum=5ca3403c08de4716719575ec56c686b1eb55b078c0fe50a064dcf1ac20af1618
+checksum=206329b9599c78d06969a1b7b7bb939f7c99a459ab283b2e93f76854bd34ca7b
 
 build_options="altivec assembly"
 

From a7940257d8c21c2612493b015901fff44b7c8912 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:33:04 -0400
Subject: [PATCH 02/11] avidemux: revbump for x265-3.6

---
 srcpkgs/avidemux/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/avidemux/template b/srcpkgs/avidemux/template
index 53519e72bd9822..d66f8524bd0e28 100644
--- a/srcpkgs/avidemux/template
+++ b/srcpkgs/avidemux/template
@@ -1,7 +1,7 @@
 # Template file for 'avidemux'
 pkgname=avidemux
 version=2.8.1
-revision=1
+revision=2
 # Can't be compiled for aarch64, arm* or mips*
 archs="x86_64* i686*"
 hostmakedepends="cmake pkg-config qt5-host-tools qt5-devel tar yasm"

From 487febc3640362bdbf24cb9c9fb17c560e7c6f8f Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:33:05 -0400
Subject: [PATCH 03/11] baresip: revbump for x265-3.6

---
 srcpkgs/baresip/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/baresip/template b/srcpkgs/baresip/template
index d005874699e9e0..e2a58b1a3e67e3 100644
--- a/srcpkgs/baresip/template
+++ b/srcpkgs/baresip/template
@@ -1,7 +1,7 @@
 # Template file for 'baresip'
 pkgname=baresip
 version=3.14.0
-revision=2
+revision=3
 build_style=cmake
 hostmakedepends="pkg-config glib-devel"
 makedepends="libgsm-devel libpng-devel openssl-devel libsndfile-devel

From 54d21eab1ab1b4220345e03f4927aac6b8c9933a Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:33:05 -0400
Subject: [PATCH 04/11] ffmpeg: revbump for x265-3.6

---
 srcpkgs/ffmpeg/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ffmpeg/template b/srcpkgs/ffmpeg/template
index 9c978d4d2f5f89..74bde86a04d97e 100644
--- a/srcpkgs/ffmpeg/template
+++ b/srcpkgs/ffmpeg/template
@@ -2,7 +2,7 @@
 # audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname!
 pkgname=ffmpeg
 version=4.4.4
-revision=8
+revision=9
 build_style=meta
 short_desc="Decoding, encoding and streaming software (transitional dummy package)"
 maintainer="Orphaned <orphan@voidlinux.org>"

From c0091a103fc7a814c4a3bfeb242879a3dae2d7aa Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:33:05 -0400
Subject: [PATCH 05/11] ffmpeg6: revbump for x265-3.6

---
 srcpkgs/ffmpeg6/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/ffmpeg6/template b/srcpkgs/ffmpeg6/template
index 1dcdd089c5354c..b779e9e2f4bce9 100644
--- a/srcpkgs/ffmpeg6/template
+++ b/srcpkgs/ffmpeg6/template
@@ -2,7 +2,7 @@
 # audacity also needs to be bumped when a new ffmpeg version bumps libavformat's soname!
 pkgname=ffmpeg6
 version=6.0.1
-revision=2
+revision=3
 hostmakedepends="pkg-config perl"
 makedepends="zlib-devel bzip2-devel freetype-devel alsa-lib-devel libXfixes-devel
  libXext-devel libXvMC-devel libxcb-devel lame-devel libtheora-devel

From 5606d3ce9f125399cdfa912be1efcaf688b4d96f Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:33:05 -0400
Subject: [PATCH 06/11] gimp: revbump for x265-3.6

---
 srcpkgs/gimp/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gimp/template b/srcpkgs/gimp/template
index 3ed1fc7cc9c740..653c5c0f41154c 100644
--- a/srcpkgs/gimp/template
+++ b/srcpkgs/gimp/template
@@ -1,7 +1,7 @@
 # Template file for 'gimp'
 pkgname=gimp
 version=2.10.38
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--disable-check-update --datadir=/usr/share --disable-python"
 hostmakedepends="automake gegl gettext-devel glib-devel gtk+-devel intltool

From 06478eddde7d09d16cebdb434f752101b7c616a2 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:33:05 -0400
Subject: [PATCH 07/11] gst-plugins-bad1: revbump for x265-3.6

---
 srcpkgs/gst-plugins-bad1/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/gst-plugins-bad1/template b/srcpkgs/gst-plugins-bad1/template
index 92d87d7a661cbd..13fc9f8fe7f640 100644
--- a/srcpkgs/gst-plugins-bad1/template
+++ b/srcpkgs/gst-plugins-bad1/template
@@ -1,7 +1,7 @@
 # Template file for 'gst-plugins-bad1'
 pkgname=gst-plugins-bad1
 version=1.24.6
-revision=1
+revision=2
 build_helper="gir"
 build_style=meson
 configure_args="-Dpackage-origin=https://voidlinux.org -Ddoc=disabled

From 1ceee7fc5a89639ed543b614d6a9ca6bca9d6780 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:33:05 -0400
Subject: [PATCH 08/11] handbrake: revbump for x265-3.6

---
 srcpkgs/handbrake/template | 23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/srcpkgs/handbrake/template b/srcpkgs/handbrake/template
index d0e04f3d49111e..31d47f11f2133d 100644
--- a/srcpkgs/handbrake/template
+++ b/srcpkgs/handbrake/template
@@ -1,7 +1,7 @@
 # Template file for 'handbrake'
 pkgname=handbrake
 version=1.6.1
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--force --disable-gtk-update-checks --disable-df-fetch --harden
  $(vopt_enable fdk_aac fdk-aac) $(vopt_enable nvenc) $(vopt_enable qsv)"
@@ -12,7 +12,8 @@ makedepends="bzip2-devel ffmpeg6-devel gst-plugins-base1-devel gtk+3-devel
  jansson-devel lame-devel libass-devel libbluray-devel libdav1d-devel
  libdvdnav-devel libdvdread-devel libgudev-devel libnuma-devel
  libsamplerate-devel libtheora-devel libvorbis-devel libvpx-devel libxml2-devel
- opus-devel speex-devel x264-devel x265-devel zimg-devel libsvt-av1-devel
+ opus-devel speex-devel x264-devel x265-devel zimg-devel
+ $(vopt_if svt_av1 libsvt-av1-devel)
  $(vopt_if fdk_aac fdk-aac-devel)
  $(vopt_if qsv 'libva-devel libdrm-devel oneVPL-devel')
  $(vopt_if nvenc nv-codec-headers)"
@@ -26,12 +27,19 @@ distfiles="https://github.com/HandBrake/HandBrake/releases/download/${version}/H
 checksum=94ccfe03db917a91650000c510f7fd53f844da19f19ad4b4be1b8f6bc31a8d4c
 nocross=yes
 
-build_options="fdk_aac nvenc qsv"
+build_options="fdk_aac nvenc svt_av1 qsv"
 
 case "$XBPS_TARGET_MACHINE" in
-	x86_64*|i686*)
+	x86_64*)
 		CFLAGS="-msse"
-		build_options_default="nvenc qsv"
+		build_options_default="nvenc svt_av1 qsv"
+		;;
+	i686*)
+		CFLAGS="-msse"
+		build_options_default="nvenc"
+		;;
+	*)
+		build_options_default="svt_av1"
 		;;
 esac
 
@@ -42,6 +50,11 @@ pre_configure() {
 		x265 zimg svt-av1 libvpl; do
 	    vsed -i "/MODULES += contrib\/${module}/d" make/include/main.defs
 	done
+	if [[ "$XBPS_TARGET_MACHINE" = "i686"* ]] ; then
+		sed -e 's/-lSvtAv1Enc //g' -i gtk/configure.ac
+		sed -e 's/ SvtAv1Enc//g' -i test/module.defs
+		sed -e 's/ SvtAv1Enc//g' -i libhb/module.defs
+	fi
 }
 
 pre_build() {

From a2f1f141ee79837ee4941127be2af1fdadfc7ff2 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:33:05 -0400
Subject: [PATCH 09/11] libheif: revbump for x265-3.6

---
 srcpkgs/libheif/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/libheif/template b/srcpkgs/libheif/template
index 5bd3133095f52b..9f5db189d908ef 100644
--- a/srcpkgs/libheif/template
+++ b/srcpkgs/libheif/template
@@ -1,7 +1,7 @@
 # Template file for 'libheif'
 pkgname=libheif
 version=1.17.5
-revision=1
+revision=2
 build_style=cmake
 makedepends="libjpeg-turbo-devel libpng-devel libde265-devel x265-devel
  libaom-devel"

From d6a91ad708c0de3ff45d7485e4984a6b3e9c48d9 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:33:05 -0400
Subject: [PATCH 10/11] vlc: revbump for x265-3.6

---
 srcpkgs/vlc/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/vlc/template b/srcpkgs/vlc/template
index 91ccd21acbeaf0..854e8815c90a9d 100644
--- a/srcpkgs/vlc/template
+++ b/srcpkgs/vlc/template
@@ -1,7 +1,7 @@
 # Template file for 'vlc'
 pkgname=vlc
 version=3.0.21
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--disable-gme --disable-libtar --enable-jack
  --enable-live555 --disable-fluidsynth --enable-dvdread

From 676bcef7b1f3a973eefe77be870f96293e0adfc2 Mon Sep 17 00:00:00 2001
From: zlice <zlice555@gmail.com>
Date: Fri, 2 Aug 2024 17:34:40 -0400
Subject: [PATCH 11/11] digikam: revbump for x265-3.6

---
 srcpkgs/digikam/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/digikam/template b/srcpkgs/digikam/template
index 4d08bf39526c88..51611e192f39a9 100644
--- a/srcpkgs/digikam/template
+++ b/srcpkgs/digikam/template
@@ -1,7 +1,7 @@
 # Template file for 'digikam'
 pkgname=digikam
 version=8.4.0
-revision=2
+revision=3
 build_style=cmake
 configure_args="-DBUILD_TESTING=OFF -DKF6_HOST_TOOLING=/usr/lib/cmake
  -DKDE_INSTALL_QTPLUGINDIR=lib/qt6/plugins -DBUILD_WITH_QT6=ON

  parent reply	other threads:[~2024-08-03  1:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-02 22:05 [PR PATCH] X265 3.6 zlice
2024-08-03  0:57 ` x265: update to 3.6 zlice
2024-08-03  1:27 ` zlice [this message]
2024-08-03  1:28 ` zlice
2024-08-03 18:31 ` [PR PATCH] [Updated] " zlice
2024-08-06 18:47 ` zlice
2024-08-06 18:47 ` zlice
2024-08-06 19:01 ` [PR PATCH] [Closed]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240803012757.C001C20E62@inbox.vuxu.org \
    --to=zlice@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).