[babl] extensions: follow change dropping long return
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] extensions: follow change dropping long return
- Date: Thu, 7 Sep 2017 14:36:30 +0000 (UTC)
commit 951875375f8da4efa342da222372b8ba426147e6
Author: Øyvind Kolås <pippin gimp org>
Date: Thu Sep 7 16:36:14 2017 +0200
extensions: follow change dropping long return
extensions/16bit.c | 8 +--
extensions/CIE.c | 96 +++++++++-----------------
extensions/HCY.c | 16 ++--
extensions/HSL.c | 24 ++----
extensions/HSV.c | 16 ++--
extensions/cairo.c | 45 ++++--------
extensions/fast-float.c | 30 +++-----
extensions/float-half.c | 45 ++++++------
extensions/float.c | 18 ++---
extensions/gegl-fixups.c | 42 ++++--------
extensions/gggl-lies.c | 132 ++++++++++++-----------------------
extensions/gggl-table-lies.c | 48 ++++---------
extensions/gggl-table.c | 57 ++++++----------
extensions/gggl.c | 159 +++++++++++++++---------------------------
extensions/gimp-8bit.c | 95 +++++++------------------
extensions/grey.c | 12 +---
extensions/naive-CMYK.c | 20 ++---
extensions/simple.c | 48 ++++++------
extensions/sse-half.c | 32 ++++-----
extensions/sse2-float.c | 50 ++++----------
extensions/sse2-int16.c | 8 +--
extensions/sse2-int8.c | 20 +++---
extensions/sse4-int8.c | 16 ++---
extensions/two-table.c | 21 ++----
extensions/ycbcr.c | 12 +--
25 files changed, 379 insertions(+), 691 deletions(-)
---
diff --git a/extensions/16bit.c b/extensions/16bit.c
index 9071fad..f8cdd21 100644
--- a/extensions/16bit.c
+++ b/extensions/16bit.c
@@ -25,7 +25,7 @@
#include "base/util.h"
#include "extensions/util.h"
-static inline long
+static inline void
conv_rgbu16_rgbau16 (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -43,11 +43,9 @@ conv_rgbu16_rgbau16 (const Babl *conversion,unsigned char *src,
*dst16++ = *src16++;
*dst16++ = 0xffff;
}
-
- return samples;
}
-static inline long
+static inline void
conv_yu16_yau16 (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -63,8 +61,6 @@ conv_yu16_yau16 (const Babl *conversion,unsigned char *src,
*dst16++ = *src16++;
*dst16++ = 0xffff;
}
-
- return samples;
}
int init (void);
diff --git a/extensions/CIE.c b/extensions/CIE.c
index 0f3a4b8..5bb353d 100644
--- a/extensions/CIE.c
+++ b/extensions/CIE.c
@@ -216,7 +216,7 @@ LAB_to_XYZ (double L,
*to_Z = zr * D50_WHITE_REF_Z;
}
-static long
+static void
rgba_to_lab (const Babl *conversion,char *src,
char *dst,
long n)
@@ -242,10 +242,9 @@ rgba_to_lab (const Babl *conversion,char *src,
src += sizeof (double) * 4;
dst += sizeof (double) * 3;
}
- return n;
}
-static long
+static void
lab_to_rgba (const Babl *conversion,char *src,
char *dst,
long n)
@@ -280,10 +279,9 @@ lab_to_rgba (const Babl *conversion,char *src,
src += sizeof (double) * 3;
dst += sizeof (double) * 4;
}
- return n;
}
-static long
+static void
rgba_to_laba (const Babl *conversion,char *src,
char *dst,
long n)
@@ -311,10 +309,9 @@ rgba_to_laba (const Babl *conversion,char *src,
src += sizeof (double) * 4;
dst += sizeof (double) * 4;
}
- return n;
}
-static long
+static void
laba_to_rgba (const Babl *conversion,char *src,
char *dst,
long n)
@@ -352,7 +349,6 @@ laba_to_rgba (const Babl *conversion,char *src,
src += sizeof (double) * 4;
dst += sizeof (double) * 4;
}
- return n;
}
static inline void
@@ -379,7 +375,7 @@ ab_to_CHab (double a,
*to_H += 360;
}
-static long
+static void
rgba_to_lchab (const Babl *conversion,char *src,
char *dst,
long n)
@@ -410,10 +406,9 @@ rgba_to_lchab (const Babl *conversion,char *src,
src += sizeof (double) * 4;
dst += sizeof (double) * 3;
}
- return n;
}
-static long
+static void
lchab_to_rgba (const Babl *conversion,char *src,
char *dst,
long n)
@@ -452,10 +447,9 @@ lchab_to_rgba (const Babl *conversion,char *src,
src += sizeof (double) * 3;
dst += sizeof (double) * 4;
}
- return n;
}
-static long
+static void
rgba_to_lchaba (const Babl *conversion,char *src,
char *dst,
long n)
@@ -487,10 +481,9 @@ rgba_to_lchaba (const Babl *conversion,char *src,
src += sizeof (double) * 4;
dst += sizeof (double) * 4;
}
- return n;
}
-static long
+static void
lchaba_to_rgba (const Babl *conversion,char *src,
char *dst,
long n)
@@ -528,7 +521,6 @@ lchaba_to_rgba (const Babl *conversion,char *src,
src += sizeof (double) * 4;
dst += sizeof (double) * 4;
}
- return n;
}
@@ -599,7 +591,7 @@ cubef (float f)
return f * f * f;
}
-static long
+static void
Yaf_to_Laf (const Babl *conversion,float *src,
float *dst,
long samples)
@@ -618,11 +610,9 @@ Yaf_to_Laf (const Babl *conversion,float *src,
src += 2;
dst += 2;
}
-
- return samples;
}
-static long
+static void
rgbf_to_Labf (const Babl *conversion,float *src,
float *dst,
long samples)
@@ -654,11 +644,9 @@ rgbf_to_Labf (const Babl *conversion,float *src,
src += 3;
dst += 3;
}
-
- return samples;
}
-static long
+static void
rgbaf_to_Labaf (const Babl *conversion,float *src,
float *dst,
long samples)
@@ -692,11 +680,9 @@ rgbaf_to_Labaf (const Babl *conversion,float *src,
src += 4;
dst += 4;
}
-
- return samples;
}
-static long
+static void
Labf_to_rgbf (const Babl *conversion,float *src,
float *dst,
long samples)
@@ -728,11 +714,9 @@ Labf_to_rgbf (const Babl *conversion,float *src,
src += 3;
dst += 3;
}
-
- return samples;
}
-static long
+static void
Labaf_to_rgbaf (const Babl *conversion,float *src,
float *dst,
long samples)
@@ -766,11 +750,9 @@ Labaf_to_rgbaf (const Babl *conversion,float *src,
src += 4;
dst += 4;
}
-
- return samples;
}
-static long
+static void
Labf_to_Lchabf (const Babl *conversion,float *src,
float *dst,
long samples)
@@ -797,11 +779,9 @@ Labf_to_Lchabf (const Babl *conversion,float *src,
src += 3;
dst += 3;
}
-
- return samples;
}
-static long
+static void
Lchabf_to_Labf (const Babl *conversion,float *src,
float *dst,
long samples)
@@ -824,11 +804,9 @@ Lchabf_to_Labf (const Babl *conversion,float *src,
src += 3;
dst += 3;
}
-
- return samples;
}
-static long
+static void
Labaf_to_Lchabaf (const Babl *conversion,float *src,
float *dst,
long samples)
@@ -857,11 +835,9 @@ Labaf_to_Lchabaf (const Babl *conversion,float *src,
src += 4;
dst += 4;
}
-
- return samples;
}
-static long
+static void
Lchabaf_to_Labaf (const Babl *conversion,float *src,
float *dst,
long samples)
@@ -886,8 +862,6 @@ Lchabaf_to_Labaf (const Babl *conversion,float *src,
src += 4;
dst += 4;
}
-
- return samples;
}
static void
@@ -1104,7 +1078,7 @@ formats (void)
/******** begin integer RGB/CIE color space conversions **************/
-static inline long
+static inline void
convert_double_u8_scaled (const Babl *conversion,
double min_val,
double max_val,
@@ -1132,10 +1106,9 @@ convert_double_u8_scaled (const Babl *conversion,
src += src_pitch;
dst += dst_pitch;
}
- return n;
}
-static inline long
+static inline void
convert_u8_double_scaled (const Babl *conversion,
double min_val,
double max_val,
@@ -1164,29 +1137,28 @@ convert_u8_double_scaled (const Babl *conversion,
dst += dst_pitch;
src += src_pitch;
}
- return n;
}
#define MAKE_CONVERSIONS(name, min_val, max_val, min, max) \
- static long \
+ static void \
convert_ ## name ## _double (const Babl *c, char *src, \
char *dst, \
int src_pitch, \
int dst_pitch, \
long n) \
{ \
- return convert_u8_double_scaled (c, min_val, max_val, min, max, \
- src, dst, src_pitch, dst_pitch, n); \
+ convert_u8_double_scaled (c, min_val, max_val, min, max, \
+ src, dst, src_pitch, dst_pitch, n); \
} \
- static long \
+ static void \
convert_double_ ## name (const Babl *c, char *src, \
char *dst, \
int src_pitch, \
int dst_pitch, \
long n) \
{ \
- return convert_double_u8_scaled (c, min_val, max_val, min, max, \
- src, dst, src_pitch, dst_pitch, n); \
+ convert_double_u8_scaled (c, min_val, max_val, min, max, \
+ src, dst, src_pitch, dst_pitch, n); \
}
/* source ICC.1:2004-10 */
@@ -1246,7 +1218,7 @@ types_u8 (void)
);
}
-static inline long
+static inline void
convert_double_u16_scaled (const Babl *conversion,
double min_val,
double max_val,
@@ -1274,10 +1246,9 @@ convert_double_u16_scaled (const Babl *conversion,
dst += dst_pitch;
src += src_pitch;
}
- return n;
}
-static inline long
+static inline void
convert_u16_double_scaled (const Babl *conversion,
double min_val,
double max_val,
@@ -1305,29 +1276,28 @@ convert_u16_double_scaled (const Babl *conversion,
dst += dst_pitch;
src += src_pitch;
}
- return n;
}
#define MAKE_CONVERSIONS(name, min_val, max_val, min, max) \
- static long \
+ static void \
convert_ ## name ## _double (const Babl *c, char *src, \
char *dst, \
int src_pitch, \
int dst_pitch, \
long n) \
{ \
- return convert_u16_double_scaled (c, min_val, max_val, min, max, \
- src, dst, src_pitch, dst_pitch, n); \
+ convert_u16_double_scaled (c, min_val, max_val, min, max, \
+ src, dst, src_pitch, dst_pitch, n); \
} \
- static long \
+ static void \
convert_double_ ## name (const Babl *c, char *src, \
char *dst, \
int src_pitch, \
int dst_pitch, \
long n) \
{ \
- return convert_double_u16_scaled (c, min_val, max_val, min, max, \
- src, dst, src_pitch, dst_pitch, n); \
+ convert_double_u16_scaled (c, min_val, max_val, min, max, \
+ src, dst, src_pitch, dst_pitch, n); \
}
MAKE_CONVERSIONS (u16_l, 0.0, 100.0, 0x00, 0xffff)
diff --git a/extensions/HCY.c b/extensions/HCY.c
index 27a221d..c14e7eb 100644
--- a/extensions/HCY.c
+++ b/extensions/HCY.c
@@ -35,19 +35,19 @@
#define RGB_LUMA_BLUE 0.114 //0.0722
#define EPSILON 1e-10
-static long rgba_to_hcya (const Babl *conversion,char *src,
+static void rgba_to_hcya (const Babl *conversion,char *src,
char *dst,
long samples);
-static long hcya_to_rgba (const Babl *conversion,char *src,
+static void hcya_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples);
-static long rgba_to_hcy (const Babl *conversion,char *src,
+static void rgba_to_hcy (const Babl *conversion,char *src,
char *dst,
long samples);
-static long hcy_to_rgba (const Babl *conversion,char *src,
+static void hcy_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples);
@@ -286,7 +286,7 @@ hcy_to_rgba_step (char *src,
((double *) dst)[2] = gamma_2_2_to_linear (blue);
}
-static long
+static void
rgba_to_hcya (const Babl *conversion,char *src,
char *dst,
long samples)
@@ -308,7 +308,7 @@ rgba_to_hcya (const Babl *conversion,char *src,
return samples;
}
-static long
+static void
hcya_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples)
@@ -330,7 +330,7 @@ hcya_to_rgba (const Babl *conversion,char *src,
return samples;
}
-static long
+static void
rgba_to_hcy (const Babl *conversion,char *src,
char *dst,
long samples)
@@ -348,7 +348,7 @@ rgba_to_hcy (const Babl *conversion,char *src,
return samples;
}
-static long
+static void
hcy_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples)
diff --git a/extensions/HSL.c b/extensions/HSL.c
index 14d9031..96dbd60 100644
--- a/extensions/HSL.c
+++ b/extensions/HSL.c
@@ -27,16 +27,16 @@
#define MAX(a,b) ((a < b) ? b : a)
#define EPSILON 1.0e-10
-static long rgba_to_hsla (const Babl *conversion,char *src,
+static void rgba_to_hsla (const Babl *conversion,char *src,
char *dst,
long samples);
-static long hsla_to_rgba (const Babl *conversion,char *src,
+static void hsla_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples);
-static long rgba_to_hsl (const Babl *conversion,char *src,
+static void rgba_to_hsl (const Babl *conversion,char *src,
char *dst,
long samples);
-static long hsl_to_rgba (const Babl *conversion,char *src,
+static void hsl_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples);
static void rgb_to_hsl_step (double *src,
@@ -156,7 +156,7 @@ rgb_to_hsl_step (double* src,
}
-static long
+static void
rgba_to_hsla (const Babl *conversion,char *src,
char *dst,
long samples)
@@ -174,12 +174,10 @@ rgba_to_hsla (const Babl *conversion,char *src,
src += 4 * sizeof (double);
dst += 4 * sizeof (double);
}
-
- return samples;
}
-static long
+static void
rgba_to_hsl (const Babl *conversion,char *src,
char *dst,
long samples)
@@ -193,8 +191,6 @@ rgba_to_hsl (const Babl *conversion,char *src,
src += 4 * sizeof (double);
dst += 3 * sizeof (double);
}
-
- return samples;
}
@@ -243,7 +239,7 @@ hsl_to_rgb_step (double *src,
}
-static long
+static void
hsla_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples)
@@ -261,12 +257,10 @@ hsla_to_rgba (const Babl *conversion,char *src,
src += 4 * sizeof (double);
dst += 4 * sizeof (double);
}
-
- return samples;
}
-static long
+static void
hsl_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples)
@@ -282,6 +276,4 @@ hsl_to_rgba (const Babl *conversion,char *src,
src += 3 * sizeof (double);
dst += 4 * sizeof (double);
}
-
- return samples;
}
diff --git a/extensions/HSV.c b/extensions/HSV.c
index bcab206..2e90fbb 100644
--- a/extensions/HSV.c
+++ b/extensions/HSV.c
@@ -32,19 +32,19 @@
#define MAX(a,b) (a < b) ? b : a;
#define EPSILON 1.0e-10
-static long rgba_to_hsva (const Babl *conversion,char *src,
+static void rgba_to_hsva (const Babl *conversion,char *src,
char *dst,
long samples);
-static long hsva_to_rgba (const Babl *conversion,char *src,
+static void hsva_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples);
-static long rgba_to_hsv (const Babl *conversion,char *src,
+static void rgba_to_hsv (const Babl *conversion,char *src,
char *dst,
long samples);
-static long hsv_to_rgba (const Babl *conversion,char *src,
+static void hsv_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples);
@@ -274,7 +274,7 @@ hsv_to_rgba_step (char *src,
((double *) dst)[2] = gamma_2_2_to_linear (blue);
}
-static long
+static void
rgba_to_hsva (const Babl *conversion,char *src,
char *dst,
long samples)
@@ -296,7 +296,7 @@ rgba_to_hsva (const Babl *conversion,char *src,
return samples;
}
-static long
+static void
hsva_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples)
@@ -318,7 +318,7 @@ hsva_to_rgba (const Babl *conversion,char *src,
return samples;
}
-static long
+static void
rgba_to_hsv (const Babl *conversion,char *src,
char *dst,
long samples)
@@ -336,7 +336,7 @@ rgba_to_hsv (const Babl *conversion,char *src,
return samples;
}
-static long
+static void
hsv_to_rgba (const Babl *conversion,char *src,
char *dst,
long samples)
diff --git a/extensions/cairo.c b/extensions/cairo.c
index e96c74b..114194a 100644
--- a/extensions/cairo.c
+++ b/extensions/cairo.c
@@ -26,7 +26,7 @@
int init (void);
-static inline long
+static inline void
conv_rgba8_cairo24_le (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -42,10 +42,9 @@ conv_rgba8_cairo24_le (const Babl *conversion,unsigned char *src, unsigned char
uint32_t blue = red_blue >> 16;
*dsti++ = green_alpha | red | blue | 0xff000000;
}
- return samples;
}
-static inline long
+static inline void
conv_rgb8_cairo24_le (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -59,13 +58,12 @@ conv_rgb8_cairo24_le (const Babl *conversion,unsigned char *src, unsigned char *
*dst++ = red;
*dst++ = 255;
}
- return samples;
}
#if 0
-static inline long
+static inline void
conv_rgbA8_premul_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -81,11 +79,10 @@ conv_rgbA8_premul_cairo32_le (const Babl *conversion,unsigned char *src, unsigne
*dst++ = red;
*dst++ = alpha;
}
- return samples;
}
#else
-static inline long
+static inline void
conv_rgbA8_premul_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -101,11 +98,10 @@ conv_rgbA8_premul_cairo32_le (const Babl *conversion,unsigned char *src, unsigne
uint32_t blue = red_blue >> 16;
*dsti++ = green_alpha | red | blue;
}
- return samples;
}
#endif
-static long conv_cairo32_rgbA8_premul_le (const Babl *conversion,unsigned char *src, unsigned char *dst,
long samples)
+static void conv_cairo32_rgbA8_premul_le (const Babl *conversion,unsigned char *src, unsigned char *dst,
long samples)
{
long n = samples;
while (n--)
@@ -120,11 +116,10 @@ static long conv_cairo32_rgbA8_premul_le (const Babl *conversion,unsigned char *
*dst++ = blue;
*dst++ = alpha;
}
- return samples;
}
-static long conv_cairo32_rgbAF_premul_le (const Babl *conversion,unsigned char *src, unsigned char
*dst_char, long samples)
+static void conv_cairo32_rgbAF_premul_le (const Babl *conversion,unsigned char *src, unsigned char
*dst_char, long samples)
{
long n = samples;
float *dst = (void*)dst_char;
@@ -140,10 +135,9 @@ static long conv_cairo32_rgbAF_premul_le (const Babl *conversion,unsigned char *
*dst++ = blue / 255.0;
*dst++ = alpha / 255.0;
}
- return samples;
}
-static inline long
+static inline void
conv_rgbA8_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -160,10 +154,9 @@ conv_rgbA8_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char
*dst++ = div_255 (red * alpha);
*dst++ = alpha;
}
- return samples;
}
-static inline long
+static inline void
conv_rgb8_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -178,13 +171,12 @@ conv_rgb8_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *
*dst++ = red;
*dst++ = 0xff;
}
- return samples;
}
-static inline long
+static inline void
conv_yA8_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -201,10 +193,9 @@ conv_yA8_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *d
*dst++ = val;
*dst++ = alpha;
}
- return samples;
}
-static inline long
+static inline void
conv_yA16_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -219,10 +210,9 @@ conv_yA16_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *
*dst++ = (alpha * 0xff + 0.5f);
ssrc+=2;
}
- return samples;
}
-static inline long
+static inline void
conv_y8_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -234,10 +224,9 @@ conv_y8_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *ds
*dst++ = val;
*dst++ = 0xff;
}
- return samples;
}
-static inline long
+static inline void
conv_y16_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -253,10 +242,9 @@ conv_y16_cairo32_le (const Babl *conversion,unsigned char *src, unsigned char *d
*dst++ = val;
*dst++ = 0xff;
}
- return samples;
}
-static long
+static void
conv_rgbA_gamma_float_cairo32_le (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -277,10 +265,9 @@ conv_rgbA_gamma_float_cairo32_le (const Babl *conversion,unsigned char *src,
*cdst++ = val >= 0xff ? 0xff : val <= 0 ? 0 : val;
fsrc+=4;
}
- return samples;
}
-static long
+static void
conv_rgbafloat_cairo32_le (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -325,11 +312,10 @@ conv_rgbafloat_cairo32_le (const Babl *conversion,unsigned char *src,
*cdst++ = balpha + 0.5f;
}
}
- return samples;
}
-static long
+static void
conv_yafloat_cairo32_le (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -369,7 +355,6 @@ conv_yafloat_cairo32_le (const Babl *conversion,unsigned char *src,
*cdst++ = balpha + 0.5f;
}
}
- return samples;
}
int
diff --git a/extensions/fast-float.c b/extensions/fast-float.c
index 8d5f30b..328cbff 100644
--- a/extensions/fast-float.c
+++ b/extensions/fast-float.c
@@ -287,7 +287,7 @@ babl_lookup_free (BablLookup *lookup)
}
#endif
-static INLINE long
+static INLINE void
conv_rgbaF_linear_rgbAF_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -324,12 +324,11 @@ conv_rgbaF_linear_rgbAF_gamma (const Babl *conversion,unsigned char *src,
*fdst++ = alpha;
}
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbaF_linear_rgba8_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -363,10 +362,9 @@ conv_rgbaF_linear_rgba8_gamma (const Babl *conversion,unsigned char *src,
*cdst++ = val >= 0xff ? 0xff : val <= 0 ? 0 : val;
}
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbaF_linear_rgbA8_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -408,10 +406,9 @@ conv_rgbaF_linear_rgbA8_gamma (const Babl *conversion,unsigned char *src,
*cdst++ = balpha + 0.5f;
}
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_yaF_linear_rgbA8_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -447,12 +444,11 @@ conv_yaF_linear_rgbA8_gamma (const Babl *conversion,unsigned char *src,
*cdst++ = balpha + 0.5f;
}
}
- return samples;
}
-static long
+static void
conv_rgbaF_linear_rgbA8_gamma_cairo (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -494,10 +490,9 @@ conv_rgbaF_linear_rgbA8_gamma_cairo (const Babl *conversion,unsigned char *src,
*cdst++ = balpha + 0.5f;
}
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbAF_linear_rgbAF_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -535,10 +530,9 @@ conv_rgbAF_linear_rgbAF_gamma (const Babl *conversion,unsigned char *src,
*fdst++ = alpha;
}
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbaF_linear_rgbaF_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -554,10 +548,9 @@ conv_rgbaF_linear_rgbaF_gamma (const Babl *conversion,unsigned char *src,
*fdst++ = linear_to_gamma_2_2_lut (*fsrc++);
*fdst++ = *fsrc++;
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbF_linear_rgbF_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -572,11 +565,10 @@ conv_rgbF_linear_rgbF_gamma (const Babl *conversion,unsigned char *src,
*fdst++ = linear_to_gamma_2_2_lut (*fsrc++);
*fdst++ = linear_to_gamma_2_2_lut (*fsrc++);
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbaF_gamma_rgbaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -592,10 +584,9 @@ conv_rgbaF_gamma_rgbaF_linear (const Babl *conversion,unsigned char *src,
*fdst++ = gamma_2_2_to_linear_lut (*fsrc++);
*fdst++ = *fsrc++;
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbF_gamma_rgbF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -610,7 +601,6 @@ conv_rgbF_gamma_rgbF_linear (const Babl *conversion,unsigned char *src,
*fdst++ = gamma_2_2_to_linear_lut (*fsrc++);
*fdst++ = gamma_2_2_to_linear_lut (*fsrc++);
}
- return samples;
}
#define o(src, dst) \
diff --git a/extensions/float-half.c b/extensions/float-half.c
index 5b9d219..2c09ba0 100644
--- a/extensions/float-half.c
+++ b/extensions/float-half.c
@@ -228,54 +228,52 @@ static void singles2halfp(void *target, const void *source, long numel)
dst[i] = float_to_half_float (src[i]);
}
-static inline long
+static inline void
conv_yHalf_yF (const Babl *conversion,const uint16_t *src, float *dst, long samples)
{
halfp2singles(dst, src, samples);
- return samples;
}
-static long
+static void
conv_yaHalf_yaF (const Babl *conversion,const uint16_t *src, float *dst, long samples)
{
- return conv_yHalf_yF (conversion, src, dst, samples * 2) / 2;
+ conv_yHalf_yF (conversion, src, dst, samples * 2);
}
-static long
+static void
conv_rgbHalf_rgbF (const Babl *conversion,const uint16_t *src, float *dst, long samples)
{
- return conv_yHalf_yF (conversion, src, dst, samples * 3) / 3;
+ conv_yHalf_yF (conversion, src, dst, samples * 3);
}
-static long
+static void
conv_rgbaHalf_rgbaF (const Babl *conversion,const uint16_t *src, float *dst, long samples)
{
- return conv_yHalf_yF (conversion, src, dst, samples * 4) / 4;
+ conv_yHalf_yF (conversion, src, dst, samples * 4);
}
-static inline long
+static inline void
conv_yF_yHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
singles2halfp (dst, src, samples);
- return samples;
}
-static long
+static void
conv_yaF_yaHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
- return conv_yF_yHalf (conversion, src, dst, samples * 2) / 2;
+ conv_yF_yHalf (conversion, src, dst, samples * 2);
}
-static long
+static void
conv_rgbF_rgbHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
- return conv_yF_yHalf (conversion, src, dst, samples * 3) / 3;
+ conv_yF_yHalf (conversion, src, dst, samples * 3);
}
-static long
+static void
conv_rgbaF_rgbaHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
- return conv_yF_yHalf (conversion, src, dst, samples * 4) / 4;
+ conv_yF_yHalf (conversion, src, dst, samples * 4);
}
static void singles2halfp2(void *target, const void *source, long numel)
@@ -333,29 +331,28 @@ static void singles2halfp2(void *target, const void *source, long numel)
}
}
-static inline long
+static inline void
conv2_yF_yHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
singles2halfp2 (dst, src, samples);
- return samples;
}
-static long
+static void
conv2_yaF_yaHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
- return conv2_yF_yHalf (conversion, src, dst, samples * 2) / 2;
+ conv2_yF_yHalf (conversion, src, dst, samples * 2);
}
-static long
+static void
conv2_rgbF_rgbHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
- return conv2_yF_yHalf (conversion, src, dst, samples * 3) / 3;
+ conv2_yF_yHalf (conversion, src, dst, samples * 3);
}
-static long
+static void
conv2_rgbaF_rgbaHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
- return conv2_yF_yHalf (conversion, src, dst, samples * 4) / 4;
+ conv2_yF_yHalf (conversion, src, dst, samples * 4);
}
int init (void);
diff --git a/extensions/float.c b/extensions/float.c
index 4eb26dd..1f4bb86 100644
--- a/extensions/float.c
+++ b/extensions/float.c
@@ -30,7 +30,7 @@
#define INLINE inline
-static INLINE long
+static INLINE void
conv_rgbaF_linear_rgbAF_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -50,10 +50,9 @@ conv_rgbaF_linear_rgbAF_gamma (const Babl *conversion,unsigned char *src,
*fdst++ = babl_trc_from_linear (trc[2], *fsrc++) * alpha;
*fdst++ = *fsrc++;
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbAF_linear_rgbAF_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -92,10 +91,9 @@ conv_rgbAF_linear_rgbAF_gamma (const Babl *conversion,unsigned char *src,
*fdst++ = *fsrc++;
}
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbaF_linear_rgbaF_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -114,10 +112,9 @@ conv_rgbaF_linear_rgbaF_gamma (const Babl *conversion,unsigned char *src,
*fdst++ = babl_trc_from_linear (trc[2], *fsrc++);
*fdst++ = *fsrc++;
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbF_linear_rgbF_gamma (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -134,11 +131,10 @@ conv_rgbF_linear_rgbF_gamma (const Babl *conversion,unsigned char *src,
*fdst++ = babl_trc_from_linear (trc[1], *fsrc++);
*fdst++ = babl_trc_from_linear (trc[2], *fsrc++);
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbaF_gamma_rgbaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -156,10 +152,9 @@ conv_rgbaF_gamma_rgbaF_linear (const Babl *conversion,unsigned char *src,
*fdst++ = babl_trc_to_linear (trc[2], *fsrc++);
*fdst++ = *fsrc++;
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbF_gamma_rgbF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -176,7 +171,6 @@ conv_rgbF_gamma_rgbF_linear (const Babl *conversion,unsigned char *src,
*fdst++ = babl_trc_to_linear (trc[1], *fsrc++);
*fdst++ = babl_trc_to_linear (trc[2], *fsrc++);
}
- return samples;
}
#define o(src, dst) \
diff --git a/extensions/gegl-fixups.c b/extensions/gegl-fixups.c
index 96cb6e3..e3bb836 100644
--- a/extensions/gegl-fixups.c
+++ b/extensions/gegl-fixups.c
@@ -145,7 +145,7 @@ gggl_float_to_index16 (float f)
return (u.s >> 15) & ((1 << 17)-1);
}
-static INLINE long
+static INLINE void
conv_F_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -159,11 +159,10 @@ conv_F_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 1;
src += 4;
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_F_8g (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -177,11 +176,10 @@ conv_F_8g (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 1;
src += 4;
}
- return samples;
}
-static INLINE long __attribute__((unused))
+static INLINE void __attribute__((unused))
conv_8_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -194,11 +192,10 @@ conv_8_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 4;
src += 1;
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgbaF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -222,11 +219,10 @@ conv_rgbaF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
src += 4;
}
- return samples;
}
-static INLINE long __attribute__((unused))
+static INLINE void __attribute__((unused))
conv_rgbaF_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -253,23 +249,20 @@ conv_rgbaF_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
src += 4;
dst += 1;
}
- return samples;
}
#define conv_rgbaF_rgbP8 conv_rgbaF_rgba8
-static INLINE long __attribute__((unused))
+static INLINE void __attribute__((unused))
conv_rgbF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8g (conversion, src, dst, samples * 3);
- return samples;
}
-static INLINE long __attribute__((unused))
+static INLINE void __attribute__((unused))
conv_gaF_ga8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbAF_rgbA8 conv_rgbaF_rgba8
@@ -277,7 +270,7 @@ conv_gaF_ga8 (const Babl *conversion,unsigned char *src, unsigned char *dst, lon
#define conv_gAF_gA8 conv_gaF_ga8
-static INLINE long
+static INLINE void
conv_rgba8_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -300,10 +293,9 @@ conv_rgba8_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst,
dst += 4;
src += 1;
}
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgb8_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -325,10 +317,9 @@ conv_rgb8_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst,
(*(float *) dst) = 1.0;
dst += 4;
}
- return samples;
}
-static long
+static void
conv_rgbAF_rgb8 (const Babl *conversion,unsigned char *srcc,
unsigned char *dstc,
long samples)
@@ -356,10 +347,9 @@ conv_rgbAF_rgb8 (const Babl *conversion,unsigned char *srcc,
src += 4;
dst += 3;
}
- return samples;
}
-static long
+static void
conv_bgrA8_rgba8 (const Babl *conversion,unsigned char *srcc,
unsigned char *dstc,
long samples)
@@ -378,10 +368,9 @@ conv_bgrA8_rgba8 (const Babl *conversion,unsigned char *srcc,
src += 4;
dst += 4;
}
- return samples;
}
-static long
+static void
conv_rgbaF_rgbAF (const Babl *conversion,unsigned char *srcc,
unsigned char *dstc,
long samples)
@@ -400,10 +389,9 @@ conv_rgbaF_rgbAF (const Babl *conversion,unsigned char *srcc,
src += 4;
dst += 4;
}
- return samples;
}
-static long
+static void
conv_rgbAF_rgbaF (const Babl *conversion,unsigned char *srcc,
unsigned char *dstc,
long samples)
@@ -427,11 +415,10 @@ conv_rgbAF_rgbaF (const Babl *conversion,unsigned char *srcc,
src += 4;
dst += 4;
}
- return samples;
}
-static long
+static void
conv_rgbAF_lrgba8 (const Babl *conversion,unsigned char *srcc,
unsigned char *dstc,
long samples)
@@ -458,7 +445,6 @@ conv_rgbAF_lrgba8 (const Babl *conversion,unsigned char *srcc,
src += 4;
dst += 4;
}
- return samples;
}
#define conv_rgb8_rgbAF conv_rgb8_rgbaF
diff --git a/extensions/gggl-lies.c b/extensions/gggl-lies.c
index 76d4d26..b34f8ef 100644
--- a/extensions/gggl-lies.c
+++ b/extensions/gggl-lies.c
@@ -48,7 +48,7 @@
*
*/
-static long
+static void
conv_F_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -71,10 +71,9 @@ conv_F_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 1;
src += 4;
}
- return samples;
}
-static long
+static void
conv_F_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -97,12 +96,11 @@ conv_F_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 2;
src += 4;
}
- return samples;
}
-static long
+static void
conv_8_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -113,10 +111,9 @@ conv_8_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 4;
src += 1;
}
- return samples;
}
-static long
+static void
conv_16_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -127,10 +124,9 @@ conv_16_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 4;
src += 2;
}
- return samples;
}
-static long
+static void
conv_F_D (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -141,10 +137,9 @@ conv_F_D (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 8;
src += 4;
}
- return samples;
}
-static long
+static void
conv_D_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -155,9 +150,8 @@ conv_D_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 4;
src += 8;
}
- return samples;
}
-static long
+static void
conv_16_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -169,10 +163,9 @@ conv_16_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 1;
src += 2;
}
- return samples;
}
-static long
+static void
conv_8_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -183,70 +176,61 @@ conv_8_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 2;
src += 1;
}
- return samples;
}
/*********/
-static long
+static void
conv_rgbaF_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 4);
- return samples;
}
#define conv_rgbaF_rgbP8 conv_rgbaF_rgba8
-static long
+static void
conv_rgbF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_gaF_ga8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbAF_rgbA8 conv_rgbaF_rgba8
#define conv_gF_g8 conv_F_8
#define conv_gAF_gA8 conv_gaF_ga8
-static long
+static void
conv_rgbaF_rgba16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgbaF_rgbaD (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_D (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgbaD_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_D_F (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgbF_rgb16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_gaF_ga16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbAF_rgbAD conv_rgbaF_rgbaD
@@ -255,100 +239,88 @@ conv_gaF_ga16 (const Babl *conversion,unsigned char *src, unsigned char *dst, lo
#define conv_gF_g16 conv_F_16
#define conv_gAF_gA16 conv_gaF_ga16
-static long
+static void
conv_rgba8_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_F (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgb8_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_F (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_ga8_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_F (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbA8_rgbAF conv_rgba8_rgbaF
#define conv_gA8_gAF conv_ga8_gaF
#define conv_g8_gF conv_8_F
-static long
+static void
conv_rgba16_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgb16_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_ga16_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbA16_rgbAF conv_rgba16_rgbaF
#define conv_gA16_gAF conv_ga16_gaF
#define conv_g16_gF conv_16_F
-static long
+static void
conv_rgba16_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_8 (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgb16_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_8 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_ga16_ga8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_8 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbA16_rgbA8 conv_rgba16_rgba8
#define conv_gA16_gA8 conv_ga16_ga8
#define conv_g16_g8 conv_16_8
-static long
+static void
conv_rgba8_rgba16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_16 (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgb8_rgb16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_16 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_ga8_ga16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_16 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbA8_rgbA16 conv_rgba8_rgba16
@@ -357,7 +329,7 @@ conv_ga8_ga16 (const Babl *conversion,unsigned char *src, unsigned char *dst, lo
/* alpha conversions */
-static long
+static void
conv_gaF_gAF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -373,10 +345,9 @@ conv_gaF_gAF (const Babl *conversion,unsigned char *src, unsigned char *dst, lon
dst += 4;
src += 4;
}
- return samples;
}
-static long
+static void
conv_gAF_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -392,12 +363,11 @@ conv_gAF_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, lon
dst += 4;
src += 4;
}
- return samples;
}
/* alpha stripping and adding */
-static long
+static void
conv_rgbaF_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -415,11 +385,10 @@ conv_rgbaF_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst,
src += 4;
src += 4;
}
- return samples;
}
-static long
+static void
conv_gF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -436,12 +405,11 @@ conv_gF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, lo
dst += 4;
src += 4;
}
- return samples;
}
#define conv_gF_rgbAF conv_gF_rgbaF
-static long
+static void
conv_rgbF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -460,10 +428,9 @@ conv_rgbF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst,
*(float *) dst = 1.0;
dst += 4;
}
- return samples;
}
-static long
+static void
conv_gaF_gF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -475,10 +442,9 @@ conv_gaF_gF (const Babl *conversion,unsigned char *src, unsigned char *dst, long
src += 4;
src += 4;
}
- return samples;
}
-static long
+static void
conv_gF_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -491,7 +457,6 @@ conv_gF_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long
*(float *) dst = 1.0;
dst += 4;
}
- return samples;
}
#define conv_gF_gAF conv_gF_gaF
@@ -500,7 +465,7 @@ conv_gF_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long
/* colorchannel dropping and adding */
-static long
+static void
conv_gF_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -516,10 +481,9 @@ conv_gF_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, lon
}
src += 4;
}
- return samples;
}
-static long
+static void
conv_gaF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -538,14 +502,13 @@ conv_gaF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, l
dst += 4;
src += 4;
}
- return samples;
}
#define conv_gAF_rgbAF conv_gaF_rgbaF
/* other conversions coded for some optimisation reason or sumthin */
-static long
+static void
conv_rgbaF_rgbA8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -565,10 +528,9 @@ conv_rgbaF_rgbA8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
dst++;
src += 4;
}
- return samples;
}
-static long
+static void
conv_rgbaF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -585,10 +547,9 @@ conv_rgbaF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
}
src += 4;
}
- return samples;
}
-static long
+static void
conv_rgbaF_rgb16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -605,10 +566,9 @@ conv_rgbaF_rgb16 (const Babl *conversion,unsigned char *src, unsigned char *dst,
}
src += 4;
}
- return samples;
}
-static long
+static void
conv_rgba8_rgbA8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -634,10 +594,9 @@ conv_rgba8_rgbA8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
dst += 4;
src += 4;
}
- return samples;
}
-static long
+static void
conv_rgbA8_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -664,10 +623,9 @@ conv_rgbA8_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
}
src += 4;
}
- return samples;
}
-static long
+static void
conv_rgb8_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -682,12 +640,11 @@ conv_rgb8_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
dst += 4;
}
- return samples;
}
#define conv_rgb8_rgbA8 conv_rgb8_rgba8
-static long
+static void
conv_rgba8_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -700,7 +657,6 @@ conv_rgba8_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
src += 4;
dst += 3;
}
- return samples;
}
int init (void);
diff --git a/extensions/gggl-table-lies.c b/extensions/gggl-table-lies.c
index 8149002..6cce2ba 100644
--- a/extensions/gggl-table-lies.c
+++ b/extensions/gggl-table-lies.c
@@ -149,7 +149,7 @@ gggl_float_to_index16 (float f)
}
-static long
+static void
conv_F_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -163,10 +163,9 @@ conv_F_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 1;
src += 4;
}
- return samples;
}
-static long
+static void
conv_F_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -180,10 +179,9 @@ conv_F_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 2;
src += 4;
}
- return samples;
}
-static long
+static void
conv_8_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -196,10 +194,9 @@ conv_8_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 4;
src += 1;
}
- return samples;
}
-static long
+static void
conv_16_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -212,106 +209,93 @@ conv_16_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 4;
src += 2;
}
- return samples;
}
/*********/
-static long
+static void
conv_rgbaF_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 4);
- return samples;
}
#define conv_rgbaF_rgbP8 conv_rgbaF_rgba8
-static long
+static void
conv_rgbF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_gaF_ga8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbAF_rgbA8 conv_rgbaF_rgba8
#define conv_gF_g8 conv_F_8
#define conv_gAF_gA8 conv_gaF_ga8
-static long
+static void
conv_rgbaF_rgba16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgbF_rgb16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_gaF_ga16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbAF_rgbA16 conv_rgbaF_rgba16
#define conv_gF_g16 conv_F_16
#define conv_gAF_gA16 conv_gaF_ga16
-static long
+static void
conv_rgba8_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_F (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgb8_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_F (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_ga8_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_F (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbA8_rgbAF conv_rgba8_rgbaF
#define conv_gA8_gAF conv_ga8_gaF
#define conv_g8_gF conv_8_F
-static long
+static void
conv_rgba16_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgb16_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_ga16_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbA16_rgbAF conv_rgba16_rgbaF
diff --git a/extensions/gggl-table.c b/extensions/gggl-table.c
index ebb4b85..0ce0353 100644
--- a/extensions/gggl-table.c
+++ b/extensions/gggl-table.c
@@ -148,7 +148,7 @@ gggl_float_to_index16 (float f)
return u.s[1];
}
-static long
+static void
conv_F_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -162,10 +162,9 @@ conv_F_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 1;
src += 4;
}
- return samples;
}
-static long
+static void
conv_F_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -179,10 +178,9 @@ conv_F_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 2;
src += 4;
}
- return samples;
}
-static long
+static void
conv_8_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -195,10 +193,9 @@ conv_8_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 4;
src += 1;
}
- return samples;
}
-static long
+static void
conv_rgb8_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -219,10 +216,9 @@ conv_rgb8_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst,
(*(float *) dst) = 1.0;
dst += 4;
}
- return samples;
}
-static long
+static void
conv_16_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -235,10 +231,9 @@ conv_16_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 4;
src += 2;
}
- return samples;
}
-static long
+static void
conv_rgbaF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -262,103 +257,93 @@ conv_rgbaF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
src += 4;
}
- return samples;
}
/*********/
-static long
+static void
conv_rgbaF_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgbF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_gaF_ga8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbAF_rgbA8 conv_rgbaF_rgba8
#define conv_gF_g8 conv_F_8
#define conv_gAF_gA8 conv_gaF_ga8
-static long
+static void
conv_rgbaF_rgba16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgbF_rgb16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_gaF_ga16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbAF_rgbA16 conv_rgbaF_rgba16
#define conv_gF_g16 conv_F_16
#define conv_gAF_gA16 conv_gaF_ga16
-static long
+static void
conv_rgba8_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
- return conv_8_F (conversion, src, dst, samples * 4) / 4;
+ conv_8_F (conversion, src, dst, samples * 4);
}
-static long
+static void
conv_rgb8_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
- return conv_8_F (conversion, src, dst, samples * 3) / 3;
+ conv_8_F (conversion, src, dst, samples * 3);
}
-static long
+static void
conv_ga8_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
- return conv_8_F (conversion, src, dst, samples * 2) / 2;
+ conv_8_F (conversion, src, dst, samples * 2);
}
#define conv_rgbA8_rgbAF conv_rgba8_rgbaF
#define conv_gA8_gAF conv_ga8_gaF
#define conv_g8_gF conv_8_F
-static long
+static void
conv_rgba16_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgb16_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_ga16_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbA16_rgbAF conv_rgba16_rgbaF
diff --git a/extensions/gggl.c b/extensions/gggl.c
index cf0f664..83352d2 100644
--- a/extensions/gggl.c
+++ b/extensions/gggl.c
@@ -49,7 +49,7 @@
* gamma correction (not really,. gamma correction belongs in seperate ops,.
*/
-static long
+static void
conv_F_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -66,10 +66,9 @@ conv_F_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 1;
src += 4;
}
- return samples;
}
-static long
+static void
conv_F_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -92,10 +91,9 @@ conv_F_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 2;
src += 4;
}
- return samples;
}
-static long
+static void
conv_8_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -106,10 +104,9 @@ conv_8_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 4;
src += 1;
}
- return samples;
}
-static long
+static void
conv_16_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -120,10 +117,9 @@ conv_16_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 4;
src += 2;
}
- return samples;
}
-static long
+static void
conv_rgbaF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -146,10 +142,9 @@ conv_rgbaF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
}
src += 4;
}
- return samples;
}
-static long
+static void
conv_F_D (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -160,10 +155,9 @@ conv_F_D (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 8;
src += 4;
}
- return samples;
}
-static long
+static void
conv_D_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -174,10 +168,9 @@ conv_D_F (const Babl *conversion,unsigned char *src, unsigned char *dst, long sa
dst += 4;
src += 8;
}
- return samples;
}
-static long
+static void
conv_16_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -189,10 +182,9 @@ conv_16_8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 1;
src += 2;
}
- return samples;
}
-static long
+static void
conv_8_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -203,167 +195,149 @@ conv_8_16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long s
dst += 2;
src += 1;
}
- return samples;
}
/*********/
-static long
+static void
conv_rgbaF_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgbF_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_gaF_ga8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_8 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbAF_rgbA8 conv_rgbaF_rgba8
#define conv_gF_g8 conv_F_8
#define conv_gAF_gA8 conv_gaF_ga8
-static long
+static void
conv_rgbaF_rgba16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgbF_rgb16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_gaF_ga16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_16 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbAF_rgbA16 conv_rgbaF_rgba16
#define conv_gF_g16 conv_F_16
#define conv_gAF_gA16 conv_gaF_ga16
-static long
+static void
conv_rgba8_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
- return conv_8_F (conversion, src, dst, samples * 4) / 4;
+ conv_8_F (conversion, src, dst, samples * 4);
}
-static long
+static void
conv_rgb8_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
- return conv_8_F (conversion, src, dst, samples * 3) / 3;
+ conv_8_F (conversion, src, dst, samples * 3);
}
-static long
+static void
conv_ga8_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
- return conv_8_F (conversion, src, dst, samples * 2) / 2;
+ conv_8_F (conversion, src, dst, samples * 2);
}
#define conv_rgbA8_rgbAF conv_rgba8_rgbaF
#define conv_gA8_gAF conv_ga8_gaF
#define conv_g8_gF conv_8_F
-static long
+static void
conv_rgbaF_rgbaD (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_F_D (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgbaD_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_D_F (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgba16_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgb16_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_ga16_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_F (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbA16_rgbAF conv_rgba16_rgbaF
#define conv_gA16_gAF conv_ga16_gaF
#define conv_g16_gF conv_16_F
-static long
+static void
conv_rgba16_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_8 (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgb16_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_8 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_ga16_ga8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_16_8 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbA16_rgbA8 conv_rgba16_rgba8
#define conv_gA16_gA8 conv_ga16_ga8
#define conv_g16_g8 conv_16_8
-static long
+static void
conv_rgba8_rgba16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_16 (conversion, src, dst, samples * 4);
- return samples;
}
-static long
+static void
conv_rgb8_rgb16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_16 (conversion, src, dst, samples * 3);
- return samples;
}
-static long
+static void
conv_ga8_ga16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
conv_8_16 (conversion, src, dst, samples * 2);
- return samples;
}
#define conv_rgbA8_rgbA16 conv_rgba8_rgba16
@@ -372,7 +346,7 @@ conv_ga8_ga16 (const Babl *conversion,unsigned char *src, unsigned char *dst, lo
/* alpha conversions */
-static long
+static void
conv_gaF_gAF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -388,10 +362,9 @@ conv_gaF_gAF (const Babl *conversion,unsigned char *src, unsigned char *dst, lon
dst += 4;
src += 4;
}
- return samples;
}
-static long
+static void
conv_gAF_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -407,12 +380,11 @@ conv_gAF_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, lon
dst += 4;
src += 4;
}
- return samples;
}
/* alpha stripping and adding */
-static long
+static void
conv_rgbaF_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -430,10 +402,9 @@ conv_rgbaF_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst,
src += 4;
src += 4;
}
- return samples;
}
-static long
+static void
conv_rgbF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -452,13 +423,12 @@ conv_rgbF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst,
*(float *) dst = 1.0;
dst += 4;
}
- return samples;
}
#define conv_rgbF_rgbAF conv_rgbF_rgbaF
-static long
+static void
conv_gaF_gF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -470,10 +440,9 @@ conv_gaF_gF (const Babl *conversion,unsigned char *src, unsigned char *dst, long
src += 4;
src += 4;
}
- return samples;
}
-static long
+static void
conv_gF_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -486,7 +455,6 @@ conv_gF_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long
*(float *) dst = 1.0;
dst += 4;
}
- return samples;
}
#define conv_gF_gAF conv_gF_gaF
@@ -495,7 +463,7 @@ conv_gF_gaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long
/* colorchannel dropping and adding */
-static long
+static void
conv_gF_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -511,10 +479,9 @@ conv_gF_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, lon
}
src += 4;
}
- return samples;
}
-static long
+static void
conv_gaF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -533,7 +500,6 @@ conv_gaF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, l
dst += 4;
src += 4;
}
- return samples;
}
#define conv_gAF_rgbAF conv_gaF_rgbaF
@@ -541,7 +507,7 @@ conv_gaF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, l
/* other conversions coded for some optimisation reason or sumthin */
-static long
+static void
conv_rgbaF_rgbA8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -561,10 +527,9 @@ conv_rgbaF_rgbA8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
dst++;
src += 4;
}
- return samples;
}
-static long
+static void
conv_rgbaF_rgb16 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -581,10 +546,9 @@ conv_rgbaF_rgb16 (const Babl *conversion,unsigned char *src, unsigned char *dst,
}
src += 4;
}
- return samples;
}
-static long
+static void
conv_rgbA16_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -604,10 +568,9 @@ conv_rgbA16_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst
dst += 4;
src += 2;
}
- return samples;
}
-static long
+static void
conv_gF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -624,13 +587,12 @@ conv_gF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, lo
dst += 4;
src += 4;
}
- return samples;
}
#define conv_gF_rgbAF conv_gF_rgbaF
/*
- static long
+ static void
conv_rgb8_rgbaF (unsigned char *src,
unsigned char *dst,
int samples)
@@ -647,10 +609,9 @@ conv_gF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, lo
(*(float *) dst) = 1.0;
dst += 4;
}
- return samples;
}
- static long
+ static void
conv_g8_rgbaF (unsigned char *src,
unsigned char *dst,
int samples)
@@ -667,10 +628,9 @@ conv_gF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, lo
(*(float *) dst) = 1.0;
dst += 4;
}
- return samples;
}
- static long
+ static void
conv_rgb16_rgbaF (unsigned char *src,
unsigned char *dst,
int samples)
@@ -688,10 +648,9 @@ conv_gF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, lo
src += 2;
dst += 4;
}
- return samples;
}
- static long
+ static void
conv_gF_rgbaF (unsigned char *src,
unsigned char *dst,
int samples)
@@ -709,10 +668,9 @@ conv_gF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, lo
src += 4;
}
- return samples;
}
*/
-static long
+static void
conv_rgba8_rgbA8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -738,10 +696,9 @@ conv_rgba8_rgbA8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
dst += 4;
src += 4;
}
- return samples;
}
-static long
+static void
conv_rgbA8_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -768,10 +725,9 @@ conv_rgbA8_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
}
src += 4;
}
- return samples;
}
-static long
+static void
conv_rgb8_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples-1;
@@ -785,12 +741,11 @@ conv_rgb8_rgba8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
dst[1] = src[1];
dst[2] = src[2];
dst[3] = 255;
- return samples;
}
#define conv_rgb8_rgbA8 conv_rgb8_rgba8
-static long
+static void
conv_rgba8_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -803,10 +758,9 @@ conv_rgba8_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
src += 4;
dst += 3;
}
- return samples;
}
-static long
+static void
conv_rgbA8_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
long n = samples;
@@ -835,7 +789,6 @@ conv_rgbA8_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
}
src += 4;
}
- return samples;
}
#ifndef byteclamp
@@ -862,7 +815,7 @@ conv_rgbA8_rgb8 (const Babl *conversion,unsigned char *src, unsigned char *dst,
- static long
+ static void
conv_yuvaF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
float *src_f = (float *) src;
@@ -890,11 +843,10 @@ conv_yuvaF_rgbaF (const Babl *conversion,unsigned char *src, unsigned char *dst,
dst_f += 4;
src_f += 4;
}
- return samples;
}
-static long
+static void
conv_yuvF_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, long samples)
{
float *src_f = (float *) src;
@@ -921,7 +873,6 @@ conv_yuvF_rgbF (const Babl *conversion,unsigned char *src, unsigned char *dst, l
dst_f += 3;
src_f += 3;
}
- return samples;
}
int init (void);
diff --git a/extensions/gimp-8bit.c b/extensions/gimp-8bit.c
index de0099a..3db0be7 100644
--- a/extensions/gimp-8bit.c
+++ b/extensions/gimp-8bit.c
@@ -69,7 +69,7 @@ tables_init (const Babl *space)
return j;
}
-static INLINE long
+static INLINE void
u8_linear_to_float_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -79,12 +79,10 @@ u8_linear_to_float_linear (const Babl *conversion,unsigned char *src,
while (n--)
*d++ = lut_linear[*src++];
-
- return samples;
}
-static INLINE long
+static INLINE void
u8_linear_to_float_linear_premul (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -102,10 +100,9 @@ u8_linear_to_float_linear_premul (const Babl *conversion,unsigned char *src,
src += 4;
d += 4;
}
- return samples;
}
-static INLINE long
+static INLINE void
u8_gamma_2_2_to_float_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -116,32 +113,26 @@ u8_gamma_2_2_to_float_linear (const Babl *conversion,unsigned char *src,
while (n--)
*d++ = lut_gamma_2_2[space_no][*src++];
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgba8_linear_rgbaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
{
u8_linear_to_float_linear (conversion, src, dst, samples * 4);
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgba8_linear_ragabaaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
{
u8_linear_to_float_linear_premul (conversion, src, dst, samples);
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgba8_gamma_2_2_rgbaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -157,31 +148,25 @@ conv_rgba8_gamma_2_2_rgbaF_linear (const Babl *conversion,unsigned char *src,
*d++ = lut_gamma_2_2[space_no][*src++];
*d++ = lut_linear[*src++];
}
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgb8_linear_rgbF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
{
u8_linear_to_float_linear (conversion, src, dst, samples * 3);
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgb8_gamma_2_2_rgbF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
{
u8_gamma_2_2_to_float_linear (conversion, src, dst, samples * 3);
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_rgb8_linear_rgbaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -196,13 +181,11 @@ conv_rgb8_linear_rgbaF_linear (const Babl *conversion,unsigned char *src,
*d++ = lut_linear[*src++];
*d++ = 1.0;
}
-
- return samples;
}
#define conv_rgb8_linear_ragabaaF_linear conv_rgb8_linear_rgbaF_linear
-static INLINE long
+static INLINE void
conv_rgb8_gamma_2_2_rgbaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -218,21 +201,17 @@ conv_rgb8_gamma_2_2_rgbaF_linear (const Babl *conversion,unsigned char *src,
*d++ = lut_gamma_2_2[space_no][*src++];
*d++ = 1.0;
}
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_ga8_linear_gaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
{
u8_linear_to_float_linear (conversion, src, dst, samples * 2);
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_ga8_gamma_2_2_gaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -246,11 +225,9 @@ conv_ga8_gamma_2_2_gaF_linear (const Babl *conversion,unsigned char *src,
*d++ = lut_gamma_2_2[space_no][*src++];
*d++ = lut_linear[*src++];
}
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_ga8_gamma_2_2_rgba8_gamma_2_2 (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -264,11 +241,9 @@ conv_ga8_gamma_2_2_rgba8_gamma_2_2 (const Babl *conversion,unsigned char *src,
*dst++ = *src++;
*dst++ = *src++;
}
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_ga8_linear_rgbaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -285,11 +260,9 @@ conv_ga8_linear_rgbaF_linear (const Babl *conversion,unsigned char *src,
*d++ = value;
*d++ = lut_linear[*src++];
}
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_ga8_gamma_2_2_rgbaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -307,31 +280,25 @@ conv_ga8_gamma_2_2_rgbaF_linear (const Babl *conversion,unsigned char *src,
*d++ = value;
*d++ = lut_linear[*src++];
}
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_g8_linear_gF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
{
u8_linear_to_float_linear (conversion, src, dst, samples);
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_g8_gamma_2_2_gF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
{
u8_gamma_2_2_to_float_linear (conversion, src, dst, samples);
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_g8_linear_rgbaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -348,10 +315,8 @@ conv_g8_linear_rgbaF_linear (const Babl *conversion,unsigned char *src,
*d++ = value;
*d++ = 1.0;
}
-
- return samples;
}
-static INLINE long
+static INLINE void
conv_g8_gamma_2_2_rgbaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -369,13 +334,11 @@ conv_g8_gamma_2_2_rgbaF_linear (const Babl *conversion,unsigned char *src,
*d++ = value;
*d++ = 1.0;
}
-
- return samples;
}
-static INLINE long
-conv_rgbaF_linear_rgb8_linear (const Babl *conversion,unsigned char *src,
- unsigned char *dst,
+static INLINE void
+conv_rgbaF_linear_rgb8_linear (const Babl *conversion,unsigned char *src,
+ unsigned char *dst,
long samples)
{
float *fsrc = (float *) src;
@@ -389,19 +352,17 @@ conv_rgbaF_linear_rgb8_linear (const Babl *conversion,unsigned char *src,
v = rint (*fsrc++ * 255.0);
*dst++ = (v < 0) ? 0 : ((v > 255) ? 255 : v);
-
+
v = rint (*fsrc++ * 255.0);
*dst++ = (v < 0) ? 0 : ((v > 255) ? 255 : v);
fsrc++;
}
-
- return samples;
}
-static INLINE long
-conv_rgbaF_linear_rgba8_linear (const Babl *conversion,unsigned char *src,
- unsigned char *dst,
+static INLINE void
+conv_rgbaF_linear_rgba8_linear (const Babl *conversion,unsigned char *src,
+ unsigned char *dst,
long samples)
{
float *fsrc = (float *) src;
@@ -415,15 +376,13 @@ conv_rgbaF_linear_rgba8_linear (const Babl *conversion,unsigned char *src,
v = rint (*fsrc++ * 255.0);
*dst++ = (v < 0) ? 0 : ((v > 255) ? 255 : v);
-
+
v = rint (*fsrc++ * 255.0);
*dst++ = (v < 0) ? 0 : ((v > 255) ? 255 : v);
v = rint (*fsrc++ * 255.0);
*dst++ = (v < 0) ? 0 : ((v > 255) ? 255 : v);
}
-
- return samples;
}
int init (void);
diff --git a/extensions/grey.c b/extensions/grey.c
index 8df1dab..3b82812 100644
--- a/extensions/grey.c
+++ b/extensions/grey.c
@@ -32,7 +32,7 @@
/* Float versions of the double constants in rgb-constants.h */
-static long
+static void
conv_rgbaF_linear_y8_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -58,11 +58,9 @@ conv_rgbaF_linear_y8_linear (const Babl *conversion,unsigned char *src,
v = rint (value * 255.0);
*dst++ = (v < 0) ? 0 : ((v > 255) ? 255 : v);
}
-
- return samples;
}
-static long
+static void
conv_rgbaF_linear_yF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -86,11 +84,9 @@ conv_rgbaF_linear_yF_linear (const Babl *conversion,unsigned char *src,
s++;
*d++ = value;
}
-
- return samples;
}
-static long
+static void
conv_rgbaF_linear_yaF_linear (const Babl *conversion,unsigned char *src,
unsigned char *dst,
long samples)
@@ -114,8 +110,6 @@ conv_rgbaF_linear_yaF_linear (const Babl *conversion,unsigned char *src,
*d++ = value;
*d++ = *s++; /* alpha */
}
-
- return samples;
}
int init (void);
diff --git a/extensions/naive-CMYK.c b/extensions/naive-CMYK.c
index 339536b..ce76c4b 100644
--- a/extensions/naive-CMYK.c
+++ b/extensions/naive-CMYK.c
@@ -24,19 +24,19 @@
#include "base/util.h"
-static long rgba_to_cmyk (const Babl *conversion,char *src,
+static void rgba_to_cmyk (const Babl *conversion,char *src,
char *dst,
long n);
-static long cmyk_to_rgba (const Babl *conversion,char *src,
+static void cmyk_to_rgba (const Babl *conversion,char *src,
char *dst,
long n);
-static long rgba_to_cmy (const Babl *conversion,char *src,
+static void rgba_to_cmy (const Babl *conversion,char *src,
char *dst,
long n);
-static long cmy_to_rgba (const Babl *conversion,char *src,
+static void cmy_to_rgba (const Babl *conversion,char *src,
char *dst,
long n);
@@ -126,7 +126,7 @@ init (void)
}
-static long
+static void
rgba_to_cmyk (const Babl *conversion,char *src,
char *dst,
long n)
@@ -173,10 +173,9 @@ rgba_to_cmyk (const Babl *conversion,char *src,
src += 4 * sizeof (double);
dst += 4 * sizeof (double);
}
- return n;
}
-static long
+static void
cmyk_to_rgba (const Babl *conversion,char *src,
char *dst,
long n)
@@ -214,10 +213,9 @@ cmyk_to_rgba (const Babl *conversion,char *src,
src += 4 * sizeof (double);
dst += 4 * sizeof (double);
}
- return n;
}
-static long
+static void
rgba_to_cmy (const Babl *conversion,char *src,
char *dst,
long n)
@@ -241,10 +239,9 @@ rgba_to_cmy (const Babl *conversion,char *src,
src += 4 * sizeof (double);
dst += 3 * sizeof (double);
}
- return n;
}
-static long
+static void
cmy_to_rgba (const Babl *conversion,char *src,
char *dst,
long n)
@@ -270,5 +267,4 @@ cmy_to_rgba (const Babl *conversion,char *src,
src += 3 * sizeof (double);
dst += 4 * sizeof (double);
}
- return n;
}
diff --git a/extensions/simple.c b/extensions/simple.c
index cd34f1c..0581737 100644
--- a/extensions/simple.c
+++ b/extensions/simple.c
@@ -5,7 +5,7 @@
int init (void);
-static inline long
+static inline void
float_to_u8_x1 (const Babl *conversion,unsigned char *src_char, unsigned char *dst, long samples)
{
float *src = (float *)src_char;
@@ -20,19 +20,19 @@ float_to_u8_x1 (const Babl *conversion,unsigned char *src_char, unsigned char *d
return samples;
}
-static inline long
+static inline void
float_to_u8_x4 (const Babl *conversion,unsigned char *src_char, unsigned char *dst, long samples)
{
return float_to_u8_x1 (conversion, src_char, dst, samples * 4);
}
-static inline long
+static inline void
float_to_u8_x3 (const Babl *conversion,unsigned char *src_char, unsigned char *dst, long samples)
{
return float_to_u8_x1 (conversion, src_char, dst, samples * 3);
}
-static inline long
+static inline void
float_to_u8_x2 (const Babl *conversion,unsigned char *src_char, unsigned char *dst, long samples)
{
return float_to_u8_x1 (conversion, src_char, dst, samples * 2);
@@ -40,7 +40,7 @@ float_to_u8_x2 (const Babl *conversion,unsigned char *src_char, unsigned char *d
-static inline long
+static inline void
float_pre_to_u8_pre (const Babl *conversion,unsigned char *src_char, unsigned char *dst, long samples)
{
float *src = (float *)src_char;
@@ -71,7 +71,7 @@ float_pre_to_u8_pre (const Babl *conversion,unsigned char *src_char, unsigned ch
return samples;
}
-static inline long
+static inline void
float_to_u16_x1 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
float *src = (float *)src_char;
@@ -86,23 +86,23 @@ float_to_u16_x1 (const Babl *conversion,unsigned char *src_char, unsigned char *
}
return samples;
}
-static inline long
+static inline void
float_to_u16_x2 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
return float_to_u16_x1 (conversion, src_char, dst_char, samples * 2);
}
-static inline long
+static inline void
float_to_u16_x3 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
return float_to_u16_x1 (conversion, src_char, dst_char, samples * 3);
}
-static inline long
+static inline void
float_to_u16_x4 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
return float_to_u16_x1 (conversion, src_char, dst_char, samples * 4);
}
-static inline long
+static inline void
float_pre_to_u16_pre (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
float *src = (float *)src_char;
@@ -133,7 +133,7 @@ float_pre_to_u16_pre (const Babl *conversion,unsigned char *src_char, unsigned c
return samples;
}
-static inline long
+static inline void
float_pre_to_u32_pre (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
float *src = (float *)src_char;
@@ -165,7 +165,7 @@ float_pre_to_u32_pre (const Babl *conversion,unsigned char *src_char, unsigned c
}
-static inline long
+static inline void
float_to_u32_x1 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
float *src = (float *)src_char;
@@ -182,24 +182,24 @@ float_to_u32_x1 (const Babl *conversion,unsigned char *src_char, unsigned char *
}
return samples;
}
-static inline long
+static inline void
float_to_u32_x2 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
return float_to_u32_x1 (conversion, src_char, dst_char, samples * 2);
}
-static inline long
+static inline void
float_to_u32_x3 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
return float_to_u32_x1 (conversion, src_char, dst_char, samples * 3);
}
-static inline long
+static inline void
float_to_u32_x4 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
return float_to_u32_x1 (conversion, src_char, dst_char, samples * 4);
}
-static inline long
+static inline void
u32_to_float (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
uint32_t *src = (uint32_t *)src_char;
@@ -214,14 +214,14 @@ u32_to_float (const Babl *conversion,unsigned char *src_char, unsigned char *dst
return samples;
}
-static inline long
+static inline void
u32_to_float_x4 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
u32_to_float (conversion, src_char, dst_char, samples * 4);
return samples;
}
-static inline long
+static inline void
u32_to_float_x3 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
u32_to_float (conversion, src_char, dst_char, samples * 3);
@@ -229,7 +229,7 @@ u32_to_float_x3 (const Babl *conversion,unsigned char *src_char, unsigned char *
}
-static inline long
+static inline void
u32_to_float_x2 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
u32_to_float (conversion, src_char, dst_char, samples * 2);
@@ -237,7 +237,7 @@ u32_to_float_x2 (const Babl *conversion,unsigned char *src_char, unsigned char *
}
-static inline long
+static inline void
u16_to_float (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
uint16_t *src = (uint16_t *)src_char;
@@ -252,14 +252,14 @@ u16_to_float (const Babl *conversion,unsigned char *src_char, unsigned char *dst
return samples;
}
-static inline long
+static inline void
u16_to_float_x4 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
u16_to_float (conversion, src_char, dst_char, samples * 4);
return samples;
}
-static inline long
+static inline void
u16_to_float_x3 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
u16_to_float (conversion, src_char, dst_char, samples * 3);
@@ -267,14 +267,14 @@ u16_to_float_x3 (const Babl *conversion,unsigned char *src_char, unsigned char *
}
-static inline long
+static inline void
u16_to_float_x2 (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
u16_to_float (conversion, src_char, dst_char, samples * 2);
return samples;
}
-static inline long
+static inline void
yau16_rgbaf (const Babl *conversion,unsigned char *src_char, unsigned char *dst_char, long samples)
{
uint16_t *src = (uint16_t *)src_char;
diff --git a/extensions/sse-half.c b/extensions/sse-half.c
index 1a48adb..9f0dfe4 100644
--- a/extensions/sse-half.c
+++ b/extensions/sse-half.c
@@ -29,7 +29,7 @@
#include "babl-cpuaccel.h"
#include "extensions/util.h"
-static inline long
+static inline void
conv_yHalf_yF (const Babl *conversion,const uint16_t *src, float *dst, long samples)
{
const uint64_t *s_vec;
@@ -58,29 +58,27 @@ conv_yHalf_yF (const Babl *conversion,const uint16_t *src, float *dst, long samp
_mm_store_ss(dst++, out_val);
n -= 1;
}
-
- return samples;
}
-static long
+static void
conv_yaHalf_yaF (const Babl *conversion,const uint16_t *src, float *dst, long samples)
{
- return conv_yHalf_yF (conversion, src, dst, samples * 2) / 2;
+ conv_yHalf_yF (conversion, src, dst, samples * 2);
}
-static long
+static void
conv_rgbHalf_rgbF (const Babl *conversion,const uint16_t *src, float *dst, long samples)
{
- return conv_yHalf_yF (conversion, src, dst, samples * 3) / 3;
+ conv_yHalf_yF (conversion, src, dst, samples * 3);
}
-static long
+static void
conv_rgbaHalf_rgbaF (const Babl *conversion,const uint16_t *src, float *dst, long samples)
{
- return conv_yHalf_yF (conversion, src, dst, samples * 4) / 4;
+ conv_yHalf_yF (conversion, src, dst, samples * 4);
}
-static inline long
+static inline void
conv_yF_yHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
const __v4sf *s_vec;
@@ -109,26 +107,24 @@ conv_yF_yHalf (const Babl *conversion,const float *src, uint16_t *dst, long samp
*dst++ = _mm_extract_epi16(out_val, 0);
n -= 1;
}
-
- return samples;
}
-static long
+static void
conv_yaF_yaHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
- return conv_yF_yHalf (conversion, src, dst, samples * 2) / 2;
+ conv_yF_yHalf (conversion, src, dst, samples * 2);
}
-static long
+static void
conv_rgbF_rgbHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
- return conv_yF_yHalf (conversion, src, dst, samples * 3) / 3;
+ conv_yF_yHalf (conversion, src, dst, samples * 3);
}
-static long
+static void
conv_rgbaF_rgbaHalf (const Babl *conversion,const float *src, uint16_t *dst, long samples)
{
- return conv_yF_yHalf (conversion, src, dst, samples * 4) / 4;
+ conv_yF_yHalf (conversion, src, dst, samples * 4);
}
#endif /* defined(USE_SSE4_1) && defined(USE_F16C) && defined(ARCH_X86_64) */
diff --git a/extensions/sse2-float.c b/extensions/sse2-float.c
index 1f5468f..d26073c 100644
--- a/extensions/sse2-float.c
+++ b/extensions/sse2-float.c
@@ -37,7 +37,7 @@
static const float BABL_ALPHA_THRESHOLD_FLOAT = (float)BABL_ALPHA_THRESHOLD;
-static long
+static void
conv_rgbaF_linear_rgbAF_linear (const Babl *conversion,const float *src, float *dst, long samples)
{
long i = 0;
@@ -91,11 +91,9 @@ conv_rgbaF_linear_rgbAF_linear (const Babl *conversion,const float *src, float *
src += 4;
dst += 4;
}
-
- return samples;
}
-static long
+static void
conv_rgbAF_linear_rgbaF_linear_shuffle (const Babl *conversion,const float *src, float *dst, long samples)
{
long i = 0;
@@ -159,11 +157,9 @@ conv_rgbAF_linear_rgbaF_linear_shuffle (const Babl *conversion,const float *src,
src += 4;
dst += 4;
}
-
- return samples;
}
-static long
+static void
conv_rgbAF_linear_rgbaF_linear_spin (const Babl *conversion,const float *src, float *dst, long samples)
{
long i = 0;
@@ -234,8 +230,6 @@ conv_rgbAF_linear_rgbaF_linear_spin (const Babl *conversion,const float *src, fl
src += 4;
dst += 4;
}
-
- return samples;
}
#define splat4f(x) ((__v4sf){x,x,x,x})
@@ -296,7 +290,7 @@ gamma_2_2_to_linear_sse2 (__v4sf x)
}
#define GAMMA_RGBA(func, munge) \
-static inline long \
+static inline void \
func (const Babl *conversion,const float *src, float *dst, long samples)\
{\
int i = samples;\
@@ -347,18 +341,16 @@ func (const Babl *conversion,const float *src, float *dst, long samples)\
dst[3] = a;\
}\
}\
- return samples;\
}
GAMMA_RGBA(conv_rgbaF_linear_rgbaF_gamma, linear_to_gamma_2_2_sse2)
GAMMA_RGBA(conv_rgbaF_gamma_rgbaF_linear, gamma_2_2_to_linear_sse2)
-static long conv_rgbaF_linear_rgbAF_gamma (const Babl *conversion,const float *src, float *dst, long samples)
+static void conv_rgbaF_linear_rgbAF_gamma (const Babl *conversion,const float *src, float *dst, long samples)
{
float *tmp = alloca (sizeof(float)*4*samples);
conv_rgbaF_linear_rgbaF_gamma (conversion, src, tmp, samples);
conv_rgbaF_linear_rgbAF_linear (conversion, tmp, dst, samples);
- return samples;
}
#define YA_APPLY(load, store, convert) \
@@ -379,11 +371,9 @@ static long conv_rgbaF_linear_rgbAF_gamma (const Babl *conversion,const float *s
store ((float *)d++, yaya1); \
}\
-static long
+static void
conv_yaF_linear_yaF_gamma (const Babl *conversion,const float *src, float *dst, long samples)
{
- long total = samples;
-
const __v4sf *s = (const __v4sf*)src;
__v4sf *d = (__v4sf*)dst;
@@ -412,16 +402,12 @@ conv_yaF_linear_yaF_gamma (const Babl *conversion,const float *src, float *dst,
*dst++ = babl_linear_to_gamma_2_2 (*src++);
*dst++ = *src++;
}
-
- return total;
}
-static long
+static void
conv_yaF_gamma_yaF_linear (const Babl *conversion,const float *src, float *dst, long samples)
{
- long total = samples;
-
const __v4sf *s = (const __v4sf*)src;
__v4sf *d = (__v4sf*)dst;
@@ -450,15 +436,11 @@ conv_yaF_gamma_yaF_linear (const Babl *conversion,const float *src, float *dst,
*dst++ = babl_gamma_2_2_to_linear (*src++);
*dst++ = *src++;
}
-
- return total;
}
-static inline long
+static inline void
conv_yF_linear_yF_gamma (const Babl *conversion,const float *src, float *dst, long samples)
{
- long total = samples;
-
const __v4sf *s = (const __v4sf*)src;
__v4sf *d = (__v4sf*)dst;
@@ -490,15 +472,11 @@ conv_yF_linear_yF_gamma (const Babl *conversion,const float *src, float *dst, lo
{
*dst++ = babl_linear_to_gamma_2_2 (*src++);
}
-
- return total;
}
-static inline long
+static inline void
conv_yF_gamma_yF_linear (const Babl *conversion,const float *src, float *dst, long samples)
{
- long total = samples;
-
const __v4sf *s = (const __v4sf*)src;
__v4sf *d = (__v4sf*)dst;
@@ -530,22 +508,20 @@ conv_yF_gamma_yF_linear (const Babl *conversion,const float *src, float *dst, lo
{
*dst++ = babl_gamma_2_2_to_linear (*src++);
}
-
- return total;
}
-static long
+static void
conv_rgbF_linear_rgbF_gamma (const Babl *conversion,const float *src, float *dst, long samples)
{
- return conv_yF_linear_yF_gamma (conversion, src, dst, samples * 3) / 3;
+ conv_yF_linear_yF_gamma (conversion, src, dst, samples * 3);
}
-static long
+static void
conv_rgbF_gamma_rgbF_linear (const Babl *conversion,const float *src, float *dst, long samples)
{
- return conv_yF_gamma_yF_linear (conversion, src, dst, samples * 3) / 3;
+ conv_yF_gamma_yF_linear (conversion, src, dst, samples * 3);
}
#endif /* defined(USE_SSE2) */
diff --git a/extensions/sse2-int16.c b/extensions/sse2-int16.c
index 71ae0b2..24815b3 100644
--- a/extensions/sse2-int16.c
+++ b/extensions/sse2-int16.c
@@ -34,7 +34,7 @@
#define Q(a) { a, a, a, a }
static const __v4sf u16_float = Q (1.f / 65535);
-static long
+static void
conv_rgba16_rgbaF (const Babl *conversion,const uint16_t *src, float *dst, long samples)
{
long i = 0;
@@ -66,11 +66,9 @@ conv_rgba16_rgbaF (const Babl *conversion,const uint16_t *src, float *dst, long
for (i *= 2 * 4; i != 4 * samples; i++)
dst[i] = src[i] * (1.f / 65535);
-
- return samples;
}
-static long
+static void
conv_rgba16_rgbAF (const Babl *conversion,const uint16_t *src, float *dst, long samples)
{
long i = 0;
@@ -131,8 +129,6 @@ conv_rgba16_rgbAF (const Babl *conversion,const uint16_t *src, float *dst, long
src += 4;
dst += 4;
}
-
- return samples;
}
#endif /* defined(USE_SSE2) */
diff --git a/extensions/sse2-int8.c b/extensions/sse2-int8.c
index cfa146e..d8bd187 100644
--- a/extensions/sse2-int8.c
+++ b/extensions/sse2-int8.c
@@ -30,7 +30,7 @@
#include "babl-cpuaccel.h"
#include "extensions/util.h"
-static inline long
+static inline void
conv_yF_y8 (const Babl *conversion,const float *src, uint8_t *dst, long samples)
{
const __v4sf *s_vec;
@@ -123,33 +123,31 @@ conv_yF_y8 (const Babl *conversion,const float *src, uint8_t *dst, long samples)
n -= 1;
}
-
- return samples;
}
-static long
+static void
conv_yaF_ya8 (const Babl *conversion,const float *src, uint8_t *dst, long samples)
{
- return conv_yF_y8 (conversion, src, dst, samples * 2) / 2;
+ conv_yF_y8 (conversion, src, dst, samples * 2);
}
-static long
+static void
conv_rgbF_rgb8 (const Babl *conversion,const float *src, uint8_t *dst, long samples)
{
- return conv_yF_y8 (conversion, src, dst, samples * 3) / 3;
+ conv_yF_y8 (conversion, src, dst, samples * 3);
}
-static long
+static void
conv_rgbaF_rgba8 (const Babl *conversion,const float *src, uint8_t *dst, long samples)
{
- return conv_yF_y8 (conversion, src, dst, samples * 4) / 4;
+ conv_yF_y8 (conversion, src, dst, samples * 4);
}
-static long
+static void
conv_rgbAF_rgbA8 (const Babl *conversion,const float *src, uint8_t *dst, long samples)
{
- return conv_yF_y8 (conversion, src, dst, samples * 4) / 4;
+ conv_yF_y8 (conversion, src, dst, samples * 4);
}
#endif
diff --git a/extensions/sse4-int8.c b/extensions/sse4-int8.c
index b6f7c42..c258082 100644
--- a/extensions/sse4-int8.c
+++ b/extensions/sse4-int8.c
@@ -30,7 +30,7 @@
#include "babl-cpuaccel.h"
#include "extensions/util.h"
-static inline long
+static inline void
conv_y8_yF (const Babl *conversion,const uint8_t *src, float *dst, long samples)
{
const float factor = 1.0f / 255.0f;
@@ -62,26 +62,24 @@ conv_y8_yF (const Babl *conversion,const uint8_t *src, float *dst, long samples)
*dst++ = (float)(*src++) * factor;
n -= 1;
}
-
- return samples;
}
-static long
+static void
conv_ya8_yaF (const Babl *conversion,const uint8_t *src, float *dst, long samples)
{
- return conv_y8_yF (conversion, src, dst, samples * 2) / 2;
+ conv_y8_yF (conversion, src, dst, samples * 2);
}
-static long
+static void
conv_rgb8_rgbF (const Babl *conversion,const uint8_t *src, float *dst, long samples)
{
- return conv_y8_yF (conversion, src, dst, samples * 3) / 3;
+ conv_y8_yF (conversion, src, dst, samples * 3);
}
-static long
+static void
conv_rgba8_rgbaF (const Babl *conversion,const uint8_t *src, float *dst, long samples)
{
- return conv_y8_yF (conversion, src, dst, samples * 4) / 4;
+ conv_y8_yF (conversion, src, dst, samples * 4);
}
#endif
diff --git a/extensions/two-table.c b/extensions/two-table.c
index c7344a1..4b263cc 100644
--- a/extensions/two-table.c
+++ b/extensions/two-table.c
@@ -42,7 +42,7 @@ conv_float_u8_two_table_map (float value)
return result;
}
-static long
+static void
conv_rgbafloat_linear_cairo24_le (const Babl *conversion,unsigned char *src_char,
unsigned char *dst,
long samples)
@@ -65,10 +65,9 @@ conv_rgbafloat_linear_cairo24_le (const Babl *conversion,unsigned char *src_char
src += 4;
dst += 4;
}
- return samples;
}
-static long
+static void
conv_rgbfloat_linear_cairo24_le (const Babl *conversion,unsigned char *src_char,
unsigned char *dst,
long samples)
@@ -85,10 +84,9 @@ conv_rgbfloat_linear_cairo24_le (const Babl *conversion,unsigned char *src_char,
src += 3;
dst += 4;
}
- return samples;
}
-static long
+static void
conv_rgbafloat_linear_rgbu8_gamma (const Babl *conversion,unsigned char *src_char,
unsigned char *dst,
long samples)
@@ -113,11 +111,10 @@ conv_rgbafloat_linear_rgbu8_gamma (const Babl *conversion,unsigned char *src_cha
src += 4;
dst += 3;
}
- return samples;
}
-static long
+static void
conv_rgbafloat_linear_rgbau8_gamma (const Babl *conversion,unsigned char *src_char,
unsigned char *dst,
long samples)
@@ -144,10 +141,9 @@ conv_rgbafloat_linear_rgbau8_gamma (const Babl *conversion,unsigned char *src_ch
src += 4;
dst += 4;
}
- return samples;
}
-static long
+static void
conv_rgbfloat_linear_rgbu8_gamma (const Babl *conversion,unsigned char *src_char,
unsigned char *dst,
long samples)
@@ -164,10 +160,9 @@ conv_rgbfloat_linear_rgbu8_gamma (const Babl *conversion,unsigned char *src_char
src += 3;
dst += 3;
}
- return samples;
}
-static long
+static void
conv_yfloat_linear_yu8_gamma (const Babl *conversion,unsigned char *src_char,
unsigned char *dst,
long samples)
@@ -179,10 +174,9 @@ conv_yfloat_linear_yu8_gamma (const Babl *conversion,unsigned char *src_char,
{
*dst++ = conv_float_u8_two_table_map (*src++);
}
- return samples;
}
-static long
+static void
conv_yafloat_linear_yau8_gamma (const Babl *conversion,unsigned char *src_char,
unsigned char *dst,
long samples)
@@ -198,7 +192,6 @@ conv_yafloat_linear_yau8_gamma (const Babl *conversion,unsigned char *src_char,
alpha = rint (*src++ * 255.0);
*dst++ = (alpha < 0) ? 0 : ((alpha > 255) ? 255 : alpha);
}
- return samples;
}
int init (void);
diff --git a/extensions/ycbcr.c b/extensions/ycbcr.c
index a7b1e28..5da49cb 100644
--- a/extensions/ycbcr.c
+++ b/extensions/ycbcr.c
@@ -71,7 +71,7 @@ models (void)
}
-static long
+static void
rgba_to_ycbcra709 (const Babl *conversion,char *src,
char *dst,
long n)
@@ -101,11 +101,10 @@ rgba_to_ycbcra709 (const Babl *conversion,char *src,
src += sizeof (double) * 4;
dst += sizeof (double) * 4;
}
- return n;
}
-static long
+static void
rgba_to_ycbcr709 (const Babl *conversion,char *src,
char *dst,
long n)
@@ -133,11 +132,10 @@ rgba_to_ycbcr709 (const Babl *conversion,char *src,
src += sizeof (double) * 4;
dst += sizeof (double) * 3;
}
- return n;
}
-static long
+static void
ycbcra709_to_rgba (const Babl *conversion,char *src,
char *dst,
long n)
@@ -167,11 +165,10 @@ ycbcra709_to_rgba (const Babl *conversion,char *src,
src += sizeof (double) * 4;
dst += sizeof (double) * 4;
}
- return n;
}
-static long
+static void
ycbcr709_to_rgba (const Babl *conversion,char *src,
char *dst,
long n)
@@ -200,7 +197,6 @@ ycbcr709_to_rgba (const Babl *conversion,char *src,
src += sizeof (double) * 3;
dst += sizeof (double) * 4;
}
- return n;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]