public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: media-libs/zimg/files/, media-libs/zimg/
@ 2019-07-28 21:21 Andreas Sturmlechner
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2019-07-28 21:21 UTC (permalink / raw
  To: gentoo-commits

commit:     e77dea4a53648561d5aeee46c779e4d546f979ef
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 28 21:17:43 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jul 28 21:20:48 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e77dea4a

media-libs/zimg: Drop old

Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-libs/zimg/Manifest                    |   3 -
 media-libs/zimg/files/zimg-2.7.5-sse2.patch | 231 ----------------------------
 media-libs/zimg/zimg-2.5.ebuild             |  36 -----
 media-libs/zimg/zimg-2.7.4.ebuild           |  36 -----
 media-libs/zimg/zimg-2.7.5.ebuild           |  33 ----
 5 files changed, 339 deletions(-)

diff --git a/media-libs/zimg/Manifest b/media-libs/zimg/Manifest
index 71b6acd6d38..812439a44b6 100644
--- a/media-libs/zimg/Manifest
+++ b/media-libs/zimg/Manifest
@@ -1,4 +1 @@
-DIST zimg-2.5.tar.gz 213054 BLAKE2B 0532693c11c1b2bcc0d5bde3a0bc16bf4f736ceff5fcda5d9bf491fcebe7e8be538041cc536e40bc110e438370c8599ce0be35f71cea00429b16c6eeb680cb86 SHA512 7fc48c704b434d837c36d4bafc51b35789eaf90fc81a68dcd7ec546f1e82a3e41c53263f8d381541d5c0ce58e25dddf0adaf1c3575512842ae633b5581778938
-DIST zimg-2.7.4.tar.gz 246376 BLAKE2B b6a21a1f7ca5106810485a69bb4e8f1d59d67fe3a619fd0ac412b1e441fe2d8892f64826666fbdfa48ae441fa5a21512b5ba0977eeaca7dcb7e0fcc43447f6e4 SHA512 adbb525b2611ef5267a4c0d4e8c6dd164c2814241c4d58d5356545b23dcf0cbeabb140141ae6ff0e70ef8e0741e351cbfadbadd60923061ddd693a2c3d9e5fde
-DIST zimg-2.7.5.tar.gz 246416 BLAKE2B a0ce1497356238aee5d3965a7ec57f1591d51c5df2475fb05d208a07f1431f073f8caaac110775fb17c6df8f887ed974b53f262e01f5532de13dc4c539958c1b SHA512 600139f86b074f2ed9614daa58d969465fa3d1578d8165bd2f841193f7b793c4b36389064dd4eee8e01e66a745d1c71c62e5bdb0b5283e54c435ed4a130a5b3b
 DIST zimg-2.8.tar.gz 265363 BLAKE2B a8982c64325e0089617136fcd5d6ee429ab861e3b9445b9cc0292bd3bbd3abb5783e94983e3e802fd9e59c2c7089eeea176d1eda4f3a850379cfc4fb36cbc408 SHA512 1e89087a756798a7ae3bfae3bc8244b29ae8ae7f04f53bdf6c4d4de3cb11412dc1eecd95a4a121bb9077437e633f8fbb665522ff8112ade806d9191ea4b5f7bf

diff --git a/media-libs/zimg/files/zimg-2.7.5-sse2.patch b/media-libs/zimg/files/zimg-2.7.5-sse2.patch
deleted file mode 100644
index 77483ab59e7..00000000000
--- a/media-libs/zimg/files/zimg-2.7.5-sse2.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-From e30112df0ca703be82ed2c852511916fc46defbd Mon Sep 17 00:00:00 2001
-From: sekrit-twc <noreply@example.com>
-Date: Fri, 22 Mar 2019 18:51:14 -0700
-Subject: [PATCH] colorspace: use bfloat16 for SSE2 linear-to-gamma LUT
-
-On Skylake, processing 512 pixel array:
-
-direction	cycles/sample	cycles/pxvector
-     g->l	         2.35	           9.43
-     l->g	         2.49	           9.97
----
- .../colorspace/x86/operation_impl_avx2.cpp    |   3 +-
- .../colorspace/x86/operation_impl_sse2.cpp    | 104 ++++++++++++++++--
- test/colorspace/x86/colorspace_sse2_test.cpp  |  14 +--
- 3 files changed, 100 insertions(+), 21 deletions(-)
-
-diff --git a/src/zimg/colorspace/x86/operation_impl_avx2.cpp b/src/zimg/colorspace/x86/operation_impl_avx2.cpp
-index bbbbf896..f0e7f792 100644
---- a/src/zimg/colorspace/x86/operation_impl_avx2.cpp
-+++ b/src/zimg/colorspace/x86/operation_impl_avx2.cpp
-@@ -114,8 +114,7 @@ class ToGammaLutOperationAVX2 final : public Operation {
- 	{
- 		EnsureSinglePrecision x87;
- 
--		// Allocate an extra LUT entry so that indexing can be done by multipying by a power of 2.
--		for (unsigned long i = 0; i <= UINT16_MAX; ++i) {
-+		for (size_t i = 0; i <= UINT16_MAX; ++i) {
- 			uint16_t half = static_cast<uint16_t>(i);
- 			float x = _mm_cvtss_f32(_mm_cvtph_ps(_mm_set1_epi16(half)));
- 			m_lut[i] = func(x * prescale);
-diff --git a/src/zimg/colorspace/x86/operation_impl_sse2.cpp b/src/zimg/colorspace/x86/operation_impl_sse2.cpp
-index 48645031..da9d4dbc 100644
---- a/src/zimg/colorspace/x86/operation_impl_sse2.cpp
-+++ b/src/zimg/colorspace/x86/operation_impl_sse2.cpp
-@@ -3,11 +3,13 @@
- #include <algorithm>
- #include <cstddef>
- #include <cstdint>
-+#include <type_traits>
- #include <vector>
- #include <emmintrin.h>
- #include "common/align.h"
- #include "common/ccdep.h"
- #include "common/make_unique.h"
-+#include "common/x86/sse2_util.h"
- #include "colorspace/gamma.h"
- #include "colorspace/operation.h"
- #include "colorspace/operation_impl.h"
-@@ -20,14 +22,25 @@ namespace {
- 
- constexpr unsigned LUT_DEPTH = 16;
- 
--void lut_filter_line(const float *RESTRICT lut, unsigned lut_depth, float prescale, const float *src, float *dst, unsigned left, unsigned right)
-+template <class T, class U>
-+T bit_cast(const U &x) noexcept
-+{
-+	static_assert(sizeof(T) == sizeof(U), "object sizes must match");
-+	static_assert(std::is_pod<T>::value && std::is_pod<U>::value, "object types must be POD");
-+
-+	T ret;
-+	std::copy_n(reinterpret_cast<const char *>(&x), sizeof(x), reinterpret_cast<char *>(&ret));
-+	return ret;
-+}
-+
-+void to_linear_lut_filter_line(const float *RESTRICT lut, unsigned lut_depth, const float *src, float *dst, unsigned left, unsigned right)
- {
- 	unsigned vec_left = ceil_n(left, 4);
- 	unsigned vec_right = floor_n(right, 4);
- 
- 	const int32_t lut_limit = static_cast<int32_t>(1) << lut_depth;
- 
--	const __m128 scale = _mm_set_ps1(0.5f * prescale * lut_limit);
-+	const __m128 scale = _mm_set_ps1(0.5f * lut_limit);
- 	const __m128 offset = _mm_set_ps1(0.25f * lut_limit);
- 	const __m128i limit = _mm_set1_epi16(std::min(lut_limit + INT16_MIN, static_cast<int32_t>(INT16_MAX)));
- 	const __m128i bias_epi16 = _mm_set1_epi16(INT16_MIN);
-@@ -73,16 +86,61 @@ void lut_filter_line(const float *RESTRICT lut, unsigned lut_depth, float presca
- 	}
- }
- 
-+void to_gamma_lut_filter_line(const float *RESTRICT lut, const float *src, float *dst, unsigned left, unsigned right)
-+{
-+	unsigned vec_left = ceil_n(left, 4);
-+	unsigned vec_right = floor_n(right, 4);
-+
-+	for (unsigned j = left; j < vec_left; ++j) {
-+		__m128i x = _mm_castps_si128(_mm_load_ss(src + j));
-+		__m128i msb = _mm_srli_epi32(x, 16);
-+		__m128i lsb = _mm_and_si128(_mm_srli_epi32(x, 15), _mm_set1_epi32(1));
-+		x = mm_packus_epi32(msb, lsb);
-+		x = _mm_adds_epi16(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2)));
-+
-+		dst[j] = lut[_mm_cvtsi128_si32(x)];
-+	}
-+	for (unsigned j = vec_left; j < vec_right; j += 4) {
-+		__m128i x = _mm_castps_si128(_mm_load_ps(src + j));
-+		__m128i msb = _mm_srli_epi32(x, 16);
-+		__m128i lsb = _mm_and_si128(_mm_srli_epi32(x, 15), _mm_set1_epi32(1));
-+		x = mm_packus_epi32(msb, lsb);
-+		x = _mm_adds_epi16(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2)));
-+
-+#if SIZE_MAX >= UINT64_MAX
-+		uint64_t tmp = _mm_cvtsi128_si64(x);
-+		dst[j + 0] = lut[tmp & 0xFFFFU];
-+		dst[j + 1] = lut[(tmp >> 16) & 0xFFFFU];
-+		dst[j + 2] = lut[(tmp >> 32) & 0xFFFFU];
-+		dst[j + 3] = lut[tmp >> 48];
-+#else
-+		uint32_t tmp0 = _mm_cvtsi128_si32(x);
-+		uint32_t tmp1 = _mm_cvtsi128_si32(_mm_shuffle_epi32(x, _MM_SHUFFLE(3, 2, 0, 1)));
-+		dst[j + 0] = lut[tmp0 & 0xFFFFU];
-+		dst[j + 1] = lut[tmp0 >> 16];
-+		dst[j + 2] = lut[tmp1 & 0xFFFFU];
-+		dst[j + 3] = lut[tmp1 >> 16];
-+#endif
-+	}
-+	for (unsigned j = vec_right; j < right; ++j) {
-+		__m128i x = _mm_castps_si128(_mm_load_ss(src + j));
-+		__m128i msb = _mm_srli_epi32(x, 16);
-+		__m128i lsb = _mm_and_si128(_mm_srli_epi32(x, 15), _mm_set1_epi32(1));
-+		x = mm_packus_epi32(msb, lsb);
-+		x = _mm_adds_epi16(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2)));
-+
-+		dst[j] = lut[_mm_cvtsi128_si32(x)];
-+	}
-+}
-+
- 
--class LutOperationSSE2 final : public Operation {
-+class ToLinearLutOperationSSE2 final : public Operation {
- 	std::vector<float> m_lut;
- 	unsigned m_lut_depth;
--	float m_prescale;
- public:
--	LutOperationSSE2(gamma_func func, unsigned lut_depth, float prescale, float postscale) :
-+	ToLinearLutOperationSSE2(gamma_func func, unsigned lut_depth, float postscale) :
- 		m_lut((1UL << lut_depth) + 1),
--		m_lut_depth{ lut_depth },
--		m_prescale{ static_cast<float>(prescale) }
-+		m_lut_depth{ lut_depth }
- 	{
- 		EnsureSinglePrecision x87;
- 
-@@ -95,9 +153,31 @@ class LutOperationSSE2 final : public Operation {
- 
- 	void process(const float * const *src, float * const *dst, unsigned left, unsigned right) const override
- 	{
--		lut_filter_line(m_lut.data(), m_lut_depth, m_prescale, src[0], dst[0], left, right);
--		lut_filter_line(m_lut.data(), m_lut_depth, m_prescale, src[1], dst[1], left, right);
--		lut_filter_line(m_lut.data(), m_lut_depth, m_prescale, src[2], dst[2], left, right);
-+		to_linear_lut_filter_line(m_lut.data(), m_lut_depth, src[0], dst[0], left, right);
-+		to_linear_lut_filter_line(m_lut.data(), m_lut_depth, src[1], dst[1], left, right);
-+		to_linear_lut_filter_line(m_lut.data(), m_lut_depth, src[2], dst[2], left, right);
-+	}
-+};
-+
-+class ToGammaLutOperationSSE2 final : public Operation {
-+	std::vector<float> m_lut;
-+public:
-+	ToGammaLutOperationSSE2(gamma_func func, float prescale) :
-+		m_lut(static_cast<uint32_t>(UINT16_MAX) + 1)
-+	{
-+		EnsureSinglePrecision x87;
-+
-+		for (size_t i = 0; i <= UINT16_MAX; ++i) {
-+			float x = bit_cast<float>(static_cast<uint32_t>(i << 16));
-+			m_lut[i] = func(x * prescale);
-+		}
-+	}
-+
-+	void process(const float * const *src, float * const *dst, unsigned left, unsigned right) const override
-+	{
-+		to_gamma_lut_filter_line(m_lut.data(), src[0], dst[0], left, right);
-+		to_gamma_lut_filter_line(m_lut.data(), src[1], dst[1], left, right);
-+		to_gamma_lut_filter_line(m_lut.data(), src[2], dst[2], left, right);
- 	}
- };
- 
-@@ -109,7 +189,7 @@ std::unique_ptr<Operation> create_gamma_operation_sse2(const TransferFunction &t
- 	if (!params.approximate_gamma)
- 		return nullptr;
- 
--	return ztd::make_unique<LutOperationSSE2>(transfer.to_gamma, LUT_DEPTH, transfer.to_gamma_scale, 1.0f);
-+	return ztd::make_unique<ToGammaLutOperationSSE2>(transfer.to_gamma, transfer.to_gamma_scale);
- }
- 
- std::unique_ptr<Operation> create_inverse_gamma_operation_sse2(const TransferFunction &transfer, const OperationParams &params)
-@@ -117,7 +197,7 @@ std::unique_ptr<Operation> create_inverse_gamma_operation_sse2(const TransferFun
- 	if (!params.approximate_gamma)
- 		return nullptr;
- 
--	return ztd::make_unique<LutOperationSSE2>(transfer.to_linear, LUT_DEPTH, 1.0f, transfer.to_linear_scale);
-+	return ztd::make_unique<ToLinearLutOperationSSE2>(transfer.to_linear, LUT_DEPTH, transfer.to_linear_scale);
- }
- 
- } // namespace colorspace
-diff --git a/test/colorspace/x86/colorspace_sse2_test.cpp b/test/colorspace/x86/colorspace_sse2_test.cpp
-index d5130868..ecaa05e7 100644
---- a/test/colorspace/x86/colorspace_sse2_test.cpp
-+++ b/test/colorspace/x86/colorspace_sse2_test.cpp
-@@ -53,9 +53,9 @@ TEST(ColorspaceConversionSSE2Test, test_transfer_lut)
- 			"162687e701627cdc17283a32c36ea711d28a953e"
- 		},
- 		{
--			"492587e7ed75b7e3ab868bead6ade7a4137c6ea1",
--			"3b0694e9fbce61466cb5a575f300d784089b6cad",
--			"b68f103f52ccafae867d664d7f27fe56ae9208af"
-+			"95f2715bd0d417028bebd5c5377180fcd5b01119",
-+			"76f7c88b198f1ab08167f8162c1237b54f22007a",
-+			"1099c3ae187c0a9f79acb9445761b6056218c779"
- 		},
- 		{
- 			"4c0b5ffe768a7812d1ef102b4d8d52614838bc8e",
-@@ -63,13 +63,13 @@ TEST(ColorspaceConversionSSE2Test, test_transfer_lut)
- 			"85a277a80dfca2e21789cedd76aaee307dbc4562"
- 		},
- 		{
--			"df546ce0ad6f859499a96d2d697d896067e60e38",
--			"f0041b8a008ab45f0ea1319090ac7e8be0990d92",
--			"06880efb598e41f96fa79e04dbdfcccd50d6dc6f"
-+			"5e35786d313e936566d9873ba7a08a8d6005b2ee",
-+			"829fa88acfbbb26801871bf3cadf5cc2eb6830c9",
-+			"f82fcad18a19b548d419a1952b6a7a423a684b62"
- 		},
- 	};
- 	const double expected_tolinear_snr = 80.0;
--	const double expected_togamma_snr = 40.0;
-+	const double expected_togamma_snr = 60.0;
- 
- 	SCOPED_TRACE("tolinear 709");
- 	test_case({ MatrixCoefficients::RGB, TransferCharacteristics::REC_709, ColorPrimaries::UNSPECIFIED },

diff --git a/media-libs/zimg/zimg-2.5.ebuild b/media-libs/zimg/zimg-2.5.ebuild
deleted file mode 100644
index df91e3a3d81..00000000000
--- a/media-libs/zimg/zimg-2.5.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-AUTOTOOLS_AUTORECONF=yes
-
-SCM=""
-
-if [ "${PV#9999}" != "${PV}" ] ; then
-	SCM="git-r3"
-	EGIT_REPO_URI="https://github.com/sekrit-twc/zimg"
-fi
-
-inherit autotools-multilib ${SCM}
-
-DESCRIPTION="Scaling, colorspace conversion, and dithering library"
-HOMEPAGE="https://github.com/sekrit-twc/zimg"
-
-if [ "${PV#9999}" = "${PV}" ] ; then
-	SRC_URI="https://github.com/sekrit-twc/zimg/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86"
-	S="${WORKDIR}/${PN}-release-${PV}/"
-fi
-
-LICENSE="WTFPL-2"
-SLOT="0"
-IUSE="static-libs cpu_flags_x86_sse"
-
-DEPEND=""
-RDEPEND="${DEPEND}"
-
-src_configure() {
-	autotools-multilib_src_configure \
-		$(use_enable cpu_flags_x86_sse x86simd)
-}

diff --git a/media-libs/zimg/zimg-2.7.4.ebuild b/media-libs/zimg/zimg-2.7.4.ebuild
deleted file mode 100644
index 1d720a336c9..00000000000
--- a/media-libs/zimg/zimg-2.7.4.ebuild
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-AUTOTOOLS_AUTORECONF=yes
-
-SCM=""
-
-if [ "${PV#9999}" != "${PV}" ] ; then
-	SCM="git-r3"
-	EGIT_REPO_URI="https://github.com/sekrit-twc/zimg"
-fi
-
-inherit autotools-multilib ${SCM}
-
-DESCRIPTION="Scaling, colorspace conversion, and dithering library"
-HOMEPAGE="https://github.com/sekrit-twc/zimg"
-
-if [ "${PV#9999}" = "${PV}" ] ; then
-	SRC_URI="https://github.com/sekrit-twc/zimg/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-	S="${WORKDIR}/${PN}-release-${PV}/"
-fi
-
-LICENSE="WTFPL-2"
-SLOT="0"
-IUSE="static-libs cpu_flags_x86_sse"
-
-DEPEND=""
-RDEPEND="${DEPEND}"
-
-src_configure() {
-	autotools-multilib_src_configure \
-		$(use_enable cpu_flags_x86_sse x86simd)
-}

diff --git a/media-libs/zimg/zimg-2.7.5.ebuild b/media-libs/zimg/zimg-2.7.5.ebuild
deleted file mode 100644
index 7bac59befc3..00000000000
--- a/media-libs/zimg/zimg-2.7.5.ebuild
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-if [[ ${PV} = *9999* ]] ; then
-	EGIT_REPO_URI="https://github.com/sekrit-twc/zimg"
-	inherit git-r3
-else
-	SRC_URI="https://github.com/sekrit-twc/zimg/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-	S="${WORKDIR}/${PN}-release-${PV}/"
-fi
-inherit autotools multilib-minimal
-
-DESCRIPTION="Scaling, colorspace conversion, and dithering library"
-HOMEPAGE="https://github.com/sekrit-twc/zimg"
-
-LICENSE="WTFPL-2"
-SLOT="0"
-IUSE="static-libs cpu_flags_x86_sse"
-
-PATCHES=( "${FILESDIR}/${P}-sse2.patch" )
-
-src_prepare() {
-	default
-	eautoreconf
-}
-
-multilib_src_configure() {
-	ECONF_SOURCE="${S}" econf \
-		$(use_enable cpu_flags_x86_sse x86simd)
-}


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/zimg/files/, media-libs/zimg/
@ 2022-09-25  1:27 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2022-09-25  1:27 UTC (permalink / raw
  To: gentoo-commits

commit:     41f53032ea23d2a8a2cac6d58812130518c69315
Author:     matoro <matoro <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Sat Sep 17 18:09:34 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 25 01:27:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41f53032

media-libs/zimg: enable tests

Bug: https://bugs.gentoo.org/868030
Closes: https://github.com/gentoo/gentoo/pull/27310
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../zimg/files/backport-e29571f-issue-175.patch    | 83 ++++++++++++++++++++++
 media-libs/zimg/files/system-gtest.patch           | 45 ++++++++++++
 media-libs/zimg/zimg-3.0.4.ebuild                  | 12 +++-
 3 files changed, 138 insertions(+), 2 deletions(-)

diff --git a/media-libs/zimg/files/backport-e29571f-issue-175.patch b/media-libs/zimg/files/backport-e29571f-issue-175.patch
new file mode 100644
index 000000000000..e8512f35eb7e
--- /dev/null
+++ b/media-libs/zimg/files/backport-e29571f-issue-175.patch
@@ -0,0 +1,83 @@
+https://github.com/sekrit-twc/zimg/issues/175
+
+From e29571f9fc4a7bb37503a9c7ae4afd2352968b8f Mon Sep 17 00:00:00 2001
+From: sekrit-twc <noreply@example.com>
+Date: Sat, 7 May 2022 07:47:53 -0700
+Subject: [PATCH] test: update ARM hashsums
+
+Fix #175
+---
+ test/colorspace/arm/colorspace_neon_test.cpp | 36 ++++++++++----------
+ 1 file changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/test/colorspace/arm/colorspace_neon_test.cpp b/test/colorspace/arm/colorspace_neon_test.cpp
+index 1b6e0bc9..54ad2c39 100644
+--- a/test/colorspace/arm/colorspace_neon_test.cpp
++++ b/test/colorspace/arm/colorspace_neon_test.cpp
+@@ -54,13 +54,13 @@ TEST(ColorspaceConversionNeonTest, test_matrix)
+ 
+ 	const char *expected_sha1[3] = {
+ #if defined(_M_ARM64) || defined(__aarch64__)
+-		"7b2a05426e2ef61dc6adc16573fca46ea3480256",
+-		"9c69bc8fa775a8e877e66e79812e9f4c39cec647",
+-		"6010983126eb3f5ca2dd5c01f4753c0e9f36d0bb"
++		"749f74428406c019b1b727fa30352fcd1f0141ed",
++		"334cfa73375f8afef8423a163f3cff8f8a196762",
++		"aa3aab12d52e67b4d6765b4e8c03205a5375d8d9"
+ #else
+-		"0495adab9c82d98e73841e229a9b2041838fc0f2",
+-		"ece7edb1118d4b3063ad80f5d8febb6db7e9633a",
+-		"73a9ee951c7bde9ae0ada9b90afd1f7ce8b604df"
++		"1d559e4b2812a5940839b064f5bd74bc4fe0a2f9",
++		"b32a33c4bbbf3901f89458f914e6d03cc81f2c1d",
++		"4aadd644fae30cfd2098bb8d2b9f98483c8821fd"
+ #endif
+ 	};
+ #if defined(_M_ARM64) || defined(__aarch64__)
+@@ -82,34 +82,34 @@ TEST(ColorspaceConversionNeonTest, test_transfer_lut)
+ 		{
+ #if defined(_M_ARM64) || defined(__aarch64__)
+ 			"23d012fcb280f601e2e3c349229d0108e3cd632a",
+-			"21f5071b0a817c28295d51ead5137cabc6e0d5c4",
+-			"158c4ff0c91c08f82e9fc35a500a1c8166f5ae6b"
++			"7ae186215d5fa45065f7aeac74ab2dc74b556696",
++			"bad84d4e0de8572c81df6d9f91fef05b1576f9e5"
+ #else
+ 			"52451877e62e9fc31eb10b1e37c5f95fdd8851db",
+-			"3e2ff4f017c343edbe787692ce169123124337b1",
+-			"f719a90e6a6c859bfcfc136f3296e65044495da0"
++			"06bc0aff436bbbf4ba633b2255dd096e628a129c",
++			"a20570af1c05291029ea7d6b4215c451f4a9187a"
+ #endif
+ 		},
+ 		{
+ 			"011ee645ad30bb6ad6d93d8980d89a3e3e073c19",
+-			"d64814ca78cbf4e07606f92f1644f59762271ca5",
+-			"f871247697737f9f8b6a59a58306e22cce472ea6"
++			"5ae0e075b3856d9f491954b477568b17daf7f147",
++			"84b20f8fa27c23a668540566b9df26c4b42c9afa"
+ 		},
+ 		{
+ #if defined(_M_ARM64) || defined(__aarch64__)
+ 			"8206be2ae5e8a0fc003daeec4178189eecf82a13",
+-			"6bc5833cbd22f04c1965d230aad2ef8969da24b7",
+-			"6538399afe0b9fd55a95608b25c8036e16d658b8"
++			"24843f17600dd7bf9870f5c778549bd96c333427",
++			"26a6b00801b41da17d849e02217bf69add6324a6"
+ #else
+ 			"905d4d54eeae6458e8e0975c9cea66b25edcc234",
+-			"c2e7015447b40ebb2f4bfba48b7b091f964b22f1",
+-			"d222f960fe874ac88608666c4af8de180d91868e"
++			"d380f54820f1e269ea54a1d552b0cb704f83dd7b",
++			"552579149674b5e37f0d443ad19a59593fdca057"
+ #endif
+ 		},
+ 		{
+ 			"16f2274ffac90927de0438114f0ea22e650981a0",
+-			"2e01c95f89ea26b5a55bed895223381ac3f17e70",
+-			"c61d9c5369a00af5bb40b70fbb21956c00a4a1e9"
++			"b1c8b15b6159ab43e7bfc4e715fe3b621628d26e",
++			"632ae07d6919533c87d2ed28560a60cf070498e2"
+ 		},
+ 	};
+ 	const double expected_tolinear_snr = 80.0;

diff --git a/media-libs/zimg/files/system-gtest.patch b/media-libs/zimg/files/system-gtest.patch
new file mode 100644
index 000000000000..5e9e49bcab4d
--- /dev/null
+++ b/media-libs/zimg/files/system-gtest.patch
@@ -0,0 +1,45 @@
+diff --git a/Makefile.am b/Makefile.am
+index 8727ca4..303cc6f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -356,8 +356,7 @@ test_unit_test_CPPFLAGS = \
+ 	$(AM_CPPFLAGS) \
+ 	-I$(srcdir)/src/zimg \
+ 	-I$(srcdir)/test \
+-	-I$(srcdir)/test/extra \
+-	-I$(srcdir)/test/extra/googletest/googletest/include
++	-I$(srcdir)/test/extra
+ 
+ test_unit_test_SOURCES = \
+ 	test/main.cpp \
+@@ -419,13 +418,8 @@ test_unit_test_SOURCES += \
+ 	test/resize/x86/resize_impl_avx512_vnni_test.cpp
+ endif # X86SIMD_AVX512
+ 
+-test/extra/googletest/build/lib/libgtest.a: .FAKE
+-	-$(MAKE) -C test/extra/googletest/build gtest
+-
+-.FAKE:
+-
+ test_unit_test_LDADD = \
+-	test/extra/googletest/build/lib/libgtest.a \
++	-lgtest \
+ 	test/libmusl_m.la \
+ 	libzimg_internal.la
+ endif # UNIT_TEST
+diff --git a/configure.ac b/configure.ac
+index cd50e96..5fd41fb 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -45,11 +45,6 @@ AS_IF([test "x$enable_unit_test" = "xyes"],
+                 [i?86],    [CFLAGS="$CFLAGS -mfpmath=sse -msse2" CXXFLAGS="$CXXFLAGS -mfpmath=sse -msse2"],
+                 [x86_64],  [],
+                 [AC_MSG_WARN([Could not determine how to enable IEEE-754 compliance on host. Tests may fail.])])
+-
+-        AC_CHECK_PROG([CMAKE], [cmake], [cmake])
+-        AS_MKDIR_P([test/extra/googletest/build])
+-        AS_IF([(cd "test/extra/googletest/build" && $CMAKE -Dgtest_disable_pthreads=ON "$ac_abs_confdir/test/extra/googletest")],
+-              [], [AC_MSG_ERROR([CMake error])])
+       ])
+ 
+ 

