summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Farago <sensej007@email.cz>2019-07-25 12:37:31 +0200
committerTomas Farago <sensej007@email.cz>2020-02-05 10:16:26 +0100
commit721b8f2db68f6c9cdd4955eb438d0376e41bd479 (patch)
tree8783966c624198befb821dde3229ba4e40250d38
parentda6a854a6759bbc2dc1c83bb23f5a2d154a68619 (diff)
downloadufo-filters-721b8f2db68f6c9cdd4955eb438d0376e41bd479.tar.gz
ufo-filters-721b8f2db68f6c9cdd4955eb438d0376e41bd479.tar.bz2
ufo-filters-721b8f2db68f6c9cdd4955eb438d0376e41bd479.tar.xz
ufo-filters-721b8f2db68f6c9cdd4955eb438d0376e41bd479.zip
NLM: rename function dist to compute_dist
because of the name clash.
-rw-r--r--src/kernels/nlm.cl22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/kernels/nlm.cl b/src/kernels/nlm.cl
index 0f1cbcd..603767c 100644
--- a/src/kernels/nlm.cl
+++ b/src/kernels/nlm.cl
@@ -18,16 +18,16 @@
*/
float
-dist (read_only image2d_t input,
- sampler_t sampler,
- float2 p,
- float2 q,
- int radius,
- int width,
- int height,
- float h_2,
- float variance,
- constant float *window_coeffs)
+compute_dist (read_only image2d_t input,
+ sampler_t sampler,
+ float2 p,
+ float2 q,
+ int radius,
+ int width,
+ int height,
+ float h_2,
+ float variance,
+ constant float *window_coeffs)
{
float dist = 0.0f, tmp;
int wsize = (2 * radius + 1);
@@ -77,7 +77,7 @@ nlm_noise_reduction (read_only image2d_t input,
for (int j = y - search_radius; j < y + search_radius + 1; j++) {
for (int i = x - search_radius; i < x + search_radius + 1; i++) {
- d = dist (input, sampler, (float2) (x + 0.5f, y + 0.5f), (float2) (i + 0.5f, j + 0.5f),
+ d = compute_dist (input, sampler, (float2) (x + 0.5f, y + 0.5f), (float2) (i + 0.5f, j + 0.5f),
patch_radius, width, height, h_2, variance, window_coeffs);
weight = exp (-d);
pixel_value += weight * read_imagef (input, sampler, (float2) ((i + 0.5f) / width, (j + 0.5f) / height)).x;