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
41158ab5
Commit
41158ab5
authored
Mar 21, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed perf test for convertTo
parent
f13e54dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
17 deletions
+16
-17
perf_convertTo.cpp
modules/core/perf/perf_convertTo.cpp
+11
-12
convert.cpp
modules/core/src/convert.cpp
+5
-5
No files found.
modules/core/perf/per
t
_convertTo.cpp
→
modules/core/perf/per
f
_convertTo.cpp
View file @
41158ab5
...
...
@@ -12,25 +12,25 @@ typedef perf::TestBaseWithParam<Size_DepthSrc_DepthDst_Channels_alpha_t> Size_De
PERF_TEST_P
(
Size_DepthSrc_DepthDst_Channels_alpha
,
convertTo
,
testing
::
Combine
(
testing
::
Values
(
TYPICAL_MAT_SIZES
),
testing
::
Values
(
CV_8U
,
CV_
16S
,
CV_32S
,
CV_32
F
),
testing
::
Values
(
CV_8U
,
CV_16
S
,
CV_32F
,
CV_64F
),
testing
::
Values
(
1
,
2
,
3
,
4
),
testing
::
Values
(
1.0
,
1.
/
255
)
testing
::
Values
(
szVGA
,
sz1080p
),
testing
::
Values
(
CV_8U
,
CV_
8S
,
CV_16U
,
CV_16S
,
CV_32S
,
CV_32F
,
CV_64
F
),
testing
::
Values
(
CV_8U
,
CV_8S
,
CV_16U
,
CV_16S
,
CV_32
S
,
CV_32F
,
CV_64F
),
testing
::
Values
(
1
,
4
),
testing
::
Values
(
1.0
,
1.
/
255
)
)
)
{
Size
sz
=
get
<
0
>
(
GetParam
());
int
depthSrc
=
get
<
1
>
(
GetParam
());
int
depthDst
=
get
<
2
>
(
GetParam
());
int
depthDst
=
get
<
2
>
(
GetParam
());
int
channels
=
get
<
3
>
(
GetParam
());
double
alpha
=
get
<
4
>
(
GetParam
());
double
alpha
=
get
<
4
>
(
GetParam
());
Mat
src
(
sz
,
CV_MAKETYPE
(
depthSrc
,
channels
));
randu
(
src
,
0
,
255
);
Mat
dst
(
sz
,
CV_MAKETYPE
(
depthDst
,
channels
));
randu
(
src
,
0
,
255
);
Mat
dst
(
sz
,
CV_MAKETYPE
(
depthDst
,
channels
));
TEST_CYCLE
()
src
.
convertTo
(
dst
,
depthDst
,
alpha
);
TEST_CYCLE
()
src
.
convertTo
(
dst
,
depthDst
,
alpha
);
SANITY_CHECK
(
dst
);
}
\ No newline at end of file
}
modules/core/src/convert.cpp
View file @
41158ab5
...
...
@@ -919,27 +919,27 @@ static BinaryFunc cvtTab[][8] =
{
{
(
BinaryFunc
)
cvt8u
,
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt8s8u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16u8u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16s8u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32s8u
),
(
BinaryFunc
)(
cvt32f8u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16s8u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32s8u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32f8u
),
(
BinaryFunc
)
cvt64f8u
,
0
},
{
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt8u8s
),
(
BinaryFunc
)
cvt8u
,
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16u8s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16s8s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32s8s
),
(
BinaryFunc
)(
cvt32f8s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16s8s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32s8s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32f8s
),
(
BinaryFunc
)
cvt64f8s
,
0
},
{
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt8u16u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt8s16u
),
(
BinaryFunc
)
cvt16u
,
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16s16u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32s16u
),
(
BinaryFunc
)(
cvt32f16u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16s16u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32s16u
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32f16u
),
(
BinaryFunc
)
cvt64f16u
,
0
},
{
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt8u16s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt8s16s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16u16s
),
(
BinaryFunc
)
cvt16u
,
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32s16s
),
(
BinaryFunc
)(
cvt32f16s
),
(
BinaryFunc
)
cvt16u
,
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32s16s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32f16s
),
(
BinaryFunc
)
cvt64f16s
,
0
},
{
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt8u32s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt8s32s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16u32s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16s32s
),
(
BinaryFunc
)
cvt32s
,
(
BinaryFunc
)(
cvt32f32s
),
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt16s32s
),
(
BinaryFunc
)
cvt32s
,
(
BinaryFunc
)
GET_OPTIMIZED
(
cvt32f32s
),
(
BinaryFunc
)
cvt64f32s
,
0
},
{
...
...
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