Accepting request 922016 from multimedia:libs

OBS-URL: https://build.opensuse.org/request/show/922016
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zimg?expand=0&rev=37
This commit is contained in:
Dominique Leuenberger 2021-10-04 16:38:57 +00:00 committed by Git OBS Bridge
commit 3a0c24d309
7 changed files with 89 additions and 9 deletions

View File

@ -3,8 +3,8 @@
<param name="url">https://github.com/sekrit-twc/zimg.git</param> <param name="url">https://github.com/sekrit-twc/zimg.git</param>
<param name="scm">git</param> <param name="scm">git</param>
<param name="versionformat">@PARENT_TAG@</param> <param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">release([0-9\.]*)</param> <param name="versionrewrite-pattern">release-([0-9\.]*)</param>
<param name="revision">release-3.0.1</param> <param name="revision">release-3.0.3</param>
</service> </service>
<service name="tar" mode="buildtime" /> <service name="tar" mode="buildtime" />
<service name="recompress" mode="buildtime"> <service name="recompress" mode="buildtime">

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bbc514a114145d2cb895463c4eb046329f77da26df5758875144d95d1209f603
size 6154765

3
zimg-3.0.3.obscpio Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b375f776b0b404c307fc3ea962572236eb29c9642d271731ac855114df2c22c2
size 6158349

View File

@ -0,0 +1,60 @@
From b2bee8460a0f6ecf049e27d0a2090c87e871d951 Mon Sep 17 00:00:00 2001
From: Mike Gorse <mgorse@suse.com>
Date: Wed, 22 Sep 2021 11:57:47 -0500
Subject: [PATCH] FIx unit tests on big endian systems
---
test/extra/sha1/config.h | 6 ++++++
test/graph/filter_validator.cpp | 8 ++++++++
2 files changed, 14 insertions(+)
diff --git a/test/extra/sha1/config.h b/test/extra/sha1/config.h
index ea853f0..7bc4e00 100644
--- a/test/extra/sha1/config.h
+++ b/test/extra/sha1/config.h
@@ -1,3 +1,5 @@
+#include <endian.h>
+
#ifndef LITTLE_ENDIAN
#define LITTLE_ENDIAN 4321
#endif
@@ -7,5 +9,9 @@
#endif
#ifndef BYTE_ORDER
+#if defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)
+ #define BYTE_ORDER BIG_ENDIAN
+#else
#define BYTE_ORDER LITTLE_ENDIAN
#endif
+#endif
diff --git a/test/graph/filter_validator.cpp b/test/graph/filter_validator.cpp
index f0d6859..d768ebf 100644
--- a/test/graph/filter_validator.cpp
+++ b/test/graph/filter_validator.cpp
@@ -13,6 +13,8 @@
#include "gtest/gtest.h"
+#include <endian.h>
+
extern "C" {
#include "sha1/sha1.h"
}
@@ -40,7 +42,13 @@ void hash_buffer(const AuditBuffer<T> &buf, unsigned p, unsigned width, unsigned
for (unsigned i = 0; i < height; ++i) {
const unsigned char *ptr = static_cast<const unsigned char *>(image_buffer[p][i]);
+#if (__BYTE_ORDER == __LITTLE_ENDIAN)
SHA1Update(&sha_ctx, ptr, width * sizeof(T));
+#else
+ for (unsigned j = 0; j < width; j++)
+ for (int k = sizeof(T) - 1; k >= 0; k--)
+ SHA1Update(&sha_ctx, ptr + (j * sizeof(T)) + k, 1);
+#endif
}
SHA1Final(digest, &sha_ctx);
--
2.32.0

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Wed Sep 22 17:19:43 UTC 2021 - Michael Gorse <mgorse@suse.com>
- Update to 3.0.3:
* depth: fix out-of-bounds read in SSE2/AVX2 error diffusion
(introduced in 2.5)
* colorspace: revert SMPTE 240M behavior change (introduced in
3.0.2)
* Changes in version 3.0.2:
* api: default to ZIMG_CPU_AUTO when graph params are null
* colorspace: fix incorrect SMPTE 240M transfer function
* colorspace: fix underflow in AVX-512 ST.2084 transfer functions
* graph: fix conversion from fullrange grey to RGB
* arm: fix data alignment
* x86: optimizations for AMD Zen3 processors
- Add zimg-s390x-unit-tests.patch: fix unit tests on big endian
systems.
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Sep 10 17:43:22 UTC 2020 - Dirk Mueller <dmueller@suse.com> Thu Sep 10 17:43:22 UTC 2020 - Dirk Mueller <dmueller@suse.com>

View File

@ -1,5 +1,5 @@
name: zimg name: zimg
version: 3.0.1 version: 3.0.3
mtime: 1598190477 mtime: 1630862474
commit: e17ee6cf72509c32c15067b32615849e69486367 commit: 1658ce429cf944e88868a88d8aef4683425d4e78

View File

@ -18,7 +18,7 @@
%define sover 2 %define sover 2
Name: zimg Name: zimg
Version: 3.0.1 Version: 3.0.3
Release: 0 Release: 0
Summary: Scaling, colorspace conversion, and dithering library Summary: Scaling, colorspace conversion, and dithering library
License: WTFPL License: WTFPL
@ -26,6 +26,7 @@ Group: Development/Libraries/C and C++
URL: https://github.com/sekrit-twc/zimg URL: https://github.com/sekrit-twc/zimg
Source0: zimg-%{version}.tar.xz Source0: zimg-%{version}.tar.xz
Source99: baselibs.conf Source99: baselibs.conf
Patch0: zimg-s390x-unit-tests.patch
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: cmake BuildRequires: cmake
@ -56,6 +57,7 @@ developing applications that use libzimg%{sover}.
%prep %prep
%setup -q %setup -q
%patch0 -p1
%build %build
autoreconf -fiv autoreconf -fiv