Commit Graph

885 Commits

Author SHA1 Message Date
Maksim Shabunin
eebd4cad66 Fix compilation problems with XCode 7.1.1 and cmake 3.3.2 2015-11-17 18:52:55 +03:00
Maksim Shabunin
f49936a849 Fixed cmake and build issues when using Visual Studio 2015 2015-10-29 11:50:48 +03:00
Tom Stellard
42b1bd56cc ocl: Move static oclMat variables into FarnebackOpticalFlow class
Move some static functions into the FarnebackOpticalFlow class as well,
so they can access these new class variables.

oclMat objects cannot be declared statically, because their destructor
depends on the statically defined __module variable from cl_context.cpp.
Since statically defined variables in separate compilation units have
an undefined destruction order there is always the possibility the
__module will be destructed before an oclMat object, which results
in a segfault.
2014-11-13 11:16:10 -05:00
Alexander Alekhin
d2f19a3a0d Merge pull request #3418 from tstellarAMD:2.4-hog-crash-fix 2014-11-13 01:49:06 +00:00
Ilya Lavrenov
d8ca61b01b attemp to fix dox warning 2014-11-12 19:18:45 +03:00
Tom Stellard
ec335b7398 ocl: Fix crash during destruction of gauss_w_lut object in hog.cpp
gauss_w_lut is a statically defined variable of type oclMat.  The oclMat
destructor calls openCLFree() which via getInitializationMutex() accesses
the __module variable which has been statically defined in cl_context.cpp

Since the destruction order of statically defined variables in different
compilation units is undefined, it is possible that __module will
be destructed before gauss_w_lut, which would result in a segfault when
getInitializationMutex() is called while destructing gauss_w_lut.

In order to avoid this issue, we need to make gauss_w_lut a private
member of the HOGDescriptors class so we know it will be destroyed
before __module.
2014-11-12 10:07:07 -05:00
Tom Stellard
8f3b876ee6 ocl: Change static variable order in cl_context.cpp to avoid crashes during destruction
ContextImpl::currentContext contains a reference to one of the
DeviceInfoImpl objects from:

static std::vector<DeviceInfoImpl> global_devices;

ContextImpl::currentContext is destroyed in the destructor
for the statically defined object __module, and relies on its
DeviceInfoImpl reference to query some hardware features while
being destroyed.

This means that we need to ensure that the global_devices vector is
destroyed affter __module, otherwise ContextImpl::currentContext's
DeviceInfoImpl reference will no longer be valid when __module is
destroyed.

Since these variables are all confined to a single compilation unit,
they will be destruct from bottom to top, so we need to make sure
that __module is the bottom definition so it can be destroyed first.
2014-10-14 20:54:13 -04:00
Tom Stellard
934394c5e2 ocl: Don't use 'inline' attribute on functions
In C99 'inline' is not a hint to the compiler to inline the function,
it is an attribute that affects the linkage of the function.  'inline'
functions are required to have a definition in a different compiliation
unit, so compilers are free to delete 'inline' functions if they want to.

This issue can be seen in Clang when compiling at -O0.  Clang
will sometimes delete 'inline' functions which creates an invalid
program.

