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
bf62dca4
Commit
bf62dca4
authored
Mar 29, 2017
by
Vitaly Tuzov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extended restrictions for OpenVX HAL calls on small images
parent
bf5b7843
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
openvx_hal.cpp
3rdparty/openvx/hal/openvx_hal.cpp
+4
-2
ovx_defs.hpp
modules/core/include/opencv2/core/openvx/ovx_defs.hpp
+3
-3
No files found.
3rdparty/openvx/hal/openvx_hal.cpp
View file @
bf62dca4
...
...
@@ -82,7 +82,7 @@ inline bool dimTooBig(int size)
}
//OpenVX calls have essential overhead so it make sense to skip them for small images
template
<
int
kernel_id
>
inline
bool
skipSmallImages
(
int
w
,
int
h
)
{
return
w
*
h
<
3840
*
216
0
;
}
template
<
int
kernel_id
>
inline
bool
skipSmallImages
(
int
w
,
int
h
)
{
return
w
*
h
<
7680
*
432
0
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_MULTIPLY
>
(
int
w
,
int
h
)
{
return
w
*
h
<
640
*
480
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_COLOR_CONVERT
>
(
int
w
,
int
h
)
{
return
w
*
h
<
2048
*
1536
;
}
...
...
@@ -175,7 +175,9 @@ OVX_BINARY_OP(xor, { ivx::IVX_CHECK_STATUS(vxuXor(ctx, ia, ib, ic)); }, VX_KERNE
template
<
typename
T
>
int
ovx_hal_mul
(
const
T
*
a
,
size_t
astep
,
const
T
*
b
,
size_t
bstep
,
T
*
c
,
size_t
cstep
,
int
w
,
int
h
,
double
scale
)
{
if
(
skipSmallImages
<
VX_KERNEL_MULTIPLY
>
(
w
,
h
))
if
(
scale
==
1.0
||
sizeof
(
T
)
>
1
?
skipSmallImages
<
VX_KERNEL_ADD
>
(
w
,
h
)
:
/*actually it could be any kernel with generic minimum size*/
skipSmallImages
<
VX_KERNEL_MULTIPLY
>
(
w
,
h
)
)
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
if
(
dimTooBig
(
w
)
||
dimTooBig
(
h
))
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
...
...
modules/core/include/opencv2/core/openvx/ovx_defs.hpp
View file @
bf62dca4
...
...
@@ -26,12 +26,12 @@ namespace ovx{
CV_EXPORTS_W
ivx
::
Context
&
getOpenVXContext
();
template
<
int
kernel_id
>
inline
bool
skipSmallImages
(
int
w
,
int
h
)
{
return
w
*
h
<
3840
*
2160
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_MINMAXLOC
>
(
int
w
,
int
h
)
{
return
w
*
h
<
1280
*
72
0
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_MINMAXLOC
>
(
int
w
,
int
h
)
{
return
w
*
h
<
3840
*
216
0
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_MEDIAN_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
1280
*
720
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_GAUSSIAN_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
1280
*
720
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_BOX_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
1
280
*
72
0
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_BOX_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
1
920
*
108
0
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_HISTOGRAM
>
(
int
w
,
int
h
)
{
return
w
*
h
<
2048
*
1536
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_SOBEL_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
640
*
48
0
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_SOBEL_3x3
>
(
int
w
,
int
h
)
{
return
w
*
h
<
1280
*
72
0
;
}
template
<>
inline
bool
skipSmallImages
<
VX_KERNEL_CUSTOM_CONVOLUTION
>
(
int
w
,
int
h
)
{
return
w
*
h
<
1280
*
720
;
}
}}
...
...
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