From 6bc9c15dfe08db30c323e6dbeaaf2479d659ee6d45bcd8320243d6d4c4d150e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 17 Mar 2020 08:31:28 +0000 Subject: [PATCH 1/2] 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 --- colorspace-fix-assertion.patch | 34 ++++++++++++++++++++++++++++++++++ zimg.changes | 6 ++++++ zimg.spec | 2 ++ 3 files changed, 42 insertions(+) create mode 100644 colorspace-fix-assertion.patch diff --git a/colorspace-fix-assertion.patch b/colorspace-fix-assertion.patch new file mode 100644 index 0000000..6364aaf --- /dev/null +++ b/colorspace-fix-assertion.patch @@ -0,0 +1,34 @@ +From fbd1ecebde3e336ad4f205381867adddfd4f754b Mon Sep 17 00:00:00 2001 +From: sekrit-twc +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 create_inverse_arib_b67_operation(const Matrix3x3 &m, + std::unique_ptr create_cl_yuv_to_rgb_operation(const ColorspaceDefinition &in, const ColorspaceDefinition &out, const OperationParams ¶ms, 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 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 + diff --git a/zimg.changes b/zimg.changes index 43309e1..be211c3 100644 --- a/zimg.changes +++ b/zimg.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 17 07:58:45 UTC 2020 - Martin Liška + +- 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> diff --git a/zimg.spec b/zimg.spec index ea164f6..939ee5a 100644 --- a/zimg.spec +++ b/zimg.spec @@ -27,6 +27,7 @@ URL: https://github.com/sekrit-twc/zimg Source0: zimg-%{version}.tar.xz Source99: baselibs.conf Patch0: update-matrix3.cpp.patch +PAtch1: colorspace-fix-assertion.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ @@ -57,6 +58,7 @@ developing applications that use libzimg%{sover}. %prep %setup -q %patch0 -p1 +%patch1 -p1 %build autoreconf -fiv From 7a890caa432e593bb9b866969bfc33e9678039ff3d4ffea2757ef7f392715ba4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 18 Mar 2020 09:04:46 +0000 Subject: [PATCH 2/2] Accepting request 786091 from home:marxin:branches:multimedia:libs - Add colorspace-fix-assertion-part2.patch in order to address gh#sekrit-twc/zimg#123. OBS-URL: https://build.opensuse.org/request/show/786091 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/zimg?expand=0&rev=27 --- colorspace-fix-assertion-part2.patch | 36 ++++++++++++++++++++++++++++ zimg.changes | 6 +++++ zimg.spec | 4 +++- 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 colorspace-fix-assertion-part2.patch diff --git a/colorspace-fix-assertion-part2.patch b/colorspace-fix-assertion-part2.patch new file mode 100644 index 0000000..f0c1eda --- /dev/null +++ b/colorspace-fix-assertion-part2.patch @@ -0,0 +1,36 @@ +From bb17c9433bfdc78e296982aad32981bcb9d5514c Mon Sep 17 00:00:00 2001 +From: sekrit-twc +Date: Tue, 17 Mar 2020 10:40:15 -0700 +Subject: [PATCH] colorspace: fix assertions + +--- + src/zimg/colorspace/operation.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/zimg/colorspace/operation.cpp b/src/zimg/colorspace/operation.cpp +index 1218c7b..76f9d7a 100644 +--- a/src/zimg/colorspace/operation.cpp ++++ b/src/zimg/colorspace/operation.cpp +@@ -65,7 +65,8 @@ std::unique_ptr create_lms_to_ictcp_operation(const ColorspaceDefinit + std::unique_ptr create_gamma_to_linear_operation(const ColorspaceDefinition &in, const ColorspaceDefinition &out, const OperationParams ¶ms, CPUClass cpu) + { + zassert_d(in.primaries == out.primaries, "primaries mismatch"); +- zassert_d(in.matrix == MatrixCoefficients::RGB && out.matrix == MatrixCoefficients::RGB, "must be RGB"); ++ zassert_d((in.matrix == MatrixCoefficients::RGB || in.matrix == MatrixCoefficients::REC_2100_LMS) && ++ (out.matrix == MatrixCoefficients::RGB || out.matrix == MatrixCoefficients::REC_2100_LMS), "must be RGB or LMS"); + zassert_d(in.transfer != TransferCharacteristics::LINEAR && out.transfer == TransferCharacteristics::LINEAR, "wrong transfer characteristics"); + + if (in.transfer == TransferCharacteristics::ARIB_B67 && use_display_referred_b67(in.primaries, params)) +@@ -77,7 +78,8 @@ std::unique_ptr create_gamma_to_linear_operation(const ColorspaceDefi + std::unique_ptr create_linear_to_gamma_operation(const ColorspaceDefinition &in, const ColorspaceDefinition &out, const OperationParams ¶ms, CPUClass cpu) + { + zassert_d(in.primaries == out.primaries, "primaries mismatch"); +- zassert_d(in.matrix == MatrixCoefficients::RGB && out.matrix == MatrixCoefficients::RGB, "must be RGB"); ++ zassert_d((in.matrix == MatrixCoefficients::RGB || in.matrix == MatrixCoefficients::REC_2100_LMS) && ++ (out.matrix == MatrixCoefficients::RGB || out.matrix == MatrixCoefficients::REC_2100_LMS), "must be RGB or LMS"); + zassert_d(in.transfer == TransferCharacteristics::LINEAR && out.transfer != TransferCharacteristics::LINEAR, "wrong transfer characteristics"); + + if (out.transfer == TransferCharacteristics::ARIB_B67 && use_display_referred_b67(out.primaries, params)) +-- +2.25.1 + diff --git a/zimg.changes b/zimg.changes index be211c3..1dd59c5 100644 --- a/zimg.changes +++ b/zimg.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 18 08:15:32 UTC 2020 - Martin Liška + +- Add colorspace-fix-assertion-part2.patch in order to address + gh#sekrit-twc/zimg#123. + ------------------------------------------------------------------- Tue Mar 17 07:58:45 UTC 2020 - Martin Liška diff --git a/zimg.spec b/zimg.spec index 939ee5a..38a274c 100644 --- a/zimg.spec +++ b/zimg.spec @@ -27,7 +27,8 @@ URL: https://github.com/sekrit-twc/zimg Source0: zimg-%{version}.tar.xz Source99: baselibs.conf Patch0: update-matrix3.cpp.patch -PAtch1: colorspace-fix-assertion.patch +Patch1: colorspace-fix-assertion.patch +Patch2: colorspace-fix-assertion-part2.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: gcc-c++ @@ -59,6 +60,7 @@ developing applications that use libzimg%{sover}. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build autoreconf -fiv