diff options
author | Daniel Sabo <DanielSabo@gmail.com> | 2013-11-01 16:39:36 -0700 |
---|---|---|
committer | Daniel Sabo <DanielSabo@gmail.com> | 2013-11-01 21:35:02 -0700 |
commit | a40cb7fd5652a635002b01162abcbb7c6eabe051 (patch) | |
tree | d649ba7ca0c578ceba4da9ef28b8a873fc567569 /opencl | |
parent | 6c25c24a0695e942ef3d5bad251e18669bca81d1 (diff) |
Fix some warnings in colors.cl
Diffstat (limited to 'opencl')
-rw-r--r-- | opencl/colors.cl | 10 | ||||
-rw-r--r-- | opencl/colors.cl.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/opencl/colors.cl b/opencl/colors.cl index e99c1de7..c311b22f 100644 --- a/opencl/colors.cl +++ b/opencl/colors.cl @@ -30,14 +30,14 @@ #define BABL_ALPHA_THRESHOLD 0.0f /* babl reference file: babl/base/util.h */ -float linear_to_gamma_2_2 (float value) +static float linear_to_gamma_2_2 (float value) { if (value > 0.003130804954f) return 1.055f * native_powr (value, (1.0f/2.4f)) - 0.055f; return 12.92f * value; } -float gamma_2_2_to_linear (float value) +static float gamma_2_2_to_linear (float value) { if (value > 0.04045f) return native_powr ((value + 0.055f) / 1.055f, 2.4f); @@ -398,9 +398,9 @@ __kernel void yu8_to_yf (__global const uchar * in, /* -- YA float -- */ /* babl reference file: babl/base/rgb-constants.h */ -#define RGB_LUMINANCE_RED (0.222491) -#define RGB_LUMINANCE_GREEN (0.716888) -#define RGB_LUMINANCE_BLUE (0.060621) +#define RGB_LUMINANCE_RED (0.222491f) +#define RGB_LUMINANCE_GREEN (0.716888f) +#define RGB_LUMINANCE_BLUE (0.060621f) /* RGBA float -> YA float */ __kernel void rgbaf_to_yaf (__global const float4 * in, diff --git a/opencl/colors.cl.h b/opencl/colors.cl.h index 9aa7c3b8..db59ed47 100644 --- a/opencl/colors.cl.h +++ b/opencl/colors.cl.h @@ -31,14 +31,14 @@ static const char* colors_cl_source = "#define BABL_ALPHA_THRESHOLD 0.0f \n" " \n" "/* babl reference file: babl/base/util.h */ \n" -"float linear_to_gamma_2_2 (float value) \n" +"static float linear_to_gamma_2_2 (float value) \n" "{ \n" " if (value > 0.003130804954f) \n" " return 1.055f * native_powr (value, (1.0f/2.4f)) - 0.055f; \n" " return 12.92f * value; \n" "} \n" " \n" -"float gamma_2_2_to_linear (float value) \n" +"static float gamma_2_2_to_linear (float value) \n" "{ \n" " if (value > 0.04045f) \n" " return native_powr ((value + 0.055f) / 1.055f, 2.4f); \n" @@ -399,9 +399,9 @@ static const char* colors_cl_source = "/* -- YA float -- */ \n" " \n" "/* babl reference file: babl/base/rgb-constants.h */ \n" -"#define RGB_LUMINANCE_RED (0.222491) \n" -"#define RGB_LUMINANCE_GREEN (0.716888) \n" -"#define RGB_LUMINANCE_BLUE (0.060621) \n" +"#define RGB_LUMINANCE_RED (0.222491f) \n" +"#define RGB_LUMINANCE_GREEN (0.716888f) \n" +"#define RGB_LUMINANCE_BLUE (0.060621f) \n" " \n" "/* RGBA float -> YA float */ \n" "__kernel void rgbaf_to_yaf (__global const float4 * in, \n" |