libultrahdr: add patch to fix clip in GL (#26600)
* libultrahdr: add patch to fix clip in GL Equivalent to CPU code fix already upstream * add URL for context --------- Co-authored-by: Christoph Reiter <reiter.christoph@gmail.com>
This commit is contained in:
11
mingw-w64-libultrahdr/002-fix-gl-clip.patch
Normal file
11
mingw-w64-libultrahdr/002-fix-gl-clip.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/lib/src/gpu/applygainmap_gl.cpp 2025-11-28 11:53:50.186642600 +0100
|
||||
+++ b/lib/src/gpu/applygainmap_gl.cpp 2025-11-28 11:54:44.197113300 +0100
|
||||
@@ -411,7 +411,7 @@
|
||||
(log2(display_boost) - log2(gainmap_metadata->hdr_capacity_min)) /
|
||||
(log2(gainmap_metadata->hdr_capacity_max) - log2(gainmap_metadata->hdr_capacity_min));
|
||||
// avoid extrapolating the gain map to fill the displayable range
|
||||
- gainmap_weight = CLIP3(0.0f, gainmap_weight, 1.0f);
|
||||
+ gainmap_weight = CLIP3(gainmap_weight, 0.0f, 1.0f);
|
||||
} else {
|
||||
gainmap_weight = 1.0f;
|
||||
}
|
||||
@@ -4,7 +4,7 @@ _realname=libultrahdr
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=1.4.0
|
||||
pkgrel=3
|
||||
pkgrel=4
|
||||
pkgdesc="Library for encoding and decoding ultrahdr images (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
||||
@@ -22,11 +22,13 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
source=("https://github.com/google/libultrahdr/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz"
|
||||
"001-pkg-config.patch"
|
||||
"https://github.com/google/libultrahdr/commit/6db3a83ee2b1f79850f3f597172289808dc6a331.patch"
|
||||
"https://github.com/google/libultrahdr/commit/5ed39d67cd31d254e84ebf76b03d4b7bcc12e2f7.patch")
|
||||
"https://github.com/google/libultrahdr/commit/5ed39d67cd31d254e84ebf76b03d4b7bcc12e2f7.patch"
|
||||
"002-fix-gl-clip.patch")
|
||||
sha512sums=('2282bed4ae353f3b43039ca69b699754f9ef7e1611f321bf27ad1e50e7894953b8e44f28cbe215c186b5b037682a6d5733c6e7c638444d29fdcb5a661294c075'
|
||||
'ccaa15bc71c0c4a88044bd35ab929b88763cf20838f6e3b0bf7b3623ea851649e97fb0dac633a1160af805d63634a1f98e4f5f19415a7647d589f23c63f08add'
|
||||
'124e7a24857148f08862a3b6b32af69618076bae485e053e1446fb8592b0b3e449b1a66dc1c758aacbc8a4a97dc2e813b607875199809b5b7127db2f869f8d83'
|
||||
'bc63d46069a9de79ed2eb04f5a3a220dbff69e56ff2839ccaca401ced56ca3064325480db42069dad03f2ccaadcec4dc848baced9c3142f012b9fb2553682386')
|
||||
'bc63d46069a9de79ed2eb04f5a3a220dbff69e56ff2839ccaca401ced56ca3064325480db42069dad03f2ccaadcec4dc848baced9c3142f012b9fb2553682386'
|
||||
'cd9f9b9493d406483415aa80cab090aadfea775a5658c023f1c13ea83e7cb0a8fb386601d6b7ae561db7d615f74524d7fd30ae357dc4e123535f4a656e0cd049')
|
||||
|
||||
prepare() {
|
||||
cd "${_realname}-${pkgver}"
|
||||
@@ -39,6 +41,8 @@ prepare() {
|
||||
|
||||
# https://github.com/google/libultrahdr/issues/372
|
||||
patch -Np1 -i "${srcdir}"/5ed39d67cd31d254e84ebf76b03d4b7bcc12e2f7.patch
|
||||
# and GL code path equivalent: https://github.com/google/libultrahdr/issues/372#issuecomment-3585573123
|
||||
patch -Np1 -i "${srcdir}"/002-fix-gl-clip.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
|
||||
Reference in New Issue
Block a user