SHA256
10
0
forked from pool/opencv3

8 Commits

Author SHA256 Message Date
a4ef343e65 Accepting request 1300994 from science
OBS-URL: https://build.opensuse.org/request/show/1300994
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv3?expand=0&rev=19
2025-08-25 18:37:11 +00:00
Ana Guerrero
0b17de47fd - Add opencv-ppc64le-power9.patch, fix missing vec_cvfo on POWER9 due to
unavailable VSX float64 conversion

OBS-URL: https://build.opensuse.org/package/show/science/opencv3?expand=0&rev=40
2025-08-22 15:13:21 +00:00
1da4ab9733 Accepting request 1278284 from science
OBS-URL: https://build.opensuse.org/request/show/1278284
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv3?expand=0&rev=18
2025-05-20 07:37:43 +00:00
78779b12e6 - export CMAKE_POLICY_VERSION_MINIMUM="3.5" to ignore cmakes
minimum version warnings

OBS-URL: https://build.opensuse.org/package/show/science/opencv3?expand=0&rev=38
2025-05-18 18:50:11 +00:00
ad9199ff5b Accepting request 1252110 from science
OBS-URL: https://build.opensuse.org/request/show/1252110
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv3?expand=0&rev=17
2025-03-11 19:47:13 +00:00
5defe62615 Accepting request 1252054 from home:badshah400:branches:science
Add opencv3-drop-numpy-distutils.patch: drop use of numpy-distutils to determine numpy include dirs in cmake; upstream commit to 4.x branch.

OBS-URL: https://build.opensuse.org/request/show/1252054
OBS-URL: https://build.opensuse.org/package/show/science/opencv3?expand=0&rev=36
2025-03-11 15:48:09 +00:00
9d30ad629b Accepting request 1244740 from science
OBS-URL: https://build.opensuse.org/request/show/1244740
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv3?expand=0&rev=16
2025-02-10 16:30:18 +00:00
3cfcde3d9a - Update to 3.4.20:
* Bugfixes, see
    https://github.com/opencv/opencv/wiki/ChangeLog#version3420
  * Various bugfixes backported from 4.7 branch see
    https://github.com/opencv/opencv/compare/3.4.19...3.4.20
- Drop opencv3-pr19384-tbb2021.patch: Fixed upstream.
- Rebase/refresh opencv-build-compare.patch with quilt.

OBS-URL: https://build.opensuse.org/package/show/science/opencv3?expand=0&rev=34
2025-02-10 12:21:56 +00:00
3 changed files with 56 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
diff -Nur opencv-3.4.20/modules/core/include/opencv2/core/vsx_utils.hpp opencv-3.4.20-new/modules/core/include/opencv2/core/vsx_utils.hpp
--- opencv-3.4.20/modules/core/include/opencv2/core/vsx_utils.hpp 2023-06-27 19:29:13.000000000 +0800
+++ opencv-3.4.20-new/modules/core/include/opencv2/core/vsx_utils.hpp 2025-08-07 21:18:01.161909977 +0800
@@ -5,6 +5,13 @@
#ifndef OPENCV_HAL_VSX_UTILS_HPP
#define OPENCV_HAL_VSX_UTILS_HPP
+#if defined(__x86_64__) || defined(__riscv) || defined(__s390x__) || defined(__aarch64__) || defined(__loongarch64) \
+ || defined(__POWER10__) || (defined(__powerpc64__) && defined(__ARCH_PWR10__))
+ #define CV_VSX_HAS_FLOAT64_CONVERT 1
+#else
+ #define CV_VSX_HAS_FLOAT64_CONVERT 0
+#endif
+
#include "opencv2/core/cvdef.h"
#ifndef SKIP_INCLUDES
@@ -257,8 +264,26 @@
VSX_IMPL_1VRG(vec_udword2, vec_dword2, vpopcntd, vec_popcntu)
// converts between single and double-precision
-VSX_REDIRECT_1RG(vec_float4, vec_double2, vec_cvfo, __builtin_vsx_xvcvdpsp)
-VSX_REDIRECT_1RG(vec_double2, vec_float4, vec_cvfo, __builtin_vsx_xvcvspdp)
+#if CV_VSX_HAS_FLOAT64_CONVERT
+// Use VSX double<->float conversion instructions (if supported by the architecture)
+ VSX_REDIRECT_1RG(vec_float4, vec_double2, vec_cvfo, vec_floate)
+ VSX_REDIRECT_1RG(vec_double2, vec_float4, vec_cvfo, vec_doubleo)
+#else
+// Fallback: implement vec_cvfo using scalar operations (to ensure successful linking)
+ static inline vec_float4 vec_cvfo(const vec_double2& a)
+ {
+ float r0 = static_cast<float>(reinterpret_cast<const double*>(&a)[0]);
+ float r1 = static_cast<float>(reinterpret_cast<const double*>(&a)[1]);
+ return (vec_float4){r0, r1, 0.f, 0.f};
+ }
+
+ static inline vec_double2 vec_cvfo(const vec_float4& a)
+ {
+ double r0 = static_cast<double>(reinterpret_cast<const float*>(&a)[0]);
+ double r1 = static_cast<double>(reinterpret_cast<const float*>(&a)[2]);
+ return (vec_double2){r0, r1};
+ }
+#endif
// converts word and doubleword to double-precision
#undef vec_ctd

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Aug 6 12:09:57 UTC 2025 - Hillwood Yang <hillwood@opensuse.org>
- Add opencv-ppc64le-power9.patch, fix missing vec_cvfo on POWER9 due to
unavailable VSX float64 conversion
-------------------------------------------------------------------
Wed May 7 10:02:57 UTC 2025 - Simon Lees <sflees@suse.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package opencv3
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -49,6 +49,9 @@ Source1: https://github.com/opencv/opencv_contrib/archive/%{version}.tar.
Patch1: opencv-build-compare.patch
# PATCH-FIX-UPSTREAM
Patch2: https://github.com/opencv/opencv/commit/00ca8f455e6a5588d905e3a0b268f18ee3fda5dd.patch#/opencv3-drop-numpy-distutils.patch
# PATCH-FIX-UPSTREAM opencv-ppc64le-power9.patch hillwood@opensuse.org - Fix missing vec_cvfo on POWER9 due to unavailable VSX float64 conversion
# https://github.com/opencv/opencv/pull/27633
Patch3: opencv-ppc64le-power9.patch
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: libeigen3-devel