Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv_contrib
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_contrib
Commits
a181e541
Commit
a181e541
authored
Nov 22, 2015
by
Maksim Shabunin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #398 from grundman:patch-1
parents
67ceb42d
2a4bfeeb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
22 deletions
+30
-22
edgeaware_filters_common.cpp
modules/ximgproc/src/edgeaware_filters_common.cpp
+30
-22
No files found.
modules/ximgproc/src/edgeaware_filters_common.cpp
View file @
a181e541
...
@@ -48,7 +48,16 @@ using namespace std;
...
@@ -48,7 +48,16 @@ using namespace std;
#endif
#endif
#if CV_SSE
#if CV_SSE
static
volatile
bool
CPU_SUPPORT_SSE1
=
cv
::
checkHardwareSupport
(
CV_CPU_SSE
);
namespace
{
inline
bool
CPU_SUPPORT_SSE1
()
{
static
const
bool
is_supported
=
cv
::
checkHardwareSupport
(
CV_CPU_SSE
);
return
is_supported
;
}
}
// end
#endif
#endif
namespace
cv
namespace
cv
...
@@ -146,7 +155,7 @@ void add_(register float *dst, register float *src1, int w)
...
@@ -146,7 +155,7 @@ void add_(register float *dst, register float *src1, int w)
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
b
;
__m128
a
,
b
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -166,7 +175,7 @@ void mul(register float *dst, register float *src1, register float *src2, int w)
...
@@ -166,7 +175,7 @@ void mul(register float *dst, register float *src1, register float *src2, int w)
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
b
;
__m128
a
,
b
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -186,7 +195,7 @@ void mul(register float *dst, register float *src1, float src2, int w)
...
@@ -186,7 +195,7 @@ void mul(register float *dst, register float *src1, float src2, int w)
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
b
;
__m128
a
,
b
;
b
=
_mm_set_ps1
(
src2
);
b
=
_mm_set_ps1
(
src2
);
...
@@ -206,7 +215,7 @@ void mad(register float *dst, register float *src1, float alpha, float beta, int
...
@@ -206,7 +215,7 @@ void mad(register float *dst, register float *src1, float alpha, float beta, int
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
b
,
c
;
__m128
a
,
b
,
c
;
a
=
_mm_set_ps1
(
alpha
);
a
=
_mm_set_ps1
(
alpha
);
...
@@ -228,7 +237,7 @@ void sqr_(register float *dst, register float *src1, int w)
...
@@ -228,7 +237,7 @@ void sqr_(register float *dst, register float *src1, int w)
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
;
__m128
a
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -247,7 +256,7 @@ void sqr_dif(register float *dst, register float *src1, register float *src2, in
...
@@ -247,7 +256,7 @@ void sqr_dif(register float *dst, register float *src1, register float *src2, in
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
d
;
__m128
d
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -266,7 +275,7 @@ void add_mul(register float *dst, register float *src1, register float *src2, in
...
@@ -266,7 +275,7 @@ void add_mul(register float *dst, register float *src1, register float *src2, in
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
b
,
c
;
__m128
a
,
b
,
c
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -290,7 +299,7 @@ void add_sqr(register float *dst, register float *src1, int w)
...
@@ -290,7 +299,7 @@ void add_sqr(register float *dst, register float *src1, int w)
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
c
;
__m128
a
,
c
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -313,7 +322,7 @@ void add_sqr_dif(register float *dst, register float *src1, register float *src2
...
@@ -313,7 +322,7 @@ void add_sqr_dif(register float *dst, register float *src1, register float *src2
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
d
;
__m128
a
,
d
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -336,7 +345,7 @@ void sub_mul(register float *dst, register float *src1, register float *src2, in
...
@@ -336,7 +345,7 @@ void sub_mul(register float *dst, register float *src1, register float *src2, in
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
b
,
c
;
__m128
a
,
b
,
c
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -358,7 +367,7 @@ void sub_mad(register float *dst, register float *src1, register float *src2, fl
...
@@ -358,7 +367,7 @@ void sub_mad(register float *dst, register float *src1, register float *src2, fl
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
b
,
c
;
__m128
a
,
b
,
c
;
__m128
cnst
=
_mm_set_ps1
(
c0
);
__m128
cnst
=
_mm_set_ps1
(
c0
);
...
@@ -382,7 +391,7 @@ void det_2x2(register float *dst, register float *a00, register float *a01, regi
...
@@ -382,7 +391,7 @@ void det_2x2(register float *dst, register float *a00, register float *a01, regi
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
b
;
__m128
a
,
b
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -402,7 +411,7 @@ void div_det_2x2(register float *a00, register float *a01, register float *a11,
...
@@ -402,7 +411,7 @@ void div_det_2x2(register float *a00, register float *a01, register float *a11,
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
const
__m128
SIGN_MASK
=
_mm_set_ps1
(
getFloatSignBit
());
const
__m128
SIGN_MASK
=
_mm_set_ps1
(
getFloatSignBit
());
...
@@ -442,7 +451,7 @@ void div_1x(register float *a1, register float *b1, int w)
...
@@ -442,7 +451,7 @@ void div_1x(register float *a1, register float *b1, int w)
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
_a1
,
_b1
;
__m128
_a1
,
_b1
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -463,7 +472,7 @@ void inv_self(register float *src, int w)
...
@@ -463,7 +472,7 @@ void inv_self(register float *src, int w)
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
;
__m128
a
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -483,7 +492,7 @@ void sqrt_(register float *dst, register float *src, int w)
...
@@ -483,7 +492,7 @@ void sqrt_(register float *dst, register float *src, int w)
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
;
__m128
a
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -501,7 +510,7 @@ void min_(register float *dst, register float *src1, register float *src2, int w
...
@@ -501,7 +510,7 @@ void min_(register float *dst, register float *src1, register float *src2, int w
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
a
,
b
;
__m128
a
,
b
;
for
(;
j
<
w
-
3
;
j
+=
4
)
for
(;
j
<
w
-
3
;
j
+=
4
)
...
@@ -522,7 +531,7 @@ void rf_vert_row_pass(register float *curRow, register float *prevRow, float alp
...
@@ -522,7 +531,7 @@ void rf_vert_row_pass(register float *curRow, register float *prevRow, float alp
{
{
register
int
j
=
0
;
register
int
j
=
0
;
#if CV_SSE
#if CV_SSE
if
(
CPU_SUPPORT_SSE1
)
if
(
CPU_SUPPORT_SSE1
()
)
{
{
__m128
cur
,
prev
,
res
;
__m128
cur
,
prev
,
res
;
__m128
alpha
=
_mm_set_ps1
(
alphaVal
);
__m128
alpha
=
_mm_set_ps1
(
alphaVal
);
...
@@ -543,5 +552,5 @@ void rf_vert_row_pass(register float *curRow, register float *prevRow, float alp
...
@@ -543,5 +552,5 @@ void rf_vert_row_pass(register float *curRow, register float *prevRow, float alp
}
//end of cv::ximgproc::intrinsics
}
//end of cv::ximgproc::intrinsics
}
//end of cv::ximgproc
}
//end of cv::ximgproc
}
//end of cv
}
//end of cv
\ No newline at end of file
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