diff --git a/cmake/OpenCVFindIPP.cmake b/cmake/OpenCVFindIPP.cmake index ab4d7c7b9b..d42a371a3f 100644 --- a/cmake/OpenCVFindIPP.cmake +++ b/cmake/OpenCVFindIPP.cmake @@ -1,7 +1,8 @@ # -# The script to setting up Intel(R) Integrated Performance Primitives (IPP) +# The script to detect Intel(R) Integrated Performance Primitives (IPP) # installation/package # +<<<<<<< HEAD # Windows host: # Run script like this before cmake: # call "\bin\ippvars.bat" intel64 @@ -20,8 +21,9 @@ # IPP_INCLUDE_DIRS - IPP include folder # IPP_LIBRARIES - IPP libraries that are used by OpenCV # IPP_FOUND - True if Intel IPP found -# IPP_INCLUDE_DIR - IPP include folder -# IPP_LIBRARY_DIR - IPP libraries folder +# IPP_ROOT_DIR - root of IPP installation +# IPP_INCLUDE_DIRS - IPP include folder +# IPP_LIBRARY_DIRS - IPP libraries folder # IPP_LIBRARIES - IPP libraries names that are used by OpenCV # # Created: 30 Dec 2010 by Vladimir Dudnik (vladimir.dudnik@intel.com) @@ -223,31 +225,198 @@ if(IPP_H_PATH) ipp_get_version(${IPP_ROOT_DIR}) ipp_set_variables(${IPP_VERSION_STR}) ======= +======= +# IPP_LATEST_VERSION_STR - string with the newest detected IPP version +# IPP_LATEST_VERSION_MAJOR - numbers of IPP version (MAJOR.MINOR.BUILD) +# IPP_LATEST_VERSION_MINOR +# IPP_LATEST_VERSION_BUILD +# +# Created: 30 Dec 2010 by Vladimir Dudnik (vladimir.dudnik@intel.com) +# +>>>>>>> Undo changes ipp to ippicv prefix of function names -set(IPP_FOUND TRUE) +set(IPP_FOUND) set(IPP_VERSION_STR "5.3.0.0") # will not detect earlier versions set(IPP_VERSION_MAJOR 0) set(IPP_VERSION_MINOR 0) set(IPP_VERSION_BUILD 0) -set(IPP_INCLUDE_DIR ${OpenCV_SOURCE_DIR}/3rdparty/ippicv/include) +set(IPP_ROOT_DIR) +set(IPP_INCLUDE_DIRS) set(IPP_LIBRARY_DIRS) set(IPP_LIBRARIES) -if(WIN32 AND NOT ARM) - if (X86_64) - set(IPP_LIBRARY_DIR ${OpenCV_SOURCE_DIR}/3rdparty/ippicv/libs/windows/intel64) - else() - set(IPP_LIBRARY_DIR ${OpenCV_SOURCE_DIR}/3rdparty/ippicv/libs/windows/ia32/) - endif() - set(IPP_LIBRARIES ippccmt.lib ippcoremt.lib ippcvmt.lib ippimt.lib ippsmt.lib ippvmmt.lib) -elseif(UNIX) - if (X86_64) - set(IPP_LIBRARY_DIR ${OpenCV_SOURCE_DIR}/3rdparty/ippicv/libs/linux/intel64) - else() - set(IPP_LIBRARY_DIR ${OpenCV_SOURCE_DIR}/3rdparty/ippicv/libs/linux/ia32/) - endif() - set(IPP_LIBRARIES libippcc.a libippcore.a libippcv.a libippi.a libipps.a libippvm.a) +set(IPP_LIB_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX}) +set(IPP_LIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX}) +set(IPP_PREFIX "ipp") +set(IPP_SUFFIX "_l") +set(IPPCORE "core") # core functionality +set(IPPS "s") # signal processing +set(IPPI "i") # image processing +set(IPPCC "cc") # color conversion +set(IPPCV "cv") # computer vision +set(IPPVM "vm") # vector math + + +set(IPP_X64 0) +if (CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8) + set(IPP_X64 1) endif() +if (CMAKE_CL_64) + set(IPP_X64 1) +endif() + +# ------------------------------------------------------------------------ +# This function detect IPP version by analyzing ippversion.h file +# Note, ippversion.h file was inroduced since IPP 5.3 +# ------------------------------------------------------------------------ +function(get_ipp_version _ROOT_DIR) + set(_VERSION_STR) + set(_MAJOR) + set(_MINOR) + set(_BUILD) + + # read IPP version info from file + file(STRINGS ${_ROOT_DIR}/include/ippversion.h STR1 REGEX "IPP_VERSION_MAJOR") + file(STRINGS ${_ROOT_DIR}/include/ippversion.h STR2 REGEX "IPP_VERSION_MINOR") + file(STRINGS ${_ROOT_DIR}/include/ippversion.h STR3 REGEX "IPP_VERSION_BUILD") + if("${STR3}" STREQUAL "") + file(STRINGS ${_ROOT_DIR}/include/ippversion.h STR3 REGEX "IPP_VERSION_UPDATE") + endif() + file(STRINGS ${_ROOT_DIR}/include/ippversion.h STR4 REGEX "IPP_VERSION_STR") + + # extract info and assign to variables + string(REGEX MATCHALL "[0-9]+" _MAJOR ${STR1}) + string(REGEX MATCHALL "[0-9]+" _MINOR ${STR2}) + string(REGEX MATCHALL "[0-9]+" _BUILD ${STR3}) + string(REGEX MATCHALL "[0-9]+[.]+[0-9]+[^\"]+|[0-9]+[.]+[0-9]+" _VERSION_STR ${STR4}) + + # export info to parent scope + set(IPP_VERSION_STR ${_VERSION_STR} PARENT_SCOPE) + set(IPP_VERSION_MAJOR ${_MAJOR} PARENT_SCOPE) + set(IPP_VERSION_MINOR ${_MINOR} PARENT_SCOPE) + set(IPP_VERSION_BUILD ${_BUILD} PARENT_SCOPE) + message(STATUS "found IPP: ${_MAJOR}.${_MINOR}.${_BUILD} [${_VERSION_STR}]") + message(STATUS "at: ${_ROOT_DIR}") + + return() + +endfunction() + + +# ------------------------------------------------------------------------ +# This is auxiliary function called from set_ipp_variables() +# to set IPP_LIBRARIES variable in IPP 6.x style (IPP 5.3 should also work) +# ------------------------------------------------------------------------ +function(set_ipp_old_libraries) + set(IPP_PREFIX "ipp") + set(IPP_SUFFIX) # old style static core libs suffix + set(IPP_ARCH) # architecture suffix + set(IPP_DISP "emerged") # old style dipatcher and cpu-specific + set(IPP_MRGD "merged") # static libraries + set(IPPCORE "core") # core functionality + set(IPPSP "s") # signal processing + set(IPPIP "i") # image processing + set(IPPCC "cc") # color conversion + set(IPPCV "cv") # computer vision + set(IPPVM "vm") # vector math + + if (IPP_X64) + set(IPP_ARCH "em64t") + endif() + + if(WIN32) + set(IPP_SUFFIX "l") + endif() + + set(IPP_LIBRARIES + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPVM}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPVM}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCC}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCC}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPIP}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPIP}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPSP}${IPP_MRGD}${IPP_ARCH}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPSP}${IPP_DISP}${IPP_ARCH}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_ARCH}${IPP_SUFFIX}${IPP_LIB_SUFFIX} + PARENT_SCOPE) + + return() + +endfunction() + + +# ------------------------------------------------------------------------ +# This is auxiliary function called from set_ipp_variables() +# to set IPP_LIBRARIES variable in IPP 7.x and 8.x style +# ------------------------------------------------------------------------ +function(set_ipp_new_libraries _LATEST_VERSION) + set(IPP_PREFIX "ipp") + + if(${_LATEST_VERSION} VERSION_LESS "8.0") + set(IPP_SUFFIX "_l") # static not threaded libs suffix IPP 7.x + else() + 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() + set(IPPCORE "core") # core functionality + set(IPPSP "s") # signal processing + set(IPPIP "i") # image processing + set(IPPCC "cc") # color conversion + set(IPPCV "cv") # computer vision + set(IPPVM "vm") # vector math + + set(IPP_LIBRARIES + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPVM}${IPP_SUFFIX}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCC}${IPP_SUFFIX}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCV}${IPP_SUFFIX}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPI}${IPP_SUFFIX}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPS}${IPP_SUFFIX}${IPP_LIB_SUFFIX} + ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_SUFFIX}${IPP_LIB_SUFFIX}) + + if (UNIX) + set(IPP_LIBRARIES + ${IPP_LIBRARIES} + ${IPP_LIB_PREFIX}irc${CMAKE_SHARED_LIBRARY_SUFFIX} + ${IPP_LIB_PREFIX}imf${CMAKE_SHARED_LIBRARY_SUFFIX} + ${IPP_LIB_PREFIX}svml${CMAKE_SHARED_LIBRARY_SUFFIX}) + endif() + set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE) + return() + +endfunction() + + +# ------------------------------------------------------------------------ +# This function will set +# IPP_INCLUDE_DIRS, IPP_LIBRARY_DIRS and IPP_LIBRARIES variables depending +# on IPP version parameter. +# Since IPP 7.0 version library names and install folder structure +# was changed +# ------------------------------------------------------------------------ +function(set_ipp_variables _LATEST_VERSION) + if(${_LATEST_VERSION} VERSION_LESS "7.0") +# message(STATUS "old") + + # set INCLUDE and LIB folders + set(IPP_INCLUDE_DIRS ${IPP_ROOT_DIR}/include PARENT_SCOPE) + set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib PARENT_SCOPE) + + if (IPP_X64) + if(NOT EXISTS ${IPP_ROOT_DIR}/../em64t) + message(SEND_ERROR "IPP EM64T libraries not found") + endif() + else() + if(NOT EXISTS ${IPP_ROOT_DIR}/../ia32) + message(SEND_ERROR "IPP IA32 libraries not found") + endif() + endif() + +<<<<<<< HEAD # read IPP version info from file set(_VERSION_STR) set(_MAJOR) @@ -259,15 +428,99 @@ file(STRINGS ${IPP_INCLUDE_DIR}/ippversion.h STR3 REGEX "IPP_VERSION_BUILD") if("${STR3}" STREQUAL "") file(STRINGS ${IPP_INCLUDE_DIR}/ippversion.h STR3 REGEX "IPP_VERSION_UPDATE") >>>>>>> Prepare codes for ippicv library +======= + # set IPP_LIBRARIES variable (6.x lib names) + set_ipp_old_libraries() + set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE) + message(STATUS "IPP libs: ${IPP_LIBRARIES}") + + else() +# message(STATUS "new") + + # set INCLUDE and LIB folders + set(IPP_INCLUDE_DIRS ${IPP_ROOT_DIR}/include PARENT_SCOPE) + + if (APPLE) + set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib) + elseif (IPP_X64) + if(NOT EXISTS ${IPP_ROOT_DIR}/lib/intel64) + message(SEND_ERROR "IPP EM64T libraries not found") + endif() + set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/intel64) + else() + if(NOT EXISTS ${IPP_ROOT_DIR}/lib/ia32) + message(SEND_ERROR "IPP IA32 libraries not found") + endif() + set(IPP_LIBRARY_DIRS ${IPP_ROOT_DIR}/lib/ia32) + endif() + + if (UNIX) + get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../lib REALPATH) + if (IPP_X64) + if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR}/intel64) + message(SEND_ERROR "Intel compiler EM64T libraries not found") + endif() + set(IPP_LIBRARY_DIRS + ${IPP_LIBRARY_DIRS} + ${INTEL_COMPILER_LIBRARY_DIR}/intel64) + else() + if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR}/ia32) + message(SEND_ERROR "Intel compiler IA32 libraries not found") + endif() + set(IPP_LIBRARY_DIRS + ${IPP_LIBRARY_DIRS} + ${INTEL_COMPILER_LIBRARY_DIR}/ia32) + endif() + endif() + set(IPP_LIBRARY_DIRS ${IPP_LIBRARY_DIRS} PARENT_SCOPE) + + # set IPP_LIBRARIES variable (7.x or 8.x lib names) + set_ipp_new_libraries(${_LATEST_VERSION}) + set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE) + message(STATUS "IPP libs: ${IPP_LIBRARIES}") + + endif() + + return() + +endfunction() + + +# ------------------------------------------------------------------------ +# This section will look for IPP through IPPROOT env variable +# Note, IPPROOT is not set by IPP installer, you may need to set it manually +# ------------------------------------------------------------------------ +find_path( + IPP_H_PATH + NAMES ippversion.h + PATHS $ENV{IPPROOT} + PATH_SUFFIXES include + DOC "The path to Intel(R) IPP header files" + NO_DEFAULT_PATH + NO_CMAKE_PATH) + +if(IPP_H_PATH) + set(IPP_FOUND 1) + + # traverse up to IPPROOT level + get_filename_component(IPP_ROOT_DIR ${IPP_H_PATH} PATH) + + # extract IPP version info + get_ipp_version(${IPP_ROOT_DIR}) + + # keep info in the same vars for auto search and search by IPPROOT + set(IPP_LATEST_VERSION_STR ${IPP_VERSION_STR}) + set(IPP_LATEST_VERSION_MAJOR ${IPP_VERSION_MAJOR}) + set(IPP_LATEST_VERSION_MINOR ${IPP_VERSION_MINOR}) + set(IPP_LATEST_VERSION_BUILD ${IPP_VERSION_BUILD}) + + # set IPP INCLUDE, LIB dirs and library names + set_ipp_variables(${IPP_LATEST_VERSION_STR}) +>>>>>>> Undo changes ipp to ippicv prefix of function names endif() -file(STRINGS ${IPP_INCLUDE_DIR}/ippversion.h STR4 REGEX "IPP_VERSION_STR") -# extract info and assign to variables -string(REGEX MATCHALL "[0-9]+" _MAJOR ${STR1}) -string(REGEX MATCHALL "[0-9]+" _MINOR ${STR2}) -string(REGEX MATCHALL "[0-9]+" _BUILD ${STR3}) -string(REGEX MATCHALL "[0-9]+[.]+[0-9]+[^\"]+|[0-9]+[.]+[0-9]+" _VERSION_STR ${STR4}) +<<<<<<< HEAD <<<<<<< HEAD if(WIN32 AND MINGW AND NOT IPP_VERSION_MAJOR LESS 7) # Since IPP built with Microsoft compiler and /GS option @@ -295,3 +548,86 @@ set(IPP_VERSION_BUILD ${_BUILD}) message(STATUS "found IPP: ${_MAJOR}.${_MINOR}.${_BUILD} [${_VERSION_STR}]") >>>>>>> Prepare codes for ippicv library +======= +if(NOT IPP_FOUND) + # reset var from previous search + set(IPP_H_PATH) + + + # ------------------------------------------------------------------------ + # This section will look for IPP through system program folders + # Note, if several IPP installations found the newest version will be + # selected + # ------------------------------------------------------------------------ + foreach(curdir ${CMAKE_SYSTEM_PREFIX_PATH}) + set(curdir ${curdir}/intel) + file(TO_CMAKE_PATH ${curdir} CURDIR) + + if(EXISTS ${curdir}) + file(GLOB_RECURSE IPP_H_DIR ${curdir}/ippversion.h) + + if(IPP_H_DIR) + set(IPP_FOUND 1) + endif() + + # init IPP_LATEST_VERSION version with oldest detectable version (5.3.0.0) + # IPP prior 5.3 did not have ippversion.h file + set(IPP_LATEST_VERSION_STR ${IPP_VERSION_STR}) + + # look through all dirs where ippversion.h was found + foreach(item ${IPP_H_DIR}) + + # traverse up to IPPROOT level + get_filename_component(_FILE_PATH ${item} PATH) + get_filename_component(_ROOT_DIR ${_FILE_PATH} PATH) + + # extract IPP version info + get_ipp_version(${_ROOT_DIR}) + + # remember the latest version (if many found) + if(${IPP_LATEST_VERSION_STR} VERSION_LESS ${IPP_VERSION_STR}) + set(IPP_LATEST_VERSION_STR ${IPP_VERSION_STR}) + set(IPP_LATEST_VERSION_MAJOR ${IPP_VERSION_MAJOR}) + set(IPP_LATEST_VERSION_MINOR ${IPP_VERSION_MINOR}) + set(IPP_LATEST_VERSION_BUILD ${IPP_VERSION_BUILD}) + set(IPP_ROOT_DIR ${_ROOT_DIR}) + endif() + endforeach() + endif() + endforeach() +endif() + +if(IPP_FOUND) + # set IPP INCLUDE, LIB dirs and library names + set_ipp_variables(${IPP_LATEST_VERSION_STR}) + + # set CACHE variable IPP_H_PATH, + # path to IPP header files for the latest version + find_path( + IPP_H_PATH + NAMES ippversion.h + PATHS ${IPP_ROOT_DIR} + PATH_SUFFIXES include + DOC "The path to Intel(R) IPP header files" + NO_DEFAULT_PATH + NO_CMAKE_PATH) +endif() + +if(WIN32 AND MINGW AND NOT IPP_LATEST_VERSION_MAJOR LESS 7) + # Since IPP built with Microsoft compiler and /GS option + # ====================================================== + # From Windows SDK 7.1 + # (usually in "C:\Program Files\Microsoft Visual Studio 10.0\VC\lib"), + # to avoid undefined reference to __security_cookie and _chkstk: + set(MSV_RUNTMCHK "RunTmChk") + set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_RUNTMCHK}${IPP_LIB_SUFFIX}) + + # To avoid undefined reference to _alldiv and _chkstk + # =================================================== + # NB: it may require a recompilation of w32api (after having modified + # the file ntdll.def) to export the required functions + # See http://code.opencv.org/issues/1906 for additional details + set(MSV_NTDLL "ntdll") + set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_NTDLL}${IPP_LIB_SUFFIX}) +endif() +>>>>>>> Undo changes ipp to ippicv prefix of function names diff --git a/modules/core/src/arithm.cpp b/modules/core/src/arithm.cpp index 3e343f6b6b..ecc2ca0648 100644 --- a/modules/core/src/arithm.cpp +++ b/modules/core/src/arithm.cpp @@ -460,7 +460,7 @@ static void add8u( const uchar* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviAdd_8u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0)) + if (0 <= ippiAdd_8u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0)) return; #endif (vBinOp, IF_SIMD(VAdd)>(src1, step1, src2, step2, dst, step, sz)); @@ -479,7 +479,7 @@ static void add16u( const ushort* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviAdd_16u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0)) + if (0 <= ippiAdd_16u_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0)) return; #endif (vBinOp, IF_SIMD(VAdd)>(src1, step1, src2, step2, dst, step, sz)); @@ -491,7 +491,7 @@ static void add16s( const short* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviAdd_16s_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0)) + if (0 <= ippiAdd_16s_C1RSfs(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz, 0)) return; #endif (vBinOp, IF_SIMD(VAdd)>(src1, step1, src2, step2, dst, step, sz)); @@ -510,7 +510,7 @@ static void add32f( const float* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviAdd_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) + if (0 <= ippiAdd_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) return; #endif (vBinOp32, IF_SIMD(VAdd)>(src1, step1, src2, step2, dst, step, sz)); @@ -529,7 +529,7 @@ static void sub8u( const uchar* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviSub_8u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0)) + if (0 <= ippiSub_8u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0)) return; #endif (vBinOp, IF_SIMD(VSub)>(src1, step1, src2, step2, dst, step, sz)); @@ -548,7 +548,7 @@ static void sub16u( const ushort* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviSub_16u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0)) + if (0 <= ippiSub_16u_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0)) return; #endif (vBinOp, IF_SIMD(VSub)>(src1, step1, src2, step2, dst, step, sz)); @@ -560,7 +560,7 @@ static void sub16s( const short* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviSub_16s_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0)) + if (0 <= ippiSub_16s_C1RSfs(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz, 0)) return; #endif (vBinOp, IF_SIMD(VSub)>(src1, step1, src2, step2, dst, step, sz)); @@ -579,7 +579,7 @@ static void sub32f( const float* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviSub_32f_C1R(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz)) + if (0 <= ippiSub_32f_C1R(src2, (int)step2, src1, (int)step1, dst, (int)step, (IppiSize&)sz)) return; #endif (vBinOp32, IF_SIMD(VSub)>(src1, step1, src2, step2, dst, step, sz)); @@ -607,7 +607,7 @@ static void max8u( const uchar* src1, size_t step1, int i = 0; for(; i < sz.height; i++) { - if (0 > ippicvsMaxEvery_8u(s1, s2, d, sz.width)) + if (0 > ippsMaxEvery_8u(s1, s2, d, sz.width)) break; s1 += step1; s2 += step2; @@ -638,7 +638,7 @@ static void max16u( const ushort* src1, size_t step1, int i = 0; for(; i < sz.height; i++) { - if (0 > ippicvsMaxEvery_16u(s1, s2, d, sz.width)) + if (0 > ippsMaxEvery_16u(s1, s2, d, sz.width)) break; s1 = (ushort*)((uchar*)s1 + step1); s2 = (ushort*)((uchar*)s2 + step2); @@ -676,7 +676,7 @@ static void max32f( const float* src1, size_t step1, int i = 0; for(; i < sz.height; i++) { - if (0 > ippicvsMaxEvery_32f(s1, s2, d, sz.width)) + if (0 > ippsMaxEvery_32f(s1, s2, d, sz.width)) break; s1 = (float*)((uchar*)s1 + step1); s2 = (float*)((uchar*)s2 + step2); @@ -707,7 +707,7 @@ static void min8u( const uchar* src1, size_t step1, int i = 0; for(; i < sz.height; i++) { - if (0 > ippicvsMinEvery_8u(s1, s2, d, sz.width)) + if (0 > ippsMinEvery_8u(s1, s2, d, sz.width)) break; s1 += step1; s2 += step2; @@ -738,7 +738,7 @@ static void min16u( const ushort* src1, size_t step1, int i = 0; for(; i < sz.height; i++) { - if (0 > ippicvsMinEvery_16u(s1, s2, d, sz.width)) + if (0 > ippsMinEvery_16u(s1, s2, d, sz.width)) break; s1 = (ushort*)((uchar*)s1 + step1); s2 = (ushort*)((uchar*)s2 + step2); @@ -776,7 +776,7 @@ static void min32f( const float* src1, size_t step1, int i = 0; for(; i < sz.height; i++) { - if (0 > ippicvsMinEvery_32f(s1, s2, d, sz.width)) + if (0 > ippsMinEvery_32f(s1, s2, d, sz.width)) break; s1 = (float*)((uchar*)s1 + step1); s2 = (float*)((uchar*)s2 + step2); @@ -801,7 +801,7 @@ static void absdiff8u( const uchar* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviAbsDiff_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) + if (0 <= ippiAbsDiff_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) return; #endif (vBinOp, IF_SIMD(VAbsDiff)>(src1, step1, src2, step2, dst, step, sz)); @@ -820,7 +820,7 @@ static void absdiff16u( const ushort* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviAbsDiff_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) + if (0 <= ippiAbsDiff_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) return; #endif (vBinOp, IF_SIMD(VAbsDiff)>(src1, step1, src2, step2, dst, step, sz)); @@ -846,7 +846,7 @@ static void absdiff32f( const float* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviAbsDiff_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) + if (0 <= ippiAbsDiff_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) return; #endif (vBinOp32, IF_SIMD(VAbsDiff)>(src1, step1, src2, step2, dst, step, sz)); @@ -866,7 +866,7 @@ static void and8u( const uchar* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviAnd_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) + if (0 <= ippiAnd_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) return; #endif (vBinOp, IF_SIMD(VAnd)>(src1, step1, src2, step2, dst, step, sz)); @@ -878,7 +878,7 @@ static void or8u( const uchar* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviOr_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) + if (0 <= ippiOr_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) return; #endif (vBinOp, IF_SIMD(VOr)>(src1, step1, src2, step2, dst, step, sz)); @@ -890,7 +890,7 @@ static void xor8u( const uchar* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviXor_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) + if (0 <= ippiXor_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)sz)) return; #endif (vBinOp, IF_SIMD(VXor)>(src1, step1, src2, step2, dst, step, sz)); @@ -902,7 +902,7 @@ static void not8u( const uchar* src1, size_t step1, { #if (ARITHM_USE_IPP == 1) fixSteps(sz, sizeof(dst[0]), step1, step2, step); (void *)src2; - if (0 <= ippicviNot_8u_C1R(src1, (int)step1, dst, (int)step, (IppiSize&)sz)) + if (0 <= ippiNot_8u_C1R(src1, (int)step1, dst, (int)step, (IppiSize&)sz)) return; #endif (vBinOp, IF_SIMD(VNot)>(src1, step1, src2, step2, dst, step, sz)); @@ -2386,7 +2386,7 @@ static void cmp8u(const uchar* src1, size_t step1, const uchar* src2, size_t ste if( op >= 0 ) { fixSteps(size, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviCompare_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op)) + if (0 <= ippiCompare_8u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op)) return; } #endif @@ -2469,7 +2469,7 @@ static void cmp16u(const ushort* src1, size_t step1, const ushort* src2, size_t if( op >= 0 ) { fixSteps(size, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviCompare_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op)) + if (0 <= ippiCompare_16u_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op)) return; } #endif @@ -2484,7 +2484,7 @@ static void cmp16s(const short* src1, size_t step1, const short* src2, size_t st if( op > 0 ) { fixSteps(size, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviCompare_16s_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op)) + if (0 <= ippiCompare_16s_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op)) return; } #endif @@ -2590,7 +2590,7 @@ static void cmp32f(const float* src1, size_t step1, const float* src2, size_t st if( op >= 0 ) { fixSteps(size, sizeof(dst[0]), step1, step2, step); - if (0 <= ippicviCompare_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op)) + if (0 <= ippiCompare_32f_C1R(src1, (int)step1, src2, (int)step2, dst, (int)step, (IppiSize&)size, op)) return; } #endif diff --git a/modules/core/src/dxt.cpp b/modules/core/src/dxt.cpp index 73335e3589..4cdb6a16d2 100644 --- a/modules/core/src/dxt.cpp +++ b/modules/core/src/dxt.cpp @@ -466,56 +466,56 @@ template<> struct DFT_VecR4 #endif #ifdef USE_IPP_DFT -static void ippicvsDFTFwd_CToC( const Complex* src, Complex* dst, +static void ippsDFTFwd_CToC( const Complex* src, Complex* dst, const void* spec, uchar* buf) { - ippicvsDFTFwd_CToC_32fc( (const Ipp32fc*)src, (Ipp32fc*)dst, + ippsDFTFwd_CToC_32fc( (const Ipp32fc*)src, (Ipp32fc*)dst, (const IppsDFTSpec_C_32fc*)spec, buf); } -static void ippicvsDFTFwd_CToC( const Complex* src, Complex* dst, +static void ippsDFTFwd_CToC( const Complex* src, Complex* dst, const void* spec, uchar* buf) { - ippicvsDFTFwd_CToC_64fc( (const Ipp64fc*)src, (Ipp64fc*)dst, + ippsDFTFwd_CToC_64fc( (const Ipp64fc*)src, (Ipp64fc*)dst, (const IppsDFTSpec_C_64fc*)spec, buf); } -static void ippicvsDFTInv_CToC( const Complex* src, Complex* dst, +static void ippsDFTInv_CToC( const Complex* src, Complex* dst, const void* spec, uchar* buf) { - ippicvsDFTInv_CToC_32fc( (const Ipp32fc*)src, (Ipp32fc*)dst, + ippsDFTInv_CToC_32fc( (const Ipp32fc*)src, (Ipp32fc*)dst, (const IppsDFTSpec_C_32fc*)spec, buf); } -static void ippicvsDFTInv_CToC( const Complex* src, Complex* dst, +static void ippsDFTInv_CToC( const Complex* src, Complex* dst, const void* spec, uchar* buf) { - ippicvsDFTInv_CToC_64fc( (const Ipp64fc*)src, (Ipp64fc*)dst, + ippsDFTInv_CToC_64fc( (const Ipp64fc*)src, (Ipp64fc*)dst, (const IppsDFTSpec_C_64fc*)spec, buf); } -static void ippicvsDFTFwd_RToPack( const float* src, float* dst, +static void ippsDFTFwd_RToPack( const float* src, float* dst, const void* spec, uchar* buf) { - ippicvsDFTFwd_RToPack_32f( src, dst, (const IppsDFTSpec_R_32f*)spec, buf); + ippsDFTFwd_RToPack_32f( src, dst, (const IppsDFTSpec_R_32f*)spec, buf); } -static void ippicvsDFTFwd_RToPack( const double* src, double* dst, +static void ippsDFTFwd_RToPack( const double* src, double* dst, const void* spec, uchar* buf) { - ippicvsDFTFwd_RToPack_64f( src, dst, (const IppsDFTSpec_R_64f*)spec, buf); + ippsDFTFwd_RToPack_64f( src, dst, (const IppsDFTSpec_R_64f*)spec, buf); } -static void ippicvsDFTInv_PackToR( const float* src, float* dst, +static void ippsDFTInv_PackToR( const float* src, float* dst, const void* spec, uchar* buf) { - ippicvsDFTInv_PackToR_32f( src, dst, (const IppsDFTSpec_R_32f*)spec, buf); + ippsDFTInv_PackToR_32f( src, dst, (const IppsDFTSpec_R_32f*)spec, buf); } -static void ippicvsDFTInv_PackToR( const double* src, double* dst, +static void ippsDFTInv_PackToR( const double* src, double* dst, const void* spec, uchar* buf) { - ippicvsDFTInv_PackToR_64f( src, dst, (const IppsDFTSpec_R_64f*)spec, buf); + ippsDFTInv_PackToR_64f( src, dst, (const IppsDFTSpec_R_64f*)spec, buf); } #endif @@ -551,9 +551,9 @@ DFT( const Complex* src, Complex* dst, int n, if( spec ) { if( !inv ) - ippicvsDFTFwd_CToC( src, dst, spec, (uchar*)buf ); + ippsDFTFwd_CToC( src, dst, spec, (uchar*)buf ); else - ippicvsDFTInv_CToC( src, dst, spec, (uchar*)buf ); + ippsDFTInv_CToC( src, dst, spec, (uchar*)buf ); return; } #endif @@ -981,7 +981,7 @@ RealDFT( const T* src, T* dst, int n, int nf, int* factors, const int* itab, #ifdef USE_IPP_DFT if( spec ) { - ippicvsDFTFwd_RToPack( src, dst, spec, (uchar*)buf ); + ippsDFTFwd_RToPack( src, dst, spec, (uchar*)buf ); if( complex_output ) { dst[-1] = dst[0]; @@ -1113,7 +1113,7 @@ CCSIDFT( const T* src, T* dst, int n, int nf, int* factors, const int* itab, #ifdef USE_IPP_DFT if( spec ) { - ippicvsDFTInv_PackToR( src, dst, spec, (uchar*)buf ); + ippsDFTInv_PackToR( src, dst, spec, (uchar*)buf ); goto finalize; } #endif @@ -1824,26 +1824,26 @@ void cv::dft( InputArray _src0, OutputArray _dst, int flags, int nonzero_rows ) { if( depth == CV_32F ) { - getSizeFunc = ippicvsDFTGetSize_R_32f; - initFunc = (IppDFTInitFunc)ippicvsDFTInit_R_32f; + getSizeFunc = ippsDFTGetSize_R_32f; + initFunc = (IppDFTInitFunc)ippsDFTInit_R_32f; } else { - getSizeFunc = ippicvsDFTGetSize_R_64f; - initFunc = (IppDFTInitFunc)ippicvsDFTInit_R_64f; + getSizeFunc = ippsDFTGetSize_R_64f; + initFunc = (IppDFTInitFunc)ippsDFTInit_R_64f; } } else { if( depth == CV_32F ) { - getSizeFunc = ippicvsDFTGetSize_C_32fc; - initFunc = (IppDFTInitFunc)ippicvsDFTInit_C_32fc; + getSizeFunc = ippsDFTGetSize_C_32fc; + initFunc = (IppDFTInitFunc)ippsDFTInit_C_32fc; } else { - getSizeFunc = ippicvsDFTGetSize_C_64fc; - initFunc = (IppDFTInitFunc)ippicvsDFTInit_C_64fc; + getSizeFunc = ippsDFTGetSize_C_64fc; + initFunc = (IppDFTInitFunc)ippsDFTInit_C_64fc; } } if( getSizeFunc(len, ipp_norm_flag, ippAlgHintNone, &specsize, &initsize, &worksize) >= 0 ) diff --git a/modules/core/src/mathfuncs.cpp b/modules/core/src/mathfuncs.cpp index 95a5f0a461..596c193388 100644 --- a/modules/core/src/mathfuncs.cpp +++ b/modules/core/src/mathfuncs.cpp @@ -1276,14 +1276,14 @@ static void Exp_64fnoipp( const double *_x, double *y, int n ) #ifdef HAVE_IPP static void Exp_32f(const float *x, float *y, int n) { - if (ippStsNoErr == ippicvsExp_32f_A21(x, y, n)) + if (ippStsNoErr == ippsExp_32f_A21(x, y, n)) return; Exp_32fnoipp(x, y, n); } static void Exp_64f(const double *x, double *y, int n) { - if (ippStsNoErr == ippicvsExp_64f_A50(x, y, n)) + if (ippStsNoErr == ippsExp_64f_A50(x, y, n)) return; Exp_64fnoipp(x, y, n); } @@ -1934,14 +1934,14 @@ static void Log_64fnoipp( const double *x, double *y, int n ) #ifdef HAVE_IPP static void Log_32f(const float *x, float *y, int n) { - if (ippStsNoErr == ippicvsLn_32f_A21(x, y, n)) + if (ippStsNoErr == ippsLn_32f_A21(x, y, n)) return; Log_32fnoipp(x, y, n); } static void Log_64f(const double *x, double *y, int n) { - if (ippStsNoErr == ippicvsLn_64f_A50(x, y, n)) + if (ippStsNoErr == ippsLn_64f_A50(x, y, n)) return; Log_64fnoipp(x, y, n); } diff --git a/modules/core/src/matmul.cpp b/modules/core/src/matmul.cpp index 14dd1918fa..b3004707e6 100644 --- a/modules/core/src/matmul.cpp +++ b/modules/core/src/matmul.cpp @@ -2799,7 +2799,7 @@ static double dotProd_8u(const uchar* src1, const uchar* src2, int len) { double r = 0; #if ARITHM_USE_IPP - ippicviDotProd_8u64f_C1R(src1, (int)(len*sizeof(src1[0])), + ippiDotProd_8u64f_C1R(src1, (int)(len*sizeof(src1[0])), src2, (int)(len*sizeof(src2[0])), ippiSize(len, 1), &r); return r; @@ -2862,7 +2862,7 @@ static double dotProd_16u(const ushort* src1, const ushort* src2, int len) { #if (ARITHM_USE_IPP == 1) double r = 0; - if (0 <= ippicviDotProd_16u64f_C1R(src1, (int)(len*sizeof(src1[0])), src2, (int)(len*sizeof(src2[0])), ippiSize(len, 1), &r)) + if (0 <= ippiDotProd_16u64f_C1R(src1, (int)(len*sizeof(src1[0])), src2, (int)(len*sizeof(src2[0])), ippiSize(len, 1), &r)) return r; #endif return dotProd_(src1, src2, len); @@ -2872,7 +2872,7 @@ static double dotProd_16s(const short* src1, const short* src2, int len) { #if (ARITHM_USE_IPP == 1) double r = 0; - if (0 <= ippicviDotProd_16s64f_C1R(src1, (int)(len*sizeof(src1[0])), src2, (int)(len*sizeof(src2[0])), ippiSize(len, 1), &r)) + if (0 <= ippiDotProd_16s64f_C1R(src1, (int)(len*sizeof(src1[0])), src2, (int)(len*sizeof(src2[0])), ippiSize(len, 1), &r)) return r; #endif return dotProd_(src1, src2, len); @@ -2882,7 +2882,7 @@ static double dotProd_32s(const int* src1, const int* src2, int len) { #if (ARITHM_USE_IPP == 1) double r = 0; - if (0 <= ippicviDotProd_32s64f_C1R(src1, (int)(len*sizeof(src1[0])), src2, (int)(len*sizeof(src2[0])), ippiSize(len, 1), &r)) + if (0 <= ippiDotProd_32s64f_C1R(src1, (int)(len*sizeof(src1[0])), src2, (int)(len*sizeof(src2[0])), ippiSize(len, 1), &r)) return r; #endif return dotProd_(src1, src2, len); @@ -2892,7 +2892,7 @@ static double dotProd_32f(const float* src1, const float* src2, int len) { #if (ARITHM_USE_IPP == 1) double r = 0; - if (0 <= ippicvsDotProd_32f64f(src1, src2, len, &r)) + if (0 <= ippsDotProd_32f64f(src1, src2, len, &r)) return r; #endif return dotProd_(src1, src2, len); @@ -2902,7 +2902,7 @@ static double dotProd_64f(const double* src1, const double* src2, int len) { #if (ARITHM_USE_IPP == 1) double r = 0; - if (0 <= ippicvsDotProd_64f(src1, src2, len, &r)) + if (0 <= ippsDotProd_64f(src1, src2, len, &r)) return r; #endif return dotProd_(src1, src2, len); diff --git a/modules/core/src/stat.cpp b/modules/core/src/stat.cpp index 2cf335ca1d..b7e5d34224 100644 --- a/modules/core/src/stat.cpp +++ b/modules/core/src/stat.cpp @@ -543,30 +543,30 @@ cv::Scalar cv::sum( InputArray _src ) Mat src = _src.getMat(); int k, cn = src.channels(), depth = src.depth(); -#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) && 0 +#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) size_t total_size = src.total(); int rows = src.size[0], cols = (int)(total_size/rows); if( src.dims == 2 || (src.isContinuous() && cols > 0 && (size_t)rows*cols == total_size) ) { IppiSize sz = { cols, rows }; int type = src.type(); - typedef IppStatus (CV_STDCALL* ippicviSumFuncHint)(const void*, int, IppiSize, double *, IppHintAlgorithm); - typedef IppStatus (CV_STDCALL* ippicviSumFuncNoHint)(const void*, int, IppiSize, double *); - ippicviSumFuncHint ippFuncHint = - type == CV_32FC1 ? (ippicviSumFuncHint)ippicviSum_32f_C1R : - type == CV_32FC3 ? (ippicviSumFuncHint)ippicviSum_32f_C3R : - type == CV_32FC4 ? (ippicviSumFuncHint)ippicviSum_32f_C4R : + typedef IppStatus (CV_STDCALL* ippiSumFuncHint)(const void*, int, IppiSize, double *, IppHintAlgorithm); + typedef IppStatus (CV_STDCALL* ippiSumFuncNoHint)(const void*, int, IppiSize, double *); + ippiSumFuncHint ippFuncHint = + type == CV_32FC1 ? (ippiSumFuncHint)ippiSum_32f_C1R : + type == CV_32FC3 ? (ippiSumFuncHint)ippiSum_32f_C3R : + type == CV_32FC4 ? (ippiSumFuncHint)ippiSum_32f_C4R : 0; - ippicviSumFuncNoHint ippFuncNoHint = - type == CV_8UC1 ? (ippicviSumFuncNoHint)ippicviSum_8u_C1R : - type == CV_8UC3 ? (ippicviSumFuncNoHint)ippicviSum_8u_C3R : - type == CV_8UC4 ? (ippicviSumFuncNoHint)ippicviSum_8u_C4R : - type == CV_16UC1 ? (ippicviSumFuncNoHint)ippicviSum_16u_C1R : - type == CV_16UC3 ? (ippicviSumFuncNoHint)ippicviSum_16u_C3R : - type == CV_16UC4 ? (ippicviSumFuncNoHint)ippicviSum_16u_C4R : - type == CV_16SC1 ? (ippicviSumFuncNoHint)ippicviSum_16s_C1R : - type == CV_16SC3 ? (ippicviSumFuncNoHint)ippicviSum_16s_C3R : - type == CV_16SC4 ? (ippicviSumFuncNoHint)ippicviSum_16s_C4R : + ippiSumFuncNoHint ippFuncNoHint = + type == CV_8UC1 ? (ippiSumFuncNoHint)ippiSum_8u_C1R : + type == CV_8UC3 ? (ippiSumFuncNoHint)ippiSum_8u_C3R : + type == CV_8UC4 ? (ippiSumFuncNoHint)ippiSum_8u_C4R : + type == CV_16UC1 ? (ippiSumFuncNoHint)ippiSum_16u_C1R : + type == CV_16UC3 ? (ippiSumFuncNoHint)ippiSum_16u_C3R : + type == CV_16UC4 ? (ippiSumFuncNoHint)ippiSum_16u_C4R : + type == CV_16SC1 ? (ippiSumFuncNoHint)ippiSum_16s_C1R : + type == CV_16SC3 ? (ippiSumFuncNoHint)ippiSum_16s_C3R : + type == CV_16SC4 ? (ippiSumFuncNoHint)ippiSum_16s_C4R : 0; CV_Assert(!ippFuncHint || !ippFuncNoHint); if( ippFuncHint || ippFuncNoHint ) @@ -720,11 +720,11 @@ cv::Scalar cv::mean( InputArray _src, InputArray _mask ) int type = src.type(); if( !mask.empty() ) { - typedef IppStatus (CV_STDCALL* ippicviMaskMeanFuncC1)(const void *, int, void *, int, IppiSize, Ipp64f *); - ippicviMaskMeanFuncC1 ippFuncC1 = - type == CV_8UC1 ? (ippicviMaskMeanFuncC1)ippicviMean_8u_C1MR : - type == CV_16UC1 ? (ippicviMaskMeanFuncC1)ippicviMean_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskMeanFuncC1)ippicviMean_32f_C1MR : + typedef IppStatus (CV_STDCALL* ippiMaskMeanFuncC1)(const void *, int, void *, int, IppiSize, Ipp64f *); + ippiMaskMeanFuncC1 ippFuncC1 = + type == CV_8UC1 ? (ippiMaskMeanFuncC1)ippiMean_8u_C1MR : + type == CV_16UC1 ? (ippiMaskMeanFuncC1)ippiMean_16u_C1MR : + type == CV_32FC1 ? (ippiMaskMeanFuncC1)ippiMean_32f_C1MR : 0; if( ippFuncC1 ) { @@ -734,11 +734,11 @@ cv::Scalar cv::mean( InputArray _src, InputArray _mask ) return Scalar(res); } } - typedef IppStatus (CV_STDCALL* ippicviMaskMeanFuncC3)(const void *, int, void *, int, IppiSize, int, Ipp64f *); - ippicviMaskMeanFuncC3 ippFuncC3 = - type == CV_8UC3 ? (ippicviMaskMeanFuncC3)ippicviMean_8u_C3CMR : - type == CV_16UC3 ? (ippicviMaskMeanFuncC3)ippicviMean_16u_C3CMR : - type == CV_32FC3 ? (ippicviMaskMeanFuncC3)ippicviMean_32f_C3CMR : + typedef IppStatus (CV_STDCALL* ippiMaskMeanFuncC3)(const void *, int, void *, int, IppiSize, int, Ipp64f *); + ippiMaskMeanFuncC3 ippFuncC3 = + type == CV_8UC3 ? (ippiMaskMeanFuncC3)ippiMean_8u_C3CMR : + type == CV_16UC3 ? (ippiMaskMeanFuncC3)ippiMean_16u_C3CMR : + type == CV_32FC3 ? (ippiMaskMeanFuncC3)ippiMean_32f_C3CMR : 0; if( ippFuncC3 ) { @@ -753,23 +753,23 @@ cv::Scalar cv::mean( InputArray _src, InputArray _mask ) } else { - typedef IppStatus (CV_STDCALL* ippicviMeanFuncHint)(const void*, int, IppiSize, double *, IppHintAlgorithm); - typedef IppStatus (CV_STDCALL* ippicviMeanFuncNoHint)(const void*, int, IppiSize, double *); - ippicviMeanFuncHint ippFuncHint = - type == CV_32FC1 ? (ippicviMeanFuncHint)ippicviMean_32f_C1R : - type == CV_32FC3 ? (ippicviMeanFuncHint)ippicviMean_32f_C3R : - type == CV_32FC4 ? (ippicviMeanFuncHint)ippicviMean_32f_C4R : + typedef IppStatus (CV_STDCALL* ippiMeanFuncHint)(const void*, int, IppiSize, double *, IppHintAlgorithm); + typedef IppStatus (CV_STDCALL* ippiMeanFuncNoHint)(const void*, int, IppiSize, double *); + ippiMeanFuncHint ippFuncHint = + type == CV_32FC1 ? (ippiMeanFuncHint)ippiMean_32f_C1R : + type == CV_32FC3 ? (ippiMeanFuncHint)ippiMean_32f_C3R : + type == CV_32FC4 ? (ippiMeanFuncHint)ippiMean_32f_C4R : 0; - ippicviMeanFuncNoHint ippFuncNoHint = - type == CV_8UC1 ? (ippicviMeanFuncNoHint)ippicviMean_8u_C1R : - type == CV_8UC3 ? (ippicviMeanFuncNoHint)ippicviMean_8u_C3R : - type == CV_8UC4 ? (ippicviMeanFuncNoHint)ippicviMean_8u_C4R : - type == CV_16UC1 ? (ippicviMeanFuncNoHint)ippicviMean_16u_C1R : - type == CV_16UC3 ? (ippicviMeanFuncNoHint)ippicviMean_16u_C3R : - type == CV_16UC4 ? (ippicviMeanFuncNoHint)ippicviMean_16u_C4R : - type == CV_16SC1 ? (ippicviMeanFuncNoHint)ippicviMean_16s_C1R : - type == CV_16SC3 ? (ippicviMeanFuncNoHint)ippicviMean_16s_C3R : - type == CV_16SC4 ? (ippicviMeanFuncNoHint)ippicviMean_16s_C4R : + ippiMeanFuncNoHint ippFuncNoHint = + type == CV_8UC1 ? (ippiMeanFuncNoHint)ippiMean_8u_C1R : + type == CV_8UC3 ? (ippiMeanFuncNoHint)ippiMean_8u_C3R : + type == CV_8UC4 ? (ippiMeanFuncNoHint)ippiMean_8u_C4R : + type == CV_16UC1 ? (ippiMeanFuncNoHint)ippiMean_16u_C1R : + type == CV_16UC3 ? (ippiMeanFuncNoHint)ippiMean_16u_C3R : + type == CV_16UC4 ? (ippiMeanFuncNoHint)ippiMean_16u_C4R : + type == CV_16SC1 ? (ippiMeanFuncNoHint)ippiMean_16s_C1R : + type == CV_16SC3 ? (ippiMeanFuncNoHint)ippiMean_16s_C3R : + type == CV_16SC4 ? (ippiMeanFuncNoHint)ippiMean_16s_C4R : 0; // Make sure only zero or one version of the function pointer is valid CV_Assert(!ippFuncHint || !ippFuncNoHint); @@ -940,22 +940,22 @@ void cv::meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, Input int type = src.type(); if( !mask.empty() ) { - typedef IppStatus (CV_STDCALL* ippicviMaskMeanStdDevFuncC1)(const void *, int, void *, int, IppiSize, Ipp64f *, Ipp64f *); - ippicviMaskMeanStdDevFuncC1 ippFuncC1 = - type == CV_8UC1 ? (ippicviMaskMeanStdDevFuncC1)ippicviMean_StdDev_8u_C1MR : - type == CV_16UC1 ? (ippicviMaskMeanStdDevFuncC1)ippicviMean_StdDev_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskMeanStdDevFuncC1)ippicviMean_StdDev_32f_C1MR : + typedef IppStatus (CV_STDCALL* ippiMaskMeanStdDevFuncC1)(const void *, int, void *, int, IppiSize, Ipp64f *, Ipp64f *); + ippiMaskMeanStdDevFuncC1 ippFuncC1 = + type == CV_8UC1 ? (ippiMaskMeanStdDevFuncC1)ippiMean_StdDev_8u_C1MR : + type == CV_16UC1 ? (ippiMaskMeanStdDevFuncC1)ippiMean_StdDev_16u_C1MR : + type == CV_32FC1 ? (ippiMaskMeanStdDevFuncC1)ippiMean_StdDev_32f_C1MR : 0; if( ippFuncC1 ) { if( ippFuncC1(src.data, (int)src.step[0], mask.data, (int)mask.step[0], sz, pmean, pstddev) >= 0 ) return; } - typedef IppStatus (CV_STDCALL* ippicviMaskMeanStdDevFuncC3)(const void *, int, void *, int, IppiSize, int, Ipp64f *, Ipp64f *); - ippicviMaskMeanStdDevFuncC3 ippFuncC3 = - type == CV_8UC3 ? (ippicviMaskMeanStdDevFuncC3)ippicviMean_StdDev_8u_C3CMR : - type == CV_16UC3 ? (ippicviMaskMeanStdDevFuncC3)ippicviMean_StdDev_16u_C3CMR : - type == CV_32FC3 ? (ippicviMaskMeanStdDevFuncC3)ippicviMean_StdDev_32f_C3CMR : + typedef IppStatus (CV_STDCALL* ippiMaskMeanStdDevFuncC3)(const void *, int, void *, int, IppiSize, int, Ipp64f *, Ipp64f *); + ippiMaskMeanStdDevFuncC3 ippFuncC3 = + type == CV_8UC3 ? (ippiMaskMeanStdDevFuncC3)ippiMean_StdDev_8u_C3CMR : + type == CV_16UC3 ? (ippiMaskMeanStdDevFuncC3)ippiMean_StdDev_16u_C3CMR : + type == CV_32FC3 ? (ippiMaskMeanStdDevFuncC3)ippiMean_StdDev_32f_C3CMR : 0; if( ippFuncC3 ) { @@ -967,12 +967,12 @@ void cv::meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, Input } else { - typedef IppStatus (CV_STDCALL* ippicviMeanStdDevFuncC1)(const void *, int, IppiSize, Ipp64f *, Ipp64f *); - ippicviMeanStdDevFuncC1 ippFuncC1 = - type == CV_8UC1 ? (ippicviMeanStdDevFuncC1)ippicviMean_StdDev_8u_C1R : - type == CV_16UC1 ? (ippicviMeanStdDevFuncC1)ippicviMean_StdDev_16u_C1R : + typedef IppStatus (CV_STDCALL* ippiMeanStdDevFuncC1)(const void *, int, IppiSize, Ipp64f *, Ipp64f *); + ippiMeanStdDevFuncC1 ippFuncC1 = + type == CV_8UC1 ? (ippiMeanStdDevFuncC1)ippiMean_StdDev_8u_C1R : + type == CV_16UC1 ? (ippiMeanStdDevFuncC1)ippiMean_StdDev_16u_C1R : #if (IPP_VERSION_MAJOR >= 8) && (IPP_VERSION_MINOR >= 1) - type == CV_32FC1 ? (ippicviMeanStdDevFuncC1)ippicviMean_StdDev_32f_C1R ://Aug 2013: bug in IPP 7.1, 8.0 + type == CV_32FC1 ? (ippiMeanStdDevFuncC1)ippiMean_StdDev_32f_C1R ://Aug 2013: bug in IPP 7.1, 8.0 #endif 0; if( ippFuncC1 ) @@ -980,11 +980,11 @@ void cv::meanStdDev( InputArray _src, OutputArray _mean, OutputArray _sdv, Input if( ippFuncC1(src.data, (int)src.step[0], sz, pmean, pstddev) >= 0 ) return; } - typedef IppStatus (CV_STDCALL* ippicviMeanStdDevFuncC3)(const void *, int, IppiSize, int, Ipp64f *, Ipp64f *); - ippicviMeanStdDevFuncC3 ippFuncC3 = - type == CV_8UC3 ? (ippicviMeanStdDevFuncC3)ippicviMean_StdDev_8u_C3CR : - type == CV_16UC3 ? (ippicviMeanStdDevFuncC3)ippicviMean_StdDev_16u_C3CR : - type == CV_32FC3 ? (ippicviMeanStdDevFuncC3)ippicviMean_StdDev_32f_C3CR : + typedef IppStatus (CV_STDCALL* ippiMeanStdDevFuncC3)(const void *, int, IppiSize, int, Ipp64f *, Ipp64f *); + ippiMeanStdDevFuncC3 ippFuncC3 = + type == CV_8UC3 ? (ippiMeanStdDevFuncC3)ippiMean_StdDev_8u_C3CR : + type == CV_16UC3 ? (ippiMeanStdDevFuncC3)ippiMean_StdDev_16u_C3CR : + type == CV_32FC3 ? (ippiMeanStdDevFuncC3)ippiMean_StdDev_32f_C3CR : 0; if( ippFuncC3 ) { @@ -1347,11 +1347,11 @@ void cv::minMaxIdx(InputArray _src, double* minVal, int type = src.type(); if( !mask.empty() ) { - typedef IppStatus (CV_STDCALL* ippicviMaskMinMaxIndxFuncC1)(const void *, int, const void *, int, IppiSize, Ipp32f *, Ipp32f *, IppiPoint *, IppiPoint *); - ippicviMaskMinMaxIndxFuncC1 ippFuncC1 = - type == CV_8UC1 ? (ippicviMaskMinMaxIndxFuncC1)ippicviMinMaxIndx_8u_C1MR : - type == CV_16UC1 ? (ippicviMaskMinMaxIndxFuncC1)ippicviMinMaxIndx_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskMinMaxIndxFuncC1)ippicviMinMaxIndx_32f_C1MR : + typedef IppStatus (CV_STDCALL* ippiMaskMinMaxIndxFuncC1)(const void *, int, const void *, int, IppiSize, Ipp32f *, Ipp32f *, IppiPoint *, IppiPoint *); + ippiMaskMinMaxIndxFuncC1 ippFuncC1 = + type == CV_8UC1 ? (ippiMaskMinMaxIndxFuncC1)ippiMinMaxIndx_8u_C1MR : + type == CV_16UC1 ? (ippiMaskMinMaxIndxFuncC1)ippiMinMaxIndx_16u_C1MR : + type == CV_32FC1 ? (ippiMaskMinMaxIndxFuncC1)ippiMinMaxIndx_32f_C1MR : 0; if( ippFuncC1 ) { @@ -1381,11 +1381,11 @@ void cv::minMaxIdx(InputArray _src, double* minVal, } else { - typedef IppStatus (CV_STDCALL* ippicviMinMaxIndxFuncC1)(const void *, int, IppiSize, Ipp32f *, Ipp32f *, IppiPoint *, IppiPoint *); - ippicviMinMaxIndxFuncC1 ippFuncC1 = - type == CV_8UC1 ? (ippicviMinMaxIndxFuncC1)ippicviMinMaxIndx_8u_C1R : - type == CV_16UC1 ? (ippicviMinMaxIndxFuncC1)ippicviMinMaxIndx_16u_C1R : - type == CV_32FC1 ? (ippicviMinMaxIndxFuncC1)ippicviMinMaxIndx_32f_C1R : + typedef IppStatus (CV_STDCALL* ippiMinMaxIndxFuncC1)(const void *, int, IppiSize, Ipp32f *, Ipp32f *, IppiPoint *, IppiPoint *); + ippiMinMaxIndxFuncC1 ippFuncC1 = + type == CV_8UC1 ? (ippiMinMaxIndxFuncC1)ippiMinMaxIndx_8u_C1R : + type == CV_16UC1 ? (ippiMinMaxIndxFuncC1)ippiMinMaxIndx_16u_C1R : + type == CV_32FC1 ? (ippiMinMaxIndxFuncC1)ippiMinMaxIndx_32f_C1R : 0; if( ippFuncC1 ) { @@ -2024,25 +2024,25 @@ double cv::norm( InputArray _src, int normType, InputArray _mask ) int type = src.type(); if( !mask.empty() ) { - typedef IppStatus (CV_STDCALL* ippicviMaskNormFuncC1)(const void *, int, const void *, int, IppiSize, Ipp64f *); - ippicviMaskNormFuncC1 ippFuncC1 = + typedef IppStatus (CV_STDCALL* ippiMaskNormFuncC1)(const void *, int, const void *, int, IppiSize, Ipp64f *); + ippiMaskNormFuncC1 ippFuncC1 = normType == NORM_INF ? - (type == CV_8UC1 ? (ippicviMaskNormFuncC1)ippicviNorm_Inf_8u_C1MR : - type == CV_8SC1 ? (ippicviMaskNormFuncC1)ippicviNorm_Inf_8s_C1MR : - type == CV_16UC1 ? (ippicviMaskNormFuncC1)ippicviNorm_Inf_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskNormFuncC1)ippicviNorm_Inf_32f_C1MR : + (type == CV_8UC1 ? (ippiMaskNormFuncC1)ippiNorm_Inf_8u_C1MR : + type == CV_8SC1 ? (ippiMaskNormFuncC1)ippiNorm_Inf_8s_C1MR : + type == CV_16UC1 ? (ippiMaskNormFuncC1)ippiNorm_Inf_16u_C1MR : + type == CV_32FC1 ? (ippiMaskNormFuncC1)ippiNorm_Inf_32f_C1MR : 0) : normType == NORM_L1 ? - (type == CV_8UC1 ? (ippicviMaskNormFuncC1)ippicviNorm_L1_8u_C1MR : - type == CV_8SC1 ? (ippicviMaskNormFuncC1)ippicviNorm_L1_8s_C1MR : - type == CV_16UC1 ? (ippicviMaskNormFuncC1)ippicviNorm_L1_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskNormFuncC1)ippicviNorm_L1_32f_C1MR : + (type == CV_8UC1 ? (ippiMaskNormFuncC1)ippiNorm_L1_8u_C1MR : + type == CV_8SC1 ? (ippiMaskNormFuncC1)ippiNorm_L1_8s_C1MR : + type == CV_16UC1 ? (ippiMaskNormFuncC1)ippiNorm_L1_16u_C1MR : + type == CV_32FC1 ? (ippiMaskNormFuncC1)ippiNorm_L1_32f_C1MR : 0) : normType == NORM_L2 || normType == NORM_L2SQR ? - (type == CV_8UC1 ? (ippicviMaskNormFuncC1)ippicviNorm_L2_8u_C1MR : - type == CV_8SC1 ? (ippicviMaskNormFuncC1)ippicviNorm_L2_8s_C1MR : - type == CV_16UC1 ? (ippicviMaskNormFuncC1)ippicviNorm_L2_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskNormFuncC1)ippicviNorm_L2_32f_C1MR : + (type == CV_8UC1 ? (ippiMaskNormFuncC1)ippiNorm_L2_8u_C1MR : + type == CV_8SC1 ? (ippiMaskNormFuncC1)ippiNorm_L2_8s_C1MR : + type == CV_16UC1 ? (ippiMaskNormFuncC1)ippiNorm_L2_16u_C1MR : + type == CV_32FC1 ? (ippiMaskNormFuncC1)ippiNorm_L2_32f_C1MR : 0) : 0; if( ippFuncC1 ) { @@ -2052,25 +2052,25 @@ double cv::norm( InputArray _src, int normType, InputArray _mask ) return normType == NORM_L2SQR ? (double)(norm * norm) : (double)norm; } } - typedef IppStatus (CV_STDCALL* ippicviMaskNormFuncC3)(const void *, int, const void *, int, IppiSize, int, Ipp64f *); - ippicviMaskNormFuncC3 ippFuncC3 = + typedef IppStatus (CV_STDCALL* ippiMaskNormFuncC3)(const void *, int, const void *, int, IppiSize, int, Ipp64f *); + ippiMaskNormFuncC3 ippFuncC3 = normType == NORM_INF ? - (type == CV_8UC3 ? (ippicviMaskNormFuncC3)ippicviNorm_Inf_8u_C3CMR : - type == CV_8SC3 ? (ippicviMaskNormFuncC3)ippicviNorm_Inf_8s_C3CMR : - type == CV_16UC3 ? (ippicviMaskNormFuncC3)ippicviNorm_Inf_16u_C3CMR : - type == CV_32FC3 ? (ippicviMaskNormFuncC3)ippicviNorm_Inf_32f_C3CMR : + (type == CV_8UC3 ? (ippiMaskNormFuncC3)ippiNorm_Inf_8u_C3CMR : + type == CV_8SC3 ? (ippiMaskNormFuncC3)ippiNorm_Inf_8s_C3CMR : + type == CV_16UC3 ? (ippiMaskNormFuncC3)ippiNorm_Inf_16u_C3CMR : + type == CV_32FC3 ? (ippiMaskNormFuncC3)ippiNorm_Inf_32f_C3CMR : 0) : normType == NORM_L1 ? - (type == CV_8UC3 ? (ippicviMaskNormFuncC3)ippicviNorm_L1_8u_C3CMR : - type == CV_8SC3 ? (ippicviMaskNormFuncC3)ippicviNorm_L1_8s_C3CMR : - type == CV_16UC3 ? (ippicviMaskNormFuncC3)ippicviNorm_L1_16u_C3CMR : - type == CV_32FC3 ? (ippicviMaskNormFuncC3)ippicviNorm_L1_32f_C3CMR : + (type == CV_8UC3 ? (ippiMaskNormFuncC3)ippiNorm_L1_8u_C3CMR : + type == CV_8SC3 ? (ippiMaskNormFuncC3)ippiNorm_L1_8s_C3CMR : + type == CV_16UC3 ? (ippiMaskNormFuncC3)ippiNorm_L1_16u_C3CMR : + type == CV_32FC3 ? (ippiMaskNormFuncC3)ippiNorm_L1_32f_C3CMR : 0) : normType == NORM_L2 || normType == NORM_L2SQR ? - (type == CV_8UC3 ? (ippicviMaskNormFuncC3)ippicviNorm_L2_8u_C3CMR : - type == CV_8SC3 ? (ippicviMaskNormFuncC3)ippicviNorm_L2_8s_C3CMR : - type == CV_16UC3 ? (ippicviMaskNormFuncC3)ippicviNorm_L2_16u_C3CMR : - type == CV_32FC3 ? (ippicviMaskNormFuncC3)ippicviNorm_L2_32f_C3CMR : + (type == CV_8UC3 ? (ippiMaskNormFuncC3)ippiNorm_L2_8u_C3CMR : + type == CV_8SC3 ? (ippiMaskNormFuncC3)ippiNorm_L2_8s_C3CMR : + type == CV_16UC3 ? (ippiMaskNormFuncC3)ippiNorm_L2_16u_C3CMR : + type == CV_32FC3 ? (ippiMaskNormFuncC3)ippiNorm_L2_32f_C3CMR : 0) : 0; if( ippFuncC3 ) { @@ -2090,57 +2090,57 @@ double cv::norm( InputArray _src, int normType, InputArray _mask ) } else { - typedef IppStatus (CV_STDCALL* ippicviNormFuncHint)(const void *, int, IppiSize, Ipp64f *, IppHintAlgorithm hint); - typedef IppStatus (CV_STDCALL* ippicviNormFuncNoHint)(const void *, int, IppiSize, Ipp64f *); - ippicviNormFuncHint ippFuncHint = + typedef IppStatus (CV_STDCALL* ippiNormFuncHint)(const void *, int, IppiSize, Ipp64f *, IppHintAlgorithm hint); + typedef IppStatus (CV_STDCALL* ippiNormFuncNoHint)(const void *, int, IppiSize, Ipp64f *); + ippiNormFuncHint ippFuncHint = normType == NORM_L1 ? - (type == CV_32FC1 ? (ippicviNormFuncHint)ippicviNorm_L1_32f_C1R : - type == CV_32FC3 ? (ippicviNormFuncHint)ippicviNorm_L1_32f_C3R : - type == CV_32FC4 ? (ippicviNormFuncHint)ippicviNorm_L1_32f_C4R : + (type == CV_32FC1 ? (ippiNormFuncHint)ippiNorm_L1_32f_C1R : + type == CV_32FC3 ? (ippiNormFuncHint)ippiNorm_L1_32f_C3R : + type == CV_32FC4 ? (ippiNormFuncHint)ippiNorm_L1_32f_C4R : 0) : normType == NORM_L2 || normType == NORM_L2SQR ? - (type == CV_32FC1 ? (ippicviNormFuncHint)ippicviNorm_L2_32f_C1R : - type == CV_32FC3 ? (ippicviNormFuncHint)ippicviNorm_L2_32f_C3R : - type == CV_32FC4 ? (ippicviNormFuncHint)ippicviNorm_L2_32f_C4R : + (type == CV_32FC1 ? (ippiNormFuncHint)ippiNorm_L2_32f_C1R : + type == CV_32FC3 ? (ippiNormFuncHint)ippiNorm_L2_32f_C3R : + type == CV_32FC4 ? (ippiNormFuncHint)ippiNorm_L2_32f_C4R : 0) : 0; - ippicviNormFuncNoHint ippFuncNoHint = + ippiNormFuncNoHint ippFuncNoHint = normType == NORM_INF ? - (type == CV_8UC1 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_8u_C1R : - type == CV_8UC3 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_8u_C3R : - type == CV_8UC4 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_8u_C4R : - type == CV_16UC1 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_16u_C1R : - type == CV_16UC3 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_16u_C3R : - type == CV_16UC4 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_16u_C4R : - type == CV_16SC1 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_16s_C1R : + (type == CV_8UC1 ? (ippiNormFuncNoHint)ippiNorm_Inf_8u_C1R : + type == CV_8UC3 ? (ippiNormFuncNoHint)ippiNorm_Inf_8u_C3R : + type == CV_8UC4 ? (ippiNormFuncNoHint)ippiNorm_Inf_8u_C4R : + type == CV_16UC1 ? (ippiNormFuncNoHint)ippiNorm_Inf_16u_C1R : + type == CV_16UC3 ? (ippiNormFuncNoHint)ippiNorm_Inf_16u_C3R : + type == CV_16UC4 ? (ippiNormFuncNoHint)ippiNorm_Inf_16u_C4R : + type == CV_16SC1 ? (ippiNormFuncNoHint)ippiNorm_Inf_16s_C1R : #if (IPP_VERSION_MAJOR >= 8) && (IPP_VERSION_MINOR >= 1) - type == CV_16SC3 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_16s_C3R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768 - type == CV_16SC4 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_16s_C4R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768 + type == CV_16SC3 ? (ippiNormFuncNoHint)ippiNorm_Inf_16s_C3R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768 + type == CV_16SC4 ? (ippiNormFuncNoHint)ippiNorm_Inf_16s_C4R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768 #endif - type == CV_32FC1 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_32f_C1R : - type == CV_32FC3 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_32f_C3R : - type == CV_32FC4 ? (ippicviNormFuncNoHint)ippicviNorm_Inf_32f_C4R : + type == CV_32FC1 ? (ippiNormFuncNoHint)ippiNorm_Inf_32f_C1R : + type == CV_32FC3 ? (ippiNormFuncNoHint)ippiNorm_Inf_32f_C3R : + type == CV_32FC4 ? (ippiNormFuncNoHint)ippiNorm_Inf_32f_C4R : 0) : normType == NORM_L1 ? - (type == CV_8UC1 ? (ippicviNormFuncNoHint)ippicviNorm_L1_8u_C1R : - type == CV_8UC3 ? (ippicviNormFuncNoHint)ippicviNorm_L1_8u_C3R : - type == CV_8UC4 ? (ippicviNormFuncNoHint)ippicviNorm_L1_8u_C4R : - type == CV_16UC1 ? (ippicviNormFuncNoHint)ippicviNorm_L1_16u_C1R : - type == CV_16UC3 ? (ippicviNormFuncNoHint)ippicviNorm_L1_16u_C3R : - type == CV_16UC4 ? (ippicviNormFuncNoHint)ippicviNorm_L1_16u_C4R : - type == CV_16SC1 ? (ippicviNormFuncNoHint)ippicviNorm_L1_16s_C1R : - type == CV_16SC3 ? (ippicviNormFuncNoHint)ippicviNorm_L1_16s_C3R : - type == CV_16SC4 ? (ippicviNormFuncNoHint)ippicviNorm_L1_16s_C4R : + (type == CV_8UC1 ? (ippiNormFuncNoHint)ippiNorm_L1_8u_C1R : + type == CV_8UC3 ? (ippiNormFuncNoHint)ippiNorm_L1_8u_C3R : + type == CV_8UC4 ? (ippiNormFuncNoHint)ippiNorm_L1_8u_C4R : + type == CV_16UC1 ? (ippiNormFuncNoHint)ippiNorm_L1_16u_C1R : + type == CV_16UC3 ? (ippiNormFuncNoHint)ippiNorm_L1_16u_C3R : + type == CV_16UC4 ? (ippiNormFuncNoHint)ippiNorm_L1_16u_C4R : + type == CV_16SC1 ? (ippiNormFuncNoHint)ippiNorm_L1_16s_C1R : + type == CV_16SC3 ? (ippiNormFuncNoHint)ippiNorm_L1_16s_C3R : + type == CV_16SC4 ? (ippiNormFuncNoHint)ippiNorm_L1_16s_C4R : 0) : normType == NORM_L2 || normType == NORM_L2SQR ? - (type == CV_8UC1 ? (ippicviNormFuncNoHint)ippicviNorm_L2_8u_C1R : - type == CV_8UC3 ? (ippicviNormFuncNoHint)ippicviNorm_L2_8u_C3R : - type == CV_8UC4 ? (ippicviNormFuncNoHint)ippicviNorm_L2_8u_C4R : - type == CV_16UC1 ? (ippicviNormFuncNoHint)ippicviNorm_L2_16u_C1R : - type == CV_16UC3 ? (ippicviNormFuncNoHint)ippicviNorm_L2_16u_C3R : - type == CV_16UC4 ? (ippicviNormFuncNoHint)ippicviNorm_L2_16u_C4R : - type == CV_16SC1 ? (ippicviNormFuncNoHint)ippicviNorm_L2_16s_C1R : - type == CV_16SC3 ? (ippicviNormFuncNoHint)ippicviNorm_L2_16s_C3R : - type == CV_16SC4 ? (ippicviNormFuncNoHint)ippicviNorm_L2_16s_C4R : + (type == CV_8UC1 ? (ippiNormFuncNoHint)ippiNorm_L2_8u_C1R : + type == CV_8UC3 ? (ippiNormFuncNoHint)ippiNorm_L2_8u_C3R : + type == CV_8UC4 ? (ippiNormFuncNoHint)ippiNorm_L2_8u_C4R : + type == CV_16UC1 ? (ippiNormFuncNoHint)ippiNorm_L2_16u_C1R : + type == CV_16UC3 ? (ippiNormFuncNoHint)ippiNorm_L2_16u_C3R : + type == CV_16UC4 ? (ippiNormFuncNoHint)ippiNorm_L2_16u_C4R : + type == CV_16SC1 ? (ippiNormFuncNoHint)ippiNorm_L2_16s_C1R : + type == CV_16SC3 ? (ippiNormFuncNoHint)ippiNorm_L2_16s_C3R : + type == CV_16SC4 ? (ippiNormFuncNoHint)ippiNorm_L2_16s_C4R : 0) : 0; // Make sure only zero or one version of the function pointer is valid CV_Assert(!ippFuncHint || !ippFuncNoHint); @@ -2377,25 +2377,25 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m int type = src1.type(); if( !mask.empty() ) { - typedef IppStatus (CV_STDCALL* ippicviMaskNormRelFuncC1)(const void *, int, const void *, int, const void *, int, IppiSize, Ipp64f *); - ippicviMaskNormRelFuncC1 ippFuncC1 = + typedef IppStatus (CV_STDCALL* ippiMaskNormRelFuncC1)(const void *, int, const void *, int, const void *, int, IppiSize, Ipp64f *); + ippiMaskNormRelFuncC1 ippFuncC1 = normType == NORM_INF ? - (type == CV_8UC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_Inf_8u_C1MR : - type == CV_8SC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_Inf_8s_C1MR : - type == CV_16UC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_Inf_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_Inf_32f_C1MR : + (type == CV_8UC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_Inf_8u_C1MR : + type == CV_8SC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_Inf_8s_C1MR : + type == CV_16UC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_Inf_16u_C1MR : + type == CV_32FC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_Inf_32f_C1MR : 0) : normType == NORM_L1 ? - (type == CV_8UC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_L1_8u_C1MR : - type == CV_8SC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_L1_8s_C1MR : - type == CV_16UC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_L1_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_L1_32f_C1MR : + (type == CV_8UC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L1_8u_C1MR : + type == CV_8SC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L1_8s_C1MR : + type == CV_16UC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L1_16u_C1MR : + type == CV_32FC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L1_32f_C1MR : 0) : normType == NORM_L2 || normType == NORM_L2SQR ? - (type == CV_8UC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_L2_8u_C1MR : - type == CV_8SC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_L2_8s_C1MR : - type == CV_16UC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_L2_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskNormRelFuncC1)ippicviNormRel_L2_32f_C1MR : + (type == CV_8UC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L2_8u_C1MR : + type == CV_8SC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L2_8s_C1MR : + type == CV_16UC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L2_16u_C1MR : + type == CV_32FC1 ? (ippiMaskNormRelFuncC1)ippiNormRel_L2_32f_C1MR : 0) : 0; if( ippFuncC1 ) { @@ -2406,25 +2406,25 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m } else { - typedef IppStatus (CV_STDCALL* ippicviNormRelFunc)(const void *, int, const void *, int, IppiSize, Ipp64f *, IppHintAlgorithm hint); - ippicviNormRelFunc ippFunc = + typedef IppStatus (CV_STDCALL* ippiNormRelFunc)(const void *, int, const void *, int, IppiSize, Ipp64f *, IppHintAlgorithm hint); + ippiNormRelFunc ippFunc = normType == NORM_INF ? - (type == CV_8UC1 ? (ippicviNormRelFunc)ippicviNormRel_Inf_8u_C1R : - type == CV_16UC1 ? (ippicviNormRelFunc)ippicviNormRel_Inf_16u_C1R : - type == CV_16SC1 ? (ippicviNormRelFunc)ippicviNormRel_Inf_16s_C1R : - type == CV_32FC1 ? (ippicviNormRelFunc)ippicviNormRel_Inf_32f_C1R : + (type == CV_8UC1 ? (ippiNormRelFunc)ippiNormRel_Inf_8u_C1R : + type == CV_16UC1 ? (ippiNormRelFunc)ippiNormRel_Inf_16u_C1R : + type == CV_16SC1 ? (ippiNormRelFunc)ippiNormRel_Inf_16s_C1R : + type == CV_32FC1 ? (ippiNormRelFunc)ippiNormRel_Inf_32f_C1R : 0) : normType == NORM_L1 ? - (type == CV_8UC1 ? (ippicviNormRelFunc)ippicviNormRel_L1_8u_C1R : - type == CV_16UC1 ? (ippicviNormRelFunc)ippicviNormRel_L1_16u_C1R : - type == CV_16SC1 ? (ippicviNormRelFunc)ippicviNormRel_L1_16s_C1R : - type == CV_32FC1 ? (ippicviNormRelFunc)ippicviNormRel_L1_32f_C1R : + (type == CV_8UC1 ? (ippiNormRelFunc)ippiNormRel_L1_8u_C1R : + type == CV_16UC1 ? (ippiNormRelFunc)ippiNormRel_L1_16u_C1R : + type == CV_16SC1 ? (ippiNormRelFunc)ippiNormRel_L1_16s_C1R : + type == CV_32FC1 ? (ippiNormRelFunc)ippiNormRel_L1_32f_C1R : 0) : normType == NORM_L2 || normType == NORM_L2SQR ? - (type == CV_8UC1 ? (ippicviNormRelFunc)ippicviNormRel_L2_8u_C1R : - type == CV_16UC1 ? (ippicviNormRelFunc)ippicviNormRel_L2_16u_C1R : - type == CV_16SC1 ? (ippicviNormRelFunc)ippicviNormRel_L2_16s_C1R : - type == CV_32FC1 ? (ippicviNormRelFunc)ippicviNormRel_L2_32f_C1R : + (type == CV_8UC1 ? (ippiNormRelFunc)ippiNormRel_L2_8u_C1R : + type == CV_16UC1 ? (ippiNormRelFunc)ippiNormRel_L2_16u_C1R : + type == CV_16SC1 ? (ippiNormRelFunc)ippiNormRel_L2_16s_C1R : + type == CV_32FC1 ? (ippiNormRelFunc)ippiNormRel_L2_32f_C1R : 0) : 0; if( ippFunc ) { @@ -2458,25 +2458,25 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m int type = src1.type(); if( !mask.empty() ) { - typedef IppStatus (CV_STDCALL* ippicviMaskNormDiffFuncC1)(const void *, int, const void *, int, const void *, int, IppiSize, Ipp64f *); - ippicviMaskNormDiffFuncC1 ippFuncC1 = + typedef IppStatus (CV_STDCALL* ippiMaskNormDiffFuncC1)(const void *, int, const void *, int, const void *, int, IppiSize, Ipp64f *); + ippiMaskNormDiffFuncC1 ippFuncC1 = normType == NORM_INF ? - (type == CV_8UC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_Inf_8u_C1MR : - type == CV_8SC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_Inf_8s_C1MR : - type == CV_16UC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_Inf_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_Inf_32f_C1MR : + (type == CV_8UC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_Inf_8u_C1MR : + type == CV_8SC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_Inf_8s_C1MR : + type == CV_16UC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_Inf_16u_C1MR : + type == CV_32FC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_Inf_32f_C1MR : 0) : normType == NORM_L1 ? - (type == CV_8UC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_L1_8u_C1MR : - type == CV_8SC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_L1_8s_C1MR : - type == CV_16UC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_L1_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_L1_32f_C1MR : + (type == CV_8UC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L1_8u_C1MR : + type == CV_8SC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L1_8s_C1MR : + type == CV_16UC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L1_16u_C1MR : + type == CV_32FC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L1_32f_C1MR : 0) : normType == NORM_L2 || normType == NORM_L2SQR ? - (type == CV_8UC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_L2_8u_C1MR : - type == CV_8SC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_L2_8s_C1MR : - type == CV_16UC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_L2_16u_C1MR : - type == CV_32FC1 ? (ippicviMaskNormDiffFuncC1)ippicviNormDiff_L2_32f_C1MR : + (type == CV_8UC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L2_8u_C1MR : + type == CV_8SC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L2_8s_C1MR : + type == CV_16UC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L2_16u_C1MR : + type == CV_32FC1 ? (ippiMaskNormDiffFuncC1)ippiNormDiff_L2_32f_C1MR : 0) : 0; if( ippFuncC1 ) { @@ -2484,25 +2484,25 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m if( ippFuncC1(src1.data, (int)src1.step[0], src2.data, (int)src2.step[0], mask.data, (int)mask.step[0], sz, &norm) >= 0 ) return normType == NORM_L2SQR ? (double)(norm * norm) : (double)norm; } - typedef IppStatus (CV_STDCALL* ippicviMaskNormDiffFuncC3)(const void *, int, const void *, int, const void *, int, IppiSize, int, Ipp64f *); - ippicviMaskNormDiffFuncC3 ippFuncC3 = + typedef IppStatus (CV_STDCALL* ippiMaskNormDiffFuncC3)(const void *, int, const void *, int, const void *, int, IppiSize, int, Ipp64f *); + ippiMaskNormDiffFuncC3 ippFuncC3 = normType == NORM_INF ? - (type == CV_8UC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_Inf_8u_C3CMR : - type == CV_8SC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_Inf_8s_C3CMR : - type == CV_16UC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_Inf_16u_C3CMR : - type == CV_32FC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_Inf_32f_C3CMR : + (type == CV_8UC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_Inf_8u_C3CMR : + type == CV_8SC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_Inf_8s_C3CMR : + type == CV_16UC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_Inf_16u_C3CMR : + type == CV_32FC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_Inf_32f_C3CMR : 0) : normType == NORM_L1 ? - (type == CV_8UC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_L1_8u_C3CMR : - type == CV_8SC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_L1_8s_C3CMR : - type == CV_16UC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_L1_16u_C3CMR : - type == CV_32FC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_L1_32f_C3CMR : + (type == CV_8UC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_L1_8u_C3CMR : + type == CV_8SC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_L1_8s_C3CMR : + type == CV_16UC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_L1_16u_C3CMR : + type == CV_32FC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_L1_32f_C3CMR : 0) : normType == NORM_L2 || normType == NORM_L2SQR ? - (type == CV_8UC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_L2_8u_C3CMR : - type == CV_8SC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_L2_8s_C3CMR : - type == CV_16UC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_L2_16u_C3CMR : - type == CV_32FC3 ? (ippicviMaskNormDiffFuncC3)ippicviNormDiff_L2_32f_C3CMR : + (type == CV_8UC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_L2_8u_C3CMR : + type == CV_8SC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_L2_8s_C3CMR : + type == CV_16UC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_L2_16u_C3CMR : + type == CV_32FC3 ? (ippiMaskNormDiffFuncC3)ippiNormDiff_L2_32f_C3CMR : 0) : 0; if( ippFuncC3 ) { @@ -2522,57 +2522,57 @@ double cv::norm( InputArray _src1, InputArray _src2, int normType, InputArray _m } else { - typedef IppStatus (CV_STDCALL* ippicviNormDiffFuncHint)(const void *, int, const void *, int, IppiSize, Ipp64f *, IppHintAlgorithm hint); - typedef IppStatus (CV_STDCALL* ippicviNormDiffFuncNoHint)(const void *, int, const void *, int, IppiSize, Ipp64f *); - ippicviNormDiffFuncHint ippFuncHint = + typedef IppStatus (CV_STDCALL* ippiNormDiffFuncHint)(const void *, int, const void *, int, IppiSize, Ipp64f *, IppHintAlgorithm hint); + typedef IppStatus (CV_STDCALL* ippiNormDiffFuncNoHint)(const void *, int, const void *, int, IppiSize, Ipp64f *); + ippiNormDiffFuncHint ippFuncHint = normType == NORM_L1 ? - (type == CV_32FC1 ? (ippicviNormDiffFuncHint)ippicviNormDiff_L1_32f_C1R : - type == CV_32FC3 ? (ippicviNormDiffFuncHint)ippicviNormDiff_L1_32f_C3R : - type == CV_32FC4 ? (ippicviNormDiffFuncHint)ippicviNormDiff_L1_32f_C4R : + (type == CV_32FC1 ? (ippiNormDiffFuncHint)ippiNormDiff_L1_32f_C1R : + type == CV_32FC3 ? (ippiNormDiffFuncHint)ippiNormDiff_L1_32f_C3R : + type == CV_32FC4 ? (ippiNormDiffFuncHint)ippiNormDiff_L1_32f_C4R : 0) : normType == NORM_L2 || normType == NORM_L2SQR ? - (type == CV_32FC1 ? (ippicviNormDiffFuncHint)ippicviNormDiff_L2_32f_C1R : - type == CV_32FC3 ? (ippicviNormDiffFuncHint)ippicviNormDiff_L2_32f_C3R : - type == CV_32FC4 ? (ippicviNormDiffFuncHint)ippicviNormDiff_L2_32f_C4R : + (type == CV_32FC1 ? (ippiNormDiffFuncHint)ippiNormDiff_L2_32f_C1R : + type == CV_32FC3 ? (ippiNormDiffFuncHint)ippiNormDiff_L2_32f_C3R : + type == CV_32FC4 ? (ippiNormDiffFuncHint)ippiNormDiff_L2_32f_C4R : 0) : 0; - ippicviNormDiffFuncNoHint ippFuncNoHint = + ippiNormDiffFuncNoHint ippFuncNoHint = normType == NORM_INF ? - (type == CV_8UC1 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_8u_C1R : - type == CV_8UC3 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_8u_C3R : - type == CV_8UC4 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_8u_C4R : - type == CV_16UC1 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_16u_C1R : - type == CV_16UC3 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_16u_C3R : - type == CV_16UC4 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_16u_C4R : - type == CV_16SC1 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_16s_C1R : + (type == CV_8UC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_8u_C1R : + type == CV_8UC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_8u_C3R : + type == CV_8UC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_8u_C4R : + type == CV_16UC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16u_C1R : + type == CV_16UC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16u_C3R : + type == CV_16UC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16u_C4R : + type == CV_16SC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16s_C1R : #if (IPP_VERSION_MAJOR >= 8) && (IPP_VERSION_MINOR >= 1) - type == CV_16SC3 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_16s_C3R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768 - type == CV_16SC4 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_16s_C4R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768 + type == CV_16SC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16s_C3R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768 + type == CV_16SC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_16s_C4R : //Aug 2013: problem in IPP 7.1, 8.0 : -32768 #endif - type == CV_32FC1 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_32f_C1R : - type == CV_32FC3 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_32f_C3R : - type == CV_32FC4 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_Inf_32f_C4R : + type == CV_32FC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_32f_C1R : + type == CV_32FC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_32f_C3R : + type == CV_32FC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_Inf_32f_C4R : 0) : normType == NORM_L1 ? - (type == CV_8UC1 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L1_8u_C1R : - type == CV_8UC3 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L1_8u_C3R : - type == CV_8UC4 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L1_8u_C4R : - type == CV_16UC1 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L1_16u_C1R : - type == CV_16UC3 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L1_16u_C3R : - type == CV_16UC4 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L1_16u_C4R : - type == CV_16SC1 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L1_16s_C1R : - type == CV_16SC3 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L1_16s_C3R : - type == CV_16SC4 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L1_16s_C4R : + (type == CV_8UC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_8u_C1R : + type == CV_8UC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_8u_C3R : + type == CV_8UC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_8u_C4R : + type == CV_16UC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16u_C1R : + type == CV_16UC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16u_C3R : + type == CV_16UC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16u_C4R : + type == CV_16SC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16s_C1R : + type == CV_16SC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16s_C3R : + type == CV_16SC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L1_16s_C4R : 0) : normType == NORM_L2 || normType == NORM_L2SQR ? - (type == CV_8UC1 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L2_8u_C1R : - type == CV_8UC3 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L2_8u_C3R : - type == CV_8UC4 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L2_8u_C4R : - type == CV_16UC1 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L2_16u_C1R : - type == CV_16UC3 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L2_16u_C3R : - type == CV_16UC4 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L2_16u_C4R : - type == CV_16SC1 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L2_16s_C1R : - type == CV_16SC3 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L2_16s_C3R : - type == CV_16SC4 ? (ippicviNormDiffFuncNoHint)ippicviNormDiff_L2_16s_C4R : + (type == CV_8UC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L2_8u_C1R : + type == CV_8UC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L2_8u_C3R : + type == CV_8UC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L2_8u_C4R : + type == CV_16UC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L2_16u_C1R : + type == CV_16UC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L2_16u_C3R : + type == CV_16UC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L2_16u_C4R : + type == CV_16SC1 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L2_16s_C1R : + type == CV_16SC3 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L2_16s_C3R : + type == CV_16SC4 ? (ippiNormDiffFuncNoHint)ippiNormDiff_L2_16s_C4R : 0) : 0; // Make sure only zero or one version of the function pointer is valid CV_Assert(!ippFuncHint || !ippFuncNoHint); diff --git a/modules/imgproc/src/canny.cpp b/modules/imgproc/src/canny.cpp index 2d4983bb30..65e8173065 100644 --- a/modules/imgproc/src/canny.cpp +++ b/modules/imgproc/src/canny.cpp @@ -59,28 +59,28 @@ static bool ippCanny(const Mat& _src, Mat& _dst, float low, float high) int size = 0, size1 = 0; IppiSize roi = { _src.cols, _src.rows }; - ippicviFilterSobelNegVertGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &size); - ippicviFilterSobelHorizGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &size1); + ippiFilterSobelNegVertGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &size); + ippiFilterSobelHorizGetBufferSize_8u16s_C1R(roi, ippMskSize3x3, &size1); size = std::max(size, size1); - ippicviCannyGetSize(roi, &size1); + ippiCannyGetSize(roi, &size1); size = std::max(size, size1); AutoBuffer buf(size + 64); uchar* buffer = alignPtr((uchar*)buf, 32); Mat _dx(_src.rows, _src.cols, CV_16S); - if( ippicviFilterSobelNegVertBorder_8u16s_C1R(_src.data, (int)_src.step, + if( ippiFilterSobelNegVertBorder_8u16s_C1R(_src.data, (int)_src.step, _dx.ptr(), (int)_dx.step, roi, ippMskSize3x3, ippBorderRepl, 0, buffer) < 0 ) return false; Mat _dy(_src.rows, _src.cols, CV_16S); - if( ippicviFilterSobelHorizBorder_8u16s_C1R(_src.data, (int)_src.step, + if( ippiFilterSobelHorizBorder_8u16s_C1R(_src.data, (int)_src.step, _dy.ptr(), (int)_dy.step, roi, ippMskSize3x3, ippBorderRepl, 0, buffer) < 0 ) return false; - if( ippicviCanny_16s8u_C1R(_dx.ptr(), (int)_dx.step, + if( ippiCanny_16s8u_C1R(_dx.ptr(), (int)_dx.step, _dy.ptr(), (int)_dy.step, _dst.data, (int)_dst.step, roi, low, high, buffer) < 0 ) return false; diff --git a/modules/imgproc/src/color.cpp b/modules/imgproc/src/color.cpp index b105ee3267..4c9abe190f 100644 --- a/modules/imgproc/src/color.cpp +++ b/modules/imgproc/src/color.cpp @@ -99,7 +99,7 @@ #define MAX_IPP8u 255 #define MAX_IPP16u 65535 #define MAX_IPP32f 1.0 -static IppStatus sts = ippicvInit(); +static IppStatus sts = ippInit(); #endif namespace cv @@ -200,9 +200,9 @@ void CvtColorLoop(const Mat& src, Mat& dst, const Cvt& cvt) } #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) -typedef IppStatus (CV_STDCALL* ippicviReorderFunc)(const void *, int, void *, int, IppiSize, const int *); -typedef IppStatus (CV_STDCALL* ippicviGeneralFunc)(const void *, int, void *, int, IppiSize); -typedef IppStatus (CV_STDCALL* ippicviColor2GrayFunc)(const void *, int, void *, int, IppiSize, const Ipp32f *); +typedef IppStatus (CV_STDCALL* ippiReorderFunc)(const void *, int, void *, int, IppiSize, const int *); +typedef IppStatus (CV_STDCALL* ippiGeneralFunc)(const void *, int, void *, int, IppiSize); +typedef IppStatus (CV_STDCALL* ippiColor2GrayFunc)(const void *, int, void *, int, IppiSize, const Ipp32f *); template class CvtColorIPPLoop_Invoker : public ParallelLoopBody @@ -256,134 +256,134 @@ bool CvtColorIPPLoopCopy(Mat& src, Mat& dst, const Cvt& cvt) return ok; } -static IppStatus CV_STDCALL ippicviSwapChannels_8u_C3C4Rf(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, +static IppStatus CV_STDCALL ippiSwapChannels_8u_C3C4Rf(const Ipp8u* pSrc, int srcStep, Ipp8u* pDst, int dstStep, IppiSize roiSize, const int *dstOrder) { - return ippicviSwapChannels_8u_C3C4R(pSrc, srcStep, pDst, dstStep, roiSize, dstOrder, MAX_IPP8u); + return ippiSwapChannels_8u_C3C4R(pSrc, srcStep, pDst, dstStep, roiSize, dstOrder, MAX_IPP8u); } -static IppStatus CV_STDCALL ippicviSwapChannels_16u_C3C4Rf(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, +static IppStatus CV_STDCALL ippiSwapChannels_16u_C3C4Rf(const Ipp16u* pSrc, int srcStep, Ipp16u* pDst, int dstStep, IppiSize roiSize, const int *dstOrder) { - return ippicviSwapChannels_16u_C3C4R(pSrc, srcStep, pDst, dstStep, roiSize, dstOrder, MAX_IPP16u); + return ippiSwapChannels_16u_C3C4R(pSrc, srcStep, pDst, dstStep, roiSize, dstOrder, MAX_IPP16u); } -static IppStatus CV_STDCALL ippicviSwapChannels_32f_C3C4Rf(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, +static IppStatus CV_STDCALL ippiSwapChannels_32f_C3C4Rf(const Ipp32f* pSrc, int srcStep, Ipp32f* pDst, int dstStep, IppiSize roiSize, const int *dstOrder) { - return ippicviSwapChannels_32f_C3C4R(pSrc, srcStep, pDst, dstStep, roiSize, dstOrder, MAX_IPP32f); + return ippiSwapChannels_32f_C3C4R(pSrc, srcStep, pDst, dstStep, roiSize, dstOrder, MAX_IPP32f); } -static ippicviReorderFunc ippicviSwapChannelsC3C4RTab[] = +static ippiReorderFunc ippiSwapChannelsC3C4RTab[] = { - (ippicviReorderFunc)ippicviSwapChannels_8u_C3C4Rf, 0, (ippicviReorderFunc)ippicviSwapChannels_16u_C3C4Rf, 0, - 0, (ippicviReorderFunc)ippicviSwapChannels_32f_C3C4Rf, 0, 0 + (ippiReorderFunc)ippiSwapChannels_8u_C3C4Rf, 0, (ippiReorderFunc)ippiSwapChannels_16u_C3C4Rf, 0, + 0, (ippiReorderFunc)ippiSwapChannels_32f_C3C4Rf, 0, 0 }; -static ippicviGeneralFunc ippicviCopyAC4C3RTab[] = +static ippiGeneralFunc ippiCopyAC4C3RTab[] = { - (ippicviGeneralFunc)ippicviCopy_8u_AC4C3R, 0, (ippicviGeneralFunc)ippicviCopy_16u_AC4C3R, 0, - 0, (ippicviGeneralFunc)ippicviCopy_32f_AC4C3R, 0, 0 + (ippiGeneralFunc)ippiCopy_8u_AC4C3R, 0, (ippiGeneralFunc)ippiCopy_16u_AC4C3R, 0, + 0, (ippiGeneralFunc)ippiCopy_32f_AC4C3R, 0, 0 }; -static ippicviReorderFunc ippicviSwapChannelsC4C3RTab[] = +static ippiReorderFunc ippiSwapChannelsC4C3RTab[] = { - (ippicviReorderFunc)ippicviSwapChannels_8u_C4C3R, 0, (ippicviReorderFunc)ippicviSwapChannels_16u_C4C3R, 0, - 0, (ippicviReorderFunc)ippicviSwapChannels_32f_C4C3R, 0, 0 + (ippiReorderFunc)ippiSwapChannels_8u_C4C3R, 0, (ippiReorderFunc)ippiSwapChannels_16u_C4C3R, 0, + 0, (ippiReorderFunc)ippiSwapChannels_32f_C4C3R, 0, 0 }; -static ippicviReorderFunc ippicviSwapChannelsC3RTab[] = +static ippiReorderFunc ippiSwapChannelsC3RTab[] = { - (ippicviReorderFunc)ippicviSwapChannels_8u_C3R, 0, (ippicviReorderFunc)ippicviSwapChannels_16u_C3R, 0, - 0, (ippicviReorderFunc)ippicviSwapChannels_32f_C3R, 0, 0 + (ippiReorderFunc)ippiSwapChannels_8u_C3R, 0, (ippiReorderFunc)ippiSwapChannels_16u_C3R, 0, + 0, (ippiReorderFunc)ippiSwapChannels_32f_C3R, 0, 0 }; -static ippicviReorderFunc ippicviSwapChannelsC4RTab[] = +static ippiReorderFunc ippiSwapChannelsC4RTab[] = { - (ippicviReorderFunc)ippicviSwapChannels_8u_C4R, 0, (ippicviReorderFunc)ippicviSwapChannels_16u_C4R, 0, - 0, (ippicviReorderFunc)ippicviSwapChannels_32f_C4R, 0, 0 + (ippiReorderFunc)ippiSwapChannels_8u_C4R, 0, (ippiReorderFunc)ippiSwapChannels_16u_C4R, 0, + 0, (ippiReorderFunc)ippiSwapChannels_32f_C4R, 0, 0 }; -static ippicviColor2GrayFunc ippicviColor2GrayC3Tab[] = +static ippiColor2GrayFunc ippiColor2GrayC3Tab[] = { - (ippicviColor2GrayFunc)ippicviColorToGray_8u_C3C1R, 0, (ippicviColor2GrayFunc)ippicviColorToGray_16u_C3C1R, 0, - 0, (ippicviColor2GrayFunc)ippicviColorToGray_32f_C3C1R, 0, 0 + (ippiColor2GrayFunc)ippiColorToGray_8u_C3C1R, 0, (ippiColor2GrayFunc)ippiColorToGray_16u_C3C1R, 0, + 0, (ippiColor2GrayFunc)ippiColorToGray_32f_C3C1R, 0, 0 }; -static ippicviColor2GrayFunc ippicviColor2GrayC4Tab[] = +static ippiColor2GrayFunc ippiColor2GrayC4Tab[] = { - (ippicviColor2GrayFunc)ippicviColorToGray_8u_AC4C1R, 0, (ippicviColor2GrayFunc)ippicviColorToGray_16u_AC4C1R, 0, - 0, (ippicviColor2GrayFunc)ippicviColorToGray_32f_AC4C1R, 0, 0 + (ippiColor2GrayFunc)ippiColorToGray_8u_AC4C1R, 0, (ippiColor2GrayFunc)ippiColorToGray_16u_AC4C1R, 0, + 0, (ippiColor2GrayFunc)ippiColorToGray_32f_AC4C1R, 0, 0 }; -static ippicviGeneralFunc ippicviRGB2GrayC3Tab[] = +static ippiGeneralFunc ippiRGB2GrayC3Tab[] = { - (ippicviGeneralFunc)ippicviRGBToGray_8u_C3C1R, 0, (ippicviGeneralFunc)ippicviRGBToGray_16u_C3C1R, 0, - 0, (ippicviGeneralFunc)ippicviRGBToGray_32f_C3C1R, 0, 0 + (ippiGeneralFunc)ippiRGBToGray_8u_C3C1R, 0, (ippiGeneralFunc)ippiRGBToGray_16u_C3C1R, 0, + 0, (ippiGeneralFunc)ippiRGBToGray_32f_C3C1R, 0, 0 }; -static ippicviGeneralFunc ippicviRGB2GrayC4Tab[] = +static ippiGeneralFunc ippiRGB2GrayC4Tab[] = { - (ippicviGeneralFunc)ippicviRGBToGray_8u_AC4C1R, 0, (ippicviGeneralFunc)ippicviRGBToGray_16u_AC4C1R, 0, - 0, (ippicviGeneralFunc)ippicviRGBToGray_32f_AC4C1R, 0, 0 + (ippiGeneralFunc)ippiRGBToGray_8u_AC4C1R, 0, (ippiGeneralFunc)ippiRGBToGray_16u_AC4C1R, 0, + 0, (ippiGeneralFunc)ippiRGBToGray_32f_AC4C1R, 0, 0 }; -static ippicviGeneralFunc ippicviCopyP3C3RTab[] = +static ippiGeneralFunc ippiCopyP3C3RTab[] = { - (ippicviGeneralFunc)ippicviCopy_8u_P3C3R, 0, (ippicviGeneralFunc)ippicviCopy_16u_P3C3R, 0, - 0, (ippicviGeneralFunc)ippicviCopy_32f_P3C3R, 0, 0 + (ippiGeneralFunc)ippiCopy_8u_P3C3R, 0, (ippiGeneralFunc)ippiCopy_16u_P3C3R, 0, + 0, (ippiGeneralFunc)ippiCopy_32f_P3C3R, 0, 0 }; -static ippicviGeneralFunc ippicviRGB2XYZTab[] = +static ippiGeneralFunc ippiRGB2XYZTab[] = { - (ippicviGeneralFunc)ippicviRGBToXYZ_8u_C3R, 0, (ippicviGeneralFunc)ippicviRGBToXYZ_16u_C3R, 0, - 0, (ippicviGeneralFunc)ippicviRGBToXYZ_32f_C3R, 0, 0 + (ippiGeneralFunc)ippiRGBToXYZ_8u_C3R, 0, (ippiGeneralFunc)ippiRGBToXYZ_16u_C3R, 0, + 0, (ippiGeneralFunc)ippiRGBToXYZ_32f_C3R, 0, 0 }; -static ippicviGeneralFunc ippicviXYZ2RGBTab[] = +static ippiGeneralFunc ippiXYZ2RGBTab[] = { - (ippicviGeneralFunc)ippicviXYZToRGB_8u_C3R, 0, (ippicviGeneralFunc)ippicviXYZToRGB_16u_C3R, 0, - 0, (ippicviGeneralFunc)ippicviXYZToRGB_32f_C3R, 0, 0 + (ippiGeneralFunc)ippiXYZToRGB_8u_C3R, 0, (ippiGeneralFunc)ippiXYZToRGB_16u_C3R, 0, + 0, (ippiGeneralFunc)ippiXYZToRGB_32f_C3R, 0, 0 }; -static ippicviGeneralFunc ippicviRGB2HSVTab[] = +static ippiGeneralFunc ippiRGB2HSVTab[] = { - (ippicviGeneralFunc)ippicviRGBToHSV_8u_C3R, 0, (ippicviGeneralFunc)ippicviRGBToHSV_16u_C3R, 0, + (ippiGeneralFunc)ippiRGBToHSV_8u_C3R, 0, (ippiGeneralFunc)ippiRGBToHSV_16u_C3R, 0, 0, 0, 0, 0 }; -static ippicviGeneralFunc ippicviHSV2RGBTab[] = +static ippiGeneralFunc ippiHSV2RGBTab[] = { - (ippicviGeneralFunc)ippicviHSVToRGB_8u_C3R, 0, (ippicviGeneralFunc)ippicviHSVToRGB_16u_C3R, 0, + (ippiGeneralFunc)ippiHSVToRGB_8u_C3R, 0, (ippiGeneralFunc)ippiHSVToRGB_16u_C3R, 0, 0, 0, 0, 0 }; -static ippicviGeneralFunc ippicviRGB2HLSTab[] = +static ippiGeneralFunc ippiRGB2HLSTab[] = { - (ippicviGeneralFunc)ippicviRGBToHLS_8u_C3R, 0, (ippicviGeneralFunc)ippicviRGBToHLS_16u_C3R, 0, - 0, (ippicviGeneralFunc)ippicviRGBToHLS_32f_C3R, 0, 0 + (ippiGeneralFunc)ippiRGBToHLS_8u_C3R, 0, (ippiGeneralFunc)ippiRGBToHLS_16u_C3R, 0, + 0, (ippiGeneralFunc)ippiRGBToHLS_32f_C3R, 0, 0 }; -static ippicviGeneralFunc ippicviHLS2RGBTab[] = +static ippiGeneralFunc ippiHLS2RGBTab[] = { - (ippicviGeneralFunc)ippicviHLSToRGB_8u_C3R, 0, (ippicviGeneralFunc)ippicviHLSToRGB_16u_C3R, 0, - 0, (ippicviGeneralFunc)ippicviHLSToRGB_32f_C3R, 0, 0 + (ippiGeneralFunc)ippiHLSToRGB_8u_C3R, 0, (ippiGeneralFunc)ippiHLSToRGB_16u_C3R, 0, + 0, (ippiGeneralFunc)ippiHLSToRGB_32f_C3R, 0, 0 }; struct IPPGeneralFunctor { - IPPGeneralFunctor(ippicviGeneralFunc _func) : func(_func){} + IPPGeneralFunctor(ippiGeneralFunc _func) : func(_func){} bool operator()(const void *src, int srcStep, void *dst, int dstStep, int cols, int rows) const { return func(src, srcStep, dst, dstStep, ippiSize(cols, rows)) >= 0; } private: - ippicviGeneralFunc func; + ippiGeneralFunc func; }; struct IPPReorderFunctor { - IPPReorderFunctor(ippicviReorderFunc _func, int _order0, int _order1, int _order2) : func(_func) + IPPReorderFunctor(ippiReorderFunc _func, int _order0, int _order1, int _order2) : func(_func) { order[0] = _order0; order[1] = _order1; @@ -395,13 +395,13 @@ struct IPPReorderFunctor return func(src, srcStep, dst, dstStep, ippiSize(cols, rows), order) >= 0; } private: - ippicviReorderFunc func; + ippiReorderFunc func; int order[4]; }; struct IPPColor2GrayFunctor { - IPPColor2GrayFunctor(ippicviColor2GrayFunc _func) : func(_func) + IPPColor2GrayFunctor(ippiColor2GrayFunc _func) : func(_func) { coeffs[0] = 0.114f; coeffs[1] = 0.587f; @@ -412,25 +412,25 @@ struct IPPColor2GrayFunctor return func(src, srcStep, dst, dstStep, ippiSize(cols, rows), coeffs) >= 0; } private: - ippicviColor2GrayFunc func; + ippiColor2GrayFunc func; Ipp32f coeffs[3]; }; struct IPPGray2BGRFunctor { - IPPGray2BGRFunctor(ippicviGeneralFunc _func) : func(_func){} + IPPGray2BGRFunctor(ippiGeneralFunc _func) : func(_func){} bool operator()(const void *src, int srcStep, void *dst, int dstStep, int cols, int rows) const { const void* srcarray[3] = { src, src, src }; return func(srcarray, srcStep, dst, dstStep, ippiSize(cols, rows)) >= 0; } private: - ippicviGeneralFunc func; + ippiGeneralFunc func; }; struct IPPGray2BGRAFunctor { - IPPGray2BGRAFunctor(ippicviGeneralFunc _func1, ippicviReorderFunc _func2, int _depth) : func1(_func1), func2(_func2), depth(_depth){} + IPPGray2BGRAFunctor(ippiGeneralFunc _func1, ippiReorderFunc _func2, int _depth) : func1(_func1), func2(_func2), depth(_depth){} bool operator()(const void *src, int srcStep, void *dst, int dstStep, int cols, int rows) const { const void* srcarray[3] = { src, src, src }; @@ -441,14 +441,14 @@ struct IPPGray2BGRAFunctor return func2(temp.data, (int)temp.step[0], dst, dstStep, ippiSize(cols, rows), order) >= 0; } private: - ippicviGeneralFunc func1; - ippicviReorderFunc func2; + ippiGeneralFunc func1; + ippiReorderFunc func2; int depth; }; struct IPPReorderGeneralFunctor { - IPPReorderGeneralFunctor(ippicviReorderFunc _func1, ippicviGeneralFunc _func2, int _order0, int _order1, int _order2, int _depth) : func1(_func1), func2(_func2), depth(_depth) + IPPReorderGeneralFunctor(ippiReorderFunc _func1, ippiGeneralFunc _func2, int _order0, int _order1, int _order2, int _depth) : func1(_func1), func2(_func2), depth(_depth) { order[0] = _order0; order[1] = _order1; @@ -464,15 +464,15 @@ struct IPPReorderGeneralFunctor return func2(temp.data, (int)temp.step[0], dst, dstStep, ippiSize(cols, rows)) >= 0; } private: - ippicviReorderFunc func1; - ippicviGeneralFunc func2; + ippiReorderFunc func1; + ippiGeneralFunc func2; int order[4]; int depth; }; struct IPPGeneralReorderFunctor { - IPPGeneralReorderFunctor(ippicviGeneralFunc _func1, ippicviReorderFunc _func2, int _order0, int _order1, int _order2, int _depth) : func1(_func1), func2(_func2), depth(_depth) + IPPGeneralReorderFunctor(ippiGeneralFunc _func1, ippiReorderFunc _func2, int _order0, int _order1, int _order2, int _depth) : func1(_func1), func2(_func2), depth(_depth) { order[0] = _order0; order[1] = _order1; @@ -488,8 +488,8 @@ struct IPPGeneralReorderFunctor return func2(temp.data, (int)temp.step[0], dst, dstStep, ippiSize(cols, rows), order) >= 0; } private: - ippicviGeneralFunc func1; - ippicviReorderFunc func2; + ippiGeneralFunc func1; + ippiReorderFunc func2; int order[4]; int depth; }; @@ -3229,32 +3229,32 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) if( code == CV_BGR2BGRA || code == CV_RGB2RGBA) { - if ( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippicviSwapChannelsC3C4RTab[depth], 0, 1, 2)) ) + if ( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippiSwapChannelsC3C4RTab[depth], 0, 1, 2)) ) return; } else if( code == CV_BGRA2BGR ) { - if ( CvtColorIPPLoop(src, dst, IPPGeneralFunctor(ippicviCopyAC4C3RTab[depth])) ) + if ( CvtColorIPPLoop(src, dst, IPPGeneralFunctor(ippiCopyAC4C3RTab[depth])) ) return; } else if( code == CV_BGR2RGBA ) { - if( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippicviSwapChannelsC3C4RTab[depth], 2, 1, 0)) ) + if( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippiSwapChannelsC3C4RTab[depth], 2, 1, 0)) ) return; } else if( code == CV_RGBA2BGR ) { - if( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippicviSwapChannelsC4C3RTab[depth], 2, 1, 0)) ) + if( CvtColorIPPLoop(src, dst, IPPReorderFunctor(ippiSwapChannelsC4C3RTab[depth], 2, 1, 0)) ) return; } else if( code == CV_RGB2BGR ) { - if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippicviSwapChannelsC3RTab[depth], 2, 1, 0)) ) + if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippiSwapChannelsC3RTab[depth], 2, 1, 0)) ) return; } else if( code == CV_RGBA2BGRA ) { - if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippicviSwapChannelsC4RTab[depth], 2, 1, 0)) ) + if( CvtColorIPPLoopCopy(src, dst, IPPReorderFunctor(ippiSwapChannelsC4RTab[depth], 2, 1, 0)) ) return; } #endif @@ -3316,24 +3316,24 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) /* if( code == CV_BGR2GRAY ) { - if( CvtColorIPPLoop(src, dst, IPPColor2GrayFunctor(ippicviColor2GrayC3Tab[depth])) ) + if( CvtColorIPPLoop(src, dst, IPPColor2GrayFunctor(ippiColor2GrayC3Tab[depth])) ) return; } else */ if( code == CV_RGB2GRAY ) { - if( CvtColorIPPLoop(src, dst, IPPGeneralFunctor(ippicviRGB2GrayC3Tab[depth])) ) + if( CvtColorIPPLoop(src, dst, IPPGeneralFunctor(ippiRGB2GrayC3Tab[depth])) ) return; } else if( code == CV_BGRA2GRAY ) { - if( CvtColorIPPLoop(src, dst, IPPColor2GrayFunctor(ippicviColor2GrayC4Tab[depth])) ) + if( CvtColorIPPLoop(src, dst, IPPColor2GrayFunctor(ippiColor2GrayC4Tab[depth])) ) return; } else if( code == CV_RGBA2GRAY ) { - if( CvtColorIPPLoop(src, dst, IPPGeneralFunctor(ippicviRGB2GrayC4Tab[depth])) ) + if( CvtColorIPPLoop(src, dst, IPPGeneralFunctor(ippiRGB2GrayC4Tab[depth])) ) return; } #endif @@ -3370,12 +3370,12 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) if( code == CV_GRAY2BGR ) { - if( CvtColorIPPLoop(src, dst, IPPGray2BGRFunctor(ippicviCopyP3C3RTab[depth])) ) + if( CvtColorIPPLoop(src, dst, IPPGray2BGRFunctor(ippiCopyP3C3RTab[depth])) ) return; } else if( code == CV_GRAY2BGRA ) { - if( CvtColorIPPLoop(src, dst, IPPGray2BGRAFunctor(ippicviCopyP3C3RTab[depth], ippicviSwapChannelsC3C4RTab[depth], depth)) ) + if( CvtColorIPPLoop(src, dst, IPPGray2BGRAFunctor(ippiCopyP3C3RTab[depth], ippiSwapChannelsC3C4RTab[depth], depth)) ) return; } #endif @@ -3463,22 +3463,22 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) if( code == CV_BGR2XYZ && scn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippicviSwapChannelsC3RTab[depth], ippicviRGB2XYZTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth], ippiRGB2XYZTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_BGR2XYZ && scn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippicviSwapChannelsC4C3RTab[depth], ippicviRGB2XYZTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2XYZTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_RGB2XYZ && scn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippicviRGB2XYZTab[depth])) ) + if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiRGB2XYZTab[depth])) ) return; } else if( code == CV_RGB2XYZ && scn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippicviSwapChannelsC4C3RTab[depth], ippicviRGB2XYZTab[depth], 0, 1, 2, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2XYZTab[depth], 0, 1, 2, depth)) ) return; } #endif @@ -3502,22 +3502,22 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) if( code == CV_XYZ2BGR && dcn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPGeneralReorderFunctor(ippicviXYZ2RGBTab[depth], ippicviSwapChannelsC3RTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoopCopy(src, dst, IPPGeneralReorderFunctor(ippiXYZ2RGBTab[depth], ippiSwapChannelsC3RTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_XYZ2BGR && dcn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippicviXYZ2RGBTab[depth], ippicviSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiXYZ2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) ) return; } if( code == CV_XYZ2RGB && dcn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippicviXYZ2RGBTab[depth])) ) + if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiXYZ2RGBTab[depth])) ) return; } else if( code == CV_XYZ2RGB && dcn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippicviXYZ2RGBTab[depth], ippicviSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiXYZ2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)) ) return; } #endif @@ -3547,42 +3547,42 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) { if( code == CV_BGR2HSV_FULL && scn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippicviSwapChannelsC3RTab[depth], ippicviRGB2HSVTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth], ippiRGB2HSVTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_BGR2HSV_FULL && scn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippicviSwapChannelsC4C3RTab[depth], ippicviRGB2HSVTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2HSVTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_RGB2HSV_FULL && scn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippicviRGB2HSVTab[depth])) ) + if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiRGB2HSVTab[depth])) ) return; } else if( code == CV_RGB2HSV_FULL && scn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippicviSwapChannelsC4C3RTab[depth], ippicviRGB2HSVTab[depth], 0, 1, 2, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2HSVTab[depth], 0, 1, 2, depth)) ) return; } else if( code == CV_BGR2HLS_FULL && scn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippicviSwapChannelsC3RTab[depth], ippicviRGB2HLSTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoopCopy(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC3RTab[depth], ippiRGB2HLSTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_BGR2HLS_FULL && scn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippicviSwapChannelsC4C3RTab[depth], ippicviRGB2HLSTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2HLSTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_RGB2HLS_FULL && scn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippicviRGB2HLSTab[depth])) ) + if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiRGB2HLSTab[depth])) ) return; } else if( code == CV_RGB2HLS_FULL && scn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippicviSwapChannelsC4C3RTab[depth], ippicviRGB2HLSTab[depth], 0, 1, 2, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPReorderGeneralFunctor(ippiSwapChannelsC4C3RTab[depth], ippiRGB2HLSTab[depth], 0, 1, 2, depth)) ) return; } } @@ -3628,42 +3628,42 @@ void cv::cvtColor( InputArray _src, OutputArray _dst, int code, int dcn ) { if( code == CV_HSV2BGR_FULL && dcn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPGeneralReorderFunctor(ippicviHSV2RGBTab[depth], ippicviSwapChannelsC3RTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoopCopy(src, dst, IPPGeneralReorderFunctor(ippiHSV2RGBTab[depth], ippiSwapChannelsC3RTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_HSV2BGR_FULL && dcn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippicviHSV2RGBTab[depth], ippicviSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiHSV2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_HSV2RGB_FULL && dcn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippicviHSV2RGBTab[depth])) ) + if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiHSV2RGBTab[depth])) ) return; } else if( code == CV_HSV2RGB_FULL && dcn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippicviHSV2RGBTab[depth], ippicviSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiHSV2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)) ) return; } else if( code == CV_HLS2BGR_FULL && dcn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPGeneralReorderFunctor(ippicviHLS2RGBTab[depth], ippicviSwapChannelsC3RTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoopCopy(src, dst, IPPGeneralReorderFunctor(ippiHLS2RGBTab[depth], ippiSwapChannelsC3RTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_HLS2BGR_FULL && dcn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippicviHLS2RGBTab[depth], ippicviSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiHLS2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 2, 1, 0, depth)) ) return; } else if( code == CV_HLS2RGB_FULL && dcn == 3 ) { - if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippicviHLS2RGBTab[depth])) ) + if( CvtColorIPPLoopCopy(src, dst, IPPGeneralFunctor(ippiHLS2RGBTab[depth])) ) return; } else if( code == CV_HLS2RGB_FULL && dcn == 4 ) { - if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippicviHLS2RGBTab[depth], ippicviSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)) ) + if( CvtColorIPPLoop(src, dst, IPPGeneralReorderFunctor(ippiHLS2RGBTab[depth], ippiSwapChannelsC3C4RTab[depth], 0, 1, 2, depth)) ) return; } } diff --git a/modules/imgproc/src/deriv.cpp b/modules/imgproc/src/deriv.cpp index 30a267f44c..887162ee03 100644 --- a/modules/imgproc/src/deriv.cpp +++ b/modules/imgproc/src/deriv.cpp @@ -44,7 +44,7 @@ #include "opencl_kernels.hpp" #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) -static IppStatus sts = ippicvInit(); +static IppStatus sts = ippInit(); #endif /****************************************************************************************\ @@ -212,18 +212,18 @@ static bool IPPDerivScharr(const Mat& src, Mat& dst, int ddepth, int dx, int dy, { if ((dx == 1) && (dy == 0)) { - if (ippStsNoErr != ippicviFilterScharrVertGetBufferSize_8u16s_C1R(roi,&bufSize)) + if (ippStsNoErr != ippiFilterScharrVertGetBufferSize_8u16s_C1R(roi,&bufSize)) return false; buffer.allocate(bufSize); - return (ippStsNoErr == ippicviFilterScharrVertBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, + return (ippStsNoErr == ippiFilterScharrVertBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, (Ipp16s*)dst.data, (int)dst.step, roi, ippBorderRepl, 0, (Ipp8u*)(char*)buffer)); } if ((dx == 0) && (dy == 1)) { - if (ippStsNoErr != ippicviFilterScharrHorizGetBufferSize_8u16s_C1R(roi,&bufSize)) + if (ippStsNoErr != ippiFilterScharrHorizGetBufferSize_8u16s_C1R(roi,&bufSize)) return false; buffer.allocate(bufSize); - return (ippStsNoErr == ippicviFilterScharrHorizBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, + return (ippStsNoErr == ippiFilterScharrHorizBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, (Ipp16s*)dst.data, (int)dst.step, roi, ippBorderRepl, 0, (Ipp8u*)(char*)buffer)); } return false; @@ -240,11 +240,11 @@ static bool IPPDerivScharr(const Mat& src, Mat& dst, int ddepth, int dx, int dy, { if ((dx == 1) && (dy == 0)) { - if (ippStsNoErr != ippicviFilterScharrVertGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows),&bufSize)) + if (ippStsNoErr != ippiFilterScharrVertGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows),&bufSize)) return false; buffer.allocate(bufSize); - if (ippStsNoErr != ippicviFilterScharrVertBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, + if (ippStsNoErr != ippiFilterScharrVertBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, (Ipp32f*)dst.data, (int)dst.step, ippiSize(src.cols, src.rows), ippBorderRepl, 0, (Ipp8u*)(char*)buffer)) { @@ -253,23 +253,23 @@ static bool IPPDerivScharr(const Mat& src, Mat& dst, int ddepth, int dx, int dy, if (scale != 1) /* IPP is fast, so MulC produce very little perf degradation.*/ - //ippicviMulC_32f_C1IR((Ipp32f)scale, (Ipp32f*)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); - ippicviMulC_32f_C1R((Ipp32f*)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f*)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); + //ippiMulC_32f_C1IR((Ipp32f)scale, (Ipp32f*)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); + ippiMulC_32f_C1R((Ipp32f*)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f*)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); return true; } if ((dx == 0) && (dy == 1)) { - if (ippStsNoErr != ippicviFilterScharrHorizGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows),&bufSize)) + if (ippStsNoErr != ippiFilterScharrHorizGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows),&bufSize)) return false; buffer.allocate(bufSize); - if (ippStsNoErr != ippicviFilterScharrHorizBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, + if (ippStsNoErr != ippiFilterScharrHorizBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, (Ipp32f*)dst.data, (int)dst.step, ippiSize(src.cols, src.rows), ippBorderRepl, 0, (Ipp8u*)(char*)buffer)) return false; if (scale != 1) - ippicviMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); + ippiMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); return true; } } @@ -296,44 +296,44 @@ static bool IPPDeriv(const Mat& src, Mat& dst, int ddepth, int dx, int dy, int k { if ((dx == 1) && (dy == 0)) { - if (ippStsNoErr != ippicviFilterSobelNegVertGetBufferSize_8u16s_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) + if (ippStsNoErr != ippiFilterSobelNegVertGetBufferSize_8u16s_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) return false; buffer.allocate(bufSize); - return (ippStsNoErr == ippicviFilterSobelNegVertBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, + return (ippStsNoErr == ippiFilterSobelNegVertBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, (Ipp16s*)dst.data, (int)dst.step, ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize), ippBorderRepl, 0, (Ipp8u*)(char*)buffer)); } if ((dx == 0) && (dy == 1)) { - if (ippStsNoErr != ippicviFilterSobelHorizGetBufferSize_8u16s_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) + if (ippStsNoErr != ippiFilterSobelHorizGetBufferSize_8u16s_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) return false; buffer.allocate(bufSize); - return (ippStsNoErr == ippicviFilterSobelHorizBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, + return (ippStsNoErr == ippiFilterSobelHorizBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, (Ipp16s*)dst.data, (int)dst.step, ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize), ippBorderRepl, 0, (Ipp8u*)(char*)buffer)); } if ((dx == 2) && (dy == 0)) { - if (ippStsNoErr != ippicviFilterSobelVertSecondGetBufferSize_8u16s_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) + if (ippStsNoErr != ippiFilterSobelVertSecondGetBufferSize_8u16s_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) return false; buffer.allocate(bufSize); - return (ippStsNoErr == ippicviFilterSobelVertSecondBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, + return (ippStsNoErr == ippiFilterSobelVertSecondBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, (Ipp16s*)dst.data, (int)dst.step, ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize), ippBorderRepl, 0, (Ipp8u*)(char*)buffer)); } if ((dx == 0) && (dy == 2)) { - if (ippStsNoErr != ippicviFilterSobelHorizSecondGetBufferSize_8u16s_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) + if (ippStsNoErr != ippiFilterSobelHorizSecondGetBufferSize_8u16s_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) return false; buffer.allocate(bufSize); - return (ippStsNoErr == ippicviFilterSobelHorizSecondBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, + return (ippStsNoErr == ippiFilterSobelHorizSecondBorder_8u16s_C1R((const Ipp8u*)src.data, (int)src.step, (Ipp16s*)dst.data, (int)dst.step, ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize), ippBorderRepl, 0, (Ipp8u*)(char*)buffer)); } @@ -343,62 +343,62 @@ static bool IPPDeriv(const Mat& src, Mat& dst, int ddepth, int dx, int dy, int k { if ((dx == 1) && (dy == 0)) { - if (ippStsNoErr != ippicviFilterSobelNegVertGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize), &bufSize)) + if (ippStsNoErr != ippiFilterSobelNegVertGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize), &bufSize)) return false; buffer.allocate(bufSize); - if (ippStsNoErr != ippicviFilterSobelNegVertBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, + if (ippStsNoErr != ippiFilterSobelNegVertBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, (Ipp32f*)dst.data, (int)dst.step, ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize), ippBorderRepl, 0, (Ipp8u*)(char*)buffer)) { return false; } if(scale != 1) - ippicviMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); + ippiMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); return true; } if ((dx == 0) && (dy == 1)) { - if (ippStsNoErr != ippicviFilterSobelHorizGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) + if (ippStsNoErr != ippiFilterSobelHorizGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) return false; buffer.allocate(bufSize); - if (ippStsNoErr != ippicviFilterSobelHorizBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, + if (ippStsNoErr != ippiFilterSobelHorizBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, (Ipp32f*)dst.data, (int)dst.step, ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize), ippBorderRepl, 0, (Ipp8u*)(char*)buffer)) { return false; } if(scale != 1) - ippicviMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); + ippiMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); return true; } if((dx == 2) && (dy == 0)) { - if (ippStsNoErr != ippicviFilterSobelVertSecondGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) + if (ippStsNoErr != ippiFilterSobelVertSecondGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) return false; buffer.allocate(bufSize); - if (ippStsNoErr != ippicviFilterSobelVertSecondBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, + if (ippStsNoErr != ippiFilterSobelVertSecondBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, (Ipp32f*)dst.data, (int)dst.step, ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize), ippBorderRepl, 0, (Ipp8u*)(char*)buffer)) { return false; } if(scale != 1) - ippicviMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); + ippiMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); return true; } if((dx == 0) && (dy == 2)) { - if (ippStsNoErr != ippicviFilterSobelHorizSecondGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) + if (ippStsNoErr != ippiFilterSobelHorizSecondGetBufferSize_32f_C1R(ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize),&bufSize)) return false; buffer.allocate(bufSize); - if (ippStsNoErr != ippicviFilterSobelHorizSecondBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, + if (ippStsNoErr != ippiFilterSobelHorizSecondBorder_32f_C1R((const Ipp32f*)src.data, (int)src.step, (Ipp32f*)dst.data, (int)dst.step, ippiSize(src.cols, src.rows), (IppiMaskSize)(ksize*10+ksize), ippBorderRepl, 0, (Ipp8u*)(char*)buffer)) { @@ -406,7 +406,7 @@ static bool IPPDeriv(const Mat& src, Mat& dst, int ddepth, int dx, int dy, int k } if(scale != 1) - ippicviMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); + ippiMulC_32f_C1R((Ipp32f *)dst.data, (int)dst.step, (Ipp32f)scale, (Ipp32f *)dst.data, (int)dst.step, ippiSize(dst.cols*dst.channels(), dst.rows)); return true; } } diff --git a/modules/imgproc/src/distransform.cpp b/modules/imgproc/src/distransform.cpp index 4c28735c05..94a5592858 100644 --- a/modules/imgproc/src/distransform.cpp +++ b/modules/imgproc/src/distransform.cpp @@ -748,7 +748,7 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe if( maskSize == CV_DIST_MASK_5 ) { IppiSize roi = { src.cols, src.rows }; - if( ippicviDistanceTransform_5x5_8u32f_C1R( + if( ippiDistanceTransform_5x5_8u32f_C1R( src.ptr(), (int)src.step, dst.ptr(), (int)dst.step, roi, _mask) >= 0 ) return; diff --git a/modules/imgproc/src/filter.cpp b/modules/imgproc/src/filter.cpp index 62a62ded9c..d23f87ef47 100644 --- a/modules/imgproc/src/filter.cpp +++ b/modules/imgproc/src/filter.cpp @@ -1421,7 +1421,7 @@ struct RowVec_32f int operator()(const uchar* _src, uchar* _dst, int width, int cn) const { #ifdef USE_IPP_SEP_FILTERS - int ret = ippicviOperator(_src, _dst, width, cn); + int ret = ippiOperator(_src, _dst, width, cn); if (ret > 0) return ret; #endif @@ -1461,7 +1461,7 @@ struct RowVec_32f #ifdef USE_IPP_SEP_FILTERS private: mutable int bufsz; - int ippicviOperator(const uchar* _src, uchar* _dst, int width, int cn) const + int ippiOperator(const uchar* _src, uchar* _dst, int width, int cn) const { int _ksize = kernel.rows + kernel.cols - 1; if ((1 != cn && 3 != cn) || width < _ksize*8) @@ -1474,8 +1474,8 @@ private: IppiSize roisz = { width, 1 }; if( bufsz < 0 ) { - if( (cn == 1 && ippicviFilterRowBorderPipelineGetBufferSize_32f_C1R(roisz, _ksize, &bufsz) < 0) || - (cn == 3 && ippicviFilterRowBorderPipelineGetBufferSize_32f_C3R(roisz, _ksize, &bufsz) < 0)) + if( (cn == 1 && ippiFilterRowBorderPipelineGetBufferSize_32f_C1R(roisz, _ksize, &bufsz) < 0) || + (cn == 3 && ippiFilterRowBorderPipelineGetBufferSize_32f_C3R(roisz, _ksize, &bufsz) < 0)) return 0; } AutoBuffer buf(bufsz + 64); @@ -1484,9 +1484,9 @@ private: float borderValue[] = {0.f, 0.f, 0.f}; // here is the trick. IPP needs border type and extrapolates the row. We did it already. // So we pass anchor=0 and ignore the right tail of results since they are incorrect there. - if( (cn == 1 && ippicviFilterRowBorderPipeline_32f_C1R(src, step, &dst, roisz, _kx, _ksize, 0, + if( (cn == 1 && ippiFilterRowBorderPipeline_32f_C1R(src, step, &dst, roisz, _kx, _ksize, 0, ippBorderRepl, borderValue[0], bufptr) < 0) || - (cn == 3 && ippicviFilterRowBorderPipeline_32f_C3R(src, step, &dst, roisz, _kx, _ksize, 0, + (cn == 3 && ippiFilterRowBorderPipeline_32f_C3R(src, step, &dst, roisz, _kx, _ksize, 0, ippBorderRepl, borderValue, bufptr) < 0)) return 0; return width - _ksize + 1; diff --git a/modules/imgproc/src/imgwarp.cpp b/modules/imgproc/src/imgwarp.cpp index d12c7851bd..fdb8302f14 100644 --- a/modules/imgproc/src/imgwarp.cpp +++ b/modules/imgproc/src/imgwarp.cpp @@ -50,24 +50,24 @@ #include "opencl_kernels.hpp" #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) -static IppStatus sts = ippicvInit(); +static IppStatus sts = ippInit(); #endif namespace cv { #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701) - typedef IppStatus (CV_STDCALL* ippicviResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*); - typedef IppStatus (CV_STDCALL* ippicviResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*); - typedef IppStatus (CV_STDCALL* ippicviResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*); + typedef IppStatus (CV_STDCALL* ippiResizeFunc)(const void*, int, const void*, int, IppiPoint, IppiSize, IppiBorderType, void*, void*, Ipp8u*); + typedef IppStatus (CV_STDCALL* ippiResizeGetBufferSize)(void*, IppiSize, Ipp32u, int*); + typedef IppStatus (CV_STDCALL* ippiResizeGetSrcOffset)(void*, IppiPoint, IppiPoint*); #endif #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) - typedef IppStatus (CV_STDCALL* ippicviSetFunc)(const void*, void *, int, IppiSize); - typedef IppStatus (CV_STDCALL* ippicviWarpPerspectiveBackFunc)(const void*, IppiSize, int, IppiRect, void *, int, IppiRect, double [3][3], int); - typedef IppStatus (CV_STDCALL* ippicviWarpAffineBackFunc)(const void*, IppiSize, int, IppiRect, void *, int, IppiRect, double [2][3], int); + typedef IppStatus (CV_STDCALL* ippiSetFunc)(const void*, void *, int, IppiSize); + typedef IppStatus (CV_STDCALL* ippiWarpPerspectiveBackFunc)(const void*, IppiSize, int, IppiRect, void *, int, IppiRect, double [3][3], int); + typedef IppStatus (CV_STDCALL* ippiWarpAffineBackFunc)(const void*, IppiSize, int, IppiRect, void *, int, IppiRect, double [2][3], int); template - bool IPPSetSimple(cv::Scalar value, void *dataPointer, int step, IppiSize &size, ippicviSetFunc func) + bool IPPSetSimple(cv::Scalar value, void *dataPointer, int step, IppiSize &size, ippiSetFunc func) { Type values[channels]; for( int i = 0; i < channels; i++ ) @@ -82,11 +82,11 @@ namespace cv switch( depth ) { case CV_8U: - return ippicviSet_8u_C1R((Ipp8u)value[0], (Ipp8u *)dataPointer, step, size) >= 0; + return ippiSet_8u_C1R((Ipp8u)value[0], (Ipp8u *)dataPointer, step, size) >= 0; case CV_16U: - return ippicviSet_16u_C1R((Ipp16u)value[0], (Ipp16u *)dataPointer, step, size) >= 0; + return ippiSet_16u_C1R((Ipp16u)value[0], (Ipp16u *)dataPointer, step, size) >= 0; case CV_32F: - return ippicviSet_32f_C1R((Ipp32f)value[0], (Ipp32f *)dataPointer, step, size) >= 0; + return ippiSet_32f_C1R((Ipp32f)value[0], (Ipp32f *)dataPointer, step, size) >= 0; } } else @@ -96,11 +96,11 @@ namespace cv switch( depth ) { case CV_8U: - return IPPSetSimple<3, Ipp8u>(value, dataPointer, step, size, (ippicviSetFunc)ippicviSet_8u_C3R); + return IPPSetSimple<3, Ipp8u>(value, dataPointer, step, size, (ippiSetFunc)ippiSet_8u_C3R); case CV_16U: - return IPPSetSimple<3, Ipp16u>(value, dataPointer, step, size, (ippicviSetFunc)ippicviSet_16u_C3R); + return IPPSetSimple<3, Ipp16u>(value, dataPointer, step, size, (ippiSetFunc)ippiSet_16u_C3R); case CV_32F: - return IPPSetSimple<3, Ipp32f>(value, dataPointer, step, size, (ippicviSetFunc)ippicviSet_32f_C3R); + return IPPSetSimple<3, Ipp32f>(value, dataPointer, step, size, (ippiSetFunc)ippiSet_32f_C3R); } } else if( channels == 4 ) @@ -108,11 +108,11 @@ namespace cv switch( depth ) { case CV_8U: - return IPPSetSimple<4, Ipp8u>(value, dataPointer, step, size, (ippicviSetFunc)ippicviSet_8u_C4R); + return IPPSetSimple<4, Ipp8u>(value, dataPointer, step, size, (ippiSetFunc)ippiSet_8u_C4R); case CV_16U: - return IPPSetSimple<4, Ipp16u>(value, dataPointer, step, size, (ippicviSetFunc)ippicviSet_16u_C4R); + return IPPSetSimple<4, Ipp16u>(value, dataPointer, step, size, (ippiSetFunc)ippiSet_16u_C4R); case CV_32F: - return IPPSetSimple<4, Ipp32f>(value, dataPointer, step, size, (ippicviSetFunc)ippicviSet_32f_C4R); + return IPPSetSimple<4, Ipp32f>(value, dataPointer, step, size, (ippiSetFunc)ippiSet_32f_C4R); } } } @@ -1880,37 +1880,37 @@ static int computeResizeAreaTab( int ssize, int dsize, int cn, double scale, Dec #define CHECK_IPP_STATUS(STATUS) if( STATUS!=ippStsNoErr ) { *ok = false; return;} #define SET_IPP_RESIZE_LINEAR_FUNC_PTR(TYPE, CN) \ - func = (ippicviResizeFunc)ippicviResizeLinear_##TYPE##_##CN##R; CHECK_IPP_FUNC(func);\ - CHECK_IPP_STATUS(ippicviResizeGetSize_##TYPE(srcSize, dstSize, (IppiInterpolationType)mode, 0, &specSize, &initSize));\ + func = (ippiResizeFunc)ippiResizeLinear_##TYPE##_##CN##R; CHECK_IPP_FUNC(func);\ + CHECK_IPP_STATUS(ippiResizeGetSize_##TYPE(srcSize, dstSize, (IppiInterpolationType)mode, 0, &specSize, &initSize));\ specBuf.allocate(specSize);\ pSpec = (uchar*)specBuf;\ - CHECK_IPP_STATUS(ippicviResizeLinearInit_##TYPE(srcSize, dstSize, (IppiResizeSpec_32f*)pSpec)); + CHECK_IPP_STATUS(ippiResizeLinearInit_##TYPE(srcSize, dstSize, (IppiResizeSpec_32f*)pSpec)); #define SET_IPP_RESIZE_LINEAR_FUNC_64_PTR(TYPE, CN) \ if (mode==(int)ippCubic) { *ok = false; return;}\ - func = (ippicviResizeFunc)ippicviResizeLinear_##TYPE##_##CN##R; CHECK_IPP_FUNC(func);\ - CHECK_IPP_STATUS(ippicviResizeGetSize_##TYPE(srcSize, dstSize, (IppiInterpolationType)mode, 0, &specSize, &initSize));\ + func = (ippiResizeFunc)ippiResizeLinear_##TYPE##_##CN##R; CHECK_IPP_FUNC(func);\ + CHECK_IPP_STATUS(ippiResizeGetSize_##TYPE(srcSize, dstSize, (IppiInterpolationType)mode, 0, &specSize, &initSize));\ specBuf.allocate(specSize);\ pSpec = (uchar*)specBuf;\ - CHECK_IPP_STATUS(ippicviResizeLinearInit_##TYPE(srcSize, dstSize, (IppiResizeSpec_64f*)pSpec));\ - getBufferSizeFunc = (ippicviResizeGetBufferSize)ippicviResizeGetBufferSize_##TYPE;\ - getSrcOffsetFunc = (ippicviResizeGetSrcOffset) ippicviResizeGetBufferSize_##TYPE; + CHECK_IPP_STATUS(ippiResizeLinearInit_##TYPE(srcSize, dstSize, (IppiResizeSpec_64f*)pSpec));\ + getBufferSizeFunc = (ippiResizeGetBufferSize)ippiResizeGetBufferSize_##TYPE;\ + getSrcOffsetFunc = (ippiResizeGetSrcOffset) ippiResizeGetBufferSize_##TYPE; #define SET_IPP_RESIZE_CUBIC_FUNC_PTR(TYPE, CN) \ - func = (ippicviResizeFunc)ippicviResizeCubic_##TYPE##_##CN##R; CHECK_IPP_FUNC(func);\ - CHECK_IPP_STATUS(ippicviResizeGetSize_##TYPE(srcSize, dstSize, (IppiInterpolationType)mode, 0, &specSize, &initSize));\ + func = (ippiResizeFunc)ippiResizeCubic_##TYPE##_##CN##R; CHECK_IPP_FUNC(func);\ + CHECK_IPP_STATUS(ippiResizeGetSize_##TYPE(srcSize, dstSize, (IppiInterpolationType)mode, 0, &specSize, &initSize));\ specBuf.allocate(specSize);\ pSpec = (uchar*)specBuf;\ AutoBuffer buf(initSize);\ uchar* pInit = (uchar*)buf;\ - CHECK_IPP_STATUS(ippicviResizeCubicInit_##TYPE(srcSize, dstSize, 0.f, 0.75f, (IppiResizeSpec_32f*)pSpec, pInit)); + CHECK_IPP_STATUS(ippiResizeCubicInit_##TYPE(srcSize, dstSize, 0.f, 0.75f, (IppiResizeSpec_32f*)pSpec, pInit)); #define SET_IPP_RESIZE_PTR(TYPE, CN) \ if (mode == (int)ippLinear) { SET_IPP_RESIZE_LINEAR_FUNC_PTR(TYPE, CN);}\ else if (mode == (int)ippCubic) { SET_IPP_RESIZE_CUBIC_FUNC_PTR(TYPE, CN);}\ else { *ok = false; return;}\ - getBufferSizeFunc = (ippicviResizeGetBufferSize)ippicviResizeGetBufferSize_##TYPE;\ - getSrcOffsetFunc = (ippicviResizeGetSrcOffset)ippicviResizeGetSrcOffset_##TYPE; + getBufferSizeFunc = (ippiResizeGetBufferSize)ippiResizeGetBufferSize_##TYPE;\ + getSrcOffsetFunc = (ippiResizeGetSrcOffset)ippiResizeGetSrcOffset_##TYPE; #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR*100 + IPP_VERSION_MINOR >= 701) class IPPresizeInvoker : @@ -2021,9 +2021,9 @@ private: void *pSpec; AutoBuffer specBuf; int mode; - ippicviResizeFunc func; - ippicviResizeGetBufferSize getBufferSizeFunc; - ippicviResizeGetSrcOffset getSrcOffsetFunc; + ippiResizeFunc func; + ippiResizeGetBufferSize getBufferSizeFunc; + ippiResizeGetSrcOffset getSrcOffsetFunc; bool *ok; const IPPresizeInvoker& operator= (const IPPresizeInvoker&); }; @@ -4051,7 +4051,7 @@ class IPPwarpAffineInvoker : public ParallelLoopBody { public: - IPPwarpAffineInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[2][3], int &_interpolation, int &_borderType, const Scalar &_borderValue, ippicviWarpAffineBackFunc _func, bool *_ok) : + IPPwarpAffineInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[2][3], int &_interpolation, int &_borderType, const Scalar &_borderValue, ippiWarpAffineBackFunc _func, bool *_ok) : ParallelLoopBody(), src(_src), dst(_dst), mode(_interpolation), coeffs(_coeffs), borderType(_borderType), borderValue(_borderValue), func(_func), ok(_ok) { *ok = true; @@ -4083,7 +4083,7 @@ private: int mode; int borderType; Scalar borderValue; - ippicviWarpAffineBackFunc func; + ippiWarpAffineBackFunc func; bool *ok; const IPPwarpAffineInvoker& operator= (const IPPwarpAffineInvoker&); }; @@ -4246,16 +4246,16 @@ void cv::warpAffine( InputArray _src, OutputArray _dst, ( borderType == cv::BORDER_TRANSPARENT || ( borderType == cv::BORDER_CONSTANT ) ) ) { int type = src.type(); - ippicviWarpAffineBackFunc ippFunc = - type == CV_8UC1 ? (ippicviWarpAffineBackFunc)ippicviWarpAffineBack_8u_C1R : - type == CV_8UC3 ? (ippicviWarpAffineBackFunc)ippicviWarpAffineBack_8u_C3R : - type == CV_8UC4 ? (ippicviWarpAffineBackFunc)ippicviWarpAffineBack_8u_C4R : - type == CV_16UC1 ? (ippicviWarpAffineBackFunc)ippicviWarpAffineBack_16u_C1R : - type == CV_16UC3 ? (ippicviWarpAffineBackFunc)ippicviWarpAffineBack_16u_C3R : - type == CV_16UC4 ? (ippicviWarpAffineBackFunc)ippicviWarpAffineBack_16u_C4R : - type == CV_32FC1 ? (ippicviWarpAffineBackFunc)ippicviWarpAffineBack_32f_C1R : - type == CV_32FC3 ? (ippicviWarpAffineBackFunc)ippicviWarpAffineBack_32f_C3R : - type == CV_32FC4 ? (ippicviWarpAffineBackFunc)ippicviWarpAffineBack_32f_C4R : + ippiWarpAffineBackFunc ippFunc = + type == CV_8UC1 ? (ippiWarpAffineBackFunc)ippiWarpAffineBack_8u_C1R : + type == CV_8UC3 ? (ippiWarpAffineBackFunc)ippiWarpAffineBack_8u_C3R : + type == CV_8UC4 ? (ippiWarpAffineBackFunc)ippiWarpAffineBack_8u_C4R : + type == CV_16UC1 ? (ippiWarpAffineBackFunc)ippiWarpAffineBack_16u_C1R : + type == CV_16UC3 ? (ippiWarpAffineBackFunc)ippiWarpAffineBack_16u_C3R : + type == CV_16UC4 ? (ippiWarpAffineBackFunc)ippiWarpAffineBack_16u_C4R : + type == CV_32FC1 ? (ippiWarpAffineBackFunc)ippiWarpAffineBack_32f_C1R : + type == CV_32FC3 ? (ippiWarpAffineBackFunc)ippiWarpAffineBack_32f_C3R : + type == CV_32FC4 ? (ippiWarpAffineBackFunc)ippiWarpAffineBack_32f_C4R : 0; int mode = flags == INTER_LINEAR ? IPPI_INTER_LINEAR : @@ -4394,7 +4394,7 @@ class IPPwarpPerspectiveInvoker : public ParallelLoopBody { public: - IPPwarpPerspectiveInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[3][3], int &_interpolation, int &_borderType, const Scalar &_borderValue, ippicviWarpPerspectiveBackFunc _func, bool *_ok) : + IPPwarpPerspectiveInvoker(Mat &_src, Mat &_dst, double (&_coeffs)[3][3], int &_interpolation, int &_borderType, const Scalar &_borderValue, ippiWarpPerspectiveBackFunc _func, bool *_ok) : ParallelLoopBody(), src(_src), dst(_dst), mode(_interpolation), coeffs(_coeffs), borderType(_borderType), borderValue(_borderValue), func(_func), ok(_ok) { *ok = true; @@ -4427,7 +4427,7 @@ private: int mode; int borderType; const Scalar borderValue; - ippicviWarpPerspectiveBackFunc func; + ippiWarpPerspectiveBackFunc func; bool *ok; const IPPwarpPerspectiveInvoker& operator= (const IPPwarpPerspectiveInvoker&); }; @@ -4476,16 +4476,16 @@ void cv::warpPerspective( InputArray _src, OutputArray _dst, InputArray _M0, ( borderType == cv::BORDER_TRANSPARENT || borderType == cv::BORDER_CONSTANT ) ) { int type = src.type(); - ippicviWarpPerspectiveBackFunc ippFunc = - type == CV_8UC1 ? (ippicviWarpPerspectiveBackFunc)ippicviWarpPerspectiveBack_8u_C1R : - type == CV_8UC3 ? (ippicviWarpPerspectiveBackFunc)ippicviWarpPerspectiveBack_8u_C3R : - type == CV_8UC4 ? (ippicviWarpPerspectiveBackFunc)ippicviWarpPerspectiveBack_8u_C4R : - type == CV_16UC1 ? (ippicviWarpPerspectiveBackFunc)ippicviWarpPerspectiveBack_16u_C1R : - type == CV_16UC3 ? (ippicviWarpPerspectiveBackFunc)ippicviWarpPerspectiveBack_16u_C3R : - type == CV_16UC4 ? (ippicviWarpPerspectiveBackFunc)ippicviWarpPerspectiveBack_16u_C4R : - type == CV_32FC1 ? (ippicviWarpPerspectiveBackFunc)ippicviWarpPerspectiveBack_32f_C1R : - type == CV_32FC3 ? (ippicviWarpPerspectiveBackFunc)ippicviWarpPerspectiveBack_32f_C3R : - type == CV_32FC4 ? (ippicviWarpPerspectiveBackFunc)ippicviWarpPerspectiveBack_32f_C4R : + ippiWarpPerspectiveBackFunc ippFunc = + type == CV_8UC1 ? (ippiWarpPerspectiveBackFunc)ippiWarpPerspectiveBack_8u_C1R : + type == CV_8UC3 ? (ippiWarpPerspectiveBackFunc)ippiWarpPerspectiveBack_8u_C3R : + type == CV_8UC4 ? (ippiWarpPerspectiveBackFunc)ippiWarpPerspectiveBack_8u_C4R : + type == CV_16UC1 ? (ippiWarpPerspectiveBackFunc)ippiWarpPerspectiveBack_16u_C1R : + type == CV_16UC3 ? (ippiWarpPerspectiveBackFunc)ippiWarpPerspectiveBack_16u_C3R : + type == CV_16UC4 ? (ippiWarpPerspectiveBackFunc)ippiWarpPerspectiveBack_16u_C4R : + type == CV_32FC1 ? (ippiWarpPerspectiveBackFunc)ippiWarpPerspectiveBack_32f_C1R : + type == CV_32FC3 ? (ippiWarpPerspectiveBackFunc)ippiWarpPerspectiveBack_32f_C3R : + type == CV_32FC4 ? (ippiWarpPerspectiveBackFunc)ippiWarpPerspectiveBack_32f_C4R : 0; int mode = flags == INTER_LINEAR ? IPPI_INTER_LINEAR : diff --git a/modules/imgproc/src/morph.cpp b/modules/imgproc/src/morph.cpp index 6030c7e6c8..9303b8d8c3 100644 --- a/modules/imgproc/src/morph.cpp +++ b/modules/imgproc/src/morph.cpp @@ -1161,53 +1161,53 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne case cvtype: \ {\ int specSize = 0, bufferSize = 0;\ - if (ippStsNoErr != ippicviMorphologyBorderGetSize_##flavor(roiSize.width, kernelSize, &specSize, &bufferSize))\ + if (ippStsNoErr != ippiMorphologyBorderGetSize_##flavor(roiSize.width, kernelSize, &specSize, &bufferSize))\ return false;\ - IppiMorphState *pSpec = (IppiMorphState*)ippicvMalloc(specSize);\ - Ipp8u *pBuffer = (Ipp8u*)ippicvMalloc(bufferSize);\ - if (ippStsNoErr != ippicviMorphologyBorderInit_##flavor(roiSize.width, kernel.data, kernelSize, pSpec, pBuffer))\ + IppiMorphState *pSpec = (IppiMorphState*)ippMalloc(specSize);\ + Ipp8u *pBuffer = (Ipp8u*)ippMalloc(bufferSize);\ + if (ippStsNoErr != ippiMorphologyBorderInit_##flavor(roiSize.width, kernel.data, kernelSize, pSpec, pBuffer))\ {\ - ippicvFree(pBuffer);\ - ippicvFree(pSpec);\ + ippFree(pBuffer);\ + ippFree(pSpec);\ return false;\ }\ bool ok = false;\ if (op == MORPH_ERODE)\ - ok = (ippStsNoErr == ippicviErodeBorder_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0], (Ipp##data_type *)dst.data, (int)dst.step[0],\ + ok = (ippStsNoErr == ippiErodeBorder_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0], (Ipp##data_type *)dst.data, (int)dst.step[0],\ roiSize, ippBorderRepl, 0, pSpec, pBuffer));\ else\ - ok = (ippStsNoErr == ippicviDilateBorder_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0], (Ipp##data_type *)dst.data, (int)dst.step[0],\ + ok = (ippStsNoErr == ippiDilateBorder_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0], (Ipp##data_type *)dst.data, (int)dst.step[0],\ roiSize, ippBorderRepl, 0, pSpec, pBuffer));\ - ippicvFree(pBuffer);\ - ippicvFree(pSpec);\ + ippFree(pBuffer);\ + ippFree(pSpec);\ return ok;\ }\ break; #else IppiPoint point = {anchor.x, anchor.y}; // this is case, which can be used with the anchor not in center of the kernel, but - // ippicviMorphologyBorderGetSize_, ippicviErodeBorderReplicate_ and ippicviDilateBorderReplicate_ are deprecate. + // ippiMorphologyBorderGetSize_, ippiErodeBorderReplicate_ and ippiDilateBorderReplicate_ are deprecate. #define IPP_MORPH_CASE(cvtype, flavor, data_type) \ case cvtype: \ {\ int specSize = 0;\ int bufferSize = 0;\ - if (ippStsNoErr != ippicviMorphologyBorderGetSize_##flavor( roiSize.width, kernelSize, &specSize, &bufferSize))\ + if (ippStsNoErr != ippiMorphologyBorderGetSize_##flavor( roiSize.width, kernelSize, &specSize, &bufferSize))\ return false;\ bool ok = false;\ - IppiMorphState* pState = (IppiMorphState*)ippicvMalloc(specSize);;\ - if (ippicviMorphologyInit_##flavor(roiSize.width, kernel.data, kernelSize, point, pState) >= 0)\ + IppiMorphState* pState = (IppiMorphState*)ippMalloc(specSize);;\ + if (ippiMorphologyInit_##flavor(roiSize.width, kernel.data, kernelSize, point, pState) >= 0)\ {\ if (op == MORPH_ERODE)\ - ok = ippicviErodeBorderReplicate_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0],\ + ok = ippiErodeBorderReplicate_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0],\ (Ipp##data_type *)dst.data, (int)dst.step[0],\ roiSize, ippBorderRepl, pState ) >= 0;\ else\ - ok = ippicviDilateBorderReplicate_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0],\ + ok = ippiDilateBorderReplicate_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0],\ (Ipp##data_type *)dst.data, (int)dst.step[0],\ roiSize, ippBorderRepl, pState ) >= 0;\ }\ - ippicvFree(pState);\ + ippFree(pState);\ return ok;\ }\ break; @@ -1234,13 +1234,13 @@ static bool IPPMorphReplicate(int op, const Mat &src, Mat &dst, const Mat &kerne case cvtype: \ {\ int bufSize = 0;\ - if (ippStsNoErr != ippicviFilterMinGetBufferSize_##flavor(src.cols, kernelSize, &bufSize))\ + if (ippStsNoErr != ippiFilterMinGetBufferSize_##flavor(src.cols, kernelSize, &bufSize))\ return false;\ AutoBuffer buf(bufSize + 64);\ uchar* buffer = alignPtr((uchar*)buf, 32);\ if (op == MORPH_ERODE)\ - return (ippStsNoErr == ippicviFilterMinBorderReplicate_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0], (Ipp##data_type *)dst.data, (int)dst.step[0], roiSize, kernelSize, point, buffer));\ - return (ippStsNoErr == ippicviFilterMaxBorderReplicate_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0], (Ipp##data_type *)dst.data, (int)dst.step[0], roiSize, kernelSize, point, buffer));\ + return (ippStsNoErr == ippiFilterMinBorderReplicate_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0], (Ipp##data_type *)dst.data, (int)dst.step[0], roiSize, kernelSize, point, buffer));\ + return (ippStsNoErr == ippiFilterMaxBorderReplicate_##flavor((Ipp##data_type *)_src->data, (int)_src->step[0], (Ipp##data_type *)dst.data, (int)dst.step[0], roiSize, kernelSize, point, buffer));\ }\ break; diff --git a/modules/imgproc/src/samplers.cpp b/modules/imgproc/src/samplers.cpp index 81bbf7656d..d6cc8a56fe 100644 --- a/modules/imgproc/src/samplers.cpp +++ b/modules/imgproc/src/samplers.cpp @@ -375,7 +375,7 @@ void cv::getRectSubPix( InputArray _image, Size patchSize, Point2f center, Mat patch = _patch.getMat(); #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) - typedef IppStatus (CV_STDCALL *ippicviGetRectSubPixFunc)( const void* src, int src_step, + typedef IppStatus (CV_STDCALL *ippiGetRectSubPixFunc)( const void* src, int src_step, IppiSize src_size, void* dst, int dst_step, IppiSize win_size, IppiPoint_32f center, @@ -385,10 +385,10 @@ void cv::getRectSubPix( InputArray _image, Size patchSize, Point2f center, IppiPoint_32f icenter = {center.x, center.y}; IppiSize src_size={image.cols, image.rows}, win_size={patch.cols, patch.rows}; int srctype = image.type(); - ippicviGetRectSubPixFunc ippfunc = - srctype == CV_8UC1 && ddepth == CV_8U ? (ippicviGetRectSubPixFunc)ippicviCopySubpixIntersect_8u_C1R : - srctype == CV_8UC1 && ddepth == CV_32F ? (ippicviGetRectSubPixFunc)ippicviCopySubpixIntersect_8u32f_C1R : - srctype == CV_32FC1 && ddepth == CV_32F ? (ippicviGetRectSubPixFunc)ippicviCopySubpixIntersect_32f_C1R : 0; + ippiGetRectSubPixFunc ippfunc = + srctype == CV_8UC1 && ddepth == CV_8U ? (ippiGetRectSubPixFunc)ippiCopySubpixIntersect_8u_C1R : + srctype == CV_8UC1 && ddepth == CV_32F ? (ippiGetRectSubPixFunc)ippiCopySubpixIntersect_8u32f_C1R : + srctype == CV_32FC1 && ddepth == CV_32F ? (ippiGetRectSubPixFunc)ippiCopySubpixIntersect_32f_C1R : 0; if( ippfunc && ippfunc(image.data, (int)image.step, src_size, patch.data, (int)patch.step, win_size, icenter, &minpt, &maxpt) >= 0 ) diff --git a/modules/imgproc/src/smooth.cpp b/modules/imgproc/src/smooth.cpp index 2282290ffe..9de25bdf77 100644 --- a/modules/imgproc/src/smooth.cpp +++ b/modules/imgproc/src/smooth.cpp @@ -1115,17 +1115,17 @@ void cv::GaussianBlur( InputArray _src, OutputArray _dst, Size ksize, Mat src = _src.getMat(), dst = _dst.getMat(); IppiSize roi = { src.cols, src.rows }; int specSize = 0, bufferSize = 0; - if (ippStsNoErr == ippicviFilterGaussianGetBufferSize(roi, (Ipp32u)ksize.width, ipp32f, 1, &specSize, &bufferSize)) + if (ippStsNoErr == ippiFilterGaussianGetBufferSize(roi, (Ipp32u)ksize.width, ipp32f, 1, &specSize, &bufferSize)) { - IppFilterGaussianSpec *pSpec = (IppFilterGaussianSpec*)ippicvMalloc(specSize); - Ipp8u *pBuffer = (Ipp8u*)ippicvMalloc(bufferSize); - if (ippStsNoErr == ippicviFilterGaussianInit(roi, (Ipp32u)ksize.width, (Ipp32f)sigma1, (IppiBorderType)borderType, ipp32f, 1, pSpec, pBuffer)) + IppFilterGaussianSpec *pSpec = (IppFilterGaussianSpec*)ippMalloc(specSize); + Ipp8u *pBuffer = (Ipp8u*)ippMalloc(bufferSize); + if (ippStsNoErr == ippiFilterGaussianInit(roi, (Ipp32u)ksize.width, (Ipp32f)sigma1, (IppiBorderType)borderType, ipp32f, 1, pSpec, pBuffer)) { - IppStatus sts = ippicviFilterGaussianBorder_32f_C1R( (const Ipp32f *)src.data, (int)src.step, + IppStatus sts = ippiFilterGaussianBorder_32f_C1R( (const Ipp32f *)src.data, (int)src.step, (Ipp32f *)dst.data, (int)dst.step, roi, 0.0, pSpec, pBuffer); - ippicvFree(pBuffer); - ippicvFree(pSpec); + ippFree(pBuffer); + ippFree(pSpec); if (ippStsNoErr == sts) return; } @@ -2187,19 +2187,19 @@ public: IppiSize kernel = {d, d}; IppiSize roi={dst.cols, range.end - range.start}; int bufsize=0; - if (ippStsNoErr != ippicviFilterBilateralGetBufSize_8u_C1R( ippiFilterBilateralGauss, roi, kernel, &bufsize)) + if (ippStsNoErr != ippiFilterBilateralGetBufSize_8u_C1R( ippiFilterBilateralGauss, roi, kernel, &bufsize)) { *ok = false; return; } AutoBuffer buf(bufsize); IppiFilterBilateralSpec *pSpec = (IppiFilterBilateralSpec *)alignPtr(&buf[0], 32); - if (ippStsNoErr != ippicviFilterBilateralInit_8u_C1R( ippiFilterBilateralGauss, kernel, (Ipp32f)sigma_color, (Ipp32f)sigma_space, 1, pSpec )) + if (ippStsNoErr != ippiFilterBilateralInit_8u_C1R( ippiFilterBilateralGauss, kernel, (Ipp32f)sigma_color, (Ipp32f)sigma_space, 1, pSpec )) { *ok = false; return; } - if (ippStsNoErr != ippicviFilterBilateral_8u_C1R( src.ptr(range.start) + radius * ((int)src.step[0] + 1), (int)src.step[0], dst.ptr(range.start), (int)dst.step[0], roi, kernel, pSpec )) + if (ippStsNoErr != ippiFilterBilateral_8u_C1R( src.ptr(range.start) + radius * ((int)src.step[0] + 1), (int)src.step[0], dst.ptr(range.start), (int)dst.step[0], roi, kernel, pSpec )) *ok = false; } private: diff --git a/modules/imgproc/src/sumpixels.cpp b/modules/imgproc/src/sumpixels.cpp index 240bcad680..f7749d4c18 100644 --- a/modules/imgproc/src/sumpixels.cpp +++ b/modules/imgproc/src/sumpixels.cpp @@ -44,7 +44,7 @@ #include "opencl_kernels.hpp" #if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7) -static IppStatus sts = ippicvInit(); +static IppStatus sts = ippInit(); #endif namespace cv @@ -371,22 +371,22 @@ void cv::integral( InputArray _src, OutputArray _sum, OutputArray _sqsum, Output { if( _sqsum.needed() ) { - status = ippicviSqrIntegral_8u32f64f_C1R( (const Ipp8u*)src.data, (int)src.step, (Ipp32f*)sum.data, (int)sum.step, (Ipp64f*)sqsum.data, (int)sqsum.step, srcRoiSize, 0, 0 ); + status = ippiSqrIntegral_8u32f64f_C1R( (const Ipp8u*)src.data, (int)src.step, (Ipp32f*)sum.data, (int)sum.step, (Ipp64f*)sqsum.data, (int)sqsum.step, srcRoiSize, 0, 0 ); } else { - status = ippicviIntegral_8u32f_C1R( (const Ipp8u*)src.data, (int)src.step, (Ipp32f*)sum.data, (int)sum.step, srcRoiSize, 0 ); + status = ippiIntegral_8u32f_C1R( (const Ipp8u*)src.data, (int)src.step, (Ipp32f*)sum.data, (int)sum.step, srcRoiSize, 0 ); } } else if( sdepth == CV_32S ) { if( _sqsum.needed() ) { - status = ippicviSqrIntegral_8u32s64f_C1R( (const Ipp8u*)src.data, (int)src.step, (Ipp32s*)sum.data, (int)sum.step, (Ipp64f*)sqsum.data, (int)sqsum.step, srcRoiSize, 0, 0 ); + status = ippiSqrIntegral_8u32s64f_C1R( (const Ipp8u*)src.data, (int)src.step, (Ipp32s*)sum.data, (int)sum.step, (Ipp64f*)sqsum.data, (int)sqsum.step, srcRoiSize, 0, 0 ); } else { - status = ippicviIntegral_8u32s_C1R( (const Ipp8u*)src.data, (int)src.step, (Ipp32s*)sum.data, (int)sum.step, srcRoiSize, 0 ); + status = ippiIntegral_8u32s_C1R( (const Ipp8u*)src.data, (int)src.step, (Ipp32s*)sum.data, (int)sum.step, srcRoiSize, 0 ); } } if (ippStsNoErr == status) diff --git a/modules/objdetect/src/haar.cpp b/modules/objdetect/src/haar.cpp index a2dfdd26fd..4b2d2b0d51 100644 --- a/modules/objdetect/src/haar.cpp +++ b/modules/objdetect/src/haar.cpp @@ -165,7 +165,7 @@ icvReleaseHidHaarClassifierCascade( CvHidHaarClassifierCascade** _cascade ) for( i = 0; i < cascade->count; i++ ) { if( cascade->ipp_stages[i] ) - ippicviHaarClassifierFree_32f( (IppiHaarClassifier_32f*)cascade->ipp_stages[i] ); + ippiHaarClassifierFree_32f( (IppiHaarClassifier_32f*)cascade->ipp_stages[i] ); } } cvFree( &cascade->ipp_stages ); @@ -1318,7 +1318,7 @@ public: if( cascade->hid_cascade->ipp_stages ) { IppiRect iequRect = {equRect.x, equRect.y, equRect.width, equRect.height}; - ippicviRectStdDev_32f_C1R(sum1.ptr(y1), (int)sum1.step, + ippiRectStdDev_32f_C1R(sum1.ptr(y1), (int)sum1.step, sqsum1.ptr(y1), (int)sqsum1.step, norm1->ptr(y1), (int)norm1->step, ippiSize(ssz.width, ssz.height), iequRect ); @@ -1340,7 +1340,7 @@ public: for( int j = 0; j < cascade->count; j++ ) { - if( ippicviApplyHaarClassifier_32f_C1R( + if( ippiApplyHaarClassifier_32f_C1R( sum1.ptr(y1), (int)sum1.step, norm1->ptr(y1), (int)norm1->step, mask1->ptr(y1), (int)mask1->step,