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
72066a51
Commit
72066a51
authored
Sep 27, 2016
by
Vitaly Tuzov
Committed by
mshabunin
Oct 04, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for OpenVX-based implementation of HAL multiplication API
parent
3bd5055a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
openvx_hal.hpp
3rdparty/openvx/include/openvx_hal.hpp
+13
-1
No files found.
3rdparty/openvx/include/openvx_hal.hpp
View file @
72066a51
...
...
@@ -343,11 +343,23 @@ inline int ovx_hal_mul(const T *a, size_t astep, const T *b, size_t bstep, T *c,
{
try
{
int
rounding_policy
=
VX_ROUND_POLICY_TO_ZERO
;
if
(
scale
!=
0x0
.01010102
)
{
int
exp
=
0
;
double
significand
=
frexp
(
scale
,
&
exp
);
if
((
significand
!=
0.5
)
||
(
exp
>
1
)
||
(
exp
<
-
14
))
return
CV_HAL_ERROR_NOT_IMPLEMENTED
;
}
else
{
rounding_policy
=
VX_ROUND_POLICY_TO_NEAREST_EVEN
;
// That's the only rounding that MUST be supported for 1/255 scale
}
vxContext
*
ctx
=
vxContext
::
getContext
();
vxImage
ia
(
*
ctx
,
a
,
astep
,
w
,
h
);
vxImage
ib
(
*
ctx
,
b
,
bstep
,
w
,
h
);
vxImage
ic
(
*
ctx
,
c
,
cstep
,
w
,
h
);
vxErr
::
check
(
vxuMultiply
(
ctx
->
ctx
,
ia
.
img
,
ib
.
img
,
(
float
)
scale
,
VX_CONVERT_POLICY_SATURATE
,
VX_ROUND_POLICY_TO_ZERO
,
ic
.
img
));
vxErr
::
check
(
vxuMultiply
(
ctx
->
ctx
,
ia
.
img
,
ib
.
img
,
(
float
)
scale
,
VX_CONVERT_POLICY_SATURATE
,
rounding_policy
,
ic
.
img
));
}
catch
(
vxErr
&
e
)
{
...
...
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