Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
bfc546d2
Commit
bfc546d2
authored
Apr 02, 2014
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable IPP ICV support
parent
2aab7b29
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
199 additions
and
332 deletions
+199
-332
CMakeLists.txt
CMakeLists.txt
+5
-4
OpenCVFindIPP.cmake
cmake/OpenCVFindIPP.cmake
+174
-306
OpenCVFindLibsPerf.cmake
cmake/OpenCVFindLibsPerf.cmake
+4
-7
cvconfig.h.in
cmake/templates/cvconfig.h.in
+1
-0
private.hpp
modules/core/include/opencv2/core/private.hpp
+6
-1
arithm.cpp
modules/core/src/arithm.cpp
+0
-12
system.cpp
modules/core/src/system.cpp
+8
-1
imgwarp.cpp
modules/imgproc/src/imgwarp.cpp
+1
-1
No files found.
CMakeLists.txt
View file @
bfc546d2
...
@@ -127,7 +127,8 @@ OCV_OPTION(WITH_FFMPEG "Include FFMPEG support" ON
...
@@ -127,7 +127,8 @@ OCV_OPTION(WITH_FFMPEG "Include FFMPEG support" ON
OCV_OPTION
(
WITH_GSTREAMER
"Include Gstreamer support"
ON
IF
(
UNIX AND NOT APPLE AND NOT ANDROID
)
)
OCV_OPTION
(
WITH_GSTREAMER
"Include Gstreamer support"
ON
IF
(
UNIX AND NOT APPLE AND NOT ANDROID
)
)
OCV_OPTION
(
WITH_GSTREAMER_0_10
"Enable Gstreamer 0.10 support (instead of 1.x)"
OFF
)
OCV_OPTION
(
WITH_GSTREAMER_0_10
"Enable Gstreamer 0.10 support (instead of 1.x)"
OFF
)
OCV_OPTION
(
WITH_GTK
"Include GTK support"
ON
IF
(
UNIX AND NOT APPLE AND NOT ANDROID
)
)
OCV_OPTION
(
WITH_GTK
"Include GTK support"
ON
IF
(
UNIX AND NOT APPLE AND NOT ANDROID
)
)
OCV_OPTION
(
WITH_IPP
"Include Intel IPP support"
OFF
IF
(
MSVC OR X86 OR X86_64
)
)
OCV_OPTION
(
WITH_ICV
"Include Intel IPP ICV support"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_IPP
"Include Intel IPP support"
OFF
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_JASPER
"Include JPEG2K support"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_JASPER
"Include JPEG2K support"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_JPEG
"Include JPEG support"
ON
)
OCV_OPTION
(
WITH_JPEG
"Include JPEG support"
ON
)
OCV_OPTION
(
WITH_WEBP
"Include WebP support"
ON
IF
(
NOT IOS
)
)
OCV_OPTION
(
WITH_WEBP
"Include WebP support"
ON
IF
(
NOT IOS
)
)
...
@@ -916,11 +917,11 @@ endif(DEFINED WITH_INTELPERC)
...
@@ -916,11 +917,11 @@ endif(DEFINED WITH_INTELPERC)
status
(
""
)
status
(
""
)
status
(
" Other third-party libraries:"
)
status
(
" Other third-party libraries:"
)
if
(
WITH_IPP AND IPP_FOUND
)
if
(
(
WITH_IPP OR WITH_ICV
)
AND HAVE_IPP
)
status
(
" Use IPP:"
"
${
IPP_
LATEST_VERSION_STR
}
[
${
IPP_LATEST_VERSION_MAJOR
}
.
${
IPP_LATEST_VERSION_MINOR
}
.
${
IPP_LATEST
_VERSION_BUILD
}
]"
)
status
(
" Use IPP:"
"
${
IPP_
VERSION_STR
}
[
${
IPP_VERSION_MAJOR
}
.
${
IPP_VERSION_MINOR
}
.
${
IPP
_VERSION_BUILD
}
]"
)
status
(
" at:"
"
${
IPP_ROOT_DIR
}
"
)
status
(
" at:"
"
${
IPP_ROOT_DIR
}
"
)
else
()
else
()
status
(
" Use IPP:"
WITH_IPP AND NOT IPP_FOUND
THEN
"IPP not found"
ELSE NO
)
status
(
" Use IPP:"
(
WITH_IPP OR WITH_ICV
)
AND NOT HAVE_IPP
THEN
"IPP not found"
ELSE NO
)
endif
()
endif
()
status
(
" Use Eigen:"
HAVE_EIGEN THEN
"YES (ver
${
EIGEN_WORLD_VERSION
}
.
${
EIGEN_MAJOR_VERSION
}
.
${
EIGEN_MINOR_VERSION
}
)"
ELSE NO
)
status
(
" Use Eigen:"
HAVE_EIGEN THEN
"YES (ver
${
EIGEN_WORLD_VERSION
}
.
${
EIGEN_MAJOR_VERSION
}
.
${
EIGEN_MINOR_VERSION
}
)"
ELSE NO
)
...
...
cmake/OpenCVFindIPP.cmake
View file @
bfc546d2
...
@@ -2,35 +2,41 @@
...
@@ -2,35 +2,41 @@
# The script to detect Intel(R) Integrated Performance Primitives (IPP)
# The script to detect Intel(R) Integrated Performance Primitives (IPP)
# installation/package
# installation/package
#
#
# This will try to find Intel IPP libraries, and include path by automatic
# Windows host:
# search through typical install locations and if failed it will
# Run script like this before cmake:
# examine IPPROOT environment variable.
# call "<IPP_INSTALL_DIR>\bin\ippvars.bat" intel64
# Note, IPPROOT is not set by IPP installer, it should be set manually.
# for example:
# call "C:\Program Files (x86)\Intel\Composer XE\ipp\bin\ippvars.bat" intel64
#
# Linux host:
# Run script like this before cmake:
# source /opt/intel/ipp/bin/ippvars.sh [ia32|intel64]
#
#
# On return this will define:
# On return this will define:
#
#
#
IPP_FOUND
- True if Intel IPP found
#
HAVE_IPP
- True if Intel IPP found
#
IPP_ROOT_DIR - root of IPP installation
#
HAVE_IPP_ICV_ONLY - True if Intel IPP ICV version is available
# IPP_
INCLUDE_DIRS - IPP include folder
# IPP_
ROOT_DIR - root of IPP installation
# IPP_
LIBRARY_DIRS - IPP libraries
folder
# IPP_
INCLUDE_DIRS - IPP include
folder
# IPP_LIBRARIES
- IPP libraries nam
es that are used by OpenCV
# IPP_LIBRARIES
- IPP librari
es that are used by OpenCV
# IPP_
LATEST_
VERSION_STR - string with the newest detected IPP version
# IPP_VERSION_STR - string with the newest detected IPP version
# IPP_
LATEST_
VERSION_MAJOR - numbers of IPP version (MAJOR.MINOR.BUILD)
# IPP_VERSION_MAJOR - numbers of IPP version (MAJOR.MINOR.BUILD)
# IPP_
LATEST_
VERSION_MINOR
# IPP_VERSION_MINOR
# IPP_
LATEST_
VERSION_BUILD
# IPP_VERSION_BUILD
#
#
# Created: 30 Dec 2010 by Vladimir Dudnik (vladimir.dudnik@intel.com)
# Created: 30 Dec 2010 by Vladimir Dudnik (vladimir.dudnik@intel.com)
#
#
set
(
IPP_FOUND
)
unset
(
HAVE_IPP CACHE
)
set
(
IPP_VERSION_STR
"5.3.0.0"
)
# will not detect earlier versions
unset
(
HAVE_IPP_ICV_ONLY
)
set
(
IPP_VERSION_MAJOR 0
)
unset
(
IPP_ROOT_DIR
)
set
(
IPP_VERSION_MINOR 0
)
unset
(
IPP_INCLUDE_DIRS
)
set
(
IPP_VERSION_BUILD 0
)
unset
(
IPP_LIBRARIES
)
set
(
IPP_ROOT_DIR
)
unset
(
IPP_VERSION_STR
)
set
(
IPP_INCLUDE_DIRS
)
unset
(
IPP_VERSION_MAJOR
)
set
(
IPP_LIBRARY_DIRS
)
unset
(
IPP_VERSION_MINOR
)
set
(
IPP_LIBRARIES
)
unset
(
IPP_VERSION_BUILD
)
set
(
IPP_LIB_PREFIX
${
CMAKE_STATIC_LIBRARY_PREFIX
}
)
set
(
IPP_LIB_PREFIX
${
CMAKE_STATIC_LIBRARY_PREFIX
}
)
set
(
IPP_LIB_SUFFIX
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
set
(
IPP_LIB_SUFFIX
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
)
set
(
IPP_PREFIX
"ipp"
)
set
(
IPP_PREFIX
"ipp"
)
...
@@ -42,322 +48,184 @@ set(IPPCC "cc") # color conversion
...
@@ -42,322 +48,184 @@ set(IPPCC "cc") # color conversion
set
(
IPPCV
"cv"
)
# computer vision
set
(
IPPCV
"cv"
)
# computer vision
set
(
IPPVM
"vm"
)
# vector math
set
(
IPPVM
"vm"
)
# vector math
set
(
IPP_X64 0
)
set
(
IPP_X64 0
)
if
(
CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8
)
if
(
CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8
)
set
(
IPP_X64 1
)
set
(
IPP_X64 1
)
endif
()
endif
()
if
(
CMAKE_CL_64
)
if
(
CMAKE_CL_64
)
set
(
IPP_X64 1
)
set
(
IPP_X64 1
)
endif
()
endif
()
# ------------------------------------------------------------------------
# This function detects IPP version by analyzing ippversion.h file
# This function detect IPP version by analyzing ippversion.h file
macro
(
ipp_get_version _ROOT_DIR
)
# Note, ippversion.h file was inroduced since IPP 5.3
unset
(
_VERSION_STR
)
# ------------------------------------------------------------------------
unset
(
_MAJOR
)
function
(
get_ipp_version _ROOT_DIR
)
unset
(
_MINOR
)
set
(
_VERSION_STR
)
unset
(
_BUILD
)
set
(
_MAJOR
)
set
(
_MINOR
)
# read IPP version info from file
set
(
_BUILD
)
file
(
STRINGS
${
_ROOT_DIR
}
/include/ippversion.h STR1 REGEX
"IPP_VERSION_MAJOR"
)
file
(
STRINGS
${
_ROOT_DIR
}
/include/ippversion.h STR2 REGEX
"IPP_VERSION_MINOR"
)
# read IPP version info from file
file
(
STRINGS
${
_ROOT_DIR
}
/include/ippversion.h STR3 REGEX
"IPP_VERSION_BUILD"
)
file
(
STRINGS
${
_ROOT_DIR
}
/include/ippversion.h STR1 REGEX
"IPP_VERSION_MAJOR"
)
if
(
"
${
STR3
}
"
STREQUAL
""
)
file
(
STRINGS
${
_ROOT_DIR
}
/include/ippversion.h STR2 REGEX
"IPP_VERSION_MINOR"
)
file
(
STRINGS
${
_ROOT_DIR
}
/include/ippversion.h STR3 REGEX
"IPP_VERSION_UPDATE"
)
file
(
STRINGS
${
_ROOT_DIR
}
/include/ippversion.h STR3 REGEX
"IPP_VERSION_BUILD"
)
endif
()
if
(
"
${
STR3
}
"
STREQUAL
""
)
file
(
STRINGS
${
_ROOT_DIR
}
/include/ippversion.h STR4 REGEX
"IPP_VERSION_STR"
)
file
(
STRINGS
${
_ROOT_DIR
}
/include/ippversion.h STR3 REGEX
"IPP_VERSION_UPDATE"
)
endif
()
# extract info and assign to variables
file
(
STRINGS
${
_ROOT_DIR
}
/include/ippversion.h STR4 REGEX
"IPP_VERSION_STR"
)
string
(
REGEX MATCHALL
"[0-9]+"
_MAJOR
${
STR1
}
)
string
(
REGEX MATCHALL
"[0-9]+"
_MINOR
${
STR2
}
)
# extract info and assign to variables
string
(
REGEX MATCHALL
"[0-9]+"
_BUILD
${
STR3
}
)
string
(
REGEX MATCHALL
"[0-9]+"
_MAJOR
${
STR1
}
)
string
(
REGEX MATCHALL
"[0-9]+[.]+[0-9]+[^
\"
]+|[0-9]+[.]+[0-9]+"
_VERSION_STR
${
STR4
}
)
string
(
REGEX MATCHALL
"[0-9]+"
_MINOR
${
STR2
}
)
string
(
REGEX MATCHALL
"[0-9]+"
_BUILD
${
STR3
}
)
# export info to parent scope
string
(
REGEX MATCHALL
"[0-9]+[.]+[0-9]+[^
\"
]+|[0-9]+[.]+[0-9]+"
_VERSION_STR
${
STR4
}
)
set
(
IPP_VERSION_STR
${
_VERSION_STR
}
)
set
(
IPP_VERSION_MAJOR
${
_MAJOR
}
)
# export info to parent scope
set
(
IPP_VERSION_MINOR
${
_MINOR
}
)
set
(
IPP_VERSION_STR
${
_VERSION_STR
}
PARENT_SCOPE
)
set
(
IPP_VERSION_BUILD
${
_BUILD
}
)
set
(
IPP_VERSION_MAJOR
${
_MAJOR
}
PARENT_SCOPE
)
set
(
IPP_VERSION_MINOR
${
_MINOR
}
PARENT_SCOPE
)
set
(
__msg
)
set
(
IPP_VERSION_BUILD
${
_BUILD
}
PARENT_SCOPE
)
if
(
EXISTS
${
_ROOT_DIR
}
/include/ippicv.h
)
ocv_assert
(
WITH_ICV AND NOT WITH_IPP
)
message
(
STATUS
"found IPP:
${
_MAJOR
}
.
${
_MINOR
}
.
${
_BUILD
}
[
${
_VERSION_STR
}
]"
)
set
(
__msg
" ICV version"
)
message
(
STATUS
"at:
${
_ROOT_DIR
}
"
)
set
(
HAVE_IPP_ICV_ONLY 1
)
endif
()
message
(
STATUS
"found IPP:
${
_MAJOR
}
.
${
_MINOR
}
.
${
_BUILD
}
[
${
_VERSION_STR
}
]
${
__msg
}
"
)
message
(
STATUS
"at:
${
_ROOT_DIR
}
"
)
endmacro
()
# This function sets IPP_INCLUDE_DIRS and IPP_LIBRARIES variables
macro
(
ipp_set_variables _LATEST_VERSION
)
if
(
${
_LATEST_VERSION
}
VERSION_LESS
"7.0"
)
message
(
SEND_ERROR
"IPP
${
_LATEST_VERSION
}
is not supported"
)
unset
(
HAVE_IPP
)
return
()
return
()
endif
()
endfunction
()
# set INCLUDE and LIB folders
set
(
IPP_INCLUDE_DIRS
${
IPP_ROOT_DIR
}
/include
)
# ------------------------------------------------------------------------
# This is auxiliary function called from set_ipp_variables()
if
(
NOT HAVE_IPP_ICV_ONLY
)
# to set IPP_LIBRARIES variable in IPP 6.x style (IPP 5.3 should also work)
if
(
APPLE
)
# ------------------------------------------------------------------------
set
(
IPP_LIBRARY_DIR
${
IPP_ROOT_DIR
}
/lib
)
function
(
set_ipp_old_libraries
)
elseif
(
IPP_X64
)
set
(
IPP_PREFIX
"ipp"
)
if
(
NOT EXISTS
${
IPP_ROOT_DIR
}
/lib/intel64
)
set
(
IPP_SUFFIX
)
# old style static core libs suffix
message
(
SEND_ERROR
"IPP EM64T libraries not found"
)
set
(
IPP_ARCH
)
# architecture suffix
endif
()
set
(
IPP_DISP
"emerged"
)
# old style dipatcher and cpu-specific
set
(
IPP_LIBRARY_DIR
${
IPP_ROOT_DIR
}
/lib/intel64
)
set
(
IPP_MRGD
"merged"
)
# static libraries
else
()
set
(
IPPCORE
"core"
)
# core functionality
if
(
NOT EXISTS
${
IPP_ROOT_DIR
}
/lib/ia32
)
set
(
IPPSP
"s"
)
# signal processing
message
(
SEND_ERROR
"IPP IA32 libraries not found"
)
set
(
IPPIP
"i"
)
# image processing
endif
()
set
(
IPPCC
"cc"
)
# color conversion
set
(
IPP_LIBRARY_DIR
${
IPP_ROOT_DIR
}
/lib/ia32
)
set
(
IPPCV
"cv"
)
# computer vision
set
(
IPPVM
"vm"
)
# vector math
if
(
IPP_X64
)
set
(
IPP_ARCH
"em64t"
)
endif
()
endif
()
else
()
if
(
WIN32
)
if
(
APPLE
)
set
(
IPP_SUFFIX
"l"
)
set
(
IPP_LIBRARY_DIR
${
IPP_ROOT_DIR
}
/libs/macosx
)
elseif
(
WIN32 AND NOT ARM
)
set
(
IPP_LIBRARY_DIR
${
IPP_ROOT_DIR
}
/libs/windows
)
elseif
(
UNIX
)
set
(
IPP_LIBRARY_DIR
${
IPP_ROOT_DIR
}
/libs/linux
)
else
()
message
(
MESSAGE
"IPP
${
_LATEST_VERSION
}
at
${
IPP_ROOT_DIR
}
is not supported"
)
unset
(
HAVE_IPP
)
return
()
endif
()
endif
()
if
(
X86_64
)
set
(
IPP_LIBRARIES
set
(
IPP_LIBRARY_DIR
${
IPP_LIBRARY_DIR
}
/intel64
)
${
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
()
else
()
if
(
WIN32
)
set
(
IPP_LIBRARY_DIR
${
IPP_LIBRARY_DIR
}
/ia32
)
set
(
IPP_SUFFIX
"mt"
)
# static not threaded libs suffix IPP 8.x for Windows
else
()
set
(
IPP_SUFFIX
""
)
# static not threaded libs suffix IPP 8.x for Linux/OS X
endif
()
endif
()
endif
()
set
(
IPPCORE
"core"
)
# core functionality
endif
()
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
set
(
IPP_PREFIX
"ipp"
)
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPVM
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
if
(
${
_LATEST_VERSION
}
VERSION_LESS
"8.0"
)
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPCC
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
set
(
IPP_SUFFIX
"_l"
)
# static not threaded libs suffix IPP 7.x
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPCV
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
else
()
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPI
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
if
(
WIN32
)
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPS
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
set
(
IPP_SUFFIX
"mt"
)
# static not threaded libs suffix IPP 8.x for Windows
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPCORE
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
)
else
()
set
(
IPP_SUFFIX
""
)
# static not threaded libs suffix IPP 8.x for Linux/OS X
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
()
endif
()
set
(
IPP_LIBRARIES
${
IPP_LIBRARIES
}
PARENT_SCOPE
)
endif
()
return
()
set
(
IPPCORE
"core"
)
# core functionality
set
(
IPPSP
"s"
)
# signal processing
endfunction
()
set
(
IPPIP
"i"
)
# image processing
set
(
IPPCC
"cc"
)
# color conversion
set
(
IPPCV
"cv"
)
# computer vision
# ------------------------------------------------------------------------
set
(
IPPVM
"vm"
)
# vector math
# This function will set
# IPP_INCLUDE_DIRS, IPP_LIBRARY_DIRS and IPP_LIBRARIES variables depending
list
(
APPEND IPP_LIBRARIES
${
IPP_LIBRARY_DIR
}
/
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPVM
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
)
# on IPP version parameter.
list
(
APPEND IPP_LIBRARIES
${
IPP_LIBRARY_DIR
}
/
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPCC
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
)
# Since IPP 7.0 version library names and install folder structure
list
(
APPEND IPP_LIBRARIES
${
IPP_LIBRARY_DIR
}
/
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPCV
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
)
# was changed
list
(
APPEND IPP_LIBRARIES
${
IPP_LIBRARY_DIR
}
/
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPI
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
)
# ------------------------------------------------------------------------
list
(
APPEND IPP_LIBRARIES
${
IPP_LIBRARY_DIR
}
/
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPS
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
)
function
(
set_ipp_variables _LATEST_VERSION
)
list
(
APPEND IPP_LIBRARIES
${
IPP_LIBRARY_DIR
}
/
${
IPP_LIB_PREFIX
}${
IPP_PREFIX
}${
IPPCORE
}${
IPP_SUFFIX
}${
IPP_LIB_SUFFIX
}
)
if
(
${
_LATEST_VERSION
}
VERSION_LESS
"7.0"
)
# message(STATUS "old")
# FIXIT
# if(UNIX AND NOT HAVE_IPP_ICV_ONLY)
# set INCLUDE and LIB folders
# get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../lib REALPATH)
set
(
IPP_INCLUDE_DIRS
${
IPP_ROOT_DIR
}
/include PARENT_SCOPE
)
if
(
UNIX
)
set
(
IPP_LIBRARY_DIRS
${
IPP_ROOT_DIR
}
/lib PARENT_SCOPE
)
if
(
NOT HAVE_IPP_ICV_ONLY
)
get_filename_component
(
INTEL_COMPILER_LIBRARY_DIR
${
IPP_ROOT_DIR
}
/../lib REALPATH
)
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
()
# 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
()
else
()
# message(STATUS "new")
set
(
INTEL_COMPILER_LIBRARY_DIR
"/opt/intel/lib"
)
# 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
()
endif
()
if
(
IPP_X64
)
return
()
if
(
NOT EXISTS
${
INTEL_COMPILER_LIBRARY_DIR
}
/intel64
)
message
(
SEND_ERROR
"Intel compiler EM64T libraries not found"
)
endfunction
()
endif
()
set
(
INTEL_COMPILER_LIBRARY_DIR
${
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
(
INTEL_COMPILER_LIBRARY_DIR
${
INTEL_COMPILER_LIBRARY_DIR
}
/ia32
)
endif
()
list
(
APPEND IPP_LIBRARIES
${
INTEL_COMPILER_LIBRARY_DIR
}
/
${
IPP_LIB_PREFIX
}
irc
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
list
(
APPEND IPP_LIBRARIES
${
INTEL_COMPILER_LIBRARY_DIR
}
/
${
IPP_LIB_PREFIX
}
imf
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
list
(
APPEND IPP_LIBRARIES
${
INTEL_COMPILER_LIBRARY_DIR
}
/
${
IPP_LIB_PREFIX
}
svml
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
endif
()
#message(STATUS "IPP libs: ${IPP_LIBRARIES}")
endmacro
()
if
(
WITH_IPP
)
set
(
IPPPATH $ENV{IPPROOT}
)
if
(
UNIX
)
list
(
APPEND IPPPATH /opt/intel/ipp
)
endif
()
elseif
(
WITH_ICV
)
if
(
DEFINED ENV{IPPICVROOT}
)
set
(
IPPPATH $ENV{IPPICVROOT}
)
else
()
set
(
IPPPATH
${
OpenCV_SOURCE_DIR
}
/3rdparty/ippicv
)
endif
()
endif
()
# ------------------------------------------------------------------------
# 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
(
find_path
(
IPP_H_PATH
IPP_H_PATH
NAMES ippversion.h
NAMES ippversion.h
PATHS $
ENV{IPPROOT
}
PATHS
$
{
IPPPATH
}
PATH_SUFFIXES include
PATH_SUFFIXES include
DOC
"The path to Intel(R) IPP header files"
DOC
"The path to Intel(R) IPP header files"
NO_DEFAULT_PATH
NO_DEFAULT_PATH
NO_CMAKE_PATH
)
NO_CMAKE_PATH
)
if
(
IPP_H_PATH
)
if
(
IPP_H_PATH
)
set
(
IPP_FOUND
1
)
set
(
HAVE_IPP
1
)
# traverse up to IPPROOT level
get_filename_component
(
IPP_ROOT_DIR
${
IPP_H_PATH
}
PATH
)
get_filename_component
(
IPP_ROOT_DIR
${
IPP_H_PATH
}
PATH
)
# extract IPP version info
ipp_get_version
(
${
IPP_ROOT_DIR
}
)
get_ipp_version
(
${
IPP_ROOT_DIR
}
)
ipp_set_variables
(
${
IPP_VERSION_STR
}
)
# 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
}
)
endif
()
endif
()
if
(
NOT IPP_FOUND
)
if
(
WIN32 AND MINGW AND NOT IPP_VERSION_MAJOR LESS 7
)
# 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
# Since IPP built with Microsoft compiler and /GS option
# ======================================================
# ======================================================
# From Windows SDK 7.1
# From Windows SDK 7.1
...
...
cmake/OpenCVFindLibsPerf.cmake
View file @
bfc546d2
...
@@ -8,16 +8,13 @@ if(WITH_TBB)
...
@@ -8,16 +8,13 @@ if(WITH_TBB)
endif
(
WITH_TBB
)
endif
(
WITH_TBB
)
# --- IPP ---
# --- IPP ---
ocv_clear_vars
(
IPP_FOUND
)
if
(
WITH_IPP OR WITH_ICV
)
if
(
WITH_IPP
)
include
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/OpenCVFindIPP.cmake"
)
include
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/OpenCVFindIPP.cmake"
)
if
(
IPP_FOUND
)
if
(
HAVE_IPP
)
add_definitions
(
-DHAVE_IPP
)
ocv_include_directories
(
${
IPP_INCLUDE_DIRS
}
)
ocv_include_directories
(
${
IPP_INCLUDE_DIRS
}
)
link_directories
(
${
IPP_LIBRARY_DIRS
}
)
list
(
APPEND OPENCV_LINKER_LIBS
${
IPP_LIBRARIES
}
)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
${
IPP_LIBRARIES
}
)
endif
()
endif
()
endif
(
WITH_IPP
)
endif
()
# --- CUDA ---
# --- CUDA ---
if
(
WITH_CUDA
)
if
(
WITH_CUDA
)
...
...
cmake/templates/cvconfig.h.in
View file @
bfc546d2
...
@@ -93,6 +93,7 @@
...
@@ -93,6 +93,7 @@
/* Intel Integrated Performance Primitives */
/* Intel Integrated Performance Primitives */
#cmakedefine HAVE_IPP
#cmakedefine HAVE_IPP
#cmakedefine HAVE_IPP_ICV_ONLY
/* JPEG-2000 codec */
/* JPEG-2000 codec */
#cmakedefine HAVE_JASPER
#cmakedefine HAVE_JASPER
...
...
modules/core/include/opencv2/core/private.hpp
View file @
bfc546d2
...
@@ -210,7 +210,12 @@ CV_EXPORTS void scalarToRawData(const cv::Scalar& s, void* buf, int type, int un
...
@@ -210,7 +210,12 @@ CV_EXPORTS void scalarToRawData(const cv::Scalar& s, void* buf, int type, int un
\****************************************************************************************/
\****************************************************************************************/
#ifdef HAVE_IPP
#ifdef HAVE_IPP
# include "ipp.h"
# ifdef HAVE_IPP_ICV_ONLY
# include "ippicv.h"
# include "ippicv_fn_map.h"
# else
# include "ipp.h"
# endif
static
inline
IppiSize
ippiSize
(
int
width
,
int
height
)
static
inline
IppiSize
ippiSize
(
int
width
,
int
height
)
{
{
...
...
modules/core/src/arithm.cpp
View file @
bfc546d2
...
@@ -52,18 +52,6 @@
...
@@ -52,18 +52,6 @@
namespace
cv
namespace
cv
{
{
#if ARITHM_USE_IPP
struct
IPPArithmInitializer
{
IPPArithmInitializer
(
void
)
{
ippStaticInit
();
}
};
IPPArithmInitializer
ippArithmInitializer
;
#endif
struct
NOP
{};
struct
NOP
{};
#if CV_SSE2
#if CV_SSE2
...
...
modules/core/src/system.cpp
View file @
bfc546d2
...
@@ -274,7 +274,14 @@ volatile bool useOptimizedFlag = true;
...
@@ -274,7 +274,14 @@ volatile bool useOptimizedFlag = true;
#ifdef HAVE_IPP
#ifdef HAVE_IPP
struct
IPPInitializer
struct
IPPInitializer
{
{
IPPInitializer
(
void
)
{
ippStaticInit
();
}
IPPInitializer
(
void
)
{
#if IPP_VERSION_MAJOR >= 8
ippInit
();
#else
ippStaticInit
();
#endif
}
};
};
IPPInitializer
ippInitializer
;
IPPInitializer
ippInitializer
;
...
...
modules/imgproc/src/imgwarp.cpp
View file @
bfc546d2
...
@@ -1982,7 +1982,7 @@ public:
...
@@ -1982,7 +1982,7 @@ public:
}
}
private
:
private
:
Mat
&
src
;
const
Mat
&
src
;
Mat
&
dst
;
Mat
&
dst
;
double
inv_scale_x
;
double
inv_scale_x
;
double
inv_scale_y
;
double
inv_scale_y
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment