diff options
Diffstat (limited to 'opencl/noise-reduction.cl.h')
-rw-r--r-- | opencl/noise-reduction.cl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/opencl/noise-reduction.cl.h b/opencl/noise-reduction.cl.h index 969fe2a3..9794fd81 100644 --- a/opencl/noise-reduction.cl.h +++ b/opencl/noise-reduction.cl.h @@ -4,7 +4,7 @@ static const char* noise_reduction_cl_source = " \n" "#define POW2(a) ((a)*(a)) \n" " \n" -"#define GEN_METRIC(before, center, after) POW2((center) * 2 - (before) - (after))\n" +"#define GEN_METRIC(before, center, after) POW2((center) * (float4)(2.0f) - (before) - (after))\n" " \n" "#define BAIL_CONDITION(new,original) ((new) < (original)) \n" " \n" @@ -61,7 +61,7 @@ static const char* noise_reduction_cl_source = " after_pix); \n" " mask = BAIL_CONDITION (metric_new, metric_reference[axis]) & mask;\n" " } \n" -" sum += mask >0 ? value : 0; \n" +" sum += mask >0 ? value : (float4)(0.0); \n" " count += mask >0 ? 1 : 0; \n" " } \n" " dst_buf[dst_offset] = (sum/convert_float4(count)); \n" |