Merge pull request #3138 from alalek:icv_update

This commit is contained in:
Alexander Alekhin 2014-11-06 15:58:14 +00:00
commit f50f249f80
3 changed files with 20 additions and 16 deletions

View File

@ -8,21 +8,21 @@
function(_icv_downloader)
# Define actual ICV versions
if(APPLE)
set(OPENCV_ICV_PACKAGE_NAME "ippicv_macosx_20140429.tgz")
set(OPENCV_ICV_PACKAGE_HASH "f2195a60829899983acd4a45794e1717")
set(OPENCV_ICV_PACKAGE_NAME "ippicv_macosx_20141027.tgz")
set(OPENCV_ICV_PACKAGE_HASH "9662fe0694a67e59491a0dcc82fa26e0")
set(OPENCV_ICV_PLATFORM "macosx")
set(OPENCV_ICV_PACKAGE_SUBDIR "/ippicv_osx")
elseif(UNIX)
if(ANDROID AND (NOT ANDROID_ABI STREQUAL x86))
return()
endif()
set(OPENCV_ICV_PACKAGE_NAME "ippicv_linux_20140513.tgz")
set(OPENCV_ICV_PACKAGE_HASH "d80cb24f3a565113a9d6dc56344142f6")
set(OPENCV_ICV_PACKAGE_NAME "ippicv_linux_20141027.tgz")
set(OPENCV_ICV_PACKAGE_HASH "8b449a536a2157bcad08a2b9f266828b")
set(OPENCV_ICV_PLATFORM "linux")
set(OPENCV_ICV_PACKAGE_SUBDIR "/ippicv_lnx")
elseif(WIN32 AND NOT ARM)
set(OPENCV_ICV_PACKAGE_NAME "ippicv_windows_20140429.zip")
set(OPENCV_ICV_PACKAGE_HASH "b5028a92224ec1fbc554010c52eb3ec8")
set(OPENCV_ICV_PACKAGE_NAME "ippicv_windows_20141027.zip")
set(OPENCV_ICV_PACKAGE_HASH "b59f865d1ba16e8c84124e19d78eec57")
set(OPENCV_ICV_PLATFORM "windows")
set(OPENCV_ICV_PACKAGE_SUBDIR "/ippicv_win")
else()
@ -45,7 +45,7 @@ function(_icv_downloader)
endif()
endif()
unset(OPENCV_ICV_PACKAGE_DOWNLOADED CACHE)
set(OPENCV_ICV_PACKAGE_ARCHIVE "${CMAKE_CURRENT_LIST_DIR}/downloads/${OPENCV_ICV_PLATFORM}-${OPENCV_ICV_PACKAGE_HASH}/${OPENCV_ICV_PACKAGE_NAME}")
get_filename_component(OPENCV_ICV_PACKAGE_ARCHIVE_DIR "${OPENCV_ICV_PACKAGE_ARCHIVE}" PATH)
if(EXISTS "${OPENCV_ICV_PACKAGE_ARCHIVE}")
@ -56,7 +56,7 @@ function(_icv_downloader)
file(REMOVE_RECURSE "${OPENCV_ICV_PACKAGE_ARCHIVE_DIR}")
endif()
endif()
if(NOT EXISTS "${OPENCV_ICV_PACKAGE_ARCHIVE}")
if(NOT DEFINED OPENCV_ICV_URL)
if(DEFINED ENV{OPENCV_ICV_URL})
@ -65,7 +65,7 @@ function(_icv_downloader)
set(OPENCV_ICV_URL "http://sourceforge.net/projects/opencvlibrary/files/3rdparty/ippicv")
endif()
endif()
file(MAKE_DIRECTORY ${OPENCV_ICV_PACKAGE_ARCHIVE_DIR})
message(STATUS "ICV: Downloading ${OPENCV_ICV_PACKAGE_NAME}...")
file(DOWNLOAD "${OPENCV_ICV_URL}/${OPENCV_ICV_PACKAGE_NAME}" "${OPENCV_ICV_PACKAGE_ARCHIVE}"
@ -82,12 +82,12 @@ function(_icv_downloader)
endif()
endif()
endif()
ocv_assert(EXISTS "${OPENCV_ICV_PACKAGE_ARCHIVE}")
ocv_assert(NOT EXISTS "${OPENCV_ICV_UNPACK_PATH}")
file(MAKE_DIRECTORY ${OPENCV_ICV_UNPACK_PATH})
ocv_assert(EXISTS "${OPENCV_ICV_UNPACK_PATH}")
message(STATUS "ICV: Unpacking ${OPENCV_ICV_PACKAGE_NAME} to ${OPENCV_ICV_UNPACK_PATH}...")
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xz "${OPENCV_ICV_PACKAGE_ARCHIVE}"
WORKING_DIRECTORY "${OPENCV_ICV_UNPACK_PATH}"
@ -100,7 +100,7 @@ function(_icv_downloader)
ocv_assert(EXISTS "${OPENCV_ICV_PATH}")
set(OPENCV_ICV_PACKAGE_DOWNLOADED "${OPENCV_ICV_PACKAGE_HASH}" CACHE INTERNAL "ICV package hash")
message(STATUS "ICV: Package successfully downloaded")
set(OPENCV_ICV_PATH "${OPENCV_ICV_PATH}" PARENT_SCOPE)
endfunction()

View File

@ -3212,7 +3212,9 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m
type == CV_16UC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16u_C1R :
type == CV_16UC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16u_C3R :
type == CV_16UC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16u_C4R :
#if !(IPP_VERSION_X100 == 802 && (!defined(IPP_VERSION_UPDATE) || IPP_VERSION_UPDATE <= 1)) // Oct 2014: Accuracy issue with IPP 8.2 / 8.2.1
type == CV_16SC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16s_C1R :
#endif
type == CV_16SC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16s_C3R :
type == CV_16SC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16s_C4R :
0) :

View File

@ -1223,15 +1223,17 @@ void cv::boxFilter( InputArray _src, OutputArray _dst, int ddepth,
else if (stype == CV_8UC4)
IPP_FILTER_BOX_BORDER(Ipp8u, ipp8u, 8u_C4R);
else if (stype == CV_16UC1)
IPP_FILTER_BOX_BORDER(Ipp16u, ipp16u, 16u_C1R);
// Oct 2014: performance with BORDER_CONSTANT
//else if (stype == CV_16UC1)
// IPP_FILTER_BOX_BORDER(Ipp16u, ipp16u, 16u_C1R);
else if (stype == CV_16UC3)
IPP_FILTER_BOX_BORDER(Ipp16u, ipp16u, 16u_C3R);
else if (stype == CV_16UC4)
IPP_FILTER_BOX_BORDER(Ipp16u, ipp16u, 16u_C4R);
else if (stype == CV_16SC1)
IPP_FILTER_BOX_BORDER(Ipp16s, ipp16s, 16s_C1R);
// Oct 2014: performance with BORDER_CONSTANT
//else if (stype == CV_16SC1)
// IPP_FILTER_BOX_BORDER(Ipp16s, ipp16s, 16s_C1R);
else if (stype == CV_16SC3)
IPP_FILTER_BOX_BORDER(Ipp16s, ipp16s, 16s_C3R);
else if (stype == CV_16SC4)