Commit Graph

2564 Commits

Author SHA1 Message Date
Alexander Alekhin
4700722444 Merge pull request #15359 from mgehre:fix_dangling_pointer 2019-08-21 11:38:36 +00:00
Matthias Gehre
0e92ac2af7 modules/core/src/ocl.cpp: Fix dangling pointer
Detected by clang trunk:
```
opencv/modules/core/src/ocl.cpp:4337:37: warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling]
        CV_OCL_CHECK_RESULT(retval, cv::format("clCreateBuffer(capacity=%lld) => %p", (long long int)entry.capacity_, (void*)entry.clBuffer_).c_str());
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
opencv/modules/core/src/ocl.cpp:193:42: note: expanded from macro 'CV_OCL_CHECK_RESULT'
            if (0) { const char* msg_ = (msg); CV_UNUSED(msg_); /* ensure const char* type (cv::String without c_str()) */ } \
```
because `cv::format` yields a temporary std::string, and thus `msg_` points to a destroyed buffer.
2019-08-20 23:30:34 +02:00
luz.paz
ec43292e1e Fix modules/ typos
Found using `codespell -q 3 -S ./3rdparty -L activ,amin,ang,atleast,childs,dof,endwhile,halfs,hist,iff,nd,od,uint`
2019-08-15 18:02:09 -04:00
Alexander Alekhin
2ad0487cec Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-08-13 18:32:29 +00:00
Hugo Lindström
935067ee05 Merge pull request #15265 from hugolm84:wince-armv7-supports-neon
* WINCE 8.0 requires ARMv7 Thumb2 and thus have NEON instructions

