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
25e99c45
Commit
25e99c45
authored
Jan 12, 2015
by
Ilya Lavrenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avx2 in arithm
parent
70933ea9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
OpenCVCompilerOptions.cmake
cmake/OpenCVCompilerOptions.cmake
+4
-7
cvdef.h
modules/core/include/opencv2/core/cvdef.h
+3
-1
arithm.cpp
modules/core/src/arithm.cpp
+0
-0
color.cpp
modules/imgproc/src/color.cpp
+4
-1
No files found.
cmake/OpenCVCompilerOptions.cmake
View file @
25e99c45
...
...
@@ -224,14 +224,11 @@ if(MSVC)
set
(
OPENCV_EXTRA_FLAGS_RELEASE
"
${
OPENCV_EXTRA_FLAGS_RELEASE
}
/Zi"
)
endif
()
if
(
ENABLE_AVX AND NOT MSVC_VERSION LESS 1600
)
set
(
OPENCV_EXTRA_FLAGS
"
${
OPENCV_EXTRA_FLAGS
}
/arch:AVX"
)
endif
()
if
(
ENABLE_AVX2 AND NOT MSVC_VERSION LESS 1600
)
set
(
OPENCV_EXTRA_FLAGS
"
${
OPENCV_EXTRA_FLAGS
}
/arch:AVX2"
)
endif
()
if
(
ENABLE_
FMA3 AND NOT MSVC_VERSION LESS 1600
)
set
(
OPENCV_EXTRA_FLAGS
"
${
OPENCV_EXTRA_FLAGS
}
/arch:
FMA
"
)
if
(
ENABLE_
AVX AND NOT MSVC_VERSION LESS 1600 AND NOT OPENCV_EXTRA_FLAGS MATCHES
"/arch:"
)
set
(
OPENCV_EXTRA_FLAGS
"
${
OPENCV_EXTRA_FLAGS
}
/arch:
AVX
"
)
endif
()
if
(
ENABLE_SSE4_1 AND CV_ICC AND NOT OPENCV_EXTRA_FLAGS MATCHES
"/arch:"
)
...
...
@@ -252,7 +249,7 @@ if(MSVC)
endif
()
endif
()
if
(
ENABLE_SSE OR ENABLE_SSE2 OR ENABLE_SSE3 OR ENABLE_SSE4_1 OR ENABLE_AVX
)
if
(
ENABLE_SSE OR ENABLE_SSE2 OR ENABLE_SSE3 OR ENABLE_SSE4_1 OR ENABLE_AVX
OR ENABLE_AVX2
)
set
(
OPENCV_EXTRA_FLAGS
"
${
OPENCV_EXTRA_FLAGS
}
/Oi"
)
endif
()
...
...
@@ -312,7 +309,7 @@ if(MSVC)
string
(
REPLACE
"/W3"
"/W4"
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
"
)
if
(
NOT ENABLE_NOISY_WARNINGS AND MSVC_VERSION EQUAL 1400
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4510 /wd4610 /wd4312 /wd4201 /wd4244 /wd4328 /wd4267
)
ocv_warnings_disable
(
CMAKE_CXX_FLAGS /wd4510 /wd4610 /wd4312 /wd4201 /wd4244 /wd4328 /wd4267
/wd4324
)
endif
()
# allow extern "C" functions throw exceptions
...
...
modules/core/include/opencv2/core/cvdef.h
View file @
25e99c45
...
...
@@ -159,7 +159,9 @@
# define CV_SSE4_2 1
# endif
# if defined __POPCNT__ || (defined _MSC_VER && _MSC_VER >= 1500)
# include <popcntintrin.h>
# ifndef _MSC_VER
# include <popcntintrin.h>
# endif
# define CV_POPCNT 1
# endif
# if defined __AVX__ || (defined _MSC_FULL_VER && _MSC_FULL_VER >= 160040219)
...
...
modules/core/src/arithm.cpp
View file @
25e99c45
This diff is collapsed.
Click to expand it.
modules/imgproc/src/color.cpp
View file @
25e99c45
...
...
@@ -2879,6 +2879,8 @@ struct YCrCb2RGB_i<uchar>
v_delta
=
_mm_set1_epi16
(
ColorChannel
<
uchar
>::
half
());
v_delta2
=
_mm_set1_epi32
(
1
<<
(
yuv_shift
-
1
));
v_zero
=
_mm_setzero_si128
();
useSSE
=
coeffs
[
0
]
<=
std
::
numeric_limits
<
short
>::
max
();
}
// 16s x 8
...
...
@@ -2934,7 +2936,7 @@ struct YCrCb2RGB_i<uchar>
int
C0
=
coeffs
[
0
],
C1
=
coeffs
[
1
],
C2
=
coeffs
[
2
],
C3
=
coeffs
[
3
];
n
*=
3
;
if
(
dcn
==
3
)
if
(
dcn
==
3
&&
useSSE
)
{
for
(
;
i
<=
n
-
96
;
i
+=
96
,
dst
+=
dcn
*
32
)
{
...
...
@@ -3014,6 +3016,7 @@ struct YCrCb2RGB_i<uchar>
}
int
dstcn
,
blueIdx
;
int
coeffs
[
4
];
bool
useSSE
;
__m128i
v_c0
,
v_c1
,
v_c2
,
v_c3
,
v_delta2
;
__m128i
v_delta
,
v_alpha
,
v_zero
;
...
...
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