kumquat-buildroot/package/opencv/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch
Samuel Martin a9043951b9 package/opencv: bump to version 3.0
This major version bump is in fact a bump from 2.4.10 to 2.4.11, then to
3.0.

OpenCV-2.4.11 improves a lot the Buildroot integration, including a
couple of patches that are no longer needed:
- x86 PIC code compilation fix in core module [1];
- return type fix in superes module [2];
- opencv.pc generation [3].

It also improves the gstreamer-0.10/1.x detection [4], that will be
needed in a follow-up patch.

OpenCV-3.0 still requires 2 patches (backported from upstream fixing
pthread support [5,6].

The OpenCV-3.0 does some major changes, for which a transition guide
has been published [7].

Among these changes coming with OpenCV-3.0, some new modules have been
introduced and others got removed; leading to a bunch of configure
option updates (to keep as much as possible an iso-functional-perimeter)
and the legacy menu has been updated too.
The worth noticing removals being:
- the opencv_legacy and opencv_nonfree modules no longer exist;
- the opencv_contrib module has moved out of the opencv base tree and
  now has its own repository [8].
  There is currently no plan to support it.

Some 3rd-party supports have been improved or added; their integrations
in Buildroot will be addressed in follow-up patches.

[1] ea50be0529
[2] 2e393ab833
[3] eceada586b
[4] 38bb0db9db
[5] 1f983ec39c
[6] a482dcce46
[7] http://docs.opencv.org/master/db/dfa/tutorial_transition_guide.html
[8] https://github.com/itseez/opencv_contrib

[Thomas:
  - address most contents made by Yann E. Morin on the Config.in file.]

Cc: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-06-26 20:38:28 +02:00

63 lines
1.8 KiB
Diff

Backport from https://github.com/Itseez/opencv/commit/1f983ec39c97298b0c8ce409a1cc229ecf14e55c
From 1f983ec39c97298b0c8ce409a1cc229ecf14e55c Mon Sep 17 00:00:00 2001
From: Maksim Shabunin <maksim.shabunin@itseez.com>
Date: Tue, 9 Jun 2015 13:59:48 +0300
Subject: [PATCH] Fixed compilation of pthread-based parallel_for with gcc
4.4.3
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
modules/core/src/parallel.cpp | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/modules/core/src/parallel.cpp b/modules/core/src/parallel.cpp
index b1e7567..0b593ee 100644
--- a/modules/core/src/parallel.cpp
+++ b/modules/core/src/parallel.cpp
@@ -132,8 +132,14 @@
namespace cv
{
ParallelLoopBody::~ParallelLoopBody() {}
+#if defined HAVE_PTHREADS && HAVE_PTHREADS
+ void parallel_for_pthreads(const cv::Range& range, const cv::ParallelLoopBody& body, double nstripes);
+ size_t parallel_pthreads_get_threads_num();
+ void parallel_pthreads_set_threads_num(int num);
+#endif
}
+
namespace
{
#ifdef CV_PARALLEL_FRAMEWORK
@@ -301,7 +307,7 @@ void cv::parallel_for_(const cv::Range& range, const cv::ParallelLoopBody& body,
}
#elif defined HAVE_PTHREADS
- void parallel_for_pthreads(const Range& range, const ParallelLoopBody& body, double nstripes);
+
parallel_for_pthreads(range, body, nstripes);
#else
@@ -361,8 +367,6 @@ int cv::getNumThreads(void)
#elif defined HAVE_PTHREADS
- size_t parallel_pthreads_get_threads_num();
-
return parallel_pthreads_get_threads_num();
#else
@@ -424,8 +428,6 @@ void cv::setNumThreads( int threads )
#elif defined HAVE_PTHREADS
- void parallel_pthreads_set_threads_num(int num);
-
parallel_pthreads_set_threads_num(threads);
#endif
--
2.4.4