Skip to content

Commit 67fe820

Browse files
author
Woody Chow
committed
Merging master to filter_avx2, and resolving conflicts
2 parents 9eecb5a + fe4555e commit 67fe820

File tree

232 files changed

+12974
-6174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

232 files changed

+12974
-6174
lines changed

3rdparty/ffmpeg/ffmpeg.cmake

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
1-
# Binary branch name: ffmpeg/master_20161202
2-
# Binaries were created for OpenCV: 594c136d1fcbb5816c57516e50f9cbeffbd90835
3-
set(FFMPEG_BINARIES_COMMIT "2a19d0006415955c79431116e4634f04d5eb5a74")
4-
set(FFMPEG_FILE_HASH_BIN32 "f081abd9d6ca7e425d340ce586f9c090")
5-
set(FFMPEG_FILE_HASH_BIN64 "a423363a6eb76d362ca6c406c96c8db6")
6-
set(FFMPEG_FILE_HASH_CMAKE "5346ae1854fc7aa569a722e85af480ec")
1+
# Binary branch name: ffmpeg/master_20170418
2+
# Binaries were created for OpenCV: b993b9b7c7f6f5f37d10acacb2962812228410ba
3+
set(FFMPEG_BINARIES_COMMIT "86c4a841055f2612774e85b4292bb20e5fe8a783")
4+
set(FFMPEG_FILE_HASH_BIN32 "3dea5f7f009b44601fe95728328e0f9e")
5+
set(FFMPEG_FILE_HASH_BIN64 "9debe701975ef074bd6661981f3f0716")
6+
set(FFMPEG_FILE_HASH_CMAKE "208c00f03d2f6f39fa6262649e0bfc8d")
77

