Merge commit '43aec5ad^' into merge-2.4
Conflicts: modules/contrib/src/inputoutput.cpp modules/gpu/perf/perf_imgproc.cpp modules/gpuarithm/perf/perf_element_operations.cpp modules/gpuarithm/src/element_operations.cpp modules/ts/src/precomp.hpp
This commit is contained in:
commit
4d06c4c7b6
@ -136,17 +136,20 @@ endfunction()
|
|||||||
|
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
# This is auxiliary function called from set_ipp_variables()
|
# This is auxiliary function called from set_ipp_variables()
|
||||||
# to set IPP_LIBRARIES variable in IPP 7.x style
|
# to set IPP_LIBRARIES variable in IPP 7.x and 8.x style
|
||||||
# ------------------------------------------------------------------------
|
# ------------------------------------------------------------------------
|
||||||
function(set_ipp_new_libraries _LATEST_VERSION)
|
function(set_ipp_new_libraries _LATEST_VERSION)
|
||||||
set(IPP_PREFIX "ipp")
|
set(IPP_PREFIX "ipp")
|
||||||
|
|
||||||
if(${_LATEST_VERSION} VERSION_LESS "8.0")
|
if(${_LATEST_VERSION} VERSION_LESS "8.0")
|
||||||
set(IPP_SUFFIX "_l") # static not threaded libs suffix
|
set(IPP_SUFFIX "_l") # static not threaded libs suffix IPP 7.x
|
||||||
else()
|
else()
|
||||||
set(IPP_SUFFIX "") # static not threaded libs suffix
|
if(WIN32)
|
||||||
|
set(IPP_SUFFIX "mt") # static not threaded libs suffix IPP 8.x for Windows
|
||||||
|
else()
|
||||||
|
set(IPP_SUFFIX "") # static not threaded libs suffix IPP 8.x for Linux/OS X
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
set(IPP_THRD "_t") # static threaded libs suffix
|
|
||||||
set(IPPCORE "core") # core functionality
|
set(IPPCORE "core") # core functionality
|
||||||
set(IPPSP "s") # signal processing
|
set(IPPSP "s") # signal processing
|
||||||
set(IPPIP "i") # image processing
|
set(IPPIP "i") # image processing
|
||||||
@ -218,7 +221,7 @@ function(set_ipp_variables _LATEST_VERSION)
|
|||||||
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/ia32 PARENT_SCOPE)
|
set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/ia32 PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# set IPP_LIBRARIES variable (7.x lib names)
|
# set IPP_LIBRARIES variable (7.x or 8.x lib names)
|
||||||
set_ipp_new_libraries(${_LATEST_VERSION})
|
set_ipp_new_libraries(${_LATEST_VERSION})
|
||||||
set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE)
|
set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE)
|
||||||
message(STATUS "IPP libs: ${IPP_LIBRARIES}")
|
message(STATUS "IPP libs: ${IPP_LIBRARIES}")
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
namespace cv
|
namespace cv
|
||||||
{
|
{
|
||||||
std::vector<String> Directory::GetListFiles( const String& path, const String & exten, bool addPath )
|
std::vector<String> Directory::GetListFiles( const String& path, const String & exten, bool addPath )
|
||||||
{
|
{
|
||||||
std::vector<String> list;
|
std::vector<String> list;
|
||||||
list.clear();
|
list.clear();
|
||||||
@ -24,10 +24,9 @@ namespace cv
|
|||||||
HANDLE hFind;
|
HANDLE hFind;
|
||||||
|
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
size_t size = mbstowcs(NULL, path_f.c_str(), path_f.size());
|
wchar_t wpath[MAX_PATH];
|
||||||
Ptr<wchar_t> wpath = new wchar_t[size+1];
|
size_t copied = mbstowcs(wpath, path_f.c_str(), MAX_PATH);
|
||||||
wpath[size] = 0;
|
CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
|
||||||
mbstowcs(wpath, path_f.c_str(), path_f.size());
|
|
||||||
hFind = FindFirstFileExW(wpath, FindExInfoStandard, &FindFileData, FindExSearchNameMatch, NULL, 0);
|
hFind = FindFirstFileExW(wpath, FindExInfoStandard, &FindFileData, FindExSearchNameMatch, NULL, 0);
|
||||||
#else
|
#else
|
||||||
hFind = FindFirstFileA((LPCSTR)path_f.c_str(), &FindFileData);
|
hFind = FindFirstFileA((LPCSTR)path_f.c_str(), &FindFileData);
|
||||||
@ -46,12 +45,12 @@ namespace cv
|
|||||||
FindFileData.dwFileAttributes == FILE_ATTRIBUTE_SYSTEM ||
|
FindFileData.dwFileAttributes == FILE_ATTRIBUTE_SYSTEM ||
|
||||||
FindFileData.dwFileAttributes == FILE_ATTRIBUTE_READONLY)
|
FindFileData.dwFileAttributes == FILE_ATTRIBUTE_READONLY)
|
||||||
{
|
{
|
||||||
cv::Ptr<char> fname;
|
char* fname;
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
size_t asize = wcstombs(NULL, FindFileData.cFileName, 0);
|
char fname_tmp[MAX_PATH] = {0};
|
||||||
fname = new char[asize+1];
|
size_t copied = wcstombs(fname_tmp, FindFileData.cFileName, MAX_PATH);
|
||||||
fname[asize] = 0;
|
CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
|
||||||
wcstombs(fname, FindFileData.cFileName, asize);
|
fname = fname_tmp;
|
||||||
#else
|
#else
|
||||||
fname = FindFileData.cFileName;
|
fname = FindFileData.cFileName;
|
||||||
#endif
|
#endif
|
||||||
@ -108,10 +107,10 @@ namespace cv
|
|||||||
HANDLE hFind;
|
HANDLE hFind;
|
||||||
|
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
size_t size = mbstowcs(NULL, path_f.c_str(), path_f.size());
|
wchar_t wpath [MAX_PATH];
|
||||||
Ptr<wchar_t> wpath = new wchar_t[size+1];
|
size_t copied = mbstowcs(wpath, path_f.c_str(), path_f.size());
|
||||||
wpath[size] = 0;
|
CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
|
||||||
mbstowcs(wpath, path_f.c_str(), path_f.size());
|
|
||||||
hFind = FindFirstFileExW(wpath, FindExInfoStandard, &FindFileData, FindExSearchNameMatch, NULL, 0);
|
hFind = FindFirstFileExW(wpath, FindExInfoStandard, &FindFileData, FindExSearchNameMatch, NULL, 0);
|
||||||
#else
|
#else
|
||||||
hFind = FindFirstFileA((LPCSTR)path_f.c_str(), &FindFileData);
|
hFind = FindFirstFileA((LPCSTR)path_f.c_str(), &FindFileData);
|
||||||
@ -134,12 +133,12 @@ namespace cv
|
|||||||
strcmp(FindFileData.cFileName, "..") != 0)
|
strcmp(FindFileData.cFileName, "..") != 0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
cv::Ptr<char> fname;
|
char* fname;
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
size_t asize = wcstombs(NULL, FindFileData.cFileName, 0);
|
char fname_tmp[MAX_PATH];
|
||||||
fname = new char[asize+1];
|
size_t copied = wcstombs(fname, FindFileData.cFileName, MAX_PATH);
|
||||||
fname[asize] = 0;
|
CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
|
||||||
wcstombs(fname, FindFileData.cFileName, asize);
|
fname = fname_tmp;
|
||||||
#else
|
#else
|
||||||
fname = FindFileData.cFileName;
|
fname = FindFileData.cFileName;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
#include "perf_precomp.hpp"
|
#include "perf_precomp.hpp"
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# if _MSC_VER >= 1700
|
||||||
|
# pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
CV_PERF_TEST_MAIN(core)
|
CV_PERF_TEST_MAIN(core)
|
||||||
|
@ -79,10 +79,9 @@ namespace
|
|||||||
dir->ent.d_name = 0;
|
dir->ent.d_name = 0;
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
cv::String full_path = cv::String(path) + "\\*";
|
cv::String full_path = cv::String(path) + "\\*";
|
||||||
size_t size = mbstowcs(NULL, full_path.c_str(), full_path.size());
|
wchar_t wfull_path[MAX_PATH];
|
||||||
cv::Ptr<wchar_t> wfull_path = new wchar_t[size+1];
|
size_t copied = mbstowcs(wfull_path, full_path.c_str(), MAX_PATH);
|
||||||
wfull_path[size] = 0;
|
CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
|
||||||
mbstowcs(wfull_path, full_path.c_str(), full_path.size());
|
|
||||||
dir->handle = ::FindFirstFileExW(wfull_path, FindExInfoStandard,
|
dir->handle = ::FindFirstFileExW(wfull_path, FindExInfoStandard,
|
||||||
&dir->data, FindExSearchNameMatch, NULL, 0);
|
&dir->data, FindExSearchNameMatch, NULL, 0);
|
||||||
#else
|
#else
|
||||||
@ -106,6 +105,7 @@ namespace
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
size_t asize = wcstombs(NULL, dir->data.cFileName, 0);
|
size_t asize = wcstombs(NULL, dir->data.cFileName, 0);
|
||||||
|
CV_Assert((asize != 0) && (asize != (size_t)-1));
|
||||||
char* aname = new char[asize+1];
|
char* aname = new char[asize+1];
|
||||||
aname[asize] = 0;
|
aname[asize] = 0;
|
||||||
wcstombs(aname, dir->data.cFileName, asize);
|
wcstombs(aname, dir->data.cFileName, asize);
|
||||||
@ -146,10 +146,9 @@ static bool isDir(const cv::String& path, DIR* dir)
|
|||||||
{
|
{
|
||||||
WIN32_FILE_ATTRIBUTE_DATA all_attrs;
|
WIN32_FILE_ATTRIBUTE_DATA all_attrs;
|
||||||
#ifdef HAVE_WINRT
|
#ifdef HAVE_WINRT
|
||||||
size_t size = mbstowcs(NULL, path.c_str(), path.size());
|
wchar_t wpath[MAX_PATH];
|
||||||
cv::Ptr<wchar_t> wpath = new wchar_t[size+1];
|
size_t copied = mbstowcs(wpath, path.c_str(), MAX_PATH);
|
||||||
wpath[size] = 0;
|
CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
|
||||||
mbstowcs(wpath, path.c_str(), path.size());
|
|
||||||
::GetFileAttributesExW(wpath, GetFileExInfoStandard, &all_attrs);
|
::GetFileAttributesExW(wpath, GetFileExInfoStandard, &all_attrs);
|
||||||
#else
|
#else
|
||||||
::GetFileAttributesExA(path.c_str(), GetFileExInfoStandard, &all_attrs);
|
::GetFileAttributesExA(path.c_str(), GetFileExInfoStandard, &all_attrs);
|
||||||
|
@ -42,6 +42,12 @@
|
|||||||
|
|
||||||
#include "precomp.hpp"
|
#include "precomp.hpp"
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
# if _MSC_VER >= 1700
|
||||||
|
# pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined WIN32 || defined _WIN32 || defined WINCE
|
#if defined WIN32 || defined _WIN32 || defined WINCE
|
||||||
#ifndef _WIN32_WINNT // This is needed for the declaration of TryEnterCriticalSection in winbase.h with Visual Studio 2005 (and older?)
|
#ifndef _WIN32_WINNT // This is needed for the declaration of TryEnterCriticalSection in winbase.h with Visual Studio 2005 (and older?)
|
||||||
#define _WIN32_WINNT 0x0400 // http://msdn.microsoft.com/en-us/library/ms686857(VS.85).aspx
|
#define _WIN32_WINNT 0x0400 // http://msdn.microsoft.com/en-us/library/ms686857(VS.85).aspx
|
||||||
@ -423,15 +429,14 @@ String tempfile( const char* suffix )
|
|||||||
temp_file = temp_dir + std::wstring(L"\\") + temp_file;
|
temp_file = temp_dir + std::wstring(L"\\") + temp_file;
|
||||||
DeleteFileW(temp_file.c_str());
|
DeleteFileW(temp_file.c_str());
|
||||||
|
|
||||||
size_t asize = wcstombs(NULL, temp_file.c_str(), 0);
|
char aname[MAX_PATH];
|
||||||
Ptr<char> aname = new char[asize+1];
|
size_t copied = wcstombs(aname, temp_file.c_str(), MAX_PATH);
|
||||||
aname[asize] = 0;
|
CV_Assert((copied != MAX_PATH) && (copied != (size_t)-1));
|
||||||
wcstombs(aname, temp_file.c_str(), asize);
|
|
||||||
fname = std::string(aname);
|
fname = std::string(aname);
|
||||||
RoUninitialize();
|
RoUninitialize();
|
||||||
#else
|
#else
|
||||||
char temp_dir2[MAX_PATH + 1] = { 0 };
|
char temp_dir2[MAX_PATH] = { 0 };
|
||||||
char temp_file[MAX_PATH + 1] = { 0 };
|
char temp_file[MAX_PATH] = { 0 };
|
||||||
|
|
||||||
if (temp_dir == 0 || temp_dir[0] == 0)
|
if (temp_dir == 0 || temp_dir[0] == 0)
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
#ifdef HAVE_WINRT
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
# if _MSC_VER >= 1700
|
||||||
|
# pragma warning(disable:4447) // Disable warning 'main' signature found without threading model
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "test_precomp.hpp"
|
#include "test_precomp.hpp"
|
||||||
|
|
||||||
CV_TEST_MAIN("cv")
|
CV_TEST_MAIN("cv")
|
||||||
|
@ -84,7 +84,7 @@ PERF_TEST_P(Sz_Type_Flags, GEMM,
|
|||||||
|
|
||||||
TEST_CYCLE() cv::gpu::gemm(d_src1, d_src2, 1.0, d_src3, 1.0, dst, flags);
|
TEST_CYCLE() cv::gpu::gemm(d_src1, d_src2, 1.0, d_src3, 1.0, dst, flags);
|
||||||
|
|
||||||
GPU_SANITY_CHECK(dst, 1e-6);
|
GPU_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -234,7 +234,7 @@ PERF_TEST_P(Sz_KernelSz_Ccorr, Convolve,
|
|||||||
|
|
||||||
TEST_CYCLE() convolution->convolve(d_image, d_templ, dst, ccorr);
|
TEST_CYCLE() convolution->convolve(d_image, d_templ, dst, ccorr);
|
||||||
|
|
||||||
GPU_SANITY_CHECK(dst);
|
GPU_SANITY_CHECK(dst, 1e-6, ERROR_RELATIVE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1912,7 +1912,7 @@ void cv::gpu::bitwise_not(InputArray _src, OutputArray _dst, InputArray _mask, S
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
bitMatNot<unsigned short>(
|
bitMatNot<unsigned char>(
|
||||||
PtrStepSzb(src.rows, bcols, src.data, src.step),
|
PtrStepSzb(src.rows, bcols, src.data, src.step),
|
||||||
PtrStepSzb(src.rows, bcols, dst.data, dst.step),
|
PtrStepSzb(src.rows, bcols, dst.data, dst.step),
|
||||||
mask, stream);
|
mask, stream);
|
||||||
|
@ -542,7 +542,7 @@ JNIEXPORT jstring JNICALL Java_org_opencv_highgui_VideoCapture_getSupportedPrevi
|
|||||||
{
|
{
|
||||||
static const char method_name[] = "highgui::VideoCapture_getSupportedPreviewSizes_10()";
|
static const char method_name[] = "highgui::VideoCapture_getSupportedPreviewSizes_10()";
|
||||||
try {
|
try {
|
||||||
LOGD(%s, method_name);
|
LOGD("%s", method_name);
|
||||||
VideoCapture* me = (VideoCapture*) self; //TODO: check for NULL
|
VideoCapture* me = (VideoCapture*) self; //TODO: check for NULL
|
||||||
union {double prop; const char* name;} u;
|
union {double prop; const char* name;} u;
|
||||||
u.prop = me->get(CAP_PROP_ANDROID_PREVIEW_SIZES_STRING);
|
u.prop = me->get(CAP_PROP_ANDROID_PREVIEW_SIZES_STRING);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "opencv2/core/utility.hpp"
|
#include "opencv2/core/utility.hpp"
|
||||||
#include "opencv2/core/private.hpp"
|
#include "opencv2/core/private.hpp"
|
||||||
#include "opencv2/ts.hpp"
|
#include "opencv2/ts.hpp"
|
||||||
|
#include "cvconfig.h"
|
||||||
|
|
||||||
#ifdef GTEST_LINKED_AS_SHARED_LIBRARY
|
#ifdef GTEST_LINKED_AS_SHARED_LIBRARY
|
||||||
#error ts module should not have GTEST_LINKED_AS_SHARED_LIBRARY defined
|
#error ts module should not have GTEST_LINKED_AS_SHARED_LIBRARY defined
|
||||||
|
@ -740,6 +740,14 @@ void TestBase::RecordRunParameters()
|
|||||||
{
|
{
|
||||||
::testing::Test::RecordProperty("cv_implementation", param_impl);
|
::testing::Test::RecordProperty("cv_implementation", param_impl);
|
||||||
::testing::Test::RecordProperty("cv_num_threads", param_threads);
|
::testing::Test::RecordProperty("cv_num_threads", param_threads);
|
||||||
|
|
||||||
|
#ifdef HAVE_CUDA
|
||||||
|
if (param_impl == "cuda")
|
||||||
|
{
|
||||||
|
cv::gpu::DeviceInfo info(param_cuda_device);
|
||||||
|
::testing::Test::RecordProperty("cv_cuda_gpu", info.name());
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TestBase::getSelectedImpl()
|
std::string TestBase::getSelectedImpl()
|
||||||
|
Loading…
Reference in New Issue
Block a user