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
79f77045
Commit
79f77045
authored
Dec 18, 2014
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3517 from wangyan42164:ocl_denoising_2
parents
009aec51
fd2d800c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
nlmeans.cl
modules/photo/src/opencl/nlmeans.cl
+4
-4
No files found.
modules/photo/src/opencl/nlmeans.cl
View file @
79f77045
...
...
@@ -83,7 +83,7 @@ inline void calcFirstElementInRow(__global const uchar * src, int src_step, int
int
sx
=
x
-
SEARCH_SIZE2,
sy
=
y
-
SEARCH_SIZE2
;
int
col_dists_current_private[TEMPLATE_SIZE]
;
for
(
int
i
=
id
,
size
=
SEARCH_SIZE_SQ
; i < size
; i += CTA_SIZE)
for
(
int
i
=
id
; i < SEARCH_SIZE_SQ
; i += CTA_SIZE)
{
int
dist
=
0
,
value
;
...
...
@@ -128,7 +128,7 @@ inline void calcElementInFirstRow(__global const uchar * src, int src_step, int
y
-=
TEMPLATE_SIZE2
;
int
sx
=
x
-
SEARCH_SIZE2,
sy
=
y
-
SEARCH_SIZE2
;
for
(
int
i
=
id
,
size
=
SEARCH_SIZE_SQ
; i < size
; i += CTA_SIZE)
for
(
int
i
=
id
; i < SEARCH_SIZE_SQ
; i += CTA_SIZE)
{
__global
const
uchar_t
*
src_current
=
(
__global
const
uchar_t
*
)(
src
+
mad24
(
y,
src_step,
mad24
(
cn,
x,
src_offset
)))
;
__global
const
uchar_t
*
src_template
=
(
__global
const
uchar_t
*
)(
src
+
...
...
@@ -167,7 +167,7 @@ inline void calcElement(__global const uchar * src, int src_step, int src_offset
sy_up
-=
SEARCH_SIZE2
;
sy_down
-=
SEARCH_SIZE2
;
for
(
int
i
=
id
,
size
=
SEARCH_SIZE_SQ
; i < size
; i += CTA_SIZE)
for
(
int
i
=
id
; i < SEARCH_SIZE_SQ
; i += CTA_SIZE)
{
int
wx
=
i
%
SEARCH_SIZE,
wy
=
i
/
SEARCH_SIZE
;
...
...
@@ -194,7 +194,7 @@ inline void convolveWindow(__global const uchar * src, int src_step, int src_off
int
sx
=
x
-
SEARCH_SIZE2,
sy
=
y
-
SEARCH_SIZE2,
weights
=
0
;
int_t
weighted_sum
=
(
int_t
)(
0
)
;
for
(
int
i
=
id
,
size
=
SEARCH_SIZE_SQ
; i < size
; i += CTA_SIZE)
for
(
int
i
=
id
; i < SEARCH_SIZE_SQ
; i += CTA_SIZE)
{
int
src_index
=
mad24
(
sy
+
i
/
SEARCH_SIZE,
src_step,
mad24
(
i
%
SEARCH_SIZE
+
sx,
cn,
src_offset
))
;
int_t
src_value
=
convert_int_t
(
*
(
__global
const
uchar_t
*
)(
src
+
src_index
))
;
...
...
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