Skip to content

Commit

Permalink
Subtle corrections for NORM_MIN
Browse files Browse the repository at this point in the history
This is used all over and should be the same for OpenCL and CPU code for all modules.
It's now OpenCL-public via kernels/common.h
  • Loading branch information
jenshannoschwalm committed Sep 18, 2024
1 parent d680195 commit a3fcdc0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion data/kernels/channelmixer.cl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ typedef enum dt_adaptation_t
#define INVERSE_SQRT_3 0.5773502691896258f
#define TRUE 1
#define FALSE 0
#define NORM_MIN 1e-6f

static inline float sqf(const float x)
{
Expand Down
2 changes: 2 additions & 0 deletions data/kernels/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*/

#pragma once
#define NORM_MIN 1.52587890625e-05f // norm can't be < to 2^(-16)


constant sampler_t sampleri = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_NEAREST;

Expand Down
3 changes: 0 additions & 3 deletions data/kernels/filmic.cl
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,6 @@ static inline float filmic_spline(const float x,
return result;
}

#define NORM_MIN 1.52587890625e-05f // norm can't be < to 2^(-16)


static inline float log_tonemapping_v1(const float x,
const float grey, const float black,
const float dynamic_range)
Expand Down

0 comments on commit a3fcdc0

Please sign in to comment.