8-
set(FFMPEG_DOWNLOAD_URL ${OPENCV_FFMPEG_URL};$ENV{OPENCV_FFMPEG_URL};https://raw.githubusercontent.com/opencv/opencv_3rdparty/${FFMPEG_BINARIES_COMMIT}/ffmpeg/)
8+
function(download_win_ffmpeg script_var)
9+
set(${script_var} "" PARENT_SCOPE)
910

10-
ocv_download(PACKAGE opencv_ffmpeg.dll
11-
HASH ${FFMPEG_FILE_HASH_BIN32}
12-
URL ${FFMPEG_DOWNLOAD_URL}
13-
DESTINATION_DIR ${CMAKE_CURRENT_LIST_DIR})
11+
set(ids BIN32 BIN64 CMAKE)
12+
set(name_BIN32 "opencv_ffmpeg.dll")
13+
set(name_BIN64 "opencv_ffmpeg_64.dll")
14+
set(name_CMAKE "ffmpeg_version.cmake")
1415

15-
ocv_download(PACKAGE opencv_ffmpeg_64.dll
16-
HASH ${FFMPEG_FILE_HASH_BIN64}
17-
URL ${FFMPEG_DOWNLOAD_URL}
18-
DESTINATION_DIR ${CMAKE_CURRENT_LIST_DIR})
16+
set(FFMPEG_DOWNLOAD_DIR "${OpenCV_BINARY_DIR}/3rdparty/ffmpeg")
1917

20-
ocv_download(PACKAGE ffmpeg_version.cmake
21-
HASH ${FFMPEG_FILE_HASH_CMAKE}
22-
URL ${FFMPEG_DOWNLOAD_URL}
23-
DESTINATION_DIR ${CMAKE_CURRENT_LIST_DIR})
24-
25-
include(${CMAKE_CURRENT_LIST_DIR}/ffmpeg_version.cmake)
18+
set(status TRUE)
19+
foreach(id ${ids})
20+
ocv_download(FILENAME ${name_${id}}
21+
HASH ${FFMPEG_FILE_HASH_${id}}
22+
URL
23+
"$ENV{OPENCV_FFMPEG_URL}"
24+
"${OPENCV_FFMPEG_URL}"
25+
"https://raw.githubusercontent.com/opencv/opencv_3rdparty/${FFMPEG_BINARIES_COMMIT}/ffmpeg/"
26+
DESTINATION_DIR ${FFMPEG_DOWNLOAD_DIR}
27+
ID FFMPEG
28+
RELATIVE_URL
29+
STATUS res)
30+
if(NOT res)
31+
set(status FALSE)
32+
endif()
33+
endforeach()
34+
if(status)
35+
set(${script_var} "${FFMPEG_DOWNLOAD_DIR}/ffmpeg_version.cmake" PARENT_SCOPE)
36+
endif()
37+
endfunction()

3rdparty/ippicv/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

3rdparty/ippicv/CMakeLists.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# ----------------------------------------------------------------------------
2+
# CMake file for IPP IW. See root CMakeLists.txt
3+
#
4+
# ----------------------------------------------------------------------------
5+
project(${IPP_IW_LIBRARY})
6+
7+
ocv_include_directories(${IPP_INCLUDE_DIRS} ${IPP_IW_PATH}/include)
8+
add_definitions(-DIW_BUILD)
9+
if(HAVE_IPP_ICV_ONLY)
10+
add_definitions(-DICV_BASE)
11+
endif()
12+
13+
file(GLOB lib_srcs ${IPP_IW_PATH}/src/*.c)
14+
file(GLOB lib_hdrs ${IPP_IW_PATH}/include/*.h ${IPP_IW_PATH}/include/iw/*.h ${IPP_IW_PATH}/include/iw++/*.hpp)
15+
16+
# ----------------------------------------------------------------------------------
17+
# Define the library target:
18+
# ----------------------------------------------------------------------------------
19+
20+
add_library(${IPP_IW_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs})
21+
22+
if(UNIX)
23+
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC)
24+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wno-unused-function")
25+
endif()
26+
endif()
27+
28+
set_target_properties(${IPP_IW_LIBRARY}
29+
PROPERTIES OUTPUT_NAME ${IPP_IW_LIBRARY}
30+
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
31+
COMPILE_PDB_NAME ${IPP_IW_LIBRARY}
32+
COMPILE_PDB_NAME_DEBUG "${IPP_IW_LIBRARY}${OPENCV_DEBUG_POSTFIX}"
33+
ARCHIVE_OUTPUT_DIRECTORY ${3P_LIBRARY_OUTPUT_PATH}
34+
)
35+
36+
if(ENABLE_SOLUTION_FOLDERS)
37+
set_target_properties(${IPP_IW_LIBRARY} PROPERTIES FOLDER "3rdparty")
38+
endif()
39+
40+
if(NOT BUILD_SHARED_LIBS)
41+
ocv_install_target(${IPP_IW_LIBRARY} EXPORT OpenCVModules ARCHIVE DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
42+
endif()

3rdparty/ippicv/downloader.cmake

Lines changed: 0 additions & 110 deletions
This file was deleted.

3rdparty/ippicv/ippicv.cmake

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
function(download_ippicv root_var)
2+
set(${root_var} "" PARENT_SCOPE)
3+
4+
# Commit SHA in the opencv_3rdparty repo
5+
set(IPPICV_COMMIT "a62e20676a60ee0ad6581e217fe7e4bada3b95db")
6+
# Define actual ICV versions
7+
if(APPLE)
8+
set(OPENCV_ICV_PLATFORM "macosx")
9+
set(OPENCV_ICV_PACKAGE_SUBDIR "ippicv_mac")
10+
if(X86_64)
11+
set(OPENCV_ICV_NAME "ippicv_2017u2_mac_intel64_20170418.tgz")
12+
set(OPENCV_ICV_HASH "0c25953c99dbb499ff502485a9356d8d")
13+
else()
14+
set(OPENCV_ICV_NAME "ippicv_2017u2_mac_ia32_20170418.tgz")
15+
set(OPENCV_ICV_HASH "5f225948f3f64067c681293c098d50d8")
16+
endif()
17+
elseif((UNIX AND NOT ANDROID) OR (UNIX AND ANDROID_ABI MATCHES "x86"))
18+
set(OPENCV_ICV_PLATFORM "linux")
19+
set(OPENCV_ICV_PACKAGE_SUBDIR "ippicv_lnx")
20+
if(X86_64)
21+
set(OPENCV_ICV_NAME "ippicv_2017u2_lnx_intel64_20170418.tgz")
22+
set(OPENCV_ICV_HASH "87cbdeb627415d8e4bc811156289fa3a")
23+
else()
24+
set(OPENCV_ICV_NAME "ippicv_2017u2_lnx_ia32_20170418.tgz")
25+
set(OPENCV_ICV_HASH "f2cece00d802d4dea86df52ed095257e")
26+
endif()
27+
elseif(WIN32 AND NOT ARM)
28+
set(OPENCV_ICV_PLATFORM "windows")
29+
set(OPENCV_ICV_PACKAGE_SUBDIR "ippicv_win")
30+
if(X86_64)
31+
set(OPENCV_ICV_NAME "ippicv_2017u2_win_intel64_20170418.zip")
32+
set(OPENCV_ICV_HASH "75060a0c662c0800f48995b7e9b085f6")
33+
else()
34+
set(OPENCV_ICV_NAME "ippicv_2017u2_win_ia32_20170418.zip")
35+
set(OPENCV_ICV_HASH "60fcf3ccd9a2ebc9e432ffb5cb91638b")
36+
endif()
37+
else()
38+
return()
39+
endif()
40+
41+
set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/ippicv")
42+
ocv_download(FILENAME ${OPENCV_ICV_NAME}
43+
HASH ${OPENCV_ICV_HASH}
44+
URL
45+
"${OPENCV_IPPICV_URL}"
46+
"$ENV{OPENCV_IPPICV_URL}"
47+
"https://raw.githubusercontent.com/opencv/opencv_3rdparty/${IPPICV_COMMIT}/ippicv/"
48+
DESTINATION_DIR "${THE_ROOT}"
49+
ID IPPICV
50+
STATUS res
51+
UNPACK RELATIVE_URL)
52+
53+
if(res)
54+
set(${root_var} "${THE_ROOT}/${OPENCV_ICV_PACKAGE_SUBDIR}" PARENT_SCOPE)
55+
endif()
56+
endfunction()

3rdparty/openvx/hal/openvx_hal.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <cfloat>
1212
#include <climits>
1313
#include <cmath>
14+
#include <cstring>
1415

1516
//==================================================================================================
1617
// utility
@@ -600,7 +601,7 @@ int ovx_hal_sepFilterInit(cvhalFilter2D **filter_context, int src_type, int dst_
600601
{
601602
if (!filter_context || !kernelx_data || !kernely_data || delta != 0 ||
602603
src_type != CV_8UC1 || (dst_type != CV_8UC1 && dst_type != CV_16SC1) ||
603-
kernelx_length % 2 == 0 || kernely_length % 2 == 0 || anchor_x != kernelx_length / 2 || anchor_y != kernely_length / 2)
604+
kernelx_length != 3 || kernely_length != 3 || anchor_x != 1 || anchor_y != 1)
604605
return CV_HAL_ERROR_NOT_IMPLEMENTED;
605606

606607
ivx::border_t border;
@@ -1076,7 +1077,7 @@ int ovx_hal_integral(int depth, int sdepth, int, const uchar * a, size_t astep,
10761077
ib = ivx::Image::createFromHandle(ctx, VX_DF_IMAGE_U32,
10771078
ivx::Image::createAddressing(w, h, 4, (vx_int32)bstep), (unsigned int *)(b + bstep + sizeof(unsigned int)));
10781079
ivx::IVX_CHECK_STATUS(vxuIntegralImage(ctx, ia, ib));
1079-
memset(b, 0, (w + 1) * sizeof(unsigned int));
1080+
std::memset(b, 0, (w + 1) * sizeof(unsigned int));
10801081
b += bstep;
10811082
for (int i = 0; i < h; i++, b += bstep)
10821083
{

3rdparty/openvx/include/ivx.hpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ static const vx_enum VX_INTERPOLATION_NEAREST_NEIGHBOR = VX_INTERPOLATION_TYPE_N
3232
static const vx_enum VX_BORDER_CONSTANT = VX_BORDER_MODE_CONSTANT;
3333
static const vx_enum VX_BORDER_REPLICATE = VX_BORDER_MODE_REPLICATE;
3434

35+
#else
36+
37+
#ifdef IVX_RENAMED_REFS
38+
static const vx_enum VX_REF_ATTRIBUTE_TYPE = VX_REFERENCE_TYPE;
39+
#endif
40+
3541
#endif
3642

3743
#ifndef IVX_USE_CXX98
@@ -2502,10 +2508,10 @@ class Convolution : public RefWrapper<vx_convolution>
25022508
{
25032509
if (!areTypesCompatible(TypeToEnum<T>::value, dataType()))
25042510
throw WrapperError(std::string(__func__) + "(): destination type is wrong");
2505-
if (data.size() != size())
2511+
if (data.size()*sizeof(T) != size())
25062512
{
25072513
if (data.size() == 0)
2508-
data.resize(size());
2514+
data.resize(size()/sizeof(T));
25092515
else
25102516
throw WrapperError(std::string(__func__) + "(): destination size is wrong");
25112517
}
@@ -2516,7 +2522,7 @@ class Convolution : public RefWrapper<vx_convolution>
25162522
{
25172523
if (!areTypesCompatible(TypeToEnum<T>::value, dataType()))
25182524
throw WrapperError(std::string(__func__) + "(): source type is wrong");
2519-
if (data.size() != size()) throw WrapperError(std::string(__func__) + "(): source size is wrong");
2525+
if (data.size()*sizeof(T) != size()) throw WrapperError(std::string(__func__) + "(): source size is wrong");
25202526
copyFrom(&data[0]);
25212527
}
25222528

@@ -2664,10 +2670,10 @@ class Matrix : public RefWrapper<vx_matrix>
26642670
{
26652671
if (!areTypesCompatible(TypeToEnum<T>::value, dataType()))
26662672
throw WrapperError(std::string(__func__) + "(): destination type is wrong");
2667-
if (data.size() != size())
2673+
if (data.size()*sizeof(T) != size())
26682674
{
26692675
if (data.size() == 0)
2670-
data.resize(size());
2676+
data.resize(size()/sizeof(T));
26712677
else
26722678
throw WrapperError(std::string(__func__) + "(): destination size is wrong");
26732679
}
@@ -2678,7 +2684,7 @@ class Matrix : public RefWrapper<vx_matrix>
26782684
{
26792685
if (!areTypesCompatible(TypeToEnum<T>::value, dataType()))
26802686
throw WrapperError(std::string(__func__) + "(): source type is wrong");
2681-
if (data.size() != size()) throw WrapperError(std::string(__func__) + "(): source size is wrong");
2687+
if (data.size()*sizeof(T) != size()) throw WrapperError(std::string(__func__) + "(): source size is wrong");
26822688
copyFrom(&data[0]);
26832689
}
26842690

0 commit comments

Comments
 (0)