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
e4aa2ccd
Commit
e4aa2ccd
authored
Nov 22, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10136 from alalek:issue_10134
parents
f37f4cf3
3f37be5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
12 deletions
+16
-12
intrin_sse.hpp
modules/core/include/opencv2/core/hal/intrin_sse.hpp
+10
-6
intrin_vsx.hpp
modules/core/include/opencv2/core/hal/intrin_vsx.hpp
+6
-6
No files found.
modules/core/include/opencv2/core/hal/intrin_sse.hpp
View file @
e4aa2ccd
...
...
@@ -1024,24 +1024,28 @@ OPENCV_HAL_IMPL_SSE_SHIFT_OP(v_uint64x2, v_int64x2, epi64, v_srai_epi64)
template
<
int
imm
,
typename
_Tpvec
>
inline
_Tpvec
v_rotate_right
(
const
_Tpvec
&
a
)
{
return
_Tpvec
(
_mm_srli_si128
(
a
.
val
,
imm
*
(
sizeof
(
typename
_Tpvec
::
lane_type
))));
enum
{
CV_SHIFT
=
imm
*
(
sizeof
(
typename
_Tpvec
::
lane_type
))
};
return
_Tpvec
(
_mm_srli_si128
(
a
.
val
,
CV_SHIFT
));
}
template
<
int
imm
,
typename
_Tpvec
>
inline
_Tpvec
v_rotate_left
(
const
_Tpvec
&
a
)
{
return
_Tpvec
(
_mm_slli_si128
(
a
.
val
,
imm
*
(
sizeof
(
typename
_Tpvec
::
lane_type
))));
enum
{
CV_SHIFT
=
imm
*
(
sizeof
(
typename
_Tpvec
::
lane_type
))
};
return
_Tpvec
(
_mm_slli_si128
(
a
.
val
,
CV_SHIFT
));
}
template
<
int
imm
,
typename
_Tpvec
>
inline
_Tpvec
v_rotate_right
(
const
_Tpvec
&
a
,
const
_Tpvec
&
b
)
{
const
int
cWidth
=
sizeof
(
typename
_Tpvec
::
lane_type
);
return
_Tpvec
(
_mm_or_si128
(
_mm_srli_si128
(
a
.
val
,
imm
*
cWidth
),
_mm_slli_si128
(
b
.
val
,
(
16
-
imm
*
cWidth
))));
enum
{
CV_SHIFT1
=
imm
*
(
sizeof
(
typename
_Tpvec
::
lane_type
))
};
enum
{
CV_SHIFT2
=
16
-
imm
*
(
sizeof
(
typename
_Tpvec
::
lane_type
))
};
return
_Tpvec
(
_mm_or_si128
(
_mm_srli_si128
(
a
.
val
,
CV_SHIFT1
),
_mm_slli_si128
(
b
.
val
,
CV_SHIFT2
)));
}
template
<
int
imm
,
typename
_Tpvec
>
inline
_Tpvec
v_rotate_left
(
const
_Tpvec
&
a
,
const
_Tpvec
&
b
)
{
const
int
cWidth
=
sizeof
(
typename
_Tpvec
::
lane_type
);
return
_Tpvec
(
_mm_or_si128
(
_mm_slli_si128
(
a
.
val
,
imm
*
cWidth
),
_mm_srli_si128
(
b
.
val
,
(
16
-
imm
*
cWidth
))));
enum
{
CV_SHIFT1
=
imm
*
(
sizeof
(
typename
_Tpvec
::
lane_type
))
};
enum
{
CV_SHIFT2
=
16
-
imm
*
(
sizeof
(
typename
_Tpvec
::
lane_type
))
};
return
_Tpvec
(
_mm_or_si128
(
_mm_slli_si128
(
a
.
val
,
CV_SHIFT1
),
_mm_srli_si128
(
b
.
val
,
CV_SHIFT2
)));
}
#define OPENCV_HAL_IMPL_SSE_LOADSTORE_INT_OP(_Tpvec, _Tp) \
...
...
modules/core/include/opencv2/core/hal/intrin_vsx.hpp
View file @
e4aa2ccd
...
...
@@ -634,19 +634,19 @@ OPENCV_IMPL_VSX_ROTATE_LR(v_int64x2, vec_dword2)
template
<
int
imm
,
typename
_Tpvec
>
inline
_Tpvec
v_rotate_right
(
const
_Tpvec
&
a
,
const
_Tpvec
&
b
)
{
const
int
wd
=
imm
*
sizeof
(
typename
_Tpvec
::
lane_type
)
;
if
(
wd
==
0
)
enum
{
CV_SHIFT
=
16
-
imm
*
(
sizeof
(
typename
_Tpvec
::
lane_type
))
}
;
if
(
CV_SHIFT
==
16
)
return
a
;
return
_Tpvec
(
vec_sld
(
b
.
val
,
a
.
val
,
16
-
wd
));
return
_Tpvec
(
vec_sld
(
b
.
val
,
a
.
val
,
CV_SHIFT
));
}
template
<
int
imm
,
typename
_Tpvec
>
inline
_Tpvec
v_rotate_left
(
const
_Tpvec
&
a
,
const
_Tpvec
&
b
)
{
const
int
wd
=
imm
*
sizeof
(
typename
_Tpvec
::
lane_type
)
;
if
(
wd
==
16
)
enum
{
CV_SHIFT
=
imm
*
(
sizeof
(
typename
_Tpvec
::
lane_type
))
}
;
if
(
CV_SHIFT
==
16
)
return
b
;
return
_Tpvec
(
vec_sld
(
a
.
val
,
b
.
val
,
wd
));
return
_Tpvec
(
vec_sld
(
a
.
val
,
b
.
val
,
CV_SHIFT
));
}
#define OPENCV_IMPL_VSX_ROTATE_64(_Tpvec, suffix, rg1, rg2) \
...
...
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