* Only add NEON if on _ARM_
2019-08-09 18:01:37 +03:00
Alexander Alekhin
174b4ce29d Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-08-05 18:11:43 +00:00
Victor Romero
987bb2ca61 Fix build for UWP
backport of commit: f18cbd036a
2019-08-05 17:19:36 +03:00
Thang Tran
d659eb9327 core: fixed error message to avoid confusion 2019-08-04 17:17:03 +02:00
Victor Romero
f18cbd036a Merge pull request #15207 from vicroms:fix-uwp-build
Fix build for UWP (#15207)

* Guard non-WinRT calls to fix UWP build

* Remove unnecessary guard for WinRT
2019-08-03 22:53:38 +03:00
Alexander Alekhin
ba934ff1ce Merge pull request #15202 from hugolm84:support_build_shared_for_wince 2019-08-02 15:34:02 +00:00
Hugo Lindström
03fe1cb7fc Support building shared libraries on WINCE. 2019-08-01 15:28:04 +02:00
Maksim Shabunin
6d5ac67681 Restored IPP call reduction 2019-07-31 15:41:22 +03:00
Alexander Alekhin
0cf479dd5c Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-07-25 19:21:47 +00:00
Chip Kerchner
0db4fb1835 Merge pull request #15136 from ChipKerchner:dotProd_unroll
* Unroll multiply and add instructions in dotProd_32f - 35% faster.

* Eliminate unnecessary v_reduce_sum instructions.
2019-07-25 21:21:32 +03:00
Alexander Alekhin
5691d998ea core(persistence): added null ptr checks 2019-07-25 15:14:22 +03:00
Hugo Lindström
2ee00e7f7d Merge pull request #15059 from hugolm84:improved-support-for-wince
* Improve support for Windows Embedded Compact

* Remove redundant set(WINCE true) and format CMake
2019-07-24 23:12:09 +03:00
Alexander Alekhin
4ea8526e9f core(persistence): fix writeRaw() / readRaw() struct support
- writeRaw(): support structs
- readRaw(): 'len' is buffer limit in bytes (documentation is fixed)
2019-07-16 14:03:39 +03:00
Alexander Alekhin
c3b838b738 core(persistence): struct storage layout without alignment gaps 2019-07-15 21:37:20 +00:00
Alexander Alekhin
b95e93c20a Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-26 20:19:04 +00:00
Alexander Alekhin
4a6888ccf6 imgproc: fix kmeans() call from grabCut() 2019-06-25 13:42:04 +03:00
Alexander Alekhin
7b099e0fe2 videoio: plugins support on Win32 2019-06-16 15:25:25 +00:00
Alexander Alekhin
f8791f072d core: avoid function type cast, make happy UBSAN
backporting of commit: d3d13c41c4
2019-06-11 19:36:47 +00:00
Alexander Alekhin
6c8ffe81d0 core: repair default log level 2019-06-11 19:19:10 +03:00
Alexander Alekhin
d3d13c41c4 core: avoid function type cast, make happy UBSAN
oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14115
2019-06-11 07:06:29 +00:00
Alexander Alekhin
11b020b9f9 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-10 19:05:28 +00:00
Alexander Alekhin
6d916c5bb4 Merge pull request #14440 from alalek:async_array 2019-06-08 20:57:15 +00:00
Alexander Alekhin
ddcf388270 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-07 19:02:55 +03:00
Alexander Alekhin
f3de2b4be7 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-06-05 19:11:52 +03:00
Ahmed Ashour
1aca1d582e Fix some typos 2019-06-05 12:24:13 +02:00
Ted Steiner
f1fb002682 Merge pull request #14678 from tedsteiner:qnx
Fix build issue on QNX platform (#14678)

* QNX compatibility

* core: unify gettimeofday() usage
2019-06-04 19:45:21 +03:00
Alexander Alekhin
9340af1a8a core: Async API / AsyncArray 2019-05-18 19:32:23 +00:00
Alexander Alekhin
e21262deba Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-05-16 04:40:39 +00:00
Alexander Alekhin
84fd8190f3 Merge pull request #14232 from terfendail:popcount_rework 2019-05-15 17:58:11 +00:00
Vitaly Tuzov
7a55f2af3b Updated AVX2 implementation of v_popcount for u8. 2019-05-15 19:39:25 +03:00
Daniel Ingram
962d57b4d6 Merge pull request #14559 from daniel-s-ingram:master
* Fix typo: 'divisble' -> 'divisible'

* Fix typo: 'One of arguments' -> 'One of the arguments'
2019-05-15 18:41:43 +03:00
Vitaly Tuzov
1220dd4877 Updated v_popcount description, reference implementation and test. 2019-05-14 18:59:40 +03:00
Vitaly Tuzov
96ab78dc4f Reworked v_popcount implementation to provide number of bits in a single lane 2019-05-14 18:59:38 +03:00
Alexander Alekhin
b2abd8ca41 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-05-07 16:04:54 +00:00
Sayed Adel
5a77f4cee3 Merge pull request #14007 from seiko2plus:core_avx512_infa
* core: improve AVX512 infrastructure by adding more CPU features groups

* cmake: use groups for AVX512 optimization flags

* core: remove gap in CPU flags enumeration

* cmake: restore default CPU_DISPATCH
2019-05-05 14:19:49 +03:00
Alexander Alekhin
d0032b0717 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-22 18:17:28 +00:00
masa-iwm
5c404bb142 Merge pull request #14376 from masa-iwm:3.4
* fix getting platformIDs in initializeContextFromD3D11Device
2019-04-22 18:50:31 +03:00
Alexander Alekhin
44bd849697 build: reduce usage of constexpr
some compilers has lack of proper support for that
2019-04-22 15:41:27 +03:00
Ryan Wong
8af96248bf Merge pull request #13909 from kinchungwong:logging_20190220
OE-11 Logging revamp (#13909)

* Initial commit for log tag support.

Part of #11003, incomplete. Should pass build.

Moved LogLevel enum to logger.defines.hpp

LogTag struct used to convey both name and log level threshold as
one argument to the new logging macro. See logtag.hpp file, and
CV_LOG_WITH_TAG macro.

Global log level is now associated with a global log tag, when a
logging statement doesn't specify any log tag. See getLogLevel and
getGlobalLogTag functions.

A macro CV_LOGTAG_FALLBACK is allowed to be re-defined by other modules
or compilation units, internally, so that logging statements inside
that unit that specify NULL as tag will fall back to the re-defined tag.

Line-of-code information (file name, line number, function name),
together with tag name, are passed into the new log message sink.
See writeLogMessageEx function.

Fixed old incorrect CV_LOG_VERBOSE usage in ocl4dnn_conv_spatial.cpp.

* Implemented tag-based log filtering

Added LogTagManager. This is an initial version, using standard C++
approach as much as possible, to allow easier code review. Will
optimize later.

A workaround for all static dynamic initialization issues is
implemented. Refer to code comments.

* Added LogTagConfigParser.

Note: new code does not fully handle old log config parsing behavior.

* Fix log tag config vs registering ordering issue.

* Started testing LogTagConfigParser, incomplete.

The intention of this commit is to illustrate the capabilities of
the current design of LogTagConfigParser.

The test contained in this commit is not complete. Also, design changes
may require throwing away this commit and rewriting test code from
scratch.

Does not test whitespace segmentation (multiple tags on the config);
will do in next commit.

* Added CV_LOGTAG_EXPAND_NAME macro

This macro allows to be re-defined locally in other compilation units
to apply a prefix to whatever argument is passed as the "tag" argument
into CV_LOG_WITH_TAG. The default definition in logger.hpp does not
modify the argument. It is recommended to include the address-of
operator (ampersand) when re-defined locally.

* Added a few tests for LogTagManager, some fail.

See test_logtagmanager.cpp
Failed tests are: non-global ("something"), setting level by name-part
(first part or any part) has no effect at all.

* LogTagManagerTests substring non-confusion tests

* Fix major bugs in LogTagManager

The code change is intended to approximate the spec documented in
https://gist.github.com/kinchungwong/ec25bc1eba99142e0be4509b0f67d0c6

Refer to test suite in test_logtagmanager.cpp

Filter test result in "opencv_test_core" ...
with gtest_filter "LogTagManager*"

To see the test code that finds the bugs, refer to original commits
(before rebase; might be gone)

.. f3451208 (2019-03-03T19:45:17Z)
.... LogTagManagerTests substring non-confusion tests

.. 1b848f5f (2019-03-03T01:55:18Z)
.... Added a few tests for LogTagManager, some fail.

* Added LogTagManagerNamePartNonConfusionTest.

See test_logtagmanager.cpp in modules/core/test.

* Added LogTagAuto for auto registration in ctor

* Rewritten LogTagManager to resolve issues.

* Resolves code review issues around 2019-04-10

LogTagConfigParser::parseLogLevel - as part of resolving code review
issues, this function is rewritten to simplify control flow and to
improve conformance with legacy usage (for string values "OFF",
"DISABLED", and "WARNINGS").
2019-04-22 00:01:10 +03:00
Alexander Alekhin
4635356435 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-13 20:00:54 +00:00
Alexander Alekhin
b38de57f9a ts: test tags for flexible/reliable tests filtering
- added functionality to collect memory usage of OpenCL sybsystem
- memory usage of fastMalloc() (disabled by default):
  * It is not accurate sometimes - external memory profiler is required.
- specify common `CV_TEST_TAG_` macros
- added applyTestTag() function
- write memory usage / enabled tags into Google Tests output file (.xml)
2019-04-08 19:12:49 +00:00
Alexander Alekhin
33dde339fe Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-04-01 18:11:55 +03:00
Alexander Alekhin
1e583942b9 core(lda): don't perform calculations in constructor
- exceptions from constructor will not cause destructor calls
2019-03-31 21:48:44 +00:00
David Carlier
06a4c20f60 OpenBSD build fix
required for close calls.
2019-03-31 10:54:47 +01:00
Alexander Alekhin
7442100caa Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2019-03-29 19:29:36 +00:00
Alexander Alekhin
d6b82dcd65
Merge pull request #14162 from alalek:eliminate_coverity_scan_issues
core: eliminate coverity scan issues (#14162)

* core(hal): avoid using of r,g,b,a parameters in interleave/deinterleave

- static analysis tools blame on possible parameters reordering
- align AVX parameters with corresponding SSE/NEO/VSX/cpp code

* core: avoid "i,j" parameters in Matx methods

- static analysis tools blame on possible parameters reordering

* core: resolve coverity scan issues
2019-03-27 15:48:00 +03:00