Issue 3746: http://code.opencv.org/issues/3746
2014-09-19 16:13:57 -04:00
WilhelmHannemann
150487feda Bugfix brute_force_match.cl (see http://code.opencv.org/issues/2837): wrong results for non-float descriptors in OpenCL BruteForceMatcher 2014-09-19 16:41:54 +02:00
Alexander Alekhin
9e83463128 ocl: fix pyrUp perf test 2014-07-30 13:27:36 +04:00
Vadim Pisarevsky
39020fc9cf Merge pull request #2898 from PhilLab:2.4 2014-07-18 09:26:50 +00:00
Alexander Alekhin
b1ac35e14a ocl: fix mac and superres test 2014-07-02 11:54:20 +04:00
unknown
ade46bd428 Fixed typos in comments 2014-06-26 16:29:45 +02:00
Maks Naumov
79eb3c5cde remove unused variable in OCL_PERF_TEST_P() 2014-04-09 23:04:29 +03:00
Maks Naumov
befbe89bdf remove unused variable in ocl_moments() 2014-04-09 23:01:49 +03:00
Maks Naumov
eb45cf0c93 remove unused variable in findCorners_caller() 2014-04-09 22:59:52 +03:00
Andrey Pavlenko
3747d2643f Revert pull request #1929 from @alalek "ocl: added workaround into Haar kernels"
This reverts commit 3dcddad88a.

Conflicts:
	modules/ocl/src/opencl/haarobjectdetect.cl
2014-03-28 16:08:11 +04:00
Andrey Pavlenko
7d82171af4 - fix test 2014-03-28 16:06:39 +04:00
Andrey Pavlenko
e6e817e613 Revert "Merge pull request #1779 from perping:integral_2.4"
This reverts commit 54ea5bbac7, reversing
changes made to 28e0d3d771.
2014-03-28 16:05:04 +04:00
Andrey Pavlenko
244f126ff6 Merge pull request #2454 from apavlenko:2.4_haar_extend 2014-03-21 18:45:58 +04:00
Andrey Pavlenko
640e180efe switching to CV_HAAR_SCALE_IMAGE mode, enabling test 2014-03-20 22:22:55 +04:00
Andrey Pavlenko
9c7ba6db90 Merge pull request #2490 from ilya-lavrenov:ocl_sep_filters 2014-03-20 13:54:27 +04:00
Firat Kalaycilar
0a16d93e1d Fixed an issue with weight assignment causing the resulting GMM weights to be unsorted in the CUDA and OCL versions of BackgroundSubtractorMOG2 2014-03-18 17:26:24 +02:00
Ilya Lavrenov
3940b6163b remove intel guard since the code is 2 times faster on AMD too 2014-03-17 19:11:21 +04:00
Ilya Lavrenov
61c347fb76 typos 2014-03-13 22:56:46 +04:00
Ilya Lavrenov
6f76e7b42d improved performance of bitwise ops 2014-03-13 19:42:13 +04:00
Ilya Lavrenov
adc15c2bba improved performance of cv::ocl::sum 2014-03-13 17:33:18 +04:00
Ilya Lavrenov
3ebfe60008 improved performance of cv::ocl::countNonZero 2014-03-13 15:35:53 +04:00
Ilya Lavrenov
8e79de35a8 changes for GFTT 2014-03-13 14:57:13 +04:00
Ilya Lavrenov
a5afcd9f11 improved performance of cv::ocl::minMax 2014-03-13 14:35:12 +04:00
Andrey Pavlenko
0084dee05b Merge pull request #2448 from akarsakov:ocl_cxt_termination 2014-03-11 12:57:29 +04:00
Ilya Lavrenov
3eff05e3eb added performance tests for cv::ocl::calcHist 2014-03-11 12:34:27 +04:00
Alexander Karsakov
806e9241a6 Clarifying comments 2014-03-06 16:44:46 +04:00
Ilya Lavrenov
f7a474180b tuned some tests 2014-03-06 09:24:02 +04:00
Alexander Karsakov
4aa891e773 Remove clReleaseDevice call (workaround for pure virtual call on Windows) 2014-03-05 17:57:06 +04:00
Andrey Pavlenko
ba4513503e Merge pull request #2429 from ilya-lavrenov:master_compatible_tests 2014-03-04 19:18:13 +04:00
Ilya Lavrenov
099ea91823 typos 2014-03-04 12:47:40 +04:00
Ilya Lavrenov
767b28f2e3 tests 2014-03-01 18:47:44 +04:00
Ilya Lavrenov
c1c3139368 master-like performance tests 2014-02-28 22:40:24 +04:00
Alexander Karsakov
e6f6707558 OCL: Fix for Haar classifier (thanks to Konstantin Rodyushkin). 2014-02-26 18:11:11 +04:00
Andrey Pavlenko
d695d4a0bf Merge pull request #2406 from ilya-lavrenov:abf 2014-02-25 09:12:32 +04:00
Ilya Lavrenov
e1a598c5b3 disabled ABF tests 2014-02-24 23:26:01 +04:00
Ilya Lavrenov
aa5311ea9f backport of master-based perf tests for matchTemplate to 2.4 2014-02-20 18:58:32 +04:00
Alexander Alekhin
d1606b4aa3 ocl: added SVM perf test 2014-02-14 16:36:46 +04:00
Zhigang Gong
9aef26e2ad Workaround a LLVM/Clang 3.3 bug.
The LLVM/Clang 3.3 has a bug when compile a cl kernel with
assignment of a scalar to a vector data type. This patch
could work around this bug.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2014-02-12 13:14:43 +08:00
Konstantin Matskevich
435615ba2e update test CascadeClassifier 2014-02-05 12:23:36 +04:00
Andrey Pavlenko
0a4a1d7526 temporary disabling hanging test 2014-01-24 10:07:21 +04:00
Roman Donchenko
2fde4d8a94 Merge pull request #2145 from andreasBihlmaier:2.4 2014-01-14 11:55:29 +04:00
Roman Donchenko
2443e8090e Merge pull request #2133 from apavlenko:2.4-perf_haar 2014-01-13 19:28:09 +04:00
ahb
49dfa5a17f Fix the following error for ocl::getOpenCLPlatforms() on Ubuntu 12.04 with gcc 4.8
OpenCV Error: Unknown error code -6 (OpenCL function is not available: [clGetPlatformIDs]) in opencl_check_fn, file /home/ahb/software/opencv/modules/ocl/src/cl_runtime/cl_runtime.cpp, line 83

The issue results from modules/ocl/src/cl_runtime/cl_runtime.cpp checking for
"linux" instead of "__linux__" (cp.  http://sourceforge.net/p/predef/wiki/OperatingSystems/)

Adjust all other occurrences of "defined(linux)" as well.
2014-01-13 16:09:42 +01:00