You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
191 lines
6.6 KiB
191 lines
6.6 KiB
|
10 years ago
|
Index: cmake/OpenCVCompilerOptions.cmake
|
||
|
|
--- cmake/OpenCVCompilerOptions.cmake.orig 2015-10-26 08:56:34.000000000 +0100
|
||
|
|
+++ cmake/OpenCVCompilerOptions.cmake 2016-01-16 11:00:30.569698041 +0100
|
||
|
|
@@ -132,7 +132,7 @@
|
||
|
|
add_extra_compiler_option(-ffast-math)
|
||
|
|
endif()
|
||
|
|
if(ENABLE_POWERPC)
|
||
|
|
- add_extra_compiler_option("-mcpu=G3 -mtune=G5")
|
||
|
|
+ add_extra_compiler_option("-mtune=G5")
|
||
|
|
endif()
|
||
|
|
if(ENABLE_SSE)
|
||
|
|
add_extra_compiler_option(-msse)
|
||
|
|
@@ -178,6 +178,7 @@
|
||
|
|
endif(NOT MINGW)
|
||
|
|
|
||
|
|
if(X86 OR X86_64)
|
||
|
|
+ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||
|
|
if(NOT APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||
|
|
if(OPENCV_EXTRA_CXX_FLAGS MATCHES "-m(sse2|avx)")
|
||
|
|
add_extra_compiler_option(-mfpmath=sse)# !! important - be on the same wave with x64 compilers
|
||
|
|
@@ -185,6 +186,7 @@
|
||
|
|
add_extra_compiler_option(-mfpmath=387)
|
||
|
|
endif()
|
||
|
|
endif()
|
||
|
|
+ endif()
|
||
|
|
endif()
|
||
|
|
|
||
|
|
# Profiling?
|
||
|
|
Index: cmake/OpenCVFindLibsGUI.cmake
|
||
|
|
--- cmake/OpenCVFindLibsGUI.cmake.orig 2015-10-26 08:56:34.000000000 +0100
|
||
|
|
+++ cmake/OpenCVFindLibsGUI.cmake 2016-01-16 11:00:30.569698041 +0100
|
||
|
|
@@ -56,10 +56,9 @@
|
||
|
|
if(OPENGL_FOUND)
|
||
|
|
set(HAVE_OPENGL TRUE)
|
||
|
|
list(APPEND OPENCV_LINKER_LIBS ${OPENGL_LIBRARIES})
|
||
|
|
+ ocv_include_directories(${OPENGL_INCLUDE_DIR})
|
||
|
|
if(QT_QTOPENGL_FOUND)
|
||
|
|
set(HAVE_QT_OPENGL TRUE)
|
||
|
|
- else()
|
||
|
|
- ocv_include_directories(${OPENGL_INCLUDE_DIR})
|
||
|
|
endif()
|
||
|
|
endif()
|
||
|
|
endif()
|
||
|
|
Index: cmake/OpenCVVersion.cmake
|
||
|
|
--- cmake/OpenCVVersion.cmake.orig 2015-10-26 08:56:34.000000000 +0100
|
||
|
|
+++ cmake/OpenCVVersion.cmake 2016-01-16 11:00:30.569698041 +0100
|
||
|
|
@@ -11,7 +11,7 @@
|
||
|
|
set(OPENCV_VERSION "${OPENCV_VERSION}.${OPENCV_VERSION_TWEAK}")
|
||
|
|
endif()
|
||
|
|
|
||
|
|
-set(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}")
|
||
|
|
+set(OPENCV_SOVERSION "${OPENCV_VERSION_MAJOR}")
|
||
|
|
set(OPENCV_LIBVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_VERSION_PATCH}")
|
||
|
|
|
||
|
|
# create a dependency on version file
|
||
|
|
Index: modules/contrib/src/spinimages.cpp
|
||
|
|
--- modules/contrib/src/spinimages.cpp.orig 2015-10-26 08:56:34.000000000 +0100
|
||
|
|
+++ modules/contrib/src/spinimages.cpp 2016-01-16 11:00:30.569698041 +0100
|
||
|
|
@@ -46,6 +46,7 @@
|
||
|
|
#include <functional>
|
||
|
|
#include <fstream>
|
||
|
|
#include <limits>
|
||
|
|
+#include <numeric>
|
||
|
|
#include <set>
|
||
|
|
|
||
|
|
using namespace cv;
|
||
|
|
Index: modules/core/src/system.cpp
|
||
|
|
--- modules/core/src/system.cpp.orig 2015-10-26 08:56:34.000000000 +0100
|
||
|
|
+++ modules/core/src/system.cpp 2016-01-16 11:01:44.270822695 +0100
|
||
|
|
@@ -157,7 +157,7 @@
|
||
|
|
|
||
|
|
#include <stdarg.h>
|
||
|
|
|
||
|
|
-#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__ || defined __QNX__
|
||
|
|
+#if defined __linux__ || defined __APPLE__ || defined __EMSCRIPTEN__ || defined __QNX__ || defined __FreeBSD__
|
||
|
|
#include <unistd.h>
|
||
|
|
#include <stdio.h>
|
||
|
|
#include <sys/types.h>
|
||
|
|
@@ -942,14 +942,23 @@
|
||
|
|
|
||
|
|
struct Mutex::Impl
|
||
|
|
{
|
||
|
|
- Impl() { pthread_mutex_init(&sl, 0); refcount = 1; }
|
||
|
|
- ~Impl() { pthread_mutex_destroy(&sl); }
|
||
|
|
+ Impl()
|
||
|
|
+ {
|
||
|
|
+ pthread_mutexattr_t attr;
|
||
|
|
+ pthread_mutexattr_init(&attr);
|
||
|
|
+ pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
||
|
|
+ pthread_mutex_init(&mt, &attr);
|
||
|
|
+ pthread_mutexattr_destroy(&attr);
|
||
|
|
+
|
||
|
|
+ refcount = 1;
|
||
|
|
+ }
|
||
|
|
+ ~Impl() { pthread_mutex_destroy(&mt); }
|
||
|
|
|
||
|
|
- void lock() { pthread_mutex_lock(&sl); }
|
||
|
|
- bool trylock() { return pthread_mutex_trylock(&sl) == 0; }
|
||
|
|
- void unlock() { pthread_mutex_unlock(&sl); }
|
||
|
|
+ void lock() { pthread_mutex_lock(&mt); }
|
||
|
|
+ bool trylock() { return pthread_mutex_trylock(&mt) == 0; }
|
||
|
|
+ void unlock() { pthread_mutex_unlock(&mt); }
|
||
|
|
|
||
|
|
- pthread_mutex_t sl;
|
||
|
|
+ pthread_mutex_t mt;
|
||
|
|
int refcount;
|
||
|
|
};
|
||
|
|
|
||
|
|
Index: modules/highgui/src/cap_libv4l.cpp
|
||
|
|
--- modules/highgui/src/cap_libv4l.cpp.orig 2015-10-26 08:56:34.000000000 +0100
|
||
|
|
+++ modules/highgui/src/cap_libv4l.cpp 2016-01-16 11:00:30.569698041 +0100
|
||
|
|
@@ -237,7 +237,6 @@
|
||
|
|
#include <sys/mman.h>
|
||
|
|
#include <string.h>
|
||
|
|
#include <stdlib.h>
|
||
|
|
-#include <asm/types.h> /* for videodev2.h */
|
||
|
|
#include <assert.h>
|
||
|
|
#include <sys/stat.h>
|
||
|
|
#include <sys/ioctl.h>
|
||
|
|
@@ -554,7 +553,7 @@
|
||
|
|
|
||
|
|
static void v4l2_scan_controls(CvCaptureCAM_V4L* capture) {
|
||
|
|
|
||
|
|
- __u32 ctrl_id;
|
||
|
|
+ uint32_t ctrl_id;
|
||
|
|
struct v4l2_control c;
|
||
|
|
if (capture->v4l2_ctrl_ranges != NULL) {
|
||
|
|
v4l2_free_ranges(capture);
|
||
|
|
Index: modules/highgui/src/cap_v4l.cpp
|
||
|
|
--- modules/highgui/src/cap_v4l.cpp.orig 2015-10-26 08:56:34.000000000 +0100
|
||
|
|
+++ modules/highgui/src/cap_v4l.cpp 2016-01-16 11:00:30.569698041 +0100
|
||
|
|
@@ -232,7 +232,6 @@
|
||
|
|
#include <sys/ioctl.h>
|
||
|
|
|
||
|
|
#ifdef HAVE_CAMV4L2
|
||
|
|
-#include <asm/types.h> /* for videodev2.h */
|
||
|
|
#include <linux/videodev2.h>
|
||
|
|
#endif
|
||
|
|
|
||
|
|
@@ -644,7 +643,7 @@
|
||
|
|
static void v4l2_scan_controls(CvCaptureCAM_V4L* capture)
|
||
|
|
{
|
||
|
|
|
||
|
|
- __u32 ctrl_id;
|
||
|
|
+ uint32_t ctrl_id;
|
||
|
|
|
||
|
|
for (ctrl_id = V4L2_CID_BASE;
|
||
|
|
ctrl_id < V4L2_CID_LASTP1;
|
||
|
|
Index: modules/python/src2/cv2.cv.hpp
|
||
|
|
--- modules/python/src2/cv2.cv.hpp.orig 2015-10-26 08:56:34.000000000 +0100
|
||
|
|
+++ modules/python/src2/cv2.cv.hpp 2016-01-16 11:00:30.569698041 +0100
|
||
|
|
@@ -2155,7 +2155,7 @@
|
||
|
|
static int convert_to_CvNextEdgeType(PyObject *o, CvNextEdgeType *dst, const char *name = "no_name")
|
||
|
|
{
|
||
|
|
if (!PyInt_Check(o)) {
|
||
|
|
- *dst = (CvNextEdgeType)NULL;
|
||
|
|
+ *dst = (CvNextEdgeType)0;
|
||
|
|
return failmsg("Expected number for CvNextEdgeType argument '%s'", name);
|
||
|
|
} else {
|
||
|
|
*dst = (CvNextEdgeType)PyInt_AsLong(o);
|
||
|
|
Index: modules/ts/src/ts.cpp
|
||
|
|
--- modules/ts/src/ts.cpp.orig 2015-10-26 08:56:34.000000000 +0100
|
||
|
|
+++ modules/ts/src/ts.cpp 2016-01-16 11:00:30.569698041 +0100
|
||
|
|
@@ -563,7 +563,7 @@
|
||
|
|
for( int i = 0; i < MAX_IDX; i++ )
|
||
|
|
if( (streams & (1 << i)) )
|
||
|
|
{
|
||
|
|
- output_buf[i] += std::string(str);
|
||
|
|
+ output_buf[i] += ::std::string(str);
|
||
|
|
// in the new GTest-based framework we do not use
|
||
|
|
// any output files (except for the automatically generated xml report).
|
||
|
|
// if a test fails, all the buffers are printed, so we do not want to duplicate the information and
|
||
|
|
@@ -618,7 +618,7 @@
|
||
|
|
Scalar s;
|
||
|
|
uchar *p = NULL;
|
||
|
|
int n = 100/delta;
|
||
|
|
- int nR = std::min(n, (img.rows+1)/2), nC = std::min(n, (img.cols+1)/2);
|
||
|
|
+ int nR = ::std::min(n, (img.rows+1)/2), nC = std::min(n, (img.cols+1)/2);
|
||
|
|
|
||
|
|
int r, c, i;
|
||
|
|
for(r=0; r<nR; r++)
|
||
|
|
Index: samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp
|
||
|
|
--- samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp.orig 2015-10-26 08:56:34.000000000 +0100
|
||
|
|
+++ samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp 2016-01-16 11:00:35.279609915 +0100
|
||
|
|
@@ -1,4 +1,4 @@
|
||
|
|
-#include <opencv2/core/core.hpp>
|
||
|
|
+#include <opencv2/core/core.hpp>
|
||
|
|
#include <opencv2/highgui/highgui.hpp>
|
||
|
|
#include <iostream>
|
||
|
|
#include <sstream>
|