alias_conversion (Babl *babl,
void *user_data)
{
+ const Babl *sRGB = babl_space ("sRGB");
BablConversion *conv = (void *)babl;
BablSpace *space = user_data;
(!babl_format_is_palette (conv->source)) &&
(!babl_format_is_palette (conv->destination)))
{
- if ((conv->source->format.space == (void*)babl_space ("sRGB")) &&
- (conv->destination->format.space == babl_space ("sRGB")))
+ if ((conv->source->format.space == sRGB) &&
+ (conv->destination->format.space == sRGB))
{
switch (conv->instance.class_type)
{
if ((conv->source->class_type == BABL_MODEL) &&
(conv->destination->class_type == BABL_MODEL))
{
- if ((conv->source->model.space == (void*)babl_space ("sRGB")) &&
- (conv->destination->model.space == babl_space ("sRGB")))
+ if ((conv->source->model.space == sRGB) &&
+ (conv->destination->model.space == sRGB))
{
switch (conv->instance.class_type)
{
done |= 2;
}
+ /* source space not in initialization array */
if ((done & 1) == 0 && (source->format.space != sRGB))
{
run_once[i++] = source->format.space;
_babl_space_add_universal_rgb (source->format.space);
}
+
+ /* destination space not in initialization array */
if ((done & 2) == 0 && (destination->format.space != source->format.space) && (destination->format.space != sRGB))
{
run_once[i++] = destination->format.space;
}
}
-static long
+static inline long
_babl_process (const Babl *cbabl,
const void *source,
void *destination,