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
8a767689
Commit
8a767689
authored
May 06, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11470 from seiko2plus:VSXImprovements_2
parents
60e5e213
115b10ed
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
16 deletions
+36
-16
intrin_vsx.hpp
modules/core/include/opencv2/core/hal/intrin_vsx.hpp
+23
-14
test_intrin_utils.hpp
modules/core/test/test_intrin_utils.hpp
+12
-1
test_hdr.cpp
modules/photo/test/test_hdr.cpp
+1
-1
No files found.
modules/core/include/opencv2/core/hal/intrin_vsx.hpp
View file @
8a767689
...
...
@@ -589,7 +589,7 @@ inline _Tpvec v_rotate_left(const _Tpvec& a, const _Tpvec& b)
return
_Tpvec
(
vec_sld
(
a
.
val
,
b
.
val
,
CV_SHIFT
));
}
#define OPENCV_IMPL_VSX_ROTATE_64
(_Tpvec, suffix, rg1, rg2)
\
#define OPENCV_IMPL_VSX_ROTATE_64
_2RG(_Tpvec, suffix, rg1, rg2)
\
template<int imm> \
inline _Tpvec v_rotate_##suffix(const _Tpvec& a, const _Tpvec& b) \
{ \
...
...
@@ -598,11 +598,13 @@ inline _Tpvec v_rotate_##suffix(const _Tpvec& a, const _Tpvec& b) \
return imm ? b : a; \
}
OPENCV_IMPL_VSX_ROTATE_64
(
v_int64x2
,
right
,
a
,
b
)
OPENCV_IMPL_VSX_ROTATE_64
(
v_uint64x2
,
right
,
a
,
b
)
#define OPENCV_IMPL_VSX_ROTATE_64_2RG_LR(_Tpvec) \
OPENCV_IMPL_VSX_ROTATE_64_2RG(_Tpvec, left, b, a) \
OPENCV_IMPL_VSX_ROTATE_64_2RG(_Tpvec, right, a, b)
OPENCV_IMPL_VSX_ROTATE_64
(
v_int64x2
,
left
,
b
,
a
)
OPENCV_IMPL_VSX_ROTATE_64
(
v_uint64x2
,
left
,
b
,
a
)
OPENCV_IMPL_VSX_ROTATE_64_2RG_LR
(
v_float64x2
)
OPENCV_IMPL_VSX_ROTATE_64_2RG_LR
(
v_uint64x2
)
OPENCV_IMPL_VSX_ROTATE_64_2RG_LR
(
v_int64x2
)
/* Extract */
template
<
int
s
,
typename
_Tpvec
>
...
...
@@ -716,26 +718,33 @@ inline int v_signmask(const v_uint64x2& a)
inline
int
v_signmask
(
const
v_float64x2
&
a
)
{
return
v_signmask
(
v_reinterpret_as_s64
(
a
));
}
template
<
typename
_Tpvec
>
inline
bool
v_check_all
(
const
_Tpvec
&
a
)
{
return
vec_all_lt
(
a
.
val
,
_Tpvec
().
val
);}
inline
bool
v_check_all
(
const
v_uint8x16
&
a
)
{
return
vec_all_lt
(
a
.
val
,
_Tpvec
().
val
);
}
inline
bool
v_check_all
(
const
v_uint8x16
&
a
)
{
return
v_check_all
(
v_reinterpret_as_s8
(
a
));
}
inline
bool
v_check_all
(
const
v_uint16x8
&
a
)
inline
bool
v_check_all
(
const
v_uint16x8
&
a
)
{
return
v_check_all
(
v_reinterpret_as_s16
(
a
));
}
inline
bool
v_check_all
(
const
v_uint32x4
&
a
)
inline
bool
v_check_all
(
const
v_uint32x4
&
a
)
{
return
v_check_all
(
v_reinterpret_as_s32
(
a
));
}
inline
bool
v_check_all
(
const
v_float32x4
&
a
)
{
return
v_check_all
(
v_reinterpret_as_s32
(
a
));
}
inline
bool
v_check_all
(
const
v_float64x2
&
a
)
{
return
v_check_all
(
v_reinterpret_as_s64
(
a
));
}
template
<
typename
_Tpvec
>
inline
bool
v_check_any
(
const
_Tpvec
&
a
)
{
return
vec_any_lt
(
a
.
val
,
_Tpvec
().
val
);}
inline
bool
v_check_any
(
const
v_uint8x16
&
a
)
{
return
vec_any_lt
(
a
.
val
,
_Tpvec
().
val
);
}
inline
bool
v_check_any
(
const
v_uint8x16
&
a
)
{
return
v_check_any
(
v_reinterpret_as_s8
(
a
));
}
inline
bool
v_check_any
(
const
v_uint16x8
&
a
)
inline
bool
v_check_any
(
const
v_uint16x8
&
a
)
{
return
v_check_any
(
v_reinterpret_as_s16
(
a
));
}
inline
bool
v_check_any
(
const
v_uint32x4
&
a
)
inline
bool
v_check_any
(
const
v_uint32x4
&
a
)
{
return
v_check_any
(
v_reinterpret_as_s32
(
a
));
}
inline
bool
v_check_any
(
const
v_float32x4
&
a
)
{
return
v_check_any
(
v_reinterpret_as_s32
(
a
));
}
inline
bool
v_check_any
(
const
v_float64x2
&
a
)
{
return
v_check_any
(
v_reinterpret_as_s64
(
a
));
}
////////// Other math /////////
...
...
modules/core/test/test_intrin_utils.hpp
View file @
8a767689
...
...
@@ -837,17 +837,28 @@ template<typename R> struct TheTest
Data
<
R
>
resC
=
v_rotate_right
<
s
>
(
a
);
Data
<
R
>
resD
=
v_rotate_right
<
s
>
(
a
,
b
);
Data
<
R
>
resE
=
v_rotate_left
<
s
>
(
a
);
Data
<
R
>
resF
=
v_rotate_left
<
s
>
(
a
,
b
);
for
(
int
i
=
0
;
i
<
R
::
nlanes
;
++
i
)
{
if
(
i
+
s
>=
R
::
nlanes
)
{
EXPECT_EQ
((
LaneType
)
0
,
resC
[
i
]);
EXPECT_EQ
(
dataB
[
i
-
R
::
nlanes
+
s
],
resD
[
i
]);
EXPECT_EQ
((
LaneType
)
0
,
resE
[
i
-
R
::
nlanes
+
s
]);
EXPECT_EQ
(
dataB
[
i
],
resF
[
i
-
R
::
nlanes
+
s
]);
}
else
{
EXPECT_EQ
(
dataA
[
i
+
s
],
resC
[
i
]);
}
EXPECT_EQ
(
dataA
[
i
+
s
],
resD
[
i
]);
EXPECT_EQ
(
dataA
[
i
],
resE
[
i
+
s
]);
EXPECT_EQ
(
dataA
[
i
],
resF
[
i
+
s
]);
}
}
return
*
this
;
}
...
...
modules/photo/test/test_hdr.cpp
View file @
8a767689
...
...
@@ -213,7 +213,7 @@ TEST(Photo_MergeRobertson, regression)
loadImage
(
test_path
+
"merge/robertson.hdr"
,
expected
);
merge
->
process
(
images
,
result
,
times
);
#if
def __aarch64__
#if
defined(__aarch64__) || defined(__PPC64__)
const
float
eps
=
6.
f
;
#else
const
float
eps
=
5.
f
;
...
...
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