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
8ee45920
Commit
8ee45920
authored
Oct 06, 2016
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7402 from K-Shinotsuka:issue29
parents
285e6ad1
db8b3252
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
color.cpp
modules/imgproc/src/color.cpp
+20
-0
No files found.
modules/imgproc/src/color.cpp
View file @
8ee45920
...
...
@@ -4849,6 +4849,26 @@ struct RGB2HLS_b
if
(
jr
)
src
-=
jr
,
j
-=
jr
;
}
else
if
(
scn
==
4
&&
haveSIMD
)
{
for
(
;
j
<=
(
dn
*
3
-
12
);
j
+=
12
,
src
+=
16
)
{
__m128i
v_src
=
_mm_loadu_si128
((
__m128i
const
*
)
src
);
__m128i
v_src_lo
=
_mm_unpacklo_epi8
(
v_src
,
v_zero
);
__m128i
v_src_hi
=
_mm_unpackhi_epi8
(
v_src
,
v_zero
);
_mm_storeu_ps
(
buf
+
j
,
_mm_mul_ps
(
_mm_cvtepi32_ps
(
_mm_unpacklo_epi16
(
v_src_lo
,
v_zero
)),
v_scale_inv
));
_mm_storeu_ps
(
buf
+
j
+
3
,
_mm_mul_ps
(
_mm_cvtepi32_ps
(
_mm_unpackhi_epi16
(
v_src_lo
,
v_zero
)),
v_scale_inv
));
_mm_storeu_ps
(
buf
+
j
+
6
,
_mm_mul_ps
(
_mm_cvtepi32_ps
(
_mm_unpacklo_epi16
(
v_src_hi
,
v_zero
)),
v_scale_inv
));
float
tmp
=
buf
[
j
+
8
];
_mm_storeu_ps
(
buf
+
j
+
8
,
_mm_mul_ps
(
_mm_cvtepi32_ps
(
_mm_shuffle_epi32
(
_mm_unpackhi_epi16
(
v_src_hi
,
v_zero
),
0x90
)),
v_scale_inv
));
buf
[
j
+
8
]
=
tmp
;
}
int
jr
=
j
%
3
;
if
(
jr
)
src
-=
jr
,
j
-=
jr
;
}
#endif
for
(
;
j
<
dn
*
3
;
j
+=
3
,
src
+=
scn
)
{
...
...
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