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
daf3fabe
Commit
daf3fabe
authored
Jun 09, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8877 from alalek:fix_integer_overflow
parents
0213b508
e665be1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fast_nlmeans_denoising_opencl.hpp
modules/photo/src/fast_nlmeans_denoising_opencl.hpp
+2
-2
No files found.
modules/photo/src/fast_nlmeans_denoising_opencl.hpp
View file @
daf3fabe
...
@@ -52,8 +52,8 @@ static bool ocl_calcAlmostDist2Weight(UMat & almostDist2Weight,
...
@@ -52,8 +52,8 @@ static bool ocl_calcAlmostDist2Weight(UMat & almostDist2Weight,
FT
almostDist2ActualDistMultiplier
=
(
FT
)(
1
<<
almostTemplateWindowSizeSqBinShift
)
/
templateWindowSizeSq
;
FT
almostDist2ActualDistMultiplier
=
(
FT
)(
1
<<
almostTemplateWindowSizeSqBinShift
)
/
templateWindowSizeSq
;
const
FT
WEIGHT_THRESHOLD
=
1e-3
f
;
const
FT
WEIGHT_THRESHOLD
=
1e-3
f
;
int
maxDist
=
normType
==
NORM_L1
?
std
::
numeric_limits
<
ST
>::
max
()
*
cn
:
WT
maxDist
=
normType
==
NORM_L1
?
(
WT
)
std
::
numeric_limits
<
ST
>::
max
()
*
cn
:
std
::
numeric_limits
<
ST
>::
max
()
*
std
::
numeric_limits
<
ST
>::
max
()
*
cn
;
(
WT
)
std
::
numeric_limits
<
ST
>::
max
()
*
(
WT
)
std
::
numeric_limits
<
ST
>::
max
()
*
cn
;
int
almostMaxDist
=
(
int
)(
maxDist
/
almostDist2ActualDistMultiplier
+
1
);
int
almostMaxDist
=
(
int
)(
maxDist
/
almostDist2ActualDistMultiplier
+
1
);
FT
den
[
4
];
FT
den
[
4
];
CV_Assert
(
hn
>
0
&&
hn
<=
4
);
CV_Assert
(
hn
>
0
&&
hn
<=
4
);
...
...
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