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
64cf206f
Commit
64cf206f
authored
Feb 20, 2017
by
Tomoaki Teshima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimize blend using universal intrinsic
- add more channels/depth performance test for blend
parent
90538392
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
intrin_sse.hpp
modules/core/include/opencv2/core/hal/intrin_sse.hpp
+27
-0
perf_blend.cpp
modules/imgproc/perf/opencl/perf_blend.cpp
+1
-1
blend.cpp
modules/imgproc/src/blend.cpp
+0
-0
No files found.
modules/core/include/opencv2/core/hal/intrin_sse.hpp
View file @
64cf206f
...
...
@@ -1368,6 +1368,24 @@ OPENCV_HAL_IMPL_SSE_TRANSPOSE4x4(v_int32x4, epi32, OPENCV_HAL_NOP, OPENCV_HAL_NO
OPENCV_HAL_IMPL_SSE_TRANSPOSE4x4
(
v_float32x4
,
ps
,
_mm_castps_si128
,
_mm_castsi128_ps
)
// adopted from sse_utils.hpp
inline
void
v_load_deinterleave
(
const
uchar
*
ptr
,
v_uint8x16
&
a
,
v_uint8x16
&
b
)
{
__m128i
t00
=
_mm_loadu_si128
((
const
__m128i
*
)
ptr
);
__m128i
t01
=
_mm_loadu_si128
((
const
__m128i
*
)(
ptr
+
16
));
__m128i
t10
=
_mm_unpacklo_epi8
(
t00
,
t01
);
__m128i
t11
=
_mm_unpackhi_epi8
(
t00
,
t01
);
__m128i
t20
=
_mm_unpacklo_epi8
(
t10
,
t11
);
__m128i
t21
=
_mm_unpackhi_epi8
(
t10
,
t11
);
__m128i
t30
=
_mm_unpacklo_epi8
(
t20
,
t21
);
__m128i
t31
=
_mm_unpackhi_epi8
(
t20
,
t21
);
a
.
val
=
_mm_unpacklo_epi8
(
t30
,
t31
);
b
.
val
=
_mm_unpackhi_epi8
(
t30
,
t31
);
}
inline
void
v_load_deinterleave
(
const
uchar
*
ptr
,
v_uint8x16
&
a
,
v_uint8x16
&
b
,
v_uint8x16
&
c
)
{
__m128i
t00
=
_mm_loadu_si128
((
const
__m128i
*
)
ptr
);
...
...
@@ -1507,6 +1525,15 @@ inline void v_store_interleave( short* ptr, const v_int16x8& a, const v_int16x8&
_mm_storeu_si128
((
__m128i
*
)(
ptr
+
8
),
t1
);
}
inline
void
v_store_interleave
(
uchar
*
ptr
,
const
v_uint8x16
&
a
,
const
v_uint8x16
&
b
)
{
__m128i
v0
=
_mm_unpacklo_epi8
(
a
.
val
,
b
.
val
);
__m128i
v1
=
_mm_unpackhi_epi8
(
a
.
val
,
b
.
val
);
_mm_storeu_si128
((
__m128i
*
)(
ptr
),
v0
);
_mm_storeu_si128
((
__m128i
*
)(
ptr
+
16
),
v1
);
}
inline
void
v_store_interleave
(
uchar
*
ptr
,
const
v_uint8x16
&
a
,
const
v_uint8x16
&
b
,
const
v_uint8x16
&
c
)
{
...
...
modules/imgproc/perf/opencl/perf_blend.cpp
View file @
64cf206f
...
...
@@ -56,7 +56,7 @@ namespace ocl {
typedef
Size_MatType
BlendLinearFixture
;
OCL_PERF_TEST_P
(
BlendLinearFixture
,
BlendLinear
,
::
testing
::
Combine
(
OCL_TEST_SIZES
,
OCL_PERF_ENUM
(
CV_32FC1
,
CV_32FC4
)))
OCL_PERF_TEST_P
(
BlendLinearFixture
,
BlendLinear
,
::
testing
::
Combine
(
OCL_TEST_SIZES
,
OCL_PERF_ENUM
(
CV_32FC1
,
CV_32FC
3
,
CV_32FC4
,
CV_8UC1
,
CV_8UC3
,
CV_8UC
4
)))
{
Size_MatType_t
params
=
GetParam
();
const
Size
srcSize
=
get
<
0
>
(
params
);
...
...
modules/imgproc/src/blend.cpp
View file @
64cf206f
This diff is collapsed.
Click to expand it.
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