Accepting request 785829 from home:marxin:branches:multimedia:libs

- Add colorspace-fix-assertion.patch in order to fix
  build with GCC10. See gh#sekrit-twc/zimg#122.

OBS-URL: https://build.opensuse.org/request/show/785829
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/zimg?expand=0&rev=26
This commit is contained in:
Tomáš Chvátal 2020-03-17 08:31:28 +00:00 committed by Git OBS Bridge
parent 1af12dc762
commit 6bc9c15dfe
3 changed files with 42 additions and 0 deletions

View File

@ -0,0 +1,34 @@
From fbd1ecebde3e336ad4f205381867adddfd4f754b Mon Sep 17 00:00:00 2001
From: sekrit-twc <noreply@example.com>
Date: Sat, 8 Feb 2020 12:46:02 -0800
Subject: [PATCH] colorspace: fix assertion
---
src/zimg/colorspace/operation_impl.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/zimg/colorspace/operation_impl.cpp b/src/zimg/colorspace/operation_impl.cpp
index f8bad30..ccd16b1 100644
--- a/src/zimg/colorspace/operation_impl.cpp
+++ b/src/zimg/colorspace/operation_impl.cpp
@@ -343,7 +343,7 @@ std::unique_ptr<Operation> create_inverse_arib_b67_operation(const Matrix3x3 &m,
std::unique_ptr<Operation> create_cl_yuv_to_rgb_operation(const ColorspaceDefinition &in, const ColorspaceDefinition &out, const OperationParams &params, CPUClass cpu)
{
zassert_d(in.primaries == out.primaries, "primaries mismatch");
- zassert_d(in.matrix == MatrixCoefficients::REC_2020_CL && in.transfer == TransferCharacteristics::REC_709, "must be 2020 CL");
+ zassert_d((in.matrix == MatrixCoefficients::REC_2020_CL || in.matrix == MatrixCoefficients::CHROMATICITY_DERIVED_CL) && in.transfer == TransferCharacteristics::REC_709, "must be 2020 CL");
zassert_d(out.matrix == MatrixCoefficients::RGB && out.transfer == TransferCharacteristics::LINEAR, "must be linear RGB");
// CL is always scene-referred.
@@ -356,7 +356,7 @@ std::unique_ptr<Operation> create_cl_rgb_to_yuv_operation(const ColorspaceDefini
{
zassert_d(in.primaries == out.primaries, "primaries mismatch");
zassert_d(in.matrix == MatrixCoefficients::RGB && in.transfer == TransferCharacteristics::LINEAR, "must be linear RGB");
- zassert_d(out.matrix == MatrixCoefficients::REC_2020_CL && out.transfer == TransferCharacteristics::REC_709, "must be 2020 CL");
+ zassert_d((out.matrix == MatrixCoefficients::REC_2020_CL || out.matrix == MatrixCoefficients::CHROMATICITY_DERIVED_CL) && out.transfer == TransferCharacteristics::REC_709, "must be 2020 CL");
// CL is always scene-referred.
TransferFunction func = select_transfer_function(out.transfer, params.peak_luminance, true);
--
2.25.1

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Mar 17 07:58:45 UTC 2020 - Martin Liška <mliska@suse.cz>
- Add colorspace-fix-assertion.patch in order to fix
build with GCC10. See gh#sekrit-twc/zimg#122.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Mar 2 12:32:52 UTC 2020 - Martin Herkt <9+suse@cirno.systems> Mon Mar 2 12:32:52 UTC 2020 - Martin Herkt <9+suse@cirno.systems>

View File

@ -27,6 +27,7 @@ URL: https://github.com/sekrit-twc/zimg
Source0: zimg-%{version}.tar.xz Source0: zimg-%{version}.tar.xz
Source99: baselibs.conf Source99: baselibs.conf
Patch0: update-matrix3.cpp.patch Patch0: update-matrix3.cpp.patch
PAtch1: colorspace-fix-assertion.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -57,6 +58,7 @@ developing applications that use libzimg%{sover}.
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p1
%patch1 -p1
%build %build
autoreconf -fiv autoreconf -fiv