[gegl] Fix some warnings in colors.cl
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Fix some warnings in colors.cl
- Date: Sat, 2 Nov 2013 04:41:30 +0000 (UTC)
commit a40cb7fd5652a635002b01162abcbb7c6eabe051
Author: Daniel Sabo <DanielSabo gmail com>
Date: Fri Nov 1 16:39:36 2013 -0700
Fix some warnings in colors.cl
opencl/colors.cl | 10 +++++-----
opencl/colors.cl.h | 10 +++++-----
2 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/opencl/colors.cl b/opencl/colors.cl
index e99c1de..c311b22 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 9aa7c3b..db59ed4 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"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]