static void
-cmyka_to_cmykA (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmyka_to_cmykA (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-cmykA_to_cmyka (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmykA_to_cmyka (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-cmyk_to_cmyka (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmyk_to_cmyka (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-cmyka_to_cmyk (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmyka_to_cmyk (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
/////////////////////
static void
-cmyka_to_CMYKA (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmyka_to_CMYKA (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-CMYKA_to_cmyka (const Babl *conversion,char *src,
- char *dst,
- long n)
+CMYKA_to_cmyka (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
static void
-CMYK_to_cmyka (const Babl *conversion,char *src,
- char *dst,
- long n)
+CMYK_to_cmyka (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-cmyka_to_CMYK (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmyka_to_CMYK (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-cmyka_to_CMYKa (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmyka_to_CMYKa (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
#if 0
static void
-rgba_to_cmykA (const Babl *conversion,char *src,
- char *dst,
- long n)
+rgba_to_cmykA (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-cmykA_to_rgba (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmykA_to_rgba (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-rgba_to_cmyka (const Babl *conversion,char *src,
- char *dst,
- long n)
+rgba_to_cmyka (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-cmyka_to_rgba (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmyka_to_rgba (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-rgba_to_cmyk (const Babl *conversion,char *src,
- char *dst,
- long n)
+rgba_to_cmyk (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-cmyk_to_rgba (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmyk_to_rgba (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-rgba_to_cmy (const Babl *conversion,char *src,
- char *dst,
- long n)
+rgba_to_cmy (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
}
static void
-cmy_to_rgba (const Babl *conversion,char *src,
- char *dst,
- long n)
+cmy_to_rgba (const Babl *conversion,
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
static void formats (void);
static void init_single_precision (void);
-void babl_base_model_gray (void)
+void
+babl_base_model_gray (void)
{
components ();
models ();
}
static void
-gray_perceptual_to_rgb (Babl *conversion,
+gray_perceptual_to_rgb (Babl *conversion,
int src_bands,
char **src,
int *src_pitch,
}
static void
-gray_alpha_premultiplied_to_rgba (Babl *conversion,
+gray_alpha_premultiplied_to_rgba (Babl *conversion,
int src_bands,
char **src,
int *src_pitch,
static void
-rgba_to_gray_alpha_premultiplied (Babl *conversion,
+rgba_to_gray_alpha_premultiplied (Babl *conversion,
int src_bands,
char **src,
int *src_pitch,
}
static void
-gray_perceptual_to_rgb_float (Babl *conversion,
+gray_perceptual_to_rgb_float (Babl *conversion,
int src_bands,
char **src,
int *src_pitch,
}
static void
-gray_alpha_premultiplied_to_rgba_float (Babl *conversion,
+gray_alpha_premultiplied_to_rgba_float (Babl *conversion,
int src_bands,
char **src,
int *src_pitch,
static void
-rgba_to_gray_alpha_premultiplied_float (Babl *conversion,
+rgba_to_gray_alpha_premultiplied_float (Babl *conversion,
int src_bands,
char **src,
int *src_pitch,
static void
rgba_nonlinear_premultiplied2rgba (Babl *conversion,
- char *src,
- char *dst,
- long samples)
+ char *src,
+ char *dst,
+ long samples)
{
const Babl *space = babl_conversion_get_source_space (conversion);
const Babl **trc = (void*)space->space.trc;
static void
g3_perceptual_from_linear (Babl *conversion,
- int src_bands,
- char **src,
- int *src_pitch,
- int dst_bands,
- char **dst,
- int *dst_pitch,
- long samples)
+ int src_bands,
+ char **src,
+ int *src_pitch,
+ int dst_bands,
+ char **dst,
+ int *dst_pitch,
+ long samples)
{
const Babl *trc = perceptual_trc;
static void
g3_perceptual_to_linear (Babl *conversion,
- int src_bands,
- char **src,
- int *src_pitch,
- int dst_bands,
- char **dst,
- int *dst_pitch,
- long samples)
+ int src_bands,
+ char **src,
+ int *src_pitch,
+ int dst_bands,
+ char **dst,
+ int *dst_pitch,
+ long samples)
{
const Babl *trc = perceptual_trc;
long n = samples;
static void
rgba2rgba_perceptual_premultiplied (Babl *conversion,
- char *src,
- char *dst,
- long samples)
+ char *src,
+ char *dst,
+ long samples)
{
const Babl *trc = perceptual_trc;
long n = samples;
static void
rgba2rgba_perceptual (Babl *conversion,
- char *src,
- char *dst,
- long samples)
+ char *src,
+ char *dst,
+ long samples)
{
const Babl *trc = perceptual_trc;
long n = samples;
static void
rgba_perceptual2rgba (Babl *conversion,
- char *src,
- char *dst,
- long samples)
+ char *src,
+ char *dst,
+ long samples)
{
const Babl *trc = perceptual_trc;
long n = samples;
static void
rgba_nonlinear_premultiplied2rgba_float (Babl *conversion,
- char *src,
- char *dst,
- long samples)
+ char *src,
+ char *dst,
+ long samples)
{
const Babl *space = babl_conversion_get_source_space (conversion);
const Babl **trc = (void*)space->space.trc;
}
-static void init_single_precision (void)
+static void
+init_single_precision (void)
{
babl_format_new (
static void
rgba_to_ycbcra (BablConversion *conversion,
- char *src,
- char *dst,
- long n)
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
static void
rgba_to_ycbcr (BablConversion *conversion,
- char *src,
- char *dst,
- long n)
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
static void
ycbcra_to_rgba (BablConversion *conversion,
- char *src,
- char *dst,
- long n)
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
static void
ycbcr_to_rgba (BablConversion *conversion,
- char *src,
- char *dst,
- long n)
+ char *src,
+ char *dst,
+ long n)
{
while (n--)
{
* has a better convergence rate once you get reasonably close to the answer.
*/
static inline double
-init_newton (double x, double exponent, double c0, double c1, double c2)
+init_newton (double x,
+ double exponent,
+ double c0,
+ double c1,
+ double c2)
{
int iexp;
double y = frexp(x, &iexp);
* has a better convergence rate once you get reasonably close to the answer.
*/
static inline float
-init_newtonf (float x, float exponent, float c0, float c1, float c2)
+init_newtonf (float x,
+ float exponent,
+ float c0,
+ float c1,
+ float c2)
{
int iexp;
float y = frexpf(x, &iexp);
static void
convert_double_float (BablConversion *conversion,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static void
convert_float_double (BablConversion *conversion,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
//-----------------------------------------------------------------------------
-static void doubles2halfp(void *target, void *source, long numel)
+static void
+doubles2halfp(void *target,
+ void *source,
+ long numel)
{
uint16_t *hp = (uint16_t *) target; // Type pun output as an unsigned 16-bit int
uint32_t *xp = (uint32_t *) source; // Type pun input as an unsigned 32-bit int
}
}
-static void halfp2doubles(void *target, void *source, long numel)
+static void
+halfp2doubles(void *target,
+ void *source,
+ long numel)
{
uint16_t *hp = (uint16_t *) source; // Type pun input as an unsigned 16-bit int
uint32_t *xp = (uint32_t *) target; // Type pun output as an unsigned 32-bit int
static void
-singles2halfp(uint16_t *hp, const uint32_t *xp, int numel)
+singles2halfp(uint16_t *hp,
+ const uint32_t *xp,
+ int numel)
{
uint16_t hs, he, hm;
//-----------------------------------------------------------------------------
static void
-halfp2singles(uint32_t *xp, const uint16_t *hp, int numel)
+halfp2singles(uint32_t *xp,
+ const uint16_t *hp,
+ int numel)
{
uint16_t h, hs, he, hm;
static void
convert_double_half (BablConversion *conversion,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static void
convert_half_double (BablConversion *conversion,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static void
convert_float_half (BablConversion *conversion,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static void
convert_half_float (BablConversion *conversion,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
convert_u15_double_scaled (BablConversion *conversion,
double min_val,
double max_val,
- uint16_t min,
- uint16_t max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ uint16_t min,
+ uint16_t max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_double_u16_scaled (BablConversion *conversion,
- double min_val,
- double max_val,
- uint16_t min,
- uint16_t max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ double min_val,
+ double max_val,
+ uint16_t min,
+ uint16_t max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_u16_double_scaled (BablConversion *conversion,
- double min_val,
- double max_val,
- uint16_t min,
- uint16_t max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ double min_val,
+ double max_val,
+ uint16_t min,
+ uint16_t max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_float_u16_scaled (BablConversion *conversion,
- double min_val,
- double max_val,
- uint16_t min,
- uint16_t max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ double min_val,
+ double max_val,
+ uint16_t min,
+ uint16_t max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_u16_float_scaled (BablConversion *conversion,
- double min_val,
- double max_val,
- uint16_t min,
- uint16_t max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ double min_val,
+ double max_val,
+ uint16_t min,
+ uint16_t max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_double_u32_scaled (BablConversion *c,
- double min_val,
- double max_val,
- uint32_t min,
- uint32_t max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ double min_val,
+ double max_val,
+ uint32_t min,
+ uint32_t max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_u32_double_scaled (BablConversion *c,
- double min_val,
- double max_val,
- uint32_t min,
- uint32_t max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ double min_val,
+ double max_val,
+ uint32_t min,
+ uint32_t max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_float_u32_scaled (BablConversion *c,
- float min_val,
- float max_val,
- uint32_t min,
- uint32_t max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ float min_val,
+ float max_val,
+ uint32_t min,
+ uint32_t max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_u32_float_scaled (BablConversion *c,
- float min_val,
- float max_val,
- uint32_t min,
- uint32_t max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ float min_val,
+ float max_val,
+ uint32_t min,
+ uint32_t max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
#include <math.h>
static inline void
convert_double_u8_scaled (BablConversion *c,
- double min_val,
- double max_val,
- unsigned char min,
- unsigned char max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ double min_val,
+ double max_val,
+ unsigned char min,
+ unsigned char max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_u8_double_scaled (BablConversion *c,
- double min_val,
- double max_val,
- unsigned char min,
- unsigned char max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ double min_val,
+ double max_val,
+ unsigned char min,
+ unsigned char max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_float_u8_scaled (BablConversion *c,
- double min_val,
- double max_val,
- unsigned char min,
- unsigned char max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ double min_val,
+ double max_val,
+ unsigned char min,
+ unsigned char max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{
static inline void
convert_u8_float_scaled (BablConversion *c,
- double min_val,
- double max_val,
- unsigned char min,
- unsigned char max,
- char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n)
+ double min_val,
+ double max_val,
+ unsigned char min,
+ unsigned char max,
+ char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n)
{
while (n--)
{