diff --git a/media-libs/zimg/zimg-3.0.4.ebuild b/media-libs/zimg/zimg-3.0.4.ebuild
index 5198226202f1..be89f6335570 100644
--- a/media-libs/zimg/zimg-3.0.4.ebuild
+++ b/media-libs/zimg/zimg-3.0.4.ebuild
@@ -18,7 +18,14 @@ HOMEPAGE="https://github.com/sekrit-twc/zimg"
 
 LICENSE="WTFPL-2"
 SLOT="0"
-IUSE="debug static-libs"
+IUSE="debug static-libs test"
+RESTRICT="!test? ( test )"
+DEPEND="test? ( dev-cpp/gtest )"
+
+PATCHES=(
+	"${FILESDIR}/system-gtest.patch"
+	"${FILESDIR}/backport-e29571f-issue-175.patch"
+)
 
 src_prepare() {
 	default
@@ -28,5 +35,6 @@ src_prepare() {
 multilib_src_configure() {
 	ECONF_SOURCE="${S}" econf \
 		$(use_enable debug) \
-		$(use_enable static-libs static)
+		$(use_enable static-libs static) \
+		$(use_enable test unit-test)
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/zimg/files/, media-libs/zimg/
@ 2020-05-09  9:36 Sergei Trofimovich
  0 siblings, 0 replies; 4+ messages in thread
From: Sergei Trofimovich @ 2020-05-09  9:36 UTC (permalink / raw
  To: gentoo-commits

commit:     7a49f4df7f6bc0e0ab953c10ec1cd4a25558cb4b
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat May  9 09:36:19 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat May  9 09:36:33 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a49f4df

media-libs/zimg: tweak for gcc-10, bug #721676

The build fails as:

```
src/zimg/colorspace/matrix3.cpp:20:7:
  error: 'size_t' was not declared in this scope; did you mean 'std::size_t'?
   20 |  for (size_t i = 0; i < 3; ++i) {
      |       ^~~~~~
      |       std::size_t
```

Direct backport of upstream 9ae36d7d5f74 ("Update matrix3.cpp")
which adds missing <cstddef> include needed for 'size_t'.

Reported-by: Patrick McLean
Closes: https://bugs.gentoo.org/721676
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 media-libs/zimg/files/zimg-2.9.2-gcc-10.patch | 18 ++++++++++++++++++
 media-libs/zimg/zimg-2.9.2.ebuild             |  2 ++
 2 files changed, 20 insertions(+)

diff --git a/media-libs/zimg/files/zimg-2.9.2-gcc-10.patch b/media-libs/zimg/files/zimg-2.9.2-gcc-10.patch
new file mode 100644
index 00000000000..ea192f77fca
--- /dev/null
+++ b/media-libs/zimg/files/zimg-2.9.2-gcc-10.patch
@@ -0,0 +1,18 @@
+https://bugs.gentoo.org/721676
+
+From 9ae36d7d5f7420eaacd9644451933512fa13d716 Mon Sep 17 00:00:00 2001
+From: sekrit-twc <sekrit-twc@users.noreply.github.com>
+Date: Wed, 4 Dec 2019 12:01:26 -0800
+Subject: [PATCH] Update matrix3.cpp
+
+---
+ src/zimg/colorspace/matrix3.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/src/zimg/colorspace/matrix3.cpp
++++ b/src/zimg/colorspace/matrix3.cpp
+@@ -1,3 +1,4 @@
++#include <cstddef>
+ #include "matrix3.h"
+ 
+ namespace zimg {

diff --git a/media-libs/zimg/zimg-2.9.2.ebuild b/media-libs/zimg/zimg-2.9.2.ebuild
index c1295123848..e962d7a4b5f 100644
--- a/media-libs/zimg/zimg-2.9.2.ebuild
+++ b/media-libs/zimg/zimg-2.9.2.ebuild
@@ -20,6 +20,8 @@ LICENSE="WTFPL-2"
 SLOT="0"
 IUSE="cpu_flags_x86_sse debug static-libs"
 
+PATCHES=("${FILESDIR}"/${PN}-2.9.2-gcc-10.patch)
+
 src_prepare() {
 	default
 	eautoreconf


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/zimg/files/, media-libs/zimg/
@ 2019-05-21 19:29 Andreas Sturmlechner
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Sturmlechner @ 2019-05-21 19:29 UTC (permalink / raw
  To: gentoo-commits

commit:     dcc0c10f45442c42c2bdbf10564a8eb39196edee
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue May 21 19:28:14 2019 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue May 21 19:29:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dcc0c10f

media-libs/zimg: EAPI-7 bump

Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 media-libs/zimg/files/zimg-2.7.5-sse2.patch | 231 ++++++++++++++++++++++++++++
 media-libs/zimg/zimg-2.7.5.ebuild           |  35 ++---
 2 files changed, 247 insertions(+), 19 deletions(-)

diff --git a/media-libs/zimg/files/zimg-2.7.5-sse2.patch b/media-libs/zimg/files/zimg-2.7.5-sse2.patch
new file mode 100644
index 00000000000..77483ab59e7
--- /dev/null
+++ b/media-libs/zimg/files/zimg-2.7.5-sse2.patch
@@ -0,0 +1,231 @@
+From e30112df0ca703be82ed2c852511916fc46defbd Mon Sep 17 00:00:00 2001
+From: sekrit-twc <noreply@example.com>
+Date: Fri, 22 Mar 2019 18:51:14 -0700
+Subject: [PATCH] colorspace: use bfloat16 for SSE2 linear-to-gamma LUT
+
+On Skylake, processing 512 pixel array:
+
+direction	cycles/sample	cycles/pxvector
+     g->l	         2.35	           9.43
+     l->g	         2.49	           9.97
+---
+ .../colorspace/x86/operation_impl_avx2.cpp    |   3 +-
+ .../colorspace/x86/operation_impl_sse2.cpp    | 104 ++++++++++++++++--
+ test/colorspace/x86/colorspace_sse2_test.cpp  |  14 +--
+ 3 files changed, 100 insertions(+), 21 deletions(-)
+
+diff --git a/src/zimg/colorspace/x86/operation_impl_avx2.cpp b/src/zimg/colorspace/x86/operation_impl_avx2.cpp
+index bbbbf896..f0e7f792 100644
+--- a/src/zimg/colorspace/x86/operation_impl_avx2.cpp
++++ b/src/zimg/colorspace/x86/operation_impl_avx2.cpp
+@@ -114,8 +114,7 @@ class ToGammaLutOperationAVX2 final : public Operation {
+ 	{
+ 		EnsureSinglePrecision x87;
+ 
+-		// Allocate an extra LUT entry so that indexing can be done by multipying by a power of 2.
+-		for (unsigned long i = 0; i <= UINT16_MAX; ++i) {
++		for (size_t i = 0; i <= UINT16_MAX; ++i) {
+ 			uint16_t half = static_cast<uint16_t>(i);
+ 			float x = _mm_cvtss_f32(_mm_cvtph_ps(_mm_set1_epi16(half)));
+ 			m_lut[i] = func(x * prescale);
+diff --git a/src/zimg/colorspace/x86/operation_impl_sse2.cpp b/src/zimg/colorspace/x86/operation_impl_sse2.cpp
+index 48645031..da9d4dbc 100644
+--- a/src/zimg/colorspace/x86/operation_impl_sse2.cpp
++++ b/src/zimg/colorspace/x86/operation_impl_sse2.cpp
+@@ -3,11 +3,13 @@
+ #include <algorithm>
+ #include <cstddef>
+ #include <cstdint>
++#include <type_traits>
+ #include <vector>
+ #include <emmintrin.h>
+ #include "common/align.h"
+ #include "common/ccdep.h"
+ #include "common/make_unique.h"
++#include "common/x86/sse2_util.h"
+ #include "colorspace/gamma.h"
+ #include "colorspace/operation.h"
+ #include "colorspace/operation_impl.h"
+@@ -20,14 +22,25 @@ namespace {
+ 
+ constexpr unsigned LUT_DEPTH = 16;
+ 
+-void lut_filter_line(const float *RESTRICT lut, unsigned lut_depth, float prescale, const float *src, float *dst, unsigned left, unsigned right)
++template <class T, class U>
++T bit_cast(const U &x) noexcept
++{
++	static_assert(sizeof(T) == sizeof(U), "object sizes must match");
++	static_assert(std::is_pod<T>::value && std::is_pod<U>::value, "object types must be POD");
++
++	T ret;
++	std::copy_n(reinterpret_cast<const char *>(&x), sizeof(x), reinterpret_cast<char *>(&ret));
++	return ret;
++}
++
++void to_linear_lut_filter_line(const float *RESTRICT lut, unsigned lut_depth, const float *src, float *dst, unsigned left, unsigned right)
+ {
+ 	unsigned vec_left = ceil_n(left, 4);
+ 	unsigned vec_right = floor_n(right, 4);
+ 
+ 	const int32_t lut_limit = static_cast<int32_t>(1) << lut_depth;
+ 
+-	const __m128 scale = _mm_set_ps1(0.5f * prescale * lut_limit);
++	const __m128 scale = _mm_set_ps1(0.5f * lut_limit);
+ 	const __m128 offset = _mm_set_ps1(0.25f * lut_limit);
+ 	const __m128i limit = _mm_set1_epi16(std::min(lut_limit + INT16_MIN, static_cast<int32_t>(INT16_MAX)));
+ 	const __m128i bias_epi16 = _mm_set1_epi16(INT16_MIN);
+@@ -73,16 +86,61 @@ void lut_filter_line(const float *RESTRICT lut, unsigned lut_depth, float presca
+ 	}
+ }
+ 
++void to_gamma_lut_filter_line(const float *RESTRICT lut, const float *src, float *dst, unsigned left, unsigned right)
++{
++	unsigned vec_left = ceil_n(left, 4);
++	unsigned vec_right = floor_n(right, 4);
++
++	for (unsigned j = left; j < vec_left; ++j) {
++		__m128i x = _mm_castps_si128(_mm_load_ss(src + j));
++		__m128i msb = _mm_srli_epi32(x, 16);
++		__m128i lsb = _mm_and_si128(_mm_srli_epi32(x, 15), _mm_set1_epi32(1));
++		x = mm_packus_epi32(msb, lsb);
++		x = _mm_adds_epi16(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2)));
++
++		dst[j] = lut[_mm_cvtsi128_si32(x)];
++	}
++	for (unsigned j = vec_left; j < vec_right; j += 4) {
++		__m128i x = _mm_castps_si128(_mm_load_ps(src + j));
++		__m128i msb = _mm_srli_epi32(x, 16);
++		__m128i lsb = _mm_and_si128(_mm_srli_epi32(x, 15), _mm_set1_epi32(1));
++		x = mm_packus_epi32(msb, lsb);
++		x = _mm_adds_epi16(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2)));
++
++#if SIZE_MAX >= UINT64_MAX
++		uint64_t tmp = _mm_cvtsi128_si64(x);
++		dst[j + 0] = lut[tmp & 0xFFFFU];
++		dst[j + 1] = lut[(tmp >> 16) & 0xFFFFU];
++		dst[j + 2] = lut[(tmp >> 32) & 0xFFFFU];
++		dst[j + 3] = lut[tmp >> 48];
++#else
++		uint32_t tmp0 = _mm_cvtsi128_si32(x);
++		uint32_t tmp1 = _mm_cvtsi128_si32(_mm_shuffle_epi32(x, _MM_SHUFFLE(3, 2, 0, 1)));
++		dst[j + 0] = lut[tmp0 & 0xFFFFU];
++		dst[j + 1] = lut[tmp0 >> 16];
++		dst[j + 2] = lut[tmp1 & 0xFFFFU];
++		dst[j + 3] = lut[tmp1 >> 16];
++#endif
++	}
++	for (unsigned j = vec_right; j < right; ++j) {
++		__m128i x = _mm_castps_si128(_mm_load_ss(src + j));
++		__m128i msb = _mm_srli_epi32(x, 16);
++		__m128i lsb = _mm_and_si128(_mm_srli_epi32(x, 15), _mm_set1_epi32(1));
++		x = mm_packus_epi32(msb, lsb);
++		x = _mm_adds_epi16(x, _mm_shuffle_epi32(x, _MM_SHUFFLE(1, 0, 3, 2)));
++
++		dst[j] = lut[_mm_cvtsi128_si32(x)];
++	}
++}
++
+ 
+-class LutOperationSSE2 final : public Operation {
++class ToLinearLutOperationSSE2 final : public Operation {
+ 	std::vector<float> m_lut;
+ 	unsigned m_lut_depth;
+-	float m_prescale;
+ public:
+-	LutOperationSSE2(gamma_func func, unsigned lut_depth, float prescale, float postscale) :
++	ToLinearLutOperationSSE2(gamma_func func, unsigned lut_depth, float postscale) :
+ 		m_lut((1UL << lut_depth) + 1),
+-		m_lut_depth{ lut_depth },
+-		m_prescale{ static_cast<float>(prescale) }
++		m_lut_depth{ lut_depth }
+ 	{
+ 		EnsureSinglePrecision x87;
+ 
+@@ -95,9 +153,31 @@ class LutOperationSSE2 final : public Operation {
+ 
+ 	void process(const float * const *src, float * const *dst, unsigned left, unsigned right) const override
+ 	{
+-		lut_filter_line(m_lut.data(), m_lut_depth, m_prescale, src[0], dst[0], left, right);
+-		lut_filter_line(m_lut.data(), m_lut_depth, m_prescale, src[1], dst[1], left, right);
+-		lut_filter_line(m_lut.data(), m_lut_depth, m_prescale, src[2], dst[2], left, right);
++		to_linear_lut_filter_line(m_lut.data(), m_lut_depth, src[0], dst[0], left, right);
++		to_linear_lut_filter_line(m_lut.data(), m_lut_depth, src[1], dst[1], left, right);
++		to_linear_lut_filter_line(m_lut.data(), m_lut_depth, src[2], dst[2], left, right);
++	}
++};
++
++class ToGammaLutOperationSSE2 final : public Operation {
++	std::vector<float> m_lut;
++public:
++	ToGammaLutOperationSSE2(gamma_func func, float prescale) :
++		m_lut(static_cast<uint32_t>(UINT16_MAX) + 1)
++	{
++		EnsureSinglePrecision x87;
++
++		for (size_t i = 0; i <= UINT16_MAX; ++i) {
++			float x = bit_cast<float>(static_cast<uint32_t>(i << 16));
++			m_lut[i] = func(x * prescale);
++		}
++	}
++
++	void process(const float * const *src, float * const *dst, unsigned left, unsigned right) const override
++	{
++		to_gamma_lut_filter_line(m_lut.data(), src[0], dst[0], left, right);
++		to_gamma_lut_filter_line(m_lut.data(), src[1], dst[1], left, right);
++		to_gamma_lut_filter_line(m_lut.data(), src[2], dst[2], left, right);
+ 	}
+ };
+ 
+@@ -109,7 +189,7 @@ std::unique_ptr<Operation> create_gamma_operation_sse2(const TransferFunction &t
+ 	if (!params.approximate_gamma)
+ 		return nullptr;
+ 
+-	return ztd::make_unique<LutOperationSSE2>(transfer.to_gamma, LUT_DEPTH, transfer.to_gamma_scale, 1.0f);
++	return ztd::make_unique<ToGammaLutOperationSSE2>(transfer.to_gamma, transfer.to_gamma_scale);
+ }
+ 
+ std::unique_ptr<Operation> create_inverse_gamma_operation_sse2(const TransferFunction &transfer, const OperationParams &params)
+@@ -117,7 +197,7 @@ std::unique_ptr<Operation> create_inverse_gamma_operation_sse2(const TransferFun
+ 	if (!params.approximate_gamma)
+ 		return nullptr;
+ 
+-	return ztd::make_unique<LutOperationSSE2>(transfer.to_linear, LUT_DEPTH, 1.0f, transfer.to_linear_scale);
++	return ztd::make_unique<ToLinearLutOperationSSE2>(transfer.to_linear, LUT_DEPTH, transfer.to_linear_scale);
+ }
+ 
+ } // namespace colorspace
+diff --git a/test/colorspace/x86/colorspace_sse2_test.cpp b/test/colorspace/x86/colorspace_sse2_test.cpp
+index d5130868..ecaa05e7 100644
+--- a/test/colorspace/x86/colorspace_sse2_test.cpp
++++ b/test/colorspace/x86/colorspace_sse2_test.cpp
+@@ -53,9 +53,9 @@ TEST(ColorspaceConversionSSE2Test, test_transfer_lut)
+ 			"162687e701627cdc17283a32c36ea711d28a953e"
+ 		},
+ 		{
+-			"492587e7ed75b7e3ab868bead6ade7a4137c6ea1",
+-			"3b0694e9fbce61466cb5a575f300d784089b6cad",
+-			"b68f103f52ccafae867d664d7f27fe56ae9208af"
++			"95f2715bd0d417028bebd5c5377180fcd5b01119",
++			"76f7c88b198f1ab08167f8162c1237b54f22007a",
++			"1099c3ae187c0a9f79acb9445761b6056218c779"
+ 		},
+ 		{
+ 			"4c0b5ffe768a7812d1ef102b4d8d52614838bc8e",
+@@ -63,13 +63,13 @@ TEST(ColorspaceConversionSSE2Test, test_transfer_lut)
+ 			"85a277a80dfca2e21789cedd76aaee307dbc4562"
+ 		},
+ 		{
+-			"df546ce0ad6f859499a96d2d697d896067e60e38",
+-			"f0041b8a008ab45f0ea1319090ac7e8be0990d92",
+-			"06880efb598e41f96fa79e04dbdfcccd50d6dc6f"
++			"5e35786d313e936566d9873ba7a08a8d6005b2ee",
++			"829fa88acfbbb26801871bf3cadf5cc2eb6830c9",
++			"f82fcad18a19b548d419a1952b6a7a423a684b62"
+ 		},
+ 	};
+ 	const double expected_tolinear_snr = 80.0;
+-	const double expected_togamma_snr = 40.0;
++	const double expected_togamma_snr = 60.0;
+ 
+ 	SCOPED_TRACE("tolinear 709");
+ 	test_case({ MatrixCoefficients::RGB, TransferCharacteristics::REC_709, ColorPrimaries::UNSPECIFIED },

diff --git a/media-libs/zimg/zimg-2.7.5.ebuild b/media-libs/zimg/zimg-2.7.5.ebuild
index 1775f6b60bb..7bac59befc3 100644
--- a/media-libs/zimg/zimg-2.7.5.ebuild
+++ b/media-libs/zimg/zimg-2.7.5.ebuild
@@ -1,36 +1,33 @@
 # Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=5
+EAPI=7
 
-AUTOTOOLS_AUTORECONF=yes
-
-SCM=""
-
-if [ "${PV#9999}" != "${PV}" ] ; then
-	SCM="git-r3"
+if [[ ${PV} = *9999* ]] ; then
 	EGIT_REPO_URI="https://github.com/sekrit-twc/zimg"
-fi
-
-inherit autotools-multilib ${SCM}
-
-DESCRIPTION="Scaling, colorspace conversion, and dithering library"
-HOMEPAGE="https://github.com/sekrit-twc/zimg"
-
-if [ "${PV#9999}" = "${PV}" ] ; then
+	inherit git-r3
+else
 	SRC_URI="https://github.com/sekrit-twc/zimg/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
 	KEYWORDS="~alpha amd64 ~arm arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
 	S="${WORKDIR}/${PN}-release-${PV}/"
 fi
+inherit autotools multilib-minimal
+
+DESCRIPTION="Scaling, colorspace conversion, and dithering library"
+HOMEPAGE="https://github.com/sekrit-twc/zimg"
 
 LICENSE="WTFPL-2"
 SLOT="0"
 IUSE="static-libs cpu_flags_x86_sse"
 
-DEPEND=""
-RDEPEND="${DEPEND}"
+PATCHES=( "${FILESDIR}/${P}-sse2.patch" )
+
+src_prepare() {
+	default
+	eautoreconf
+}
 
-src_configure() {
-	autotools-multilib_src_configure \
+multilib_src_configure() {
+	ECONF_SOURCE="${S}" econf \
 		$(use_enable cpu_flags_x86_sse x86simd)
 }


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-25  1:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-28 21:21 [gentoo-commits] repo/gentoo:master commit in: media-libs/zimg/files/, media-libs/zimg/ Andreas Sturmlechner
  -- strict thread matches above, loose matches on Subject: below --
2022-09-25  1:27 Sam James
2020-05-09  9:36 Sergei Trofimovich
2019-05-21 19:29 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox