diff -Nru babl-0.1.6/aclocal.m4 babl-0.1.10/aclocal.m4
--- babl-0.1.6/aclocal.m4 2011-11-18 18:45:58.000000000 +0000
+++ babl-0.1.10/aclocal.m4 2012-04-02 21:35:10.000000000 +0000
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -179,12 +180,15 @@
fi[]dnl
])# PKG_CHECK_MODULES
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -194,7 +198,7 @@
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.1], [],
+m4_if([$1], [1.11.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -210,19 +214,21 @@
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.11.3])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -304,14 +310,14 @@
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 10
+# serial 12
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -351,6 +357,7 @@
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -415,7 +422,7 @@
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@@ -480,10 +487,13 @@
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
@@ -705,12 +715,15 @@
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
@@ -750,8 +763,8 @@
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
+# 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -771,7 +784,7 @@
[disable], [m4_define([am_maintainer_other], [enable])],
[m4_define([am_maintainer_other], [enable])
m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
@@ -882,12 +895,15 @@
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
@@ -910,13 +926,14 @@
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 5
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -924,13 +941,13 @@
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -1006,13 +1023,13 @@
fi
AC_MSG_RESULT(yes)])
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 2
# AM_SILENT_RULES([DEFAULT])
# --------------------------
@@ -1027,18 +1044,50 @@
no) AM_DEFAULT_VERBOSITY=1;;
*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac
+dnl
+dnl A few `make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using `$V' instead of `$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
@@ -1061,13 +1110,13 @@
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
+# serial 3
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
@@ -1076,13 +1125,13 @@
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1104,10 +1153,11 @@
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
diff -Nru babl-0.1.6/babl/Babl-0.1.gir babl-0.1.10/babl/Babl-0.1.gir
--- babl-0.1.6/babl/Babl-0.1.gir 2011-11-18 18:46:10.000000000 +0000
+++ babl-0.1.10/babl/Babl-0.1.gir 1970-01-01 00:00:00.000000000 +0000
@@ -1,307 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff -Nru babl-0.1.6/babl/babl-class.h babl-0.1.10/babl/babl-class.h
--- babl-0.1.6/babl/babl-class.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-class.h 2012-03-18 15:19:09.000000000 +0000
@@ -33,11 +33,11 @@
* to be iterated over, common functionality is defined through these
* macros.
*/
-#define BABL_CLASS_DECLARE(klass) \
- \
-BablDb * babl_##klass##_db (void); \
-Babl * babl_##klass##_from_id (int id); \
-void babl_##klass##_class_for_each (BablEachFunction each_fun, \
+#define BABL_CLASS_DECLARE(klass) \
+ \
+BablDb * babl_##klass##_db (void); \
+const Babl * babl_##klass##_from_id (int id); \
+void babl_##klass##_class_for_each (BablEachFunction each_fun, \
void *user_data)
/* common header for any item inserted into database, the actual
diff -Nru babl-0.1.6/babl/babl-component.c babl-0.1.10/babl/babl-component.c
--- babl-0.1.6/babl/babl-component.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-component.c 2012-03-18 15:18:19.000000000 +0000
@@ -58,7 +58,7 @@
}
-Babl *
+const Babl *
babl_component_new (void *first_arg,
...)
{
diff -Nru babl-0.1.6/babl/babl-conversion.c babl-0.1.10/babl/babl-conversion.c
--- babl-0.1.6/babl/babl-conversion.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-conversion.c 2012-03-31 16:06:48.000000000 +0000
@@ -32,7 +32,8 @@
Babl *destination,
BablFuncLinear linear,
BablFuncPlane plane,
- BablFuncPlanar planar)
+ BablFuncPlanar planar,
+ void *user_data)
{
Babl *babl = NULL;
@@ -103,11 +104,13 @@
babl->conversion.pixels = 0;
babl->conversion.processings = 0;
+ babl->conversion.data = user_data;
+
if (babl->class_type == BABL_CONVERSION_LINEAR &&
BABL (babl->conversion.source)->class_type == BABL_MODEL)
{
- Babl *src_format = NULL;
- Babl *dst_format = NULL;
+ const Babl *src_format = NULL;
+ const Babl *dst_format = NULL;
if (BABL (babl->conversion.source) == babl_model_from_id (BABL_RGBA))
{
src_format = babl_format_from_id (BABL_RGBA_DOUBLE);
@@ -130,6 +133,7 @@
src_format,
dst_format,
"linear", linear,
+ "data", user_data,
NULL);
babl->conversion.error = 0.0;
}
@@ -167,8 +171,8 @@
return buf;
}
-Babl *
-babl_conversion_new (void *first_arg,
+const Babl *
+babl_conversion_new (const void *first_arg,
...)
{
va_list varg;
@@ -181,6 +185,7 @@
int type = 0;
int got_func = 0;
const char *arg = first_arg;
+ void *user_data= NULL;
Babl *source;
Babl *destination;
@@ -203,6 +208,11 @@
id = va_arg (varg, int);
}
+ else if (!strcmp (arg, "data"))
+ {
+ user_data = va_arg (varg, void*);
+ }
+
else if (!strcmp (arg, "linear"))
{
if (got_func++)
@@ -270,7 +280,8 @@
babl = babl_db_exist (db, id, name);
}
- babl = conversion_new (name, id, source, destination, linear, plane, planar);
+ babl = conversion_new (name, id, source, destination, linear, plane, planar,
+ user_data);
/* Since there is not an already registered instance by the required
* id/name, inserting newly created class into database.
@@ -284,16 +295,16 @@
static long
babl_conversion_linear_process (BablConversion *conversion,
- void *source,
+ const void *source,
void *destination,
long n)
{
- return conversion->function.linear (source, destination, n);
+ return conversion->function.linear (source, destination, n, conversion->data);
}
static long
babl_conversion_plane_process (BablConversion *conversion,
- void *source,
+ const void *source,
void *destination,
int src_pitch,
int dst_pitch,
@@ -301,7 +312,8 @@
{
return conversion->function.plane (source, destination,
src_pitch, dst_pitch,
- n);
+ n,
+ conversion->data);
}
static long
@@ -311,10 +323,10 @@
long n)
{
#ifdef USE_ALLOCA
- char **src_data = alloca (sizeof (void *) * source->components);
+ const char **src_data = alloca (sizeof (void *) * source->components);
char **dst_data = alloca (sizeof (void *) * destination->components);
#else
- char *src_data[BABL_MAX_COMPONENTS];
+ const char *src_data[BABL_MAX_COMPONENTS];
char *dst_data[BABL_MAX_COMPONENTS];
#endif
@@ -327,14 +339,15 @@
destination->components,
dst_data,
destination->pitch,
- n);
+ n,
+ conversion->data);
}
long
-babl_conversion_process (Babl *babl,
- char *source,
- char *destination,
- long n)
+babl_conversion_process (const Babl *babl,
+ const char *source,
+ char *destination,
+ long n)
{
BablConversion *conversion = (BablConversion *) babl;
@@ -344,7 +357,7 @@
{
case BABL_CONVERSION_PLANE:
{
- void *src_data = NULL;
+ const void *src_data = NULL;
void *dst_data = NULL;
int src_pitch = 0;
int dst_pitch = 0;
@@ -416,7 +429,7 @@
return n;
}
-#define test_pixels 512
+#define test_pixels 128
static double *
@@ -454,13 +467,13 @@
Babl *fmt_source;
Babl *fmt_destination;
- Babl *fmt_rgba_double = babl_format_new (babl_model ("RGBA"),
- babl_type ("double"),
- babl_component ("R"),
- babl_component ("G"),
- babl_component ("B"),
- babl_component ("A"),
- NULL);
+ const Babl *fmt_rgba_double = babl_format_new (babl_model ("RGBA"),
+ babl_type ("double"),
+ babl_component ("R"),
+ babl_component ("G"),
+ babl_component ("B"),
+ babl_component ("A"),
+ NULL);
double error = 0.0;
long ticks_start = 0;
@@ -545,7 +558,6 @@
fish_reference->fish.pixels -= test_pixels;
fish_destination_to_rgba->fish.pixels -= 2 * test_pixels;
-
babl_free (source);
babl_free (destination);
babl_free (destination_rgba_double);
diff -Nru babl-0.1.6/babl/babl-conversion.h babl-0.1.10/babl/babl-conversion.h
--- babl-0.1.6/babl/babl-conversion.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-conversion.h 2012-03-18 15:22:50.000000000 +0000
@@ -21,18 +21,17 @@
BABL_CLASS_DECLARE (conversion);
-Babl * babl_conversion (const char *name);
-
-
+const Babl * babl_conversion (const char *name);
/* Signature of functions registered for reference type
* conversions,
*/
-typedef long (*BablFuncPlane) (char *src,
- char *dst,
- int src_pitch,
- int dst_pitch,
- long n);
+typedef long (*BablFuncPlane) (const char *src,
+ char *dst,
+ int src_pitch,
+ int dst_pitch,
+ long n,
+ void *user_data);
typedef struct
@@ -48,6 +47,7 @@
BablFuncPlane plane;
BablFuncPlanar planar;
} function;
+ void *data; /* user data */
int processings;
long pixels;
} BablConversion;
diff -Nru babl-0.1.6/babl/babl-extension.h babl-0.1.10/babl/babl-extension.h
--- babl-0.1.6/babl/babl-extension.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-extension.h 2012-03-18 15:23:12.000000000 +0000
@@ -27,8 +27,8 @@
* BablExtension objects are only used internally in babl.
*/
-Babl * babl_extension (const char *name);
-void babl_extension_load_dir_list (const char *dir_list);
+const Babl * babl_extension (const char *name);
+void babl_extension_load_dir_list (const char *dir_list);
typedef struct
{
diff -Nru babl-0.1.6/babl/babl-fish.c babl-0.1.10/babl/babl-fish.c
--- babl-0.1.6/babl/babl-fish.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-fish.c 2012-03-18 15:24:31.000000000 +0000
@@ -138,7 +138,7 @@
return id;
}
-Babl *
+const Babl *
babl_fish (const void *source,
const void *destination)
{
diff -Nru babl-0.1.6/babl/babl-fish-path.c babl-0.1.10/babl/babl-fish-path.c
--- babl-0.1.6/babl/babl-fish-path.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-fish-path.c 2012-03-18 15:24:24.000000000 +0000
@@ -25,19 +25,20 @@
#define BABL_HARD_MAX_PATH_LENGTH 8
#define BABL_MAX_NAME_LEN 1024
+int babl_in_fish_path = 0;
typedef struct _FishPathInstrumentation
{
- Babl *fmt_rgba_double;
+ const Babl *fmt_rgba_double;
double *test;
void *source;
void *destination;
void *ref_destination;
double *destination_rgba_double;
double *ref_destination_rgba_double;
- Babl *fish_rgba_to_source;
- Babl *fish_reference;
- Babl *fish_destination_to_rgba;
+ const Babl *fish_rgba_to_source;
+ const Babl *fish_reference;
+ const Babl *fish_destination_to_rgba;
double reference_cost;
int init_instrumentation_done;
} FishPathInstrumentation;
@@ -64,10 +65,10 @@
double *path_error);
static long
-process_conversion_path (BablList *path,
- void *source_buffer,
- void *destination_buffer,
- long n);
+process_conversion_path (BablList *path,
+ const void *source_buffer,
+ void *destination_buffer,
+ long n);
static void
get_conversion_path (PathContext *pc,
@@ -286,15 +287,20 @@
pc.fish_path = babl;
pc.to_format = (Babl *) destination;
- babl_mutex_lock (babl_format_mutex);
+ if (babl_in_fish_path <= 0)
+ babl_mutex_lock (babl_format_mutex);
/* we hold a global lock whilerunning get_conversion_path since
* it depends on keeping the various format.visited members in
* a consistent state, this code path is not performance critical
* since created fishes are cached.
*/
+ babl_in_fish_path++;
get_conversion_path (&pc, (Babl *) source, 0, max_path_length ());
- babl_mutex_unlock (babl_format_mutex);
+
+ babl_in_fish_path--;
+ if (babl_in_fish_path <= 0)
+ babl_mutex_unlock (babl_format_mutex);
babl_free (pc.current_path);
}
@@ -312,24 +318,23 @@
}
static long
-babl_fish_path_process (Babl *babl,
- void *source,
- void *destination,
- long n)
+babl_fish_path_process (Babl *babl,
+ const void *source,
+ void *destination,
+ long n)
{
return process_conversion_path (babl->fish_path.conversion_list,
- source,
- destination,
- n);
+ source,
+ destination,
+ n);
}
-
static long
-babl_fish_process (Babl *babl,
- void *source,
- void *destination,
- long n)
+babl_fish_process (Babl *babl,
+ const void *source,
+ void *destination,
+ long n)
{
long ret = 0;
@@ -373,11 +378,12 @@
}
long
-babl_process (Babl *babl,
- void *source,
- void *destination,
- long n)
+babl_process (const Babl *cbabl,
+ const void *source,
+ void *destination,
+ long n)
{
+ Babl *babl = (Babl*)cbabl;
babl_assert (babl);
babl_assert (source);
babl_assert (destination);
@@ -405,10 +411,10 @@
}
static long
-process_conversion_path (BablList *path,
- void *source_buffer,
- void *destination_buffer,
- long n)
+process_conversion_path (BablList *path,
+ const void *source_buffer,
+ void *destination_buffer,
+ long n)
{
int conversions = babl_list_size (path);
diff -Nru babl-0.1.6/babl/babl-fish-reference.c babl-0.1.10/babl/babl-fish-reference.c
--- babl-0.1.6/babl/babl-fish-reference.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-fish-reference.c 2012-03-18 15:51:42.000000000 +0000
@@ -20,8 +20,8 @@
#include "babl-internal.h"
static Babl *
-assert_conversion_find (void *source,
- void *destination)
+assert_conversion_find (const void *source,
+ const void *destination)
{
Babl *ret = babl_conversion_find (source, destination);
@@ -92,11 +92,11 @@
static void
-convert_to_double (BablFormat *source_fmt,
- BablImage *source,
- char *source_buf,
- char *source_double_buf,
- int n)
+convert_to_double (BablFormat *source_fmt,
+ const BablImage *source,
+ char *source_buf,
+ char *source_double_buf,
+ int n)
{
int i;
@@ -203,11 +203,11 @@
static void
-ncomponent_convert_to_double (BablFormat *source_fmt,
- BablImage *source,
- char *source_buf,
- char *source_double_buf,
- int n)
+ncomponent_convert_to_double (BablFormat *source_fmt,
+ const BablImage *source,
+ char *source_buf,
+ char *source_double_buf,
+ int n)
{
BablImage *src_img;
BablImage *dst_img;
@@ -276,10 +276,10 @@
static int
-process_same_model (Babl *babl,
- BablImage *source,
- BablImage *destination,
- long n)
+process_same_model (const Babl *babl,
+ const BablImage *source,
+ BablImage *destination,
+ long n)
{
void *double_buf;
@@ -341,10 +341,10 @@
}
long
-babl_fish_reference_process (Babl *babl,
- BablImage *source,
- BablImage *destination,
- long n)
+babl_fish_reference_process (const Babl *babl,
+ const BablImage *source,
+ BablImage *destination,
+ long n)
{
void *source_double_buf;
void *rgba_double_buf;
diff -Nru babl-0.1.6/babl/babl-fish-stats.c babl-0.1.10/babl/babl-fish-stats.c
--- babl-0.1.6/babl/babl-fish-stats.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-fish-stats.c 2012-03-18 15:55:30.000000000 +0000
@@ -35,12 +35,12 @@
table_destination_sum_each (Babl *babl,
void *userdata)
{
- Babl *source = userdata;
- Babl *destination = babl;
+ const Babl *source = userdata;
+ const Babl *destination = babl;
if (source != destination)
{
- Babl *fish = babl_fish (source, destination);
+ const Babl *fish = babl_fish (source, destination);
babl_assert (fish);
sum_pixels += fish->fish.pixels;
}
@@ -76,7 +76,7 @@
fprintf (output_file, "
| ");
else
{
- Babl *fish = babl_fish (source, destination);
+ const Babl *fish = babl_fish (source, destination);
babl_assert (fish);
diff -Nru babl-0.1.6/babl/babl-format.c babl-0.1.10/babl/babl-format.c
--- babl-0.1.6/babl/babl-format.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-format.c 2012-03-18 15:52:43.000000000 +0000
@@ -48,7 +48,7 @@
BablModel *model,
BablComponent **component,
BablSampling **sampling,
- BablType **type)
+ const BablType **type)
{
Babl *babl;
@@ -67,8 +67,10 @@
if (!component_found)
{
component_found = 0;
- babl_fatal ("matching source component for %s in model %s not found",
+#if 0 /* since babl does the right thing, let it happen */
+ babl_fatal("matching source component for %s in model %s not found",
model->component[i]->instance.name, model->instance.name);
+#endif
}
}
@@ -119,17 +121,17 @@
static char *
-create_name (BablModel *model,
- int components,
- BablComponent **component,
- BablType **type)
+create_name (const BablModel *model,
+ int components,
+ BablComponent **component,
+ const BablType **type)
{
char buf[512] = "";
char *p = &buf[0];
int i;
int same_types = 1;
- BablType **t = type;
- BablType *first_type = *type;
+ const BablType**t = type;
+ const BablType *first_type = *type;
BablComponent **c1 = component;
BablComponent **c2 = model->component;
@@ -188,8 +190,8 @@
static char *
-ncomponents_create_name (Babl *type,
- int components)
+ncomponents_create_name (const Babl *type,
+ int components)
{
char buf[512];
sprintf (buf, "%s[%i] ", type->instance.name, components);
@@ -205,8 +207,8 @@
}
}
-Babl *
-babl_format_n (Babl *btype,
+const Babl *
+babl_format_n (const Babl *btype,
int components)
{
int i;
@@ -216,7 +218,7 @@
BablModel *model = (BablModel *)babl_model ("Y");
BablComponent *component [components];
BablSampling *sampling [components];
- BablType *type [components];
+ const BablType *type [components];
char *name = NULL;
for (i = 0; iclass_type == BABL_FORMAT)
{
@@ -262,13 +264,13 @@
static int
-is_format_duplicate (Babl *babl,
- int planar,
- int components,
- BablModel *model,
- BablComponent **component,
- BablSampling **sampling,
- BablType **type)
+is_format_duplicate (Babl *babl,
+ int planar,
+ int components,
+ BablModel *model,
+ BablComponent **component,
+ BablSampling **sampling,
+ const BablType **type)
{
int i;
@@ -287,8 +289,8 @@
return 1;
}
-Babl *
-babl_format_new (void *first_arg,
+const Babl *
+babl_format_new (const void *first_arg,
...)
{
va_list varg;
@@ -299,12 +301,12 @@
BablModel *model = NULL;
BablComponent *component [BABL_MAX_COMPONENTS];
BablSampling *sampling [BABL_MAX_COMPONENTS];
- BablType *type [BABL_MAX_COMPONENTS];
+ const BablType*type [BABL_MAX_COMPONENTS];
BablSampling *current_sampling = (BablSampling *) babl_sampling (1, 1);
BablType *current_type = (BablType *) babl_type_from_id (BABL_DOUBLE);
char *name = NULL;
- void *arg = first_arg;
+ const void *arg = first_arg;
va_start (varg, first_arg);
@@ -496,7 +498,7 @@
return 0;
}
-Babl *
+const Babl *
babl_format_get_type (const Babl *format,
int component_index)
{
@@ -510,9 +512,9 @@
return NULL;
}
-Babl *
-babl_format_with_model_as_type (Babl *model,
- Babl *type)
+const Babl *
+babl_format_with_model_as_type (const Babl *model,
+ const Babl *type)
{
BablComponent *component[10];
int i;
@@ -559,7 +561,7 @@
}
double
-babl_format_loss (Babl *babl)
+babl_format_loss (const Babl *babl)
{
double loss = 0.0;
double *test;
@@ -568,10 +570,10 @@
void *destination;
double *transformed;
- Babl *ref_fmt;
- Babl *fmt;
- Babl *fish_to;
- Babl *fish_from;
+ const Babl *ref_fmt;
+ const Babl *fmt;
+ Babl *fish_to;
+ Babl *fish_from;
ref_fmt = babl_format_new (
babl_model ("RGBA"),
@@ -613,8 +615,42 @@
babl_free (transformed);
babl_free (test);
- babl->format.loss = loss;
+ ((Babl*)babl)->format.loss = loss;
return loss;
}
+
+void *
+babl_get_user_data (const Babl *babl)
+{
+ switch (babl->instance.class_type)
+ {
+ case BABL_MODEL:
+ return babl->model.data;
+ case BABL_FORMAT:
+ return babl->format.model->data;
+ default:
+ babl_fatal ("babl_get_user_data called on non-model/format");
+ }
+ babl_fatal ("eeeek");
+ return NULL;
+}
+
+void
+babl_set_user_data (const Babl *cbabl, void *data)
+{
+ Babl *babl = (Babl*) cbabl;
+ switch (cbabl->instance.class_type)
+ {
+ case BABL_MODEL:
+ babl->model.data = data;
+ break;
+ case BABL_FORMAT:
+ babl->format.model->data = data;
+ break;
+ default:
+ babl_fatal ("babl_set_user_data called on non-model/format");
+ }
+}
+
BABL_CLASS_IMPLEMENT (format)
diff -Nru babl-0.1.6/babl/babl-format.h babl-0.1.10/babl/babl-format.h
--- babl-0.1.6/babl/babl-format.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-format.h 2012-03-21 18:08:22.000000000 +0000
@@ -24,10 +24,11 @@
typedef struct
{
BablInstance instance;
- BablList *from_list;
+ BablList *from_list;
int components;
BablComponent **component;
BablType **type;
+ void *model_data;
void *image_template; /* image template for use with
linear (non-planer) images */
@@ -40,6 +41,7 @@
int visited; /* for convenience in code while searching
for conversion paths */
int format_n; /* whether the format is a format_n type or not */
+ int palette;
} BablFormat;
#endif
diff -Nru babl-0.1.6/babl/babl.h babl-0.1.10/babl/babl.h
--- babl-0.1.6/babl/babl.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl.h 2012-03-29 23:24:19.000000000 +0000
@@ -45,46 +45,46 @@
* Returns the babl object representing the data type given by @name
* such as for example "u8", "u16" or "float".
*/
-Babl * babl_type (const char *name);
+const Babl * babl_type (const char *name);
/**
* Returns the babl object representing the @horizontal and @vertical
* sampling such as for example 2, 2 for the chroma components in
* YCbCr.
*/
-Babl * babl_sampling (int horizontal,
+const Babl * babl_sampling (int horizontal,
int vertical);
/**
* Returns the babl object representing the color component given by
* @name such as for example "R", "cyan" or "CIE L".
*/
-Babl * babl_component (const char *name);
+const Babl * babl_component (const char *name);
/**
* Returns the babl object representing the color model given by @name
* such as for example "RGB", "CMYK" or "CIE Lab".
*/
-Babl * babl_model (const char *name);
+const Babl * babl_model (const char *name);
/**
* Returns the babl object representing the color format given by
* @name such as for example "RGB u8", "CMYK float" or "CIE Lab u16".
*/
-Babl * babl_format (const char *name);
+const Babl * babl_format (const char *name);
/* Create a babl fish capable of converting from source_format to
* destination_format, source and destination can be either strings
* with the names of the formats or Babl-format objects.
*/
-Babl * babl_fish (const void *source_format,
+const Babl * babl_fish (const void *source_format,
const void *destination_format);
/** Process n pixels from source to destination using babl_fish,
* returns number of pixels converted.
*/
-long babl_process (Babl *babl_fish,
- void *source,
+long babl_process (const Babl *babl_fish,
+ const void *source,
void *destination,
long n);
@@ -113,7 +113,7 @@
* Returns the type in the given @format for the given
* @component_index.
*/
-Babl * babl_format_get_type (const Babl *format,
+const Babl * babl_format_get_type (const Babl *format,
int component_index);
@@ -128,7 +128,7 @@
* ["max_val", double max_val,]
* NULL);
*/
-Babl * babl_type_new (void *first_arg,
+const Babl * babl_type_new (void *first_arg,
...) BABL_ARG_NULL_TERMINATED;
/**
@@ -137,8 +137,8 @@
* babl_component_new (const char *name,
* NULL);
*/
-Babl * babl_component_new (void *first_arg,
- ...) BABL_ARG_NULL_TERMINATED;
+const Babl * babl_component_new (void *first_arg,
+ ...) BABL_ARG_NULL_TERMINATED;
/**
* Defines a new color model in babl. If no name is provided a name is
@@ -149,7 +149,7 @@
* [BablComponent *componentN, ...]
* NULL);
*/
-Babl * babl_model_new (void *first_arg,
+const Babl * babl_model_new (void *first_arg,
...) BABL_ARG_NULL_TERMINATED;
/**
@@ -169,8 +169,8 @@
* ["planar",]
* NULL);
*/
-Babl * babl_format_new (void *first_arg,
- ...) BABL_ARG_NULL_TERMINATED;
+const Babl * babl_format_new (const void *first_arg,
+ ...) BABL_ARG_NULL_TERMINATED;
/*
* Defines a new pixel format in babl. With the specified data storage
@@ -178,14 +178,14 @@
* conversions are only well defined to other babl_format_n derived formats
* with the same number of components.
*/
-Babl *
-babl_format_n (Babl *type,
+const Babl *
+babl_format_n (const Babl *type,
int components);
/**
* Returns whether the @format is a format_n type.
*/
-int babl_format_is_format_n (Babl *format);
+int babl_format_is_format_n (const Babl *format);
/**
* Defines a new conversion between either two formats, two models or
@@ -197,8 +197,56 @@
* <"linear"|"planar">, conv_func,
* NULL);
*/
-Babl * babl_conversion_new (void *first_arg,
- ...) BABL_ARG_NULL_TERMINATED;
+const Babl * babl_conversion_new (const void *first_arg,
+ ...) BABL_ARG_NULL_TERMINATED;
+
+
+/**
+ * create a new palette based format, name is optional pass in NULL to get
+ * an anonymous format. If you pass in with_alpha the format also gets
+ * an 8bit alpha channel. Returns the BablModel of the color model. If
+ * you pass in the same name the previous formats will be provided
+ * again.
+ */
+const Babl *babl_new_palette (const char *name,
+ const Babl **format_u8,
+ const Babl **format_u8_with_alpha);
+
+/**
+ * check whether a format is a palette backed format.
+ */
+int babl_format_is_palette (const Babl *format);
+
+/**
+ * Assign a palette to a palette format, the data is a single span of pixels
+ * representing the colors of the palette.
+ */
+void babl_palette_set_palette (const Babl *babl,
+ const Babl *format,
+ void *data,
+ int count);
+
+/**
+ * reset a palette to initial state, frees up some caches that optimize
+ * conversions.
+ */
+void babl_palette_reset (const Babl *babl);
+
+
+
+/**
+ * associate a data pointer with a format/model, this data can be accessed and
+ * used from the conversion functions, encoding color profiles, palettes or
+ * similar with the data, perhaps this should be made internal API, not
+ * accesible at all from
+ */
+void babl_set_user_data (const Babl *babl, void *data);
+
+/**
+ * get data set with babl_set_user_data
+ */
+void * babl_get_user_data (const Babl *babl);
+
/*
diff -Nru babl-0.1.6/babl/babl-image.c babl-0.1.10/babl/babl-image.c
--- babl-0.1.6/babl/babl-image.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-image.c 2012-03-18 15:53:35.000000000 +0000
@@ -79,9 +79,10 @@
}
Babl *
-babl_image_from_linear (char *buffer,
- Babl *format)
+babl_image_from_linear (char *buffer,
+ const Babl *cformat)
{
+ Babl *format = (Babl*) cformat;
Babl *babl;
BablModel *model = NULL;
int components = 0;
@@ -169,7 +170,7 @@
}
Babl *
-babl_image_new (void *first,
+babl_image_new (const void *first,
...)
{
va_list varg;
diff -Nru babl-0.1.6/babl/babl-image.h babl-0.1.10/babl/babl-image.h
--- babl-0.1.6/babl/babl-image.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-image.h 2012-03-18 15:45:22.000000000 +0000
@@ -41,7 +41,7 @@
* ...]
* NULL);
*/
-Babl * babl_image_new (void *first_component,
+Babl * babl_image_new (const void *first_component,
...) BABL_ARG_NULL_TERMINATED;
typedef struct
diff -Nru babl-0.1.6/babl/babl-internal.h babl-0.1.10/babl/babl-internal.h
--- babl-0.1.6/babl/babl-internal.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-internal.h 2012-03-29 22:52:20.000000000 +0000
@@ -69,8 +69,8 @@
const void *destination);
double babl_conversion_error (BablConversion *conversion);
long babl_conversion_cost (BablConversion *conversion);
-long babl_conversion_process (Babl *conversion,
- char *source,
+long babl_conversion_process (const Babl *conversion,
+ const char *source,
char *destination,
long n);
@@ -82,8 +82,8 @@
Babl * babl_extension_quiet_log (void);
void babl_extension_deinit (void);
-long babl_fish_reference_process (Babl *babl,
- BablImage *source,
+long babl_fish_reference_process (const Babl *babl,
+ const BablImage*source,
BablImage *destination,
long n);
@@ -97,20 +97,20 @@
int babl_fish_get_id (const Babl *source,
const Babl *destination);
-double babl_format_loss (Babl *babl);
+double babl_format_loss (const Babl *babl);
Babl * babl_image_from_linear (char *buffer,
- Babl *format);
-Babl * babl_image_double_from_image (Babl *source);
+ const Babl *format);
+Babl * babl_image_double_from_image (const Babl *source);
-double babl_model_is_symmetric (Babl *babl);
+double babl_model_is_symmetric (const Babl *babl);
void babl_die (void);
int babl_sanity (void);
void babl_core_init (void);
-Babl * babl_format_with_model_as_type (Babl *model,
- Babl *type);
+const Babl *babl_format_with_model_as_type (const Babl *model,
+ const Babl *type);
int babl_formats_count (void); /* should maybe be templated? */
-int babl_type_is_symmetric (Babl *babl);
+int babl_type_is_symmetric (const Babl *babl);
/**** LOGGER ****/
#include
@@ -220,6 +220,7 @@
)
extern int babl_hmpf_on_name_lookups;
+extern int babl_in_fish_path;
extern BablMutex *babl_format_mutex;
#define BABL_DEBUG_MEM 0
@@ -258,7 +259,7 @@
#define BABL_CLASS_IMPLEMENT(klass) \
BABL_CLASS_MINIMAL_IMPLEMENT(klass) \
\
-Babl * \
+const Babl * \
babl_##klass (const char *name) \
{ \
Babl *babl; \
@@ -276,7 +277,7 @@
return babl; \
} \
\
-Babl * \
+const Babl * \
babl_##klass##_from_id (int id) \
{ \
Babl *babl; \
diff -Nru babl-0.1.6/babl/babl-model.c babl-0.1.10/babl/babl-model.c
--- babl-0.1.6/babl/babl-model.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-model.c 2012-03-18 15:35:15.000000000 +0000
@@ -24,7 +24,7 @@
#include "babl-internal.h"
#include "babl-db.h"
-static Babl *construct_double_format (Babl *model);
+static const Babl *construct_double_format (const Babl *model);
static int
babl_model_destroy (void *data)
@@ -93,7 +93,7 @@
}
-Babl *
+const Babl *
babl_model_new (void *first_argument,
...)
{
@@ -204,8 +204,8 @@
else
{
if (!is_model_duplicate (babl, components, component))
- babl_fatal ("BablModel '%s' already registered "
- "with different components!", name);
+ babl_fatal ("BablModel '%s' already registered "
+ "with different components!", name);
}
babl_free (name);
@@ -234,9 +234,9 @@
return test;
}
-static Babl *reference_format (void)
+static const Babl *reference_format (void)
{
- static Babl *self = NULL;
+ static const Babl *self = NULL;
if (!self)
self = babl_format_new (
@@ -250,9 +250,9 @@
return self;
}
-static Babl *construct_double_format (Babl *model)
+static const Babl *construct_double_format (const Babl *model)
{
- void *argument[44 + 1];
+ const void *argument[44 + 1];
int args = 0;
int i;
@@ -286,8 +286,9 @@
}
double
-babl_model_is_symmetric (Babl *babl)
+babl_model_is_symmetric (const Babl *cbabl)
{
+ Babl *babl = (Babl*)cbabl;
double *test;
void *original;
double *clipped;
@@ -295,10 +296,10 @@
double *transformed;
int symmetric = 1;
- Babl *ref_fmt;
- Babl *fmt;
- Babl *fish_to;
- Babl *fish_from;
+ const Babl *ref_fmt;
+ const Babl *fmt;
+ Babl *fish_to;
+ Babl *fish_from;
test = test_create ();
ref_fmt = reference_format ();
diff -Nru babl-0.1.6/babl/babl-model.h babl-0.1.10/babl/babl-model.h
--- babl-0.1.6/babl/babl-model.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-model.h 2012-03-18 03:17:54.000000000 +0000
@@ -29,6 +29,7 @@
BablComponent **component;
BablType **type; /*< must be doubles,
used here for convenience in code */
+ void *data; /* used for palette */
} BablModel;
#endif
diff -Nru babl-0.1.6/babl/babl-palette.c babl-0.1.10/babl/babl-palette.c
--- babl-0.1.6/babl/babl-palette.c 1970-01-01 00:00:00.000000000 +0000
+++ babl-0.1.10/babl/babl-palette.c 2012-03-29 23:10:26.000000000 +0000
@@ -0,0 +1,627 @@
+/* babl - dynamically extendable universal pixel conversion library.
+ * Copyright (C) 2012, Øyvind Kolås.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, see
+ * .
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include "config.h"
+#include "babl-internal.h"
+#include "babl.h"
+#include "babl-memory.h"
+
+#define HASH_TABLE_SIZE 1111
+
+/* A default palette, containing standard ANSI / EGA colors
+ *
+ */
+static unsigned char defpal_data[4*16] =
+{
+0 ,0 ,0 ,255,
+127,0 ,0 ,255,
+0 ,127,0 ,255,
+127,127,0 ,255,
+0 ,0 ,127,255,
+127,0 ,127,255,
+0 ,127,127,255,
+127,127,127,255,
+63 ,63 ,63 ,255,
+255,0 ,0 ,255,
+0 ,255,0 ,255,
+255,255,0 ,255,
+0 ,0 ,255,255,
+255,0 ,255,255,
+0 ,255,255,255,
+255,255,255,255,
+};
+static double defpal_double[4*8*16];
+
+
+typedef struct BablPalette
+{
+ int count; /* number of palette entries */
+ const Babl *format;/* the pixel format the palette is stored in */
+ unsigned char *data; /* one linear segment of all the pixels representing the palette, in order */
+ double *data_double;
+ unsigned char *data_u8;
+ int hash[HASH_TABLE_SIZE];
+ unsigned int hashpx[HASH_TABLE_SIZE];
+} BablPalette;
+
+static void
+babl_palette_reset_hash (BablPalette *pal)
+{
+ int i;
+ for (i = 0; i < HASH_TABLE_SIZE; i++)
+ {
+ pal->hashpx[i] = ((255 << 16) | (255 << 8) | 255) + 11; /* non existant pixel */
+ pal->hash[i] = -1;
+ }
+}
+
+static int
+babl_palette_lookup (BablPalette *pal, int r, int g, int b, int a)
+{
+ unsigned int pixel = (r << 16) | (g << 8) | b;
+ int hash_index = pixel % HASH_TABLE_SIZE;
+ int idx = pal->hash[hash_index];
+
+ if (idx >= 0 &&
+ pal->hashpx[hash_index] == pixel)
+ {
+ return idx;
+ }
+ else
+ {
+ int best_idx = 0;
+ int best_diff = INT_MAX;
+
+ for (idx = 0; idx < pal->count; idx++)
+ {
+ unsigned char *palpx = pal->data_u8 + idx * 4;
+ int pr = palpx[0];
+ int pg = palpx[1];
+ int pb = palpx[2];
+
+ int diff = (r - pr) * (r - pr) +
+ (g - pg) * (g - pg) +
+ (b - pb) * (b - pb);
+ if (diff < best_diff)
+ {
+ best_diff = diff;
+ best_idx = idx;
+ }
+ }
+ pal->hash[hash_index] = best_idx;
+ pal->hashpx[hash_index] = pixel;
+ return best_idx;
+ }
+ return 0;
+}
+
+static BablPalette *make_pal (const Babl *format, const void *data, int count)
+{
+ BablPalette *pal = NULL;
+ int bpp = babl_format_get_bytes_per_pixel (format);
+
+ pal = babl_malloc (sizeof (BablPalette));
+ pal->count = count;
+ pal->format = format;
+ pal->data = babl_malloc (bpp * count);
+ pal->data_double = babl_malloc (4 * sizeof(double) * count);
+ pal->data_u8 = babl_malloc (4 * sizeof(char) * count);
+ memcpy (pal->data, data, bpp * count);
+
+ babl_process (babl_fish (format, babl_format ("RGBA double")),
+ data, pal->data_double, count);
+ babl_process (babl_fish (format, babl_format ("RGBA u8")),
+ data, pal->data_u8, count);
+
+ babl_palette_reset_hash (pal);
+
+ return pal;
+}
+
+static void babl_palette_free (BablPalette *pal)
+{
+ babl_free (pal->data);
+ babl_free (pal->data_double);
+ babl_free (pal->data_u8);
+ babl_free (pal);
+}
+
+static BablPalette *default_palette (void)
+{
+ static BablPalette pal;
+ static int inited = 0;
+ if (inited)
+ return &pal;
+ memset (&pal, 0, sizeof (pal));
+ inited = 1;
+ pal.count = 16;
+ pal.format = babl_format ("RGBA u8"); /* dynamically generated, so
+ the default palette can
+ not be fully static.
+ */
+ pal.data = defpal_data;
+ pal.data_double = defpal_double;
+ pal.data_u8 = defpal_data;
+
+ babl_process (babl_fish (pal.format, babl_format ("RGBA double")),
+ pal.data, pal.data_double, pal.count);
+
+ babl_palette_reset_hash (&pal);
+ return &pal;
+}
+
+static long
+rgba_to_pal (char *src,
+ char *dst,
+ long n,
+ void *dst_model_data)
+{
+ BablPalette **palptr = dst_model_data;
+ BablPalette *pal = *palptr;
+ while (n--)
+ {
+ int idx;
+
+ int best_idx = 0;
+ double best_diff = 100000;
+ double *srcf;
+
+ srcf = ((double *) src);
+
+ for (idx = 0; idxcount; idx++)
+ {
+ double diff;
+ double *palpx = ((double *)pal->data_double) + idx * 4;
+
+ diff = (palpx[0] - srcf[0]) * (palpx[0] - srcf[0]) +
+ (palpx[1] - srcf[1]) * (palpx[1] - srcf[1]) +
+ (palpx[2] - srcf[2]) * (palpx[2] - srcf[2]);
+ if (diff <= best_diff)
+ {
+ best_diff = diff;
+ best_idx = idx;
+ }
+ }
+
+ ((double *) dst)[0] = best_idx / 255.5;
+
+ src += sizeof (double) * 4;
+ dst += sizeof (double) * 1;
+ }
+ return n;
+}
+
+static long
+rgba_to_pala (char *src,
+ char *dst,
+ long n,
+ void *dst_model_data)
+{
+ BablPalette **palptr = dst_model_data;
+ BablPalette *pal = *palptr;
+
+ assert(pal);
+ while (n--)
+ {
+ int idx;
+
+ int best_idx = 0;
+ double best_diff = 100000;
+ double *srcf;
+ double alpha;
+
+ srcf = ((double *) src);
+ alpha = srcf[3];
+
+ for (idx = 0; idxcount; idx++)
+ {
+ double diff;
+ double *palpx = ((double *)pal->data_double) + idx * 4;
+
+ diff = (palpx[0] - srcf[0]) * (palpx[0] - srcf[0]) +
+ (palpx[1] - srcf[1]) * (palpx[1] - srcf[1]) +
+ (palpx[2] - srcf[2]) * (palpx[2] - srcf[2]);
+ if (diff <= best_diff)
+ {
+ best_diff = diff;
+ best_idx = idx;
+ }
+ }
+
+ ((double *) dst)[0] = best_idx / 255.5;
+ ((double *) dst)[1] = alpha;
+
+ src += sizeof (double) * 4;
+ dst += sizeof (double) * 2;
+ }
+ return n;
+}
+
+static long
+pal_to_rgba (char *src,
+ char *dst,
+ long n,
+ void *src_model_data)
+{
+ BablPalette **palptr = src_model_data;
+ BablPalette *pal = *palptr;
+ assert(pal);
+ while (n--)
+ {
+ int idx = (((double *) src)[0]) * 255.5;
+ double *palpx;
+
+ if (idx < 0) idx = 0;
+ if (idx >= pal->count) idx = pal->count-1;
+
+ palpx = ((double *)pal->data_double) + idx * 4;
+ memcpy (dst, palpx, sizeof(double)*4);
+
+ src += sizeof (double) * 1;
+ dst += sizeof (double) * 4;
+ }
+ return n;
+}
+
+static long
+pala_to_rgba (char *src,
+ char *dst,
+ long n,
+ void *src_model_data)
+{
+ BablPalette **palptr = src_model_data;
+ BablPalette *pal = *palptr;
+
+ assert(pal);
+ while (n--)
+ {
+ int idx = (((double *) src)[0]) * 255.5;
+ double alpha = (((double *) src)[1]);
+ double *palpx;
+
+ if (idx < 0) idx = 0;
+ if (idx >= pal->count) idx = pal->count-1;
+
+ palpx = ((double *)pal->data_double) + idx * 4;
+ memcpy (dst, palpx, sizeof(double)*4);
+
+ ((double *)dst)[3] *= alpha;
+
+ src += sizeof (double) * 2;
+ dst += sizeof (double) * 4;
+ }
+ return n;
+}
+
+static long
+rgba_u8_to_pal (unsigned char *src,
+ unsigned char *dst,
+ long n,
+ void *src_model_data)
+{
+ BablPalette **palptr = src_model_data;
+ BablPalette *pal;
+ assert (palptr);
+ pal = *palptr;
+ assert(pal);
+ while (n--)
+ {
+ dst[0] = babl_palette_lookup (pal, src[0], src[1], src[2], src[3]);
+
+ src += sizeof (char) * 4;
+ dst += sizeof (char) * 1;
+ }
+
+ return n;
+}
+
+static long
+rgba_u8_to_pal_a (char *src,
+ char *dst,
+ long n,
+ void *src_model_data)
+{
+ BablPalette **palptr = src_model_data;
+ BablPalette *pal;
+ assert (palptr);
+ pal = *palptr;
+ assert(pal);
+ while (n--)
+ {
+ dst[0] = babl_palette_lookup (pal, src[0], src[1], src[2], src[3]);
+ dst[1] = src[3];
+
+ src += sizeof (char) * 4;
+ dst += sizeof (char) * 2;
+ }
+ return n;
+}
+
+static long
+pal_u8_to_rgba_u8 (char *src,
+ char *dst,
+ long n,
+ void *src_model_data)
+{
+ BablPalette **palptr = src_model_data;
+ BablPalette *pal;
+ assert (palptr);
+ pal = *palptr;
+ assert(pal);
+ while (n--)
+ {
+ int idx = (((unsigned char *) src)[0]);
+ unsigned char *palpx;
+
+ if (idx < 0) idx = 0;
+ if (idx >= pal->count) idx = pal->count-1;
+
+ palpx = ((unsigned char*)pal->data_u8) + idx * 4;
+ memcpy (dst, palpx, sizeof(char)*4);
+
+ src += sizeof (char) * 1;
+ dst += sizeof (char) * 4;
+ }
+ return n;
+}
+
+static long
+pala_u8_to_rgba_u8 (char *src,
+ char *dst,
+ long n,
+ void *src_model_data)
+{
+ BablPalette **palptr = src_model_data;
+ BablPalette *pal;
+ assert (palptr);
+ pal = *palptr;
+ assert(pal);
+ while (n--)
+ {
+ int idx = (((unsigned char *) src)[0]);
+ unsigned char *palpx;
+
+ if (idx < 0) idx = 0;
+ if (idx >= pal->count) idx = pal->count-1;
+
+ palpx = ((unsigned char*)pal->data_u8) + idx * 4;
+ memcpy (dst, palpx, sizeof(char)*4);
+ dst[3] = (dst[3] * src[1]) >> 8;
+
+ src += sizeof (char) * 2;
+ dst += sizeof (char) * 4;
+ }
+ return n;
+}
+
+
+#include "base/util.h"
+
+static inline long
+conv_pal8_pala8 (unsigned char *src, unsigned char *dst, long samples)
+{
+ long n = samples;
+
+ while (n--)
+ {
+ dst[0] = src[0];
+ dst[1] = 255;
+ src += 1;
+ dst += 2;
+ }
+ return samples;
+}
+
+static inline long
+conv_pala8_pal8 (unsigned char *src, unsigned char *dst, long samples)
+{
+ long n = samples;
+
+ while (n--)
+ {
+ dst[0] = src[0];
+ src += 2;
+ dst += 1;
+ }
+ return samples;
+}
+
+int
+babl_format_is_palette (const Babl *format)
+{
+ if (format->class_type == BABL_FORMAT)
+ return format->format.palette;
+ return 0;
+}
+
+/* should return the BablModel, permitting to fetch
+ * other formats out of it?
+ */
+const Babl *babl_new_palette (const char *name,
+ const Babl **format_u8,
+ const Babl **format_u8_with_alpha)
+{
+ const Babl *model;
+ const Babl *model_no_alpha;
+ Babl *f_pal_u8;
+ Babl *f_pal_a_u8;
+ const Babl *component;
+ const Babl *alpha;
+ BablPalette **palptr;
+
+ char cname[64];
+
+ if (!name)
+ {
+ static int cnt = 0;
+ sprintf (cname, "_babl-int-%i", cnt++);
+ name = cname;
+ }
+ else
+ {
+ strcpy (cname, name);
+ name = cname;
+
+ if ((model = babl_db_exist_by_name (babl_model_db (), name)))
+ {
+ cname[0] = ')';
+ if (format_u8)
+ *format_u8 = babl_db_exist_by_name (babl_format_db (), name);
+ cname[0] = '\\';
+ if (format_u8_with_alpha)
+ *format_u8_with_alpha = babl_db_exist_by_name (babl_format_db (), name);
+ return model;
+ }
+ }
+
+ /* re-registering is a no-op */
+ component = babl_component_new (
+ "I",
+ "luma",
+ "chroma",
+ NULL);
+ alpha = babl_component ("A");
+
+ model = babl_model_new ("name", name, component, alpha, NULL);
+ palptr = malloc (sizeof (void*));
+ *palptr = default_palette ();;
+ cname[0] = 'v';
+ model_no_alpha = babl_model_new ("name", name, component, NULL);
+ cname[0] = '\\';
+ f_pal_a_u8 = (void*) babl_format_new ("name", name, model,
+ babl_type ("u8"),
+ component, alpha, NULL);
+ cname[0] = ')';
+ f_pal_u8 = (void*) babl_format_new ("name", name, model_no_alpha,
+ babl_type ("u8"),
+ component, NULL);
+
+ f_pal_a_u8->format.palette = 1;
+ f_pal_u8->format.palette = 1;
+
+ babl_conversion_new (
+ model,
+ babl_model ("RGBA"),
+ "linear", pala_to_rgba,
+ "data", palptr,
+ NULL
+ );
+
+ babl_conversion_new (
+ babl_model ("RGBA"),
+ model,
+ "linear", rgba_to_pala,
+ "data", palptr,
+ NULL
+ );
+
+ babl_conversion_new (
+ model_no_alpha,
+ babl_model ("RGBA"),
+ "linear", pal_to_rgba,
+ "data", palptr,
+ NULL
+ );
+ babl_conversion_new (
+ babl_model ("RGBA"),
+ model_no_alpha,
+ "linear", rgba_to_pal,
+ "data", palptr,
+ NULL
+ );
+
+ babl_conversion_new (
+ f_pal_u8,
+ f_pal_a_u8,
+ "linear", conv_pal8_pala8,
+ NULL
+ );
+
+ babl_conversion_new (
+ f_pal_a_u8,
+ f_pal_u8,
+ "linear", conv_pala8_pal8,
+ NULL
+ );
+
+
+ babl_conversion_new (
+ f_pal_u8,
+ babl_format ("RGBA u8"),
+ "linear", pal_u8_to_rgba_u8,
+ "data", palptr,
+ NULL);
+
+
+ babl_conversion_new (
+ f_pal_a_u8,
+ babl_format ("RGBA u8"),
+ "linear", pala_u8_to_rgba_u8,
+ "data", palptr,
+ NULL);
+
+ babl_conversion_new (
+ babl_format ("RGBA u8"),
+ f_pal_a_u8,
+ "linear", rgba_u8_to_pal_a,
+ "data", palptr,
+ NULL);
+ babl_conversion_new (
+ babl_format ("RGBA u8"),
+ f_pal_u8,
+ "linear", rgba_u8_to_pal,
+ "data", palptr,
+ NULL);
+
+ babl_set_user_data (model, palptr);
+ babl_set_user_data (model_no_alpha, palptr);
+
+ if (format_u8)
+ *format_u8 = f_pal_u8;
+ if (format_u8_with_alpha)
+ *format_u8_with_alpha = f_pal_a_u8;
+ babl_sanity ();
+ return model;
+}
+
+void
+babl_palette_set_palette (const Babl *babl,
+ const Babl *format,
+ void *data,
+ int count)
+{
+ BablPalette **palptr = babl_get_user_data (babl);
+ babl_palette_reset (babl);
+ *palptr = make_pal (format, data, count);
+}
+
+void
+babl_palette_reset (const Babl *babl)
+{
+ BablPalette **palptr = babl_get_user_data (babl);
+ if (*palptr != default_palette ())
+ {
+ babl_palette_free (*palptr);
+ }
+ *palptr = default_palette ();
+}
diff -Nru babl-0.1.6/babl/babl-sampling.c babl-0.1.10/babl/babl-sampling.c
--- babl-0.1.6/babl/babl-sampling.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-sampling.c 2012-03-18 15:46:44.000000000 +0000
@@ -27,7 +27,7 @@
static BablSampling sampling_db[(HORIZONTAL_MAX - HORIZONTAL_MIN + 1) *
(VERTICAL_MAX - VERTICAL_MIN + 1)];
-Babl *
+const Babl *
babl_sampling (int horizontal,
int vertical)
{
diff -Nru babl-0.1.6/babl/babl-type.c babl-0.1.10/babl/babl-type.c
--- babl-0.1.6/babl/babl-type.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-type.c 2012-03-18 15:54:40.000000000 +0000
@@ -65,7 +65,7 @@
return 1;
}
-Babl *
+const Babl *
babl_type_new (void *first_arg,
...)
{
@@ -162,6 +162,9 @@
*/
babl_db_insert (db, babl);
return babl;
+
+ if (min || max || is_integer || max_val || min_val)
+ return NULL;
}
@@ -193,9 +196,9 @@
}
-static Babl *double_vector_format (void)
+static const Babl *double_vector_format (void)
{
- static Babl *self = NULL;
+ static const Babl *self = NULL;
if (!self)
self = babl_format_new (
@@ -207,7 +210,7 @@
}
int
-babl_type_is_symmetric (Babl *babl)
+babl_type_is_symmetric (const Babl *babl)
{
int is_symmetrical = 1;
void *original;
@@ -215,10 +218,10 @@
void *destination;
double *transformed;
- Babl *ref_fmt;
- Babl *fmt;
- Babl *fish_to;
- Babl *fish_from;
+ const Babl *ref_fmt;
+ const Babl *fmt;
+ Babl *fish_to;
+ Babl *fish_from;
test_init (0.0, 182.0);
diff -Nru babl-0.1.6/babl/babl-types.h babl-0.1.10/babl/babl-types.h
--- babl-0.1.6/babl/babl-types.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/babl-types.h 2012-03-18 14:09:59.000000000 +0000
@@ -33,17 +33,19 @@
/* Conversion function between linear data of a either a data types or
* color formats.
*/
-typedef long (*BablFuncLinear) (char *src,
+typedef long (*BablFuncLinear) (const char *src,
char *dst,
- long n);
+ long n,
+ void *user_data);
/* TypePlanar,ModelPlanar and FormatPlanar */
typedef long (*BablFuncPlanar) (int src_bands,
- char *src[],
+ const char *src[],
int src_pitch[],
int dst_bands,
char *dst[],
int dst_pitch[],
- long n);
+ long n,
+ void *user_data);
#endif
diff -Nru babl-0.1.6/babl/babl-version.h babl-0.1.10/babl/babl-version.h
--- babl-0.1.6/babl/babl-version.h 2011-11-18 18:46:06.000000000 +0000
+++ babl-0.1.10/babl/babl-version.h 2012-04-02 21:35:16.000000000 +0000
@@ -34,7 +34,7 @@
#define BABL_MAJOR_VERSION 0
#define BABL_MINOR_VERSION 1
-#define BABL_MICRO_VERSION 6
+#define BABL_MICRO_VERSION 10
/** Get the version information on the babl library */
void babl_get_version (int *major,
diff -Nru babl-0.1.6/babl/base/babl-base.h babl-0.1.10/babl/base/babl-base.h
--- babl-0.1.6/babl/base/babl-base.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/base/babl-base.h 2012-03-17 12:16:40.000000000 +0000
@@ -28,6 +28,7 @@
void babl_base_type_u16 (void);
void babl_base_type_u32 (void);
+void babl_base_model_pal (void);
void babl_base_model_rgb (void);
void babl_base_model_gray (void);
void babl_base_model_ycbcr (void);
diff -Nru babl-0.1.6/babl/base/Makefile.in babl-0.1.10/babl/base/Makefile.in
--- babl-0.1.6/babl/base/Makefile.in 2011-11-18 18:45:59.000000000 +0000
+++ babl-0.1.10/babl/base/Makefile.in 2012-04-02 21:35:11.000000000 +0000
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -57,8 +57,8 @@
model-ycbcr.lo
am_libbase_la_OBJECTS = $(am__objects_1) $(am__objects_2)
libbase_la_OBJECTS = $(am_libbase_la_OBJECTS)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
@@ -70,21 +70,21 @@
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libbase_la_SOURCES)
DIST_SOURCES = $(libbase_la_SOURCES)
@@ -307,7 +307,7 @@
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libbase.la: $(libbase_la_OBJECTS) $(libbase_la_DEPENDENCIES)
+libbase.la: $(libbase_la_OBJECTS) $(libbase_la_DEPENDENCIES) $(EXTRA_libbase_la_DEPENDENCIES)
$(AM_V_CCLD)$(LINK) $(libbase_la_OBJECTS) $(libbase_la_LIBADD) $(LIBS)
mostlyclean-compile:
@@ -329,26 +329,23 @@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -452,10 +449,15 @@
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff -Nru babl-0.1.6/babl/base/model-rgb.c babl-0.1.10/babl/base/model-rgb.c
--- babl-0.1.6/babl/base/model-rgb.c 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/base/model-rgb.c 2012-03-31 02:40:53.000000000 +0000
@@ -285,16 +285,16 @@
int band;
alpha = *(double *) src[src_bands - 1];
- for (band = 0; band < src_bands - 1; band++)
+ if (alpha > BABL_ALPHA_THRESHOLD)
+ {
+ double recip_alpha = 1.0 / alpha;
+ for (band = 0; band < src_bands - 1; band++)
+ *(double *) dst[band] = *(double *) src[band] * recip_alpha;
+ }
+ else
{
- if (alpha > BABL_ALPHA_THRESHOLD)
- {
- *(double *) dst[band] = *(double *) src[band] / alpha;
- }
- else
- {
- *(double *) dst[band] = 0.00;
- }
+ for (band = 0; band < src_bands - 1; band++)
+ *(double *) dst[band] = 0.0;
}
*(double *) dst[dst_bands - 1] = alpha;
diff -Nru babl-0.1.6/babl/base/util.h babl-0.1.10/babl/base/util.h
--- babl-0.1.6/babl/base/util.h 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/babl/base/util.h 2012-03-31 13:33:39.000000000 +0000
@@ -16,8 +16,8 @@
* .
*/
-#ifndef _UTIL_H
-#define _UTIL_H
+#ifndef _BASE_UTIL_H
+#define _BASE_UTIL_H
#include
#include
@@ -56,12 +56,29 @@
#ifdef BABL_USE_SRGB_GAMMA
+/* fast approximation of x ^ (5/12) from a response by David Hammen at
+ * http://stackoverflow.com/questions/6475373/optimizations-for-pow-with-const-non-integer-exponent/6475516#6475516
+ *
+ */
+static inline double xpow512 (double x)
+{
+ double cbrtx = cbrt(x);
+ return cbrtx*sqrt(sqrt(cbrtx));
+}
+
+
static inline double
linear_to_gamma_2_2 (double value)
{
+#if 0
if (value > 0.0030402477F)
return 1.055F * pow (value, (1.0F/2.4F)) - 0.055F;
return 12.92F * value;
+#else
+ if (value > 0.0030402477F)
+ return 1.055F * xpow512 (value) - 0.055F;
+ return 12.92F * value;
+#endif
}
static inline double
diff -Nru babl-0.1.6/babl/Makefile.am babl-0.1.10/babl/Makefile.am
--- babl-0.1.6/babl/Makefile.am 2011-11-18 17:03:21.000000000 +0000
+++ babl-0.1.10/babl/Makefile.am 2012-03-29 23:24:44.000000000 +0000
@@ -27,6 +27,7 @@
babl-memory.c \
babl-model.c \
babl-mutex.c \
+ babl-palette.c \
babl-sampling.c \
babl-sanity.c \
babl-type.c \
diff -Nru babl-0.1.6/babl/Makefile.in babl-0.1.10/babl/Makefile.in
--- babl-0.1.6/babl/Makefile.in 2011-11-18 18:45:59.000000000 +0000
+++ babl-0.1.10/babl/Makefile.in 2012-04-02 21:35:11.000000000 +0000
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -73,6 +73,12 @@
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \
"$(DESTDIR)$(typelibsdir)" "$(DESTDIR)$(vapidir)" \
"$(DESTDIR)$(library_includedir)"
@@ -85,15 +91,15 @@
babl-fish-reference.lo babl-fish-simple.lo babl-fish-stats.lo \
babl-fish.lo babl-format.lo babl-hash-table.lo babl-image.lo \
babl-internal.lo babl-introspect.lo babl-list.lo \
- babl-memory.lo babl-model.lo babl-mutex.lo babl-sampling.lo \
- babl-sanity.lo babl-type.lo babl-util.lo babl-cpuaccel.lo \
- babl-version.lo
+ babl-memory.lo babl-model.lo babl-mutex.lo babl-palette.lo \
+ babl-sampling.lo babl-sanity.lo babl-type.lo babl-util.lo \
+ babl-cpuaccel.lo babl-version.lo
am_libbabl_@BABL_API_VERSION@_la_OBJECTS = $(am__objects_1) \
$(am__objects_2)
libbabl_@BABL_API_VERSION@_la_OBJECTS = \
$(am_libbabl_@BABL_API_VERSION@_la_OBJECTS)
-AM_V_lt = $(am__v_lt_$(V))
-am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
libbabl_@BABL_API_VERSION@_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
@@ -109,21 +115,21 @@
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
-AM_V_CC = $(am__v_CC_$(V))
-am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-AM_V_CCLD = $(am__v_CCLD_$(V))
-am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
SOURCES = $(libbabl_@BABL_API_VERSION@_la_SOURCES)
DIST_SOURCES = $(libbabl_@BABL_API_VERSION@_la_SOURCES)
@@ -344,6 +350,7 @@
babl-memory.c \
babl-model.c \
babl-mutex.c \
+ babl-palette.c \
babl-sampling.c \
babl-sanity.c \
babl-type.c \
@@ -482,7 +489,7 @@
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
-libbabl-@BABL_API_VERSION@.la: $(libbabl_@BABL_API_VERSION@_la_OBJECTS) $(libbabl_@BABL_API_VERSION@_la_DEPENDENCIES)
+libbabl-@BABL_API_VERSION@.la: $(libbabl_@BABL_API_VERSION@_la_OBJECTS) $(libbabl_@BABL_API_VERSION@_la_DEPENDENCIES) $(EXTRA_libbabl_@BABL_API_VERSION@_la_DEPENDENCIES)
$(AM_V_CCLD)$(libbabl_@BABL_API_VERSION@_la_LINK) -rpath $(libdir) $(libbabl_@BABL_API_VERSION@_la_OBJECTS) $(libbabl_@BABL_API_VERSION@_la_LIBADD) $(LIBS)
mostlyclean-compile:
@@ -512,6 +519,7 @@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-memory.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-model.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-mutex.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-palette.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-sampling.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-sanity.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl-type.Plo@am__quote@
@@ -522,26 +530,23 @@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@@ -565,9 +570,7 @@
@$(NORMAL_UNINSTALL)
@list='$(gir_DATA)'; test -n "$(girdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(girdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(girdir)" && rm -f $$files
+ dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir)
install-typelibsDATA: $(typelibs_DATA)
@$(NORMAL_INSTALL)
test -z "$(typelibsdir)" || $(MKDIR_P) "$(DESTDIR)$(typelibsdir)"
@@ -585,9 +588,7 @@
@$(NORMAL_UNINSTALL)
@list='$(typelibs_DATA)'; test -n "$(typelibsdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(typelibsdir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(typelibsdir)" && rm -f $$files
+ dir='$(DESTDIR)$(typelibsdir)'; $(am__uninstall_files_from_dir)
install-vapiDATA: $(vapi_DATA)
@$(NORMAL_INSTALL)
test -z "$(vapidir)" || $(MKDIR_P) "$(DESTDIR)$(vapidir)"
@@ -605,9 +606,7 @@
@$(NORMAL_UNINSTALL)
@list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(vapidir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(vapidir)" && rm -f $$files
+ dir='$(DESTDIR)$(vapidir)'; $(am__uninstall_files_from_dir)
install-library_includeHEADERS: $(library_include_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)"
@@ -625,9 +624,7 @@
@$(NORMAL_UNINSTALL)
@list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(library_includedir)" && rm -f $$files
+ dir='$(DESTDIR)$(library_includedir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
@@ -840,10 +837,15 @@
installcheck: installcheck-recursive
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff -Nru babl-0.1.6/ChangeLog babl-0.1.10/ChangeLog
--- babl-0.1.6/ChangeLog 2011-11-18 18:46:07.000000000 +0000
+++ babl-0.1.10/ChangeLog 2012-04-01 23:05:28.000000000 +0000
@@ -1,3 +1,505 @@
+commit 01617bfafbd266ebb435355309505843686bfac4
+Author: Øyvind Kolås
+Date: Sun Apr 1 19:41:47 2012 +0100
+
+ extensions: quadruple precision of LUT based floatfuncs
+
+ (without increasing the size of the lookup tables, with neglible
+ performance cost)
+
+ extensions/fast-float.c | 36 ++++++++++++++++++++++--------------
+ 1 files changed, 22 insertions(+), 14 deletions(-)
+
+commit c94d8493bcffb8acd499a8a993545c95f865f5e3
+Author: Øyvind Kolås
+Date: Sun Apr 1 15:08:13 2012 +0100
+
+ fast-float: reduce overhead of saturating LUT
+
+ extensions/fast-float.c | 7 +------
+ 1 files changed, 1 insertions(+), 6 deletions(-)
+
+commit 9964f870b1e9599ccd6091c3869ad14ca030ff98
+Author: Øyvind Kolås
+Date: Sun Apr 1 15:03:10 2012 +0100
+
+ extensions/fast-float: reduce precision
+
+ Reduce sizes of lookup tables by an order of magnitude, doubling
+ the run-time
+ performance.
+
+ extensions/fast-float.c | 9 +++++++--
+ 1 files changed, 7 insertions(+), 2 deletions(-)
+
+commit df7b656e4e6b0cfe03713fa71c2ab4c3055aa327
+Author: Øyvind Kolås
+Date: Sun Apr 1 03:08:53 2012 +0100
+
+ extensions: add lut based gamma for float
+
+ extensions/Makefile.am | 3 +-
+ extensions/fast-float.c | 463
+ +++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 465 insertions(+), 1 deletions(-)
+
+commit efcbbf180060385edfd9922e7de3ffc8895d0747
+Author: Øyvind Kolås
+Date: Sat Mar 31 17:08:16 2012 +0100
+
+ babl: reduce number of pixels tested when profiling to 128
+
+ babl/babl-conversion.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3a88e9d917f96935c1abaac011b52bdc3e2d85b8
+Author: Øyvind Kolås
+Date: Sat Mar 31 15:34:31 2012 +0100
+
+ extensions: get rid of some of the conversions with the highest errors
+
+ babl/babl-conversion.c | 2 +-
+ extensions/gegl-fixups.c | 72 ------------
+ extensions/gggl-lies.c | 283
+ ----------------------------------------------
+ 3 files changed, 1 insertions(+), 356 deletions(-)
+
+commit 4f8c43e0ee4c5f9ecb453cc5a4bf27d8a11202c1
+Author: Øyvind Kolås
+Date: Sat Mar 31 15:06:52 2012 +0100
+
+ extensions: remove optmized powf, use the fully correct optimization
+ from base
+
+ extensions/float.c | 124
+ ++++++---------------------------------------------
+ 1 files changed, 15 insertions(+), 109 deletions(-)
+
+commit 1f5b281382b8511481bdd1ac0baef417a32779fb
+Author: Øyvind Kolås
+Date: Sat Mar 31 14:58:49 2012 +0100
+
+ extensions: add an extension with some float optimizations
+
+ Alos improve some alpha unpremultiplications in other extensions.
+
+ extensions/Makefile.am | 4 +
+ extensions/float.c | 324
+ ++++++++++++++++++++++++++++++++++++++++++++++
+ extensions/gegl-fixups.c | 6 +-
+ extensions/gggl.c | 3 +-
+ 4 files changed, 333 insertions(+), 4 deletions(-)
+
+commit f8d49962299cba7dc719c63c78b0dbd9b65678a5
+Author: Øyvind Kolås
+Date: Sat Mar 31 14:58:16 2012 +0100
+
+ base/util.h change define used in include guards
+
+ babl/base/util.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+commit fe553b82d2bf2ce5a76a571cedb4b1e0389cfc99
+Author: Øyvind Kolås
+Date: Sat Mar 31 03:47:06 2012 +0100
+
+ use optimized powf for x^(1.0/2.4)
+
+ babl/base/util.h | 17 +++++++++++++++++
+ 1 files changed, 17 insertions(+), 0 deletions(-)
+
+commit d36119a4f79dd174fd762bfa6761cb0743b6753f
+Author: Øyvind Kolås
+Date: Sat Mar 31 03:44:45 2012 +0100
+
+ reorder loops of reference premul
+
+ babl/base/model-rgb.c | 18 +++++++++---------
+ 1 files changed, 9 insertions(+), 9 deletions(-)
+
+commit 8f2e1e3c18299b0f522727d894ab53d7c92304ed
+Author: Øyvind Kolås
+Date: Sat Mar 31 02:50:43 2012 +0100
+
+ use sse conversions also for gamma corrected data
+
+ extensions/sse-fixups.c | 30 ++++++++++++++++++++++++++++++
+ 1 files changed, 30 insertions(+), 0 deletions(-)
+
+commit a3c5cb397632dc92cec8bde020173720f18f0210
+Author: Øyvind Kolås
+Date: Fri Mar 30 00:37:00 2012 +0100
+
+ post release version bump to 0.1.9
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 21d823b676c7785bf555f913d5cc04ff0fca3e8b
+Author: Øyvind Kolås
+Date: Fri Mar 30 00:33:09 2012 +0100
+
+ bump version to 0.1.8
+
+ Also updated NEWS
+
+ NEWS | 4 ++++
+ configure.ac | 2 +-
+ 2 files changed, 5 insertions(+), 1 deletions(-)
+
+commit 45c58bae85cce261ab585d4277bcf1143a922d75
+Author: Øyvind Kolås
+Date: Fri Mar 30 00:31:43 2012 +0100
+
+ build: do not enable introspection even for distcheck
+
+ Makefile.am | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 803de20d07e11c76ca928502d519ddaf5ffd5c59
+Author: Øyvind Kolås
+Date: Fri Mar 30 00:14:49 2012 +0100
+
+ palette: return the same values if same name is provided
+
+ babl/babl-palette.c | 15 +++++++++++++--
+ babl/babl.h | 4 +++-
+ 2 files changed, 16 insertions(+), 3 deletions(-)
+
+commit 8a220e393495137c0595c11602e1ea69c3962cc2
+Author: Øyvind Kolås
+Date: Wed Mar 28 20:28:48 2012 +0100
+
+ palette: change alpha reporting for palette formats
+
+ Only return TRUE if the format has a dedicated alpha component.
+
+ babl/babl-palette.c | 1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+commit 56e8871e416659463ecd48c954e735a35fa84b92
+Author: Øyvind Kolås
+Date: Mon Mar 26 15:29:12 2012 +0100
+
+ palette: use INT_MAX instead of MAXINT
+
+ babl/babl-palette.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 2e301fd87651f325a3684fe0cc23acd2ac67bc6a
+Author: Øyvind Kolås
+Date: Wed Mar 21 18:13:38 2012 +0000
+
+ add babl_format_is_palette
+
+ babl/babl-format.h | 1 +
+ babl/babl-palette.c | 23 +++++++++++++++++------
+ babl/babl.h | 12 ++++++++++--
+ 3 files changed, 28 insertions(+), 8 deletions(-)
+
+commit a8101cab0f51d2b1aa486b3723f5f5606645a9d6
+Author: Øyvind Kolås
+Date: Mon Mar 19 15:24:36 2012 +0000
+
+ palette: return the BablModel created
+
+ babl/babl-palette.c | 8 +++++---
+ babl/babl.h | 8 +++++---
+ 2 files changed, 10 insertions(+), 6 deletions(-)
+
+commit d5489f961a89baf74c622c8312589d420fb96c51
+Author: Øyvind Kolås
+Date: Mon Mar 19 12:46:45 2012 +0000
+
+ disable gobject introspection by default
+
+ The tooling crashes with odd strlen assertions breaking the build
+ on many
+ existing linux distros. This change should make gobject introspection
+ disabled by defualt.
+
+ m4/introspection.m4 | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+commit 3246212471a8841e2c9de2ea50904749727f3dbc
+Author: Øyvind Kolås
+Date: Mon Mar 19 02:55:32 2012 +0000
+
+ palette: optimize rgb(a) -> palette index computation
+
+ babl/babl-palette.c | 261
+ +++++++++++++++++++++++++++++++++++++++++----------
+ 1 files changed, 210 insertions(+), 51 deletions(-)
+
+commit fde6f74ee6df6da8637b55ba0a8187e4c17c8138
+Author: Øyvind Kolås
+Date: Sun Mar 18 22:10:20 2012 +0000
+
+ palette: add fast paths for adding and removing alpha channel
+
+ babl/babl-palette.c | 73
+ ++++++++++++++++++++++----------------------------
+ 1 files changed, 32 insertions(+), 41 deletions(-)
+
+commit e803b072f06e2e2717fd2be0df4b3c5f058cf6ca
+Author: Øyvind Kolås
+Date: Sun Mar 18 16:57:04 2012 +0000
+
+ tests: constify tests
+
+ tests/concurrency-stress-test.c | 2 +-
+ tests/extract.c | 2 +-
+ tests/grayscale_to_rgb.c | 2 +-
+ tests/n_components.c | 6 +++---
+ tests/palette.c | 6 +++---
+ tests/rgb_to_bgr.c | 2 +-
+ tests/rgb_to_ycbcr.c | 2 +-
+ 7 files changed, 11 insertions(+), 11 deletions(-)
+
+commit afd9b27918e766858724b25ce427af66ed46db2b
+Author: Øyvind Kolås
+Date: Sun Mar 18 15:58:11 2012 +0000
+
+ constify API
+
+ babl/babl-class.h | 10 +++---
+ babl/babl-component.c | 2 +-
+ babl/babl-conversion.c | 24 +++++++-------
+ babl/babl-conversion.h | 4 +--
+ babl/babl-extension.h | 4 +-
+ babl/babl-fish-path.c | 11 +++---
+ babl/babl-fish-reference.c | 8 ++--
+ babl/babl-fish-stats.c | 8 ++--
+ babl/babl-fish.c | 2 +-
+ babl/babl-format.c | 75
+ ++++++++++++++++++++++---------------------
+ babl/babl-image.c | 7 ++--
+ babl/babl-image.h | 2 +-
+ babl/babl-internal.h | 22 ++++++------
+ babl/babl-model.c | 23 +++++++------
+ babl/babl-palette.c | 24 +++++++-------
+ babl/babl-sampling.c | 2 +-
+ babl/babl-type.c | 19 ++++++-----
+ babl/babl.h | 52 +++++++++++++++---------------
+ extensions/gegl-fixups.c | 14 ++++----
+ extensions/gggl-lies.c | 44 +++++++++++++-------------
+ extensions/gggl.c | 42 ++++++++++++------------
+ extensions/gimp-8bit.c | 26 +++++++-------
+ extensions/sse-fixups.c | 6 ++--
+ 23 files changed, 218 insertions(+), 213 deletions(-)
+
+commit a305fd91ced781f86ed05732a3cac9fb77e5902d
+Author: Øyvind Kolås
+Date: Sun Mar 18 15:00:07 2012 +0000
+
+ palette: add fastish path for alpha<->no alpha
+
+ babl/babl-palette.c | 58
+ ++++++++++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 53 insertions(+), 5 deletions(-)
+
+commit fc2c0afa0f26a970cfdee28511a676e392415fd9
+Author: Øyvind Kolås
+Date: Sun Mar 18 14:17:04 2012 +0000
+
+ carry around user data in BablConversion
+
+ Having the user data for relevant conversions directly in
+ BablConversion
+ permits avoiding branches in the dispatch code. Branches in dispatch
+ code
+ is evil, thus desinging the rest around avoiding that.
+
+ babl/babl-conversion.c | 38 ++++++++++++++++----------------------
+ babl/babl-conversion.h | 4 ++--
+ babl/babl-palette.c | 22 ++++++++++++----------
+ babl/babl-types.h | 6 ++----
+ 4 files changed, 32 insertions(+), 38 deletions(-)
+
+commit 23345ce49c8ba6c6d185a788da90ff3c8c9a077e
+Author: Øyvind Kolås
+Date: Sun Mar 18 13:10:19 2012 +0000
+
+ palette: changed API to have aplha and non-alpha formats in out
+ arguments
+
+ babl/babl-palette.c | 23 ++++++++---------------
+ 1 files changed, 8 insertions(+), 15 deletions(-)
+
+commit 435e8ff0d2db7ac7405cabdd7dc25e950f2af632
+Author: Øyvind Kolås
+Date: Sun Mar 18 11:39:12 2012 +0000
+
+ make babl pass valgrinding
+
+ babl/babl-conversion.c | 18 ++++-
+ babl/babl-format.c | 25 ++++++-
+ babl/babl-format.h | 7 +--
+ babl/babl-palette.c | 185
+ ++++++++++++++++++++++++++++--------------------
+ babl/babl.h | 3 +-
+ tests/palette.c | 27 ++++++-
+ 6 files changed, 173 insertions(+), 92 deletions(-)
+
+commit 5945aea4b04d90274e263731cde180bf4d3fafd9
+Author: Øyvind Kolås
+Date: Sun Mar 18 02:52:00 2012 +0000
+
+ palette: initialize with 8bit fast path buffer
+
+ babl/babl-palette.c | 4 +++-
+ tests/palette.c | 33 +++++++++++++++++++++++++++------
+ 2 files changed, 30 insertions(+), 7 deletions(-)
+
+commit f28a81b51feb50e36b099dc1b0efa3687c188688
+Author: Øyvind Kolås
+Date: Sun Mar 18 00:10:52 2012 +0000
+
+ add 8bit fast path for pal -> rgba
+
+ babl/babl-palette.c | 42 +++++++++++++++++++++++++++++++++++++++++-
+ 1 files changed, 41 insertions(+), 1 deletions(-)
+
+commit 9e4542ca2b6322c56bc1dc8aa26d091bc5a4a158
+Author: Øyvind Kolås
+Date: Sat Mar 17 23:54:49 2012 +0000
+
+ add bablformats that match the hosts endianness
+
+ extensions/Makefile.am | 2 +
+ extensions/cairo.c | 86
+ ++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 88 insertions(+), 0 deletions(-)
+
+commit 72add8f22426f0f7457e9eebffe0a458e42d4b0b
+Author: Øyvind Kolås
+Date: Sat Mar 17 19:39:21 2012 +0000
+
+ palette: cache the double version of the palette internally
+
+ babl/babl-palette.c | 74
+ ++++++++++++++++++++-------------------------------
+ 1 files changed, 29 insertions(+), 45 deletions(-)
+
+commit 9d2aa7d13ac421935de1e87301c48af50b0ceb59
+Author: Øyvind Kolås
+Date: Sat Mar 17 17:02:44 2012 +0000
+
+ palette: add capability to use palette formats with separate alpha
+
+ Also refactored to make babl-palette.c only use public API.
+
+ babl/babl-fish-path.c | 6 +-
+ babl/babl-format.c | 14 +++
+ babl/babl-ids.h | 1 -
+ babl/babl-palette.c | 226
+ +++++++++++++++++++++++++++++++++++--------------
+ babl/babl.h | 18 ++++-
+ tests/palette.c | 39 ++++++++-
+ 6 files changed, 230 insertions(+), 74 deletions(-)
+
+commit 11d4a44ebbee10d62064b516e8946025ea045f76
+Author: Øyvind Kolås
+Date: Sat Mar 17 12:32:47 2012 +0000
+
+ add file missing from last commit
+
+ babl/babl-palette.c | 254
+ +++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 254 insertions(+), 0 deletions(-)
+
+commit 47f3c99e1c58bb50e60d03727c2b2cdcef363cbf
+Author: Øyvind Kolås
+Date: Sat Mar 17 12:22:10 2012 +0000
+
+ add API for managing palette based formats
+
+ babl/Makefile.am | 1 +
+ babl/babl-ids.h | 1 +
+ babl/babl-types.h | 8 +++-
+ babl/babl.h | 21 +++++++++
+ babl/base/babl-base.h | 1 +
+ tests/Makefile.am | 3 +-
+ tests/palette.c | 108
+ +++++++++++++++++++++++++++++++++++++++++++++++++
+ 7 files changed, 139 insertions(+), 4 deletions(-)
+
+commit ba6d0f554ecb85c853135ada91bc049b28448da9
+Author: Øyvind Kolås
+Date: Sat Mar 17 12:18:54 2012 +0000
+
+ babl: add ability to register user data with BablModel
+
+ The user data is available in the callback functions, no ABI
+ change only
+ processing functions interested in this data needs to define the
+ arguments,..
+ keeping ABI compatibility.
+
+ babl/babl-conversion.c | 12 +++++++++---
+ babl/babl-conversion.h | 4 +++-
+ babl/babl-fish-path.c | 4 ++++
+ babl/babl-format.h | 4 ++++
+ babl/babl-internal.h | 1 +
+ babl/babl-model.c | 4 ++--
+ babl/babl-model.h | 1 +
+ 7 files changed, 24 insertions(+), 6 deletions(-)
+
+commit f5b934ff75b786c22d8d885dc489e231031b6c23
+Author: Øyvind Kolås
+Date: Fri Mar 16 11:53:45 2012 +0000
+
+ tests: add missing test
+
+ tests/extract.c | 144
+ +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 144 insertions(+), 0 deletions(-)
+
+commit ba69dcba43d31279bcc27076fb15859e5ad520c9
+Author: Øyvind Kolås
+Date: Fri Mar 16 11:25:59 2012 +0000
+
+ add ability to extract component with 1 component formats
+
+ babl/babl-format.c | 4 +++-
+ tests/Makefile.am | 3 +++
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+commit 5f21288bd2d011894bf139728eb3a185bcc6f4c1
+Author: Øyvind Kolås
+Date: Thu Mar 15 22:11:56 2012 +0000
+
+ constify source argument of babl_process
+
+ babl/babl-conversion.c | 18 ++++++++--------
+ babl/babl-conversion.h | 10 ++++----
+ babl/babl-fish-path.c | 47
+ +++++++++++++++++++++----------------------
+ babl/babl-fish-reference.c | 36 ++++++++++++++++----------------
+ babl/babl-internal.h | 4 +-
+ babl/babl-types.h | 4 +-
+ babl/babl.h | 2 +-
+ 7 files changed, 60 insertions(+), 61 deletions(-)
+
+commit b76b220b8ede1c3048c18c6abbaf384604ac8012
+Author: Øyvind Kolås
+Date: Fri Dec 23 11:44:14 2011 +0000
+
+ base: remove unused model-cmyk
+
+ babl/base/model-cmyk.c | 213
+ ------------------------------------------------
+ 1 files changed, 0 insertions(+), 213 deletions(-)
+
+commit 9cabedb56d5ae9803e34bb79041d87c90400c1dd
+Author: Øyvind Kolås
+Date: Fri Nov 18 18:47:02 2011 +0000
+
+ post release version bump to 0.1.7
+
+ configure.ac | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
commit 180becb47465ca34bd4ba68c2737bef0c06ad284
Author: Øyvind Kolås
Date: Fri Nov 18 18:44:58 2011 +0000
@@ -729,13 +1231,13 @@
formats with the same number of components.
babl/babl-classes.h | 2 +-
- babl/babl-fish-reference.c | 135
- ++++++++++++++++++++++++++++++++++++++------
+ babl/babl-fish-reference.c | 131
+ +++++++++++++++++++++++++++++++++++++++-----
babl/babl-format.c | 56 +++++++++++++++++-
babl/babl.h | 12 ++++-
tests/Makefile.am | 1 +
- tests/n_components.c | 116 +++++++++++++++++++++++++++++++++++++
- 6 files changed, 299 insertions(+), 23 deletions(-)
+ tests/n_components.c | 116 +++++++++++++++++++++++++++++++++++++++
+ 6 files changed, 297 insertions(+), 21 deletions(-)
commit ec2bbd3f89f7cef65edd15d6d8fa516259714241
Author: Øyvind Kolås
diff -Nru babl-0.1.6/ChangeLog.pre-0-1 babl-0.1.10/ChangeLog.pre-0-1
--- babl-0.1.6/ChangeLog.pre-0-1 2011-09-29 17:08:54.000000000 +0000
+++ babl-0.1.10/ChangeLog.pre-0-1 1970-01-01 00:00:00.000000000 +0000
@@ -1,3345 +0,0 @@
-=========================== 0.1.0 released =============================
-
-2009-05-20 Martin Nordholts
-
- * configure.ac: Bump version to 0.1.0 and make sure the link name
- remains `babl-0.0'.
-
-2009-05-20 Martin Nordholts
-
- * docs/Makefile.am: Also add .libs directories to the BABL_PATHs
- so that e.g. the BablFishPath introspection chart is properly
- generated when doing a build, at least on Linux.
-
-2009-05-20 Martin Nordholts
-
- * docs/index-static.html.in: Convert SVN references to git
-
-2009-05-19 Martin Nordholts
-
- Update for 0.1.0 release.
-
- * AUTHORS
- * NEWS
-
-2009-05-16 Hubert Figuiere
-
- Add extern "C" to the header for C++ friendliness.
-
- * babl/babl.h
-
-2009-04-04 Martin Nordholts
-
- Bug 568576 – [PATCH] undefined operation fix
-
- Patch from Stanislav Brabec
-
- * babl/babl-fish-stats.c
- * tests/babl_fish_path_fitness.c
-
-2009-04-04 Martin Nordholts
-
- * AUTHORS: Update for 0.1.0 release.
-
-2009-04-04 Martin Nordholts
-
- * extensions/Makefile.am: extensions: util.h is part of the
- source. make distcheck passes now.
-
-2009-04-04 Martin Nordholts
-
- * babl/Makefile.am: Add forgotten header files that needs to be
- distributed with a release.
-
-2009-04-04 Martin Nordholts
-
- * Makefile.am: We don't have a COPYING.LESSER anymore
-
-2009-04-03 Martin Nordholts
-
- * NEWS: Updated for 0.1.0
-
-2009-03-31 Martin Nordholts
-
- * babl/babl-internal.h: Patch from Gary V. Vaughan. Avoid the need
- for define __func__ "unknown" on some vendor compilers
-
-2009-03-31 Martin Nordholts
-
- * configure.ac: Patch from Gary V. Vaughan. Don't try to pass gcc
- flags to vendor compilers
-
-2009-03-25 Martin Nordholts
-
- Patch from Gary V. Vaughan. Rewrite xml-insert.sh in portable
- bourne-shell
-
- * docs/Makefile.am
- * docs/tools/xml_insert.sh
-
-2009-03-25 Martin Nordholts
-
- Patch from Gary V. Vaughan. Don't use depecrated features or
- reduntant declarations in Makefile.am
-
- * babl/Makefile.am
- * babl/base/Makefile.am
- * docs/Makefile.am
- * tests/Makefile.am
-
-2009-03-25 Martin Nordholts
-
- Patch from Gary V. Vaughan. Support hpux use of shl load/unload
- and dsos with .sl suffixes
-
- * babl/babl-extension.c
- * configure.ac
- * extensions/Makefile.am
- * tests/Makefile.am
-
-2008-03-27 Kevin Cozens
-
- * configure.ac:
- * docs/graphics/Makefile.am: Applied patch from Matteo 'Peach'
- Pescarin which makes build use rsvg binary instead of inkscape
- to create pngs. Fixes bug 571516.
-
-2009-03-26 Manish Singh
-
- * configure.ac: BABL_VARIADIC_MACROS needs to be called before
- the libtool stuff (which implicitly calls AC_PROG_CXX)
-
-2009-03-25 Martin Nordholts
-
- Patch from Gary V. Vaughan. NULL-statements caused by trailing
- commas are non-portable.
-
- * babl/base/type-u16.c
- * babl/base/type-u32.c
- * babl/base/type-u8.c
- * extensions/CIE-Lab.c
-
-2009-03-25 Martin Nordholts
-
- Apply patch from Gary V. Vaughan that adds configure time checks
- for variadic macros and adapts the definitions of such macros
- in-code accordingly so that babl can be compiled on more
- platforms.
-
- * acinclude.m4
- * babl/babl-internal.h
- * configure.ac
-
-2009-03-25 Martin Nordholts
-
- * babl/babl-fish.c: Patch from Gary V. Vaughan. Some vendor
- compilers can't compile non-constant elements of compound struct
- initializers
-
-2009-03-25 Martin Nordholts
-
- Patch from Gary V. Vaughan. Some vendor C compilers choke on C++
- comments.
-
- * babl/babl-fish-path.c
- * babl/babl-fish-stats.c
- * babl/base/model-rgb.c
- * babl/base/rgb-constants.h
- * tests/babl_fish_path_fitness.c
-
-2009-03-25 Martin Nordholts
-
- * babl/babl-cpuaccel.h: Patch from Gary V. Vaughan. enum values
- must be less than INT_MAX (sign bit is illegal)
-
-2009-03-25 Martin Nordholts
-
- * babl/babl-ids.h: Patch from Gary V. Vaughan. Remove trailing
- comma in enum declaration.
-
-2009-03-25 Martin Nordholts
-
- Apply patch from Gary V. Vaughan that includes config.h in some
- files that missed it.
-
- * babl/base/conversions-type.c
- * babl/base/model-cmyk.c
-
-2009-02-24 Sven Neumann
-
- * */*.c: based on a patch from Gary V. Vaughan, include "config.h"
- before any other header file from all .c files.
-
- * babl/babl-internal.h
- * extensions/util.h: instead of including config.h from here, bail
- out if it wasn't included beforehand.
-
-2009-02-20 Martin Nordholts
-
- * babl/babl.h: Include headers in babl.h as system headers
-
-2009-01-26 Sven Neumann
-
- * babl/babl.h
- * babl/babl-format.c: renamed babl_format_get_num_of_components()
- to babl_format_get_n_components().
- (babl_format_has_alpha): changed accordingly.
-
-2009-01-24 Martin Nordholts
-
- Do a complete overhaul of the babl API.
-
- * babl/babl.h: Instead of including subsystem headers, declare the
- functions part of the API directly in the header. The public
- types, macros and the version header is still pulled in as
- includes but with inclusion guards that prevent them from being
- included separately by clients. Notable things removed from the
- API is internal class functions and the class instance structs.
-
- (babl_format_has_alpha)
- (babl_format_get_bytes_per_pixel)
- (babl_format_get_num_of_components)
- (babl_format_get_type): New getters to allow the Babl union to
- become opaque for clients.
-
- * babl/babl-types.h: New file with public types. Currently only
- the opaque Babl union and the linear and planar conversion
- function prototypes (which are not used in the API due to the use
- of varags but still part of the API for reference) are there. Make
- sure it's only included indirectly through babl.h.
-
- * babl/babl-macros.h
- * babl/babl-version.h.in: Make sure these are not included
- directly, only indirectly through babl.h.
-
- * babl/babl-main.h: Removed, function declarations are in babl.h
- now.
-
- * babl/babl-internal.h: Include the headers we now consider
- internal, mostly the different class headers.
-
- * babl/babl-class.h: The "named class" function declarations are
- now in the public header so move them away from this internal
- header.
-
- * babl/babl-image.h
- * babl/babl-format.h
- * babl/babl-fish.h
- * babl/babl-extension.h
- * babl/babl-conversion.h
- * babl/babl-component.h
- * babl/babl-classes.h
- * babl/babl-introspect.h
- * babl/babl-sampling.h
- * babl/babl-model.h
- * babl/babl-type.h: Adapt to above changes, move relevant things to babl.h
-
- * babl/base/formats.c
- * babl/base/model-gray.c
- * babl/base/model-rgb.c
- * babl/base/model-ycbcr.c
- * babl/base/type-float.c: Explicitly #include "babl-classes.h".
-
- * babl/babl-internal.c: s/babl_name/babl_get_name/
-
- * babl/babl-format.c
- (babl_format_has_alpha)
- (babl_format_get_bytes_per_pixel)
- (babl_format_get_num_of_components)
- (babl_format_get_type): Implement these.
-
- * babl/Makefile.am: Don't install the now internal headers and
- add, remove and install the other headers according to above
- changes.
-
-2009-01-18 Martin Nordholts
-
- Since babl_foo_from_id() will not be part of the public API we can
- revert to having the short variant babl_foo() instead of
- babl_foo_from_name().
-
- * babl/babl-class.h
- * babl/babl-component.h
- * babl/babl-conversion.c
- * babl/babl-conversion.h
- * babl/babl-extension.h
- * babl/babl-fish-path.c
- * babl/babl-fish.c
- * babl/babl-format.c
- * babl/babl-format.h
- * babl/babl-image.c
- * babl/babl-internal.h
- * babl/babl-model.c
- * babl/babl-model.h
- * babl/babl-type.c
- * babl/babl-type.h
- * extensions/CIE-Lab.c
- * extensions/frequency.c
- * extensions/gegl-fixups.c
- * extensions/gggl-lies.c
- * extensions/gggl.c
- * extensions/gimp-8bit.c
- * extensions/naive-CMYK.c
- * extensions/sse-fixups.c
- * tests/grayscale_to_rgb.c
- * tests/rgb_to_bgr.c
- * tests/rgb_to_ycbcr.c
-
-2009-01-18 Martin Nordholts
-
- Add include guards.
-
- * babl/babl-component.h
- * babl/babl-conversion.h
- * babl/babl-extension.h
- * babl/babl-fish.h
- * babl/babl-format.h
- * babl/babl-image.h
- * babl/babl-model.h
- * babl/babl-sampling.h
- * babl/babl-type.h
-
-2009-01-18 Martin Nordholts
-
- * babl/babl-db.h: Namespace the include guard.
-
-2009-01-18 Martin Nordholts
-
- Do a s/babl_destroy/babl_exit since 'destroy' is better paired
- with a 'create' and other libraries also use the 'init'/'exit'
- pair, including GEGL. Keep a define for babl_destroy unless
- BABL_DISABLE_DEPRECATED is defined.
-
- * babl/babl-main.h
- * babl/babl.c
- * tests/babl-html-dump.c
- * tests/babl_class_name.c
- * tests/babl_fish_path_dhtml.c
- * tests/babl_fish_path_fitness.c
- * tests/conversions.c
- * tests/formats.c
- * tests/grayscale_to_rgb.c
- * tests/introspect.c
- * tests/models.c
- * tests/nop.c
- * tests/rgb_to_bgr.c
- * tests/rgb_to_ycbcr.c
- * tests/sanity.c
- * tests/srgb_to_lab_u8.c
- * tests/types.c
-
-2009-01-18 Martin Nordholts
-
- * babl/babl-classes.h: New file collecting the type constants,
- includes and the union for the babl classes. When adding a new
- class this is the only installed header file that requires
- modification.
-
- * babl/babl-class.h: Move the class type enums to the new file.
-
- * babl/babl.h: Include babl-classes.h instead of each class on its
- own, and move the Babl union to the new file.
-
- * babl/Makefile.am: Add the new file.
-
-2009-01-18 Sven Neumann
-
- * babl/babl-component.h
- * babl/babl-conversion.h
- * babl/babl-extension.h
- * babl/babl-format.h
- * babl/babl-model.h
- * babl/babl-type.h: allow to disable the defines that were added
- for backward compatibility by definining BABL_DISABLE_DEPRECATED.
-
- * babl/babl-image.h: removed trailing whitespace.
-
-2009-01-17 Martin Nordholts
-
- Add #define babl_foo babl_foo_from_name macros, that should fix
- most builds that broke due to the below refactoring.
-
- * babl/babl-component.h
- * babl/babl-conversion.h
- * babl/babl-extension.h
- * babl/babl-format.h
- * babl/babl-model.h
- * babl/babl-type.h
-
-2009-01-17 Martin Nordholts
-
- s/babl_image/babl_image_new/
-
- * babl/babl-fish-reference.c
- * babl/babl-image.c
- * babl/babl-image.h
-
-2009-01-17 Martin Nordholts
-
- s/babl_foo_init/babl_foo_class_init/
- s/babl_foo_destroy/babl_foo_class_destroy/
- s/babl_foo_each/babl_foo_class_for_each/
- s/babl_foo/babl_foo_from_name/
- s/babl_foo_id/babl_foo_from_id/
-
- * babl/babl-class.h
- * babl/babl-conversion.c
- * babl/babl-core.c
- * babl/babl-fish-path.c
- * babl/babl-fish-reference.c
- * babl/babl-fish-stats.c
- * babl/babl-fish.c
- * babl/babl-format.c
- * babl/babl-image.c
- * babl/babl-internal.h
- * babl/babl-introspect.c
- * babl/babl-model.c
- * babl/babl-sampling.c
- * babl/babl-sanity.c
- * babl/babl-type.c
- * babl/babl.c
- * babl/base/formats.c
- * babl/base/model-gray.c
- * babl/base/model-rgb.c
- * babl/base/model-ycbcr.c
- * babl/base/type-float.c
- * babl/base/type-u16.c
- * babl/base/type-u32.c
- * babl/base/type-u8.c
- * extensions/CIE-Lab.c
- * extensions/frequency.c
- * extensions/gegl-fixups.c
- * extensions/gggl-lies.c
- * extensions/gggl.c
- * extensions/gimp-8bit.c
- * extensions/naive-CMYK.c
- * extensions/sse-fixups.c
- * tests/babl-html-dump.c
- * tests/babl_fish_path_fitness.c
- * tests/conversions.c
- * tests/formats.c
- * tests/grayscale_to_rgb.c
- * tests/models.c
- * tests/rgb_to_bgr.c
- * tests/rgb_to_ycbcr.c
- * tests/types.c
-
-2009-01-17 Martin Nordholts
-
- * babl/babl-class.h: Remove babl_name() and babl_introspect()
- which slipped in here.
-
-2009-01-17 Martin Nordholts
-
- * babl/babl.h: Don't #include
-
- * babl/base/formats.c
- * babl/base/model-gray.c
- * babl/base/model-rgb.c
- * extensions/gegl-fixups.c
- * extensions/sse-fixups.c: #include
-
-2009-01-17 Martin Nordholts
-
- Make babl.h look clean.
-
- * babl/babl-introspect.h: New installed header for babl_name() and
- babl_introspect().
-
- * babl/babl.h: Include it.
-
- * babl/Makefile.am: Add it.
-
-2009-01-17 Martin Nordholts
-
- * babl/babl-internal.h: Formating.
-
-2009-01-17 Martin Nordholts
-
- * babl/babl-class.h: New installed header file containing class
- and typesystem definitions and types.
-
- * babl/babl.h: Include it.
-
- * babl/Makefile.am: Add it.
-
-2009-01-17 Martin Nordholts
-
- * babl/babl.h: Move up forward declaration of BablList.
-
- * babl/babl-list.h: Completely rely on that declaration.
-
-2009-01-17 Martin Nordholts
-
- * babl/babl.h: Don't have BABL_ALPHA_THRESHOLD public yet.
-
- * babl/base/util.h: Put it here for now instead.
-
-2009-01-17 Martin Nordholts
-
- Instead of having BABL_CLASS() plus variants and making the macros
- expand to different things depending on if they are used in a
- header or a .c file, have two versions: BABL_CLASS_DECLARE() and
- BABL_CLASS_IMPLEMENT(). This enables further refactorisation of
- the babl.h header.
-
- * babl/babl.h: Do the name changes and remove the unpleasant
- #undefs at the bottom.
-
- * babl/babl-internal.h: Do the name changes.
-
- * babl/babl-component.[ch]
- * babl/babl-conversion.[ch]
- * babl/babl-extension.[ch]
- * babl/babl-fish.[ch]
- * babl/babl-format.[ch]
- * babl/babl-image.h
- * babl/babl-model.[ch]
- * babl/babl-sampling.h
- * babl/babl-type.[ch]: Adjust to changes.
-
-2009-01-17 Martin Nordholts
-
- Don't redeclare functions declared with the BABL_CLASS() or
- BABL_NAMED_CLASS() macros.
-
- * babl/babl-component.h
- * babl/babl-conversion.h
- * babl/babl-extension.h
- * babl/babl-fish.h
- * babl/babl-format.h
- * babl/babl-image.h
- * babl/babl-model.h
- * babl/babl-sampling.h
- * babl/babl-type.h
-
-2009-01-17 Martin Nordholts
-
- * babl/babl-main.h: New installed file with babl_init() and
- babl_destroy() declarations.
-
- * babl/babl.h: Include it.
-
- * babl/Makefile.am: Add it.
-
-2009-01-17 Martin Nordholts
-
- * babl/babl-macros.h: New installed header file that contains
- portability macros.
-
- * babl/babl.h: Include it and don't define portability macros
- here.
-
- * babl/Makefile.am: Add it.
-
-2009-01-15 Martin Nordholts
-
- * babl/babl.h: Make BablClassType an int again, it doesn't make
- sense as an enum as the set of class types is not a natural
- predefined set.
-
-2009-01-14 Martin Nordholts
-
- * babl/babl.h: Make BablClassType an enum instead of an unsigned
- int contaning enum values.
-
-2009-01-14 Martin Nordholts
-
- * babl/babl.h: Use a lowercase 'a' in 0xbab100.
-
-2009-01-14 Martin Nordholts
-
- * babl/babl.h: Don't document forward declarations and move them
- down a bit to make them less eminent.
-
-2009-01-14 Martin Nordholts
-
- * babl/babl.h
- * babl/babl-internal.h: Remove BABL_HARD_MAX_PATH_LENGTH from
- here, it's only for internal use.
-
- * babl/babl-fish-path.c: #define BABL_HARD_MAX_PATH_LENGTH locally
- here.
-
-2009-01-14 Martin Nordholts
-
- * babl/babl.h (BABL_ALPHA_THRESHOLD): Instead of an arbitrary
- threshold, use one hundredth of the channel intensity resolution
- when using 16 bit integers i.e. 0.01 / (2^16 - 1).
-
-2008-12-08 Martin Nordholts
-
- * babl/babl-internal.h (babl_assert): Don't just eek when an
- assertion fails, also say exactly what failed.
-
-2008-11-16 Øyvind Kolås
-
- * babl/babl-fish-stats.c: (legal_error), (each_conv): show in red the
- conversions that are worse than the current BABL_TOLERANCE instead of
- the earlier arbitrary 0.01.
-
-2008-11-16 Martin Nordholts
-
- * babl/babl-fish-path.c: Use the default babl tolerance level if
- BABL_TOLERANCE is the empty string so that we don't get a
- tolerance level of 0.0 in that case.
-
-2008-11-16 Martin Nordholts
-
- * babl/babl.h: Add #define BABL_ALPHA_THRESHOLD which is the alpha
- threshold used in the reference implementation for
- un-pre-multiplication of color data.
-
- * babl/base/model-rgb.c
- * babl/base/model-gray.c
- * extensions/gegl-fixups.c: Use the define, a consistent alpha
- threshold improves accurucy of conversions.
-
-2008-11-16 Martin Nordholts
-
- * extensions/gegl-fixups.c (conv_rgbAF_sdl32)
- * babl/base/model-gray.c (premultiplied_to_non_premultiplied):
- Make un-pre-multiplication with close-to-zero alpha values result
- in complete black instead of a bit brigher than black.
-
-2008-11-08 Øyvind Kolås
-
- * extensions/gegl-fixups.c: (conv_rgbAF_lrgba8): use the lookup tables
- to speed up the conversion 8still error of 0.002677 though).
-
-2008-11-06 Øyvind Kolås
-
- * extensions/gegl-fixups.c: (conv_rgbAF_rgbaF),
- (conv_rgbAF_lrgba8): make all components 0.0 when alpha < 0.00001.
-
-2008-11-04 Øyvind Kolås
-
- * extensions/gegl-fixups.c: (conv_rgbAF_rgbaF),
- (conv_rgbAF_lrgba8), (init): added some more missing conversions.
-
-2008-11-04 Øyvind Kolås
-
- * extensions/gegl-fixups.c: (conv_rgbaF_rgbAF), (init): added missing,
- needed conversion.
-
-2008-10-01 Øyvind Kolås
-
- * COPYING.LESSER: renamed to ..
- * COPYING:
-
-2008-07-09 Sven Neumann
-
- * babl/base/Makefile.am: `:='-style assignments are not portable
-
-2008-07-04 Sven Neumann
-
- * extensions/Makefile.am: also use AM_CPPFLAGS and CPPFLAGS for
- building sse-fixups.
-
-2008-07-01 Øyvind Kolås
-
- * babl/babl-cpuaccel.c: added typedef size_t gsize to the set of
- gtypes lifted from glib. spotted by Marianne Gagnon.
-
-2008-07-01 Øyvind Kolås
-
- * extensions/Makefile.am: applied patch from dmacks at netspace.org
- cleaning up some of the build system.
-
-2008-06-28 Zhang Junbo
-
- * extensions/frequency.c: changed RrRiG... back to RrGrBrArRiGiBiAi.
-
-2008-06-27 Zhang Junbo
-
- * extensions/frequency.c: some work on frequency_to_rgba.
-
-2008-06-27 Zhang Junbo
-
- * extensions/frequency.c: implemented frequency_to_rgba.
-
-2008-06-22 Zhang Junbo
-
- * extensions/frequency.c: changed RrGrBr... into RrRiGrGiBrBiArAi.
-
-2008-06-22 Zhang Junbo
-
- * extensions/frequency.c: added the format "frequency double".
-
-2008-06-16 Sam Hocevar
-
- * Makefile.am: ensure that the "w3m must be available" message is
- properly displayed: dist-hook is only called after builddir is filled.
-
-2008-06-13 Øyvind Kolås
-
- * extensions/frequency.c: added dummy model "frequency" and dummy
- format "frequency float" to be used purely for creating, storing,
- accessing but not converting to and from normal tristimulus spaces.
- can be used by GeglBuffer to create frequency domain buffers that
- are processed in a similar manner to normal buffers.
-
-2008-06-12 Øyvind Kolås
-
- * configure.ac: post release increment of version to 0.0.23
-
-=========================== 0.0.22 released =============================
-
-2008-06-12 Øyvind Kolås
-
- * configure.ac: incremented version.
-
-2008-06-12 Øyvind Kolås
-
- * docs/index-static.html.in: moved the babl directory overview here
- from the GEGL site.
-
-2008-06-12 Øyvind Kolås
-
- * docs/index-static.html.in: fixed indentation and misplaced ' spotted
- by Jan Heller.
-
-2008-06-12 Øyvind Kolås
-
- * docs/index-static.html.in: moved the BABL_TOLERANCE documentation
- paragraph in under Environment heading.
-
-2008-06-12 Øyvind Kolås
-
- * docs/index-static.html.in: removed markup mistake that introduced
- horizontal scrolling in gecko.
-
-2008-06-12 Øyvind Kolås
-
- * babl/babl-fish-path.c: (legal_error): s/BABL_TOLERANCE/
- * docs/index-static.html.in: s/BABL_ACCURACY/BABL_TOLERANCE/
-
-2008-06-12 Øyvind Kolås
-
- * babl/babl-fish-path.c: (legal_error): s/BABL_ERROR/BABL_ACCURACY/
- * docs/index-static.html.in: s/BABL_ERROR/BABL_ACCURACY/
-
- * AUTHORS: added a missing space.
-
-2008-06-12 Øyvind Kolås
-
- * NEWS: added a html comment shortening the news shown.
- * docs/index-static.html.in: assed link to changelog in svn after
- news. Updated urls with s/viewcvs/viewvc/.
-
-2008-06-12 Øyvind Kolås
-
- * Makefile.am: added TODO
- * docs/index-static.html.in: moved TODO list from here
- * TODO: to here, also edited it a bit.
- * docs/Makefile.am: include TODO in result.
-
-2008-06-12 Øyvind Kolås
-
- * docs/index-static.html.in: reindented code, documented BABL_ERROR.
-
-2008-06-12 Øyvind Kolås
-
- * AUTHORS: updated.
- * NEWS: updated.
- * docs/index-static.html.in: improved introduction and feature list.
-
-2008-06-12 Jan Heller
-
- * extensions/sse-fixups.c (conv_rgbaF_linear_rgb8_linear),
- (conv_rgbaF_linear_rgba8_linear): Added fallback non-SSE routine
- if the input buffer is not aligned to 16 bytes.
-
-2008-06-05 Jan Heller
-
- * AUTHORS: Updated contact info.
-
-2008-06-03 Jan Heller
-
- * INSTALL.in: Updated download link.
-
-2008-06-03 Jan Heller
-
- babl_get_version () moved into separate source file.
-
- * babl/Makefile.am: Added babl-version.c.
- * babl/babl-version.c (babl_get_version): Implemented.
- * babl/babl-version.h.in: Added babl_get_version () declaration.
- * babl/babl.c (babl_destroy): Removed babl_get_version ().
- * babl/babl.h: Removed babl_get_version () declaration.
-
-2008-06-03 Jan Heller
-
- * babl/babl-version.h.in: Added.
-
-2008-06-03 Jan Heller
-
- Added babl_get_version () to the public API.
-
- * babl/Makefile.am: Added babl-version.h to library_include_HEADERS.
- * babl/babl-version.h.in: Added macros to expand to babl version
- information.
- * babl/babl.c (babl_get_version): Implemented.
- * babl/babl.h: Include babl-version.h, declare babl_get_version ().
- * configure.ac: Added babl-version.h to AC_CONFIG_FILES.
-
-2008-05-23 Jan Heller
-
- * extensions/sse-fixups.c (init): Fixed conditionally compiled code.
-
-2008-05-23 Jan Heller
-
- Added support for CPU acceleration, RGBA float -> RGB u8 and
- RGBA float -> RGBA u8 SSE accelerated conversions.
-
- * babl/Makefile.am: Added babl-cpuaccel.[ch].
- * babl/babl-cpuaccel.h:
- * babl/babl-cpuaccel.c (babl_cpu_accel_get_support),
- (babl_cpu_accel_set_use), (arch_get_vendor), (arch_accel_intel),
- (arch_accel_amd), (arch_accel_centaur), (arch_accel_cyrix),
- (sigill_handler), (arch_accel_sse_os_support), (arch_accel),
- (cpu_accel): Runtime CPU detection code. Ported from GIMP.
- * babl/babl-internal.h: Include babl-cpuaccel.h.
- * babl/babl-memory.c (babl_malloc): Make babl_malloc align memory to
- BABL_ALIGN==16 boundaries.
- * babl/babl.c (babl_init): Enabled CPU acceleration.
- * configure.ac: Added compile time MMX/SSE/AltiVec detection. Ported
- from GIMP.
- * extensions/Makefile.am: Added SSE_EXTRA_CFLAGS for sse-fixups.c
- compilation.
- * extensions/sse-fixups.c (conv_rgbaF_linear_rgb8_linear),
- (conv_rgbaF_linear_rgba8_linear), (init): Added RGBA float -> RGB u8
- and RGBA float -> RGBA u8 SSE accelerated conversions.
-
-2008-05-22 Jan Heller
-
- * extensions/util.h: changed fallback macro to have the
- same return type as rint().
-
-2008-05-21 Sven Neumann
-
- * babl/babl-internal.h (rint): changed fallback macro to have the
- same return type as rint().
-
-2008-05-21 Jan Heller
-
- * babl/babl-internal.h:
- * babl/base/type-u16.c:
- * babl/base/type-u32.c:
- * babl/base/type-u8.c:
- * extensions/CIE-Lab.c:
- * extensions/gegl-fixups.c:
- * extensions/gggl-lies.c:
- * extensions/gggl.c:
- * extensions/gimp-8bit.c:
- * extensions/util.h: fallback to floor function when rint function
- is not available.
-
- * configure.ac: added check for rint function.
-
-2008-05-20 Jan Heller
-
- * extensions/gimp-8bit.c (conv_rgbaF_linear_rgb8_linear),
- (conv_rgbaF_linear_rgba8_linear), (init): added naive versions
- of respective conversions.
-
-2008-05-14 Sven Neumann
-
- * babl/babl-format.c (format_new): initialize format.visited.
-
- * babl/babl-format.h
- * babl/babl-fish-path.c: formatting.
-
-2008-04-16 Sven Neumann
-
- * babl/babl.h: formatting.
-
-2008-04-16 Øyvind Kolås
-
- * babl/babl.h: split up into ...
- Separate header files.
-
- * babl/babl-component.h:
- * babl/babl-conversion.h:
- * babl/babl-extension.h:
- * babl/babl-fish.h:
- * babl/babl-format.h:
- * babl/babl-image.h:
- * babl/babl-model.h:
- * babl/babl-sampling.h:
- * babl/babl-type.h:
-
- * babl/Makefile.am: install new headers.
-
-2008-04-15 Øyvind Kolås
-
- * babl/Makefile.am: removed babl-classes.h
- * babl/babl-classes.h: removed and mostly folded into ...
- * babl/babl.h: .. this file, which has been reorganized to contain
- each separate class by itself.
- * babl/babl-internal.h: simplified code renamed BABL_CLASS_TEMPLATE to
- be just BABL_CLASS or BABL_CLASS_MINIMAL.
-
- * babl/babl-fish.c: (babl_fish): do not accept varargs, use use
- BABL_CLASS_MINIMAL.
-
- * babl/babl-component.c:
- * babl/babl-conversion.c:
- * babl/babl-extension.c:
- * babl/babl-format.c:
- * babl/babl-model.c:
- * babl/babl-type.c: use BABL_CLASS instead of BABL_CLASS_TEMPLATE
-
- * babl/babl-hash-table.h:
- * babl/babl-list.h:
- * babl/babl-db.h: changed include warning since babl-classes doesn't
- exist anymore.
-
-2008-04-15 Sven Neumann
-
- * extensions/util.h
- * babl/*.[ch]: removed trailing whitespace.
-
-2008-04-15 Sven Neumann
-
- * babl/babl-fish-path.c (init_path_instrumentation): this function
- has no return value, declare it as void.
-
-2008-04-13 Øyvind Kolås
-
- Applied patch from Jan Heller.
-
- * babl/babl-fish-path.c: (get_conversion_path), (babl_fish_path),
- (test_create), (init_path_instrumentation),
- (destroy_path_instrumentation), (get_path_instrumentation): Improved
- fish path instrumentation during the search for a new one to optimize
- for speed. Added logic to disallow creation of a fish path that is
- actually slower than appropriate reference fish.
-
- * babl/babl-util.[ch]: (babl_process_cost): New function for unified
- timing formula for babl processings.
-
- * babl/babl-conversion.c: (babl_conversion_error): Make use of the
- new babl_process_cost function.
-
- * extensions/gimp-8bit.c: Added a function declaration to prevent
- compiler warning.
-
-2008-04-08 Øyvind Kolås
-
- Applied patch from Jan Heller that improves logic of go_fishing code
- in babl-fish.c. The current code searches list of all fishes while
- looking for suitable preexistent BABL_FISH_PATH instance. The new code
- only searches relevant part of database's hash table. Further, the
- current code searches for fish path every time such a babl fish is
- requested, even though the same fish path has been requested before
- and not found. The new code creates dummy BABL_FISH instance with
- appropriate source/destination formats and inserts it into the fish
- database to indicate that fish path has been searched for and not
- found.
-
- * babl/babl-fish.c: (find_fish_path), (find_memcpy_fish),
- (babl_fish_get_id), (babl_fish):
- * babl/babl-fish-path.c: (babl_fish_path):
- * babl/babl-fish-reference.c: (babl_fish_reference):
- * babl/babl-fish-simple.c: (babl_fish_simple):
- * babl/babl-internal.h:
-
-2008-04-06 Sven Neumann
-
- * acinclude.m4: new file defining BABL_DETECT_CFLAGS() macro.
-
- * configure.ac: set CFLAGS to get some extra compiler warnings.
-
- * babl/babl-fish-stats.c (conversions): fixed old-style function
- definition.
-
- * Makefile.am: formatting.
-
-2008-04-02 Mukund Sivaraman
-
- Sparse fixes.
-
- * babl/babl-internal.h: fflush() takes pointer.
-
- * babl/babl-conversion.c: Don't mix code and declarations.
-
- * babl/babl-fish-reference.c: Fixed array assignment.
-
-2008-04-03 Øyvind Kolås
-
- Applied patch from Jan Heller that ports BablFishPath class to the new
- list API and the list API is a bit expanded. Further, the algorithm
- for generating the shortest conversion path is reformulated to be more
- readable and comprehensible and thoroughly commented. The algorithm
- for processing the conversion paths is reformulated and commented.
- Also contains minor readability cleanups and speedups.
-
- * babl/babl-classes.h:
- * babl/babl-conversion.c:
- * babl/babl-db.c:
- * babl/babl-fish-path.c:
- * babl/babl-fish-stats.c:
- * babl/babl-fish.c:
- * babl/babl-list.c:
- * babl/babl-list.h:
- * tests/babl_fish_path_fitness.c:
-
-2008-04-01 Øyvind Kolås
-
- * babl/babl-classes.h:
- * babl/babl-conversion.c:
- * babl/babl-db.c:
- * babl/babl-fish-path.c:
- * babl/babl-fish.c:
- * babl/babl-format.c:
- * babl/babl-internal.h:
- * babl/babl-introspect.c:
- * babl/babl-list.c:
- * babl/babl-list.h:
- * babl/babl-model.c:
- * babl/babl-sampling.c:
- * babl/babl-sanity.c:
- * babl/babl-type.c:
- * babl/babl-util.[ch]: applied patch from Jan Heller that improves
- readability by using the newly introduced BablList structure.
-
-2008-03-31 Sven Neumann
-
- * AUTHORS: added Jan Heller and obfuscated the email addresses.
-
-2008-03-29 Sven Neumann
-
- * babl/babl-component.c
- * babl/babl-conversion.c
- * babl/babl-db.c
- * babl/babl-extension.c
- * babl/babl-fish-path.c
- * babl/babl-fish-reference.c
- * babl/babl-fish-simple.c
- * babl/babl-format.c
- * babl/babl-model.c
- * babl/babl-type.c: applied patch from Jan Heller that changes the
- code to test for a pre-existent instance of a babl class in the
- database before creating a new one.
-
-2008-03-24 Tor Lillqvist
-
- * babl/babl-type.c: Make the "test" array static.
-
-2008-03-23 Martin Nordholts
-
- * babl/babl-memory.[ch]: typedef:ed BABL free and malloc function
- pointers.
-
-2008-03-22 Sven Neumann
-
- Applied patch from Jan Heller that introduces list and hash table
- functionality and changes the babl database to use coalesced
- hashing (bug #523507). This considerably improves BABL
- performance.
-
- * babl/Makefile.am
- * babl/babl-list.[ch]
- * babl/babl-hash-table.[ch]: new files providing list and hash
- table functionality.
-
- * babl/babl-internal.h: include the new header files.
-
- * babl/babl-db.[ch]: use the new code.
-
- * babl/babl-fish.c: changed accordingly.
-
-2008-03-16 Mukund Sivaraman
-
- * babl/babl-extension.c: getenv() can return NULL.
-
- * babl/babl-memory.c: Check for NULL in babl_strcat().
-
-2008-03-16 Mukund Sivaraman
-
- * babl/babl-image.c: Added missing va_end()s.
-
-2008-03-16 Mukund Sivaraman
-
- * babl/babl-extension.c: Added missing dlclose()s.
-
-2008-03-02 Øyvind Kolås
-
- * babl.pc.in: do not add @DL_LIBS@ to link line of babl.
-
-2008-03-02 Øyvind Kolås
-
- * tests/Makefile.am: applied patch from dmacks@netspace.org for
- bug #519794.
-
-2008-03-02 Øyvind Kolås
-
- Applied patch from dmacks@netspace.org closing bug #519796
- * configure.ac:
- * babl/Makefile.am:
- * tests/Makefile.am: Only -ldl if required, passed automatically via
- $LIBS
-
-2008-02-27 Øyvind Kolås
-
- * configure.ac: post release version increment to 0.0.21
-
-=========================== 0.0.20 released =============================
-
-2008-02-27 Øyvind Kolås
-
- * NEWS: updated for 0.0.20 release.
- * configure.ac: incremented version.
-
-2008-02-27 Øyvind Kolås
-
- * docs/Makefile.am: use mktemp instead of tempfile.
-
-2008-02-27 Øyvind Kolås
-
- * extensions/Makefile.am: -I$(top_builddir) to be able to include
- config.h
-
-2008-02-19 Sven Neumann
-
- * babl/babl-fish-path.c (test_create): add some extra pixels
- outside the valid range to fix issues with wrong clamping of
- conversions.
-
-2008-02-19 Sven Neumann
-
- * babl/babl-fish-path.c: renamed test_pixels to num_test_pixels.
-
-2008-02-19 Sven Neumann
-
- * babl/babl-fish-path.c (test_create): reverted previous change as
- it introduces the risk of not testing any values between 0.0 and 1.0.
-
-2008-02-19 Øyvind Kolås
-
- * babl/babl-fish-path.c: (test_create): make the testbuffer contain
- values in the range -0.25 .. 1.75 instead of 0.0 .. 1.0, might fix
- issues with wrong clamping of float->8bit conversions.
-
-2008-02-15 Øyvind Kolås
-
- * configure.ac: cleaned up win32 detection vs plug-in compilation
- specifics, added DYNAMICLIB paramter for gcc which defaults to -shared
- for win32 and -dynamiclib for darwin.
- * extensions/Makefile.am: use $(DYNAMICLIB) instead of -shared.
-
-2008-02-11 Kevin Cozens
-
- * configure.ac: Set shrext to ".dylib" for Darwin (ie. Mac OS).
-
- * babl/babl-extension.c: Use BABL_DIR_SEPARATOR instead of "/".
-
-2008-01-22 Sven Neumann
-
- * extensions/gimp-8bit.c (u8_gamma_2_2_to_float_linear): use the
- correct lookup table.
-
-2008-01-20 Øyvind Kolås
-
- Always use BablFishPath's for accepted conversions. The path
- construction code is the location of the regression test, an
- earlier (now unneeded) optimization allowed using the first
- and best conversion available. The (not in bugzilla afair) bug
- manifest by this depended on the order of .so's on the file system
- to manifest itself.
-
- * babl/babl-fish.c: (go_fishing): only accepts paths when we go
- fishing for existing conversions.
- (babl_fish): elaborated a comment about why we avoid shortcut
- conversions and only paths.
-
-2008-01-17 Øyvind Kolås
-
- Applied patch from Deji Akingunola to make babl
- correctly pick up the path to the extensions on 64bit systems. Fixes
- bug #510038
-
- * babl/Makefile.am: added -DLIBDIR
- * babl/babl-extension.c: use libdir and not PREFIX "/lib" when
- defining the default BABL_PATH.
-
-2008-01-10 Sven Neumann
-
- * extensions/gimp-8bit.c: added extension to speed up code paths
- that are executed by the GIMP/GEGL hybrid. So far only 8bit to
- float conversions are handled.
-
-2008-01-10 Sven Neumann
-
- * extensions/Makefile.am: extended CFLAGS so that config.h can be
- included.
-
- * extensions/*.c: fixed up includes.
-
- * extensions/gegl-fixups.c: use linear <-> gamma conversions from
- base/util.c.
-
-2008-01-07 Kevin Cozens
-
- * babl/babl-extension.c (babl_extension_load_dir): Reverted previous
- change. BABL hasn't been updated to use gmodule (yet).
-
-2008-01-07 Kevin Cozens
-
- * babl/babl-extension.c (babl_extension_load_dir): Use G_MODULE_SUFFIX
- instead of a hard-coded suffix.
-
-2008-01-06 Sven Neumann
-
- * extensions/CIE-Lab.c: made internal functions static.
-
-2007-12-30 Sven Neumann
-
- * extensions/gggl-lies.c (table_init): completely fill the lookup
- tables for conversion from float to integer.
-
-2007-12-30 Kevin Cozens
-
- * extensions/Makefile.am: Use SHREXT instead of hard-coded ".so".
-
-2007-12-30 Øyvind Kolås
-
- * configure.ac: post release version increment to 0.0.19
-
-=========================== 0.0.18 released =============================
-
-2007-12-30 Øyvind Kolås
-
- * NEWS: updated for 0.0.18 release
- * configure.ac: increased version to 0.0.18 for release.
-
-2007-12-29 Michael Natterer
-
- * babl/babl-fish-path.c (chain_contains_fmt): one const was
- forgotten.
-
-2007-12-29 Øyvind Kolås
-
- * babl/babl.h:
- * babl/babl-classes.h:
- * babl/babl-fish-path.c:
- * babl/babl-fish-reference.c:
- * babl/babl-fish.c:
- * babl/babl-internal.[ch]: Const'ified code with Babl*'s refering to
- formats.
-
-2007-02-17 Øyvind Kolås
-
- * configure.ac: post release version increment to 0.0.17
-
-=========================== 0.0.16 released =============================
-
-2007-02-17 Øyvind Kolås
-
- * configure.ac: increased version to 0.0.16 for release.
-
-2007-11-25 Øyvind Kolås
-
- * babl/babl-image.c: (babl_image_from_linear): do additional casts to
- silence warnings from compiler.
-
-2007-11-25 Øyvind Kolås
-
- * docs/index-static.html.in: changed documentation to use babl_format
- instead of passing naked strings into babl_fish, (both will work,
- but using babl_format is a bit saner).
-
-2007-11-25 Øyvind Kolås
-
- * NEWS: updated.
- * Makefile.am: added COPYING and COPYING.LESSER
- * docs/Makefile.am: added COPYING and COPYING.LESSER
-
-2007-11-13 Øyvind Kolås
-
- * babl/babl-fish.c: (babl_fish_process): swapped source and
- destination around in memcpy.
-
-2007-11-13 Øyvind Kolås
-
- * babl/babl-fish.c: (go_fishing): optimized fishing when looking
- up existing fish (should perhaps be moved to lists going from given
- formats, similar to how conversions are added there instead.) Made
- go_fishing accept BABL_FISH_REFERENCE when source and desintation
- formats are equal.
- (babl_fish_process): removed most of the need for BablImage for
- linear buffers, do a memcpy when source and destination formats
- are equal (and we're a BABL_FISH_REFERENCE).
- * babl/babl-db.[ch]: moved the BablDb struct out into public to
- allow faster iteration through it.
-
-2007-11-11 Øyvind Kolås
-
- * Modified copyright statement to refer to an URL instead of a civic
- address for the Free Software Foundation and the text of the license.
-
-2007-11-11 Øyvind Kolås
-
- Keep a cache of the linear version of BablImage's needed for
- BablFormats around. This reduces the constant overhead for
- conversions.
-
- * babl/babl-classes.h: added .image_template field to BablFormat.
- * babl/babl-format.c: (format_new): make .image_template NULL by
- defualt.
- * babl/babl-image.c: (babl_image_from_linear): use .image_template if
- available instead of creating our own BablImage from scratch.
- * babl/babl-memory.c: (babl_free): special case freeing of BablImage
- and BablFormat to do the extra juggling needed for the image_template
- cache.
-
-2007-11-10 Øyvind Kolås
-
- * babl/babl-fish-stats.c: (table_destination_each): improve
- visualization of results.
-
-2007-11-10 Øyvind Kolås
-
- * babl/babl-db.c: (babl_db_each_inline), (babl_db_exist): Optimized
- lookup by adding an inline version of babl_db_each specially for
- babl_db_exist.
-
-2007-11-10 Øyvind Kolås
-
- Do not accept BABL_FISH_REFERENCE as a valid result when fishing for
- existing fishes.
-
- * babl/babl-fish.c: (fishing_result_examine), (babl_fish):
-
-2007-11-10 Øyvind Kolås
-
- * docs/index-static.html.in: documented BABL_STATS environment
- variable.
-
-2007-11-09 Øyvind Kolås
-
- Upgraded babl from LGPLv2 to LGPLv3. Copyright statements in all files
- have been updated to reflect this change, the permission to use leter
- versions of the GNU licenses have been retained in all instances.)
-
- * COPYING: changed to GPLv3
- * COPYING.LESSER: added (LGPLv3's overlay over GPLv3)
-
-2007-10-30 Michael Schumacher
-
- * configure.ac: DIR_SEP='\' is evil, use DIR_SEP='\\' instead.
-
-2007-09-14 Kevin Cozens
-
- * configure.ac: Define name of babl library file.
-
- * babl/babl-extension.c: Use name of babl library defined when
- ./configure was run.
-
-2007-09-14 Kevin Cozens
-
- Changes to let BABL find its extensions at run time when the
- BABL_PATH environment variable is not set.
-
- * configure.ac: Don't specify BABL_PATH in here. Renamed
- BABL_LIST_SEPERATOR to BABL_DIR_SEPARATOR.
-
- * babl/babl-extension.c: Include /lib as part of default BABL_PATH.
- Renamed #define's used to specify the path and directory separators.
- Use the values from config.h that were set when ./configure was run.
-
-2007-09-11 Kevin Cozens
-
- * autogen.sh: Added check for existence of automake-1.10.
- Fixes bug #474507.
-
-2007-09-10 Øyvind Kolås
-
- * babl/babl-internal.c: (babl_process): return immediately if 0 pixels
- were requested to be processed.
-
-2007-09-01 Øyvind Kolås
-
- * MAINTAINERS: added.
-
-2007-08-30 Øyvind Kolås
-
- Applied patch from Kevin Cozens fixing bug #467652
-
- * babl/Makefile.am: Use DL flag set by ./configure instead of
- hard-coding it in Makefile
-
-2007-08-02 Kevin Cozens
-
- * extensions/gggl.c
- * extensions/gggl-lies.c: Only include math.h once.
-
-2007-08-01 Øyvind Kolås
-
- Fixed compiler abort on certain LDFLAGS values (-Wl,-z,defs) by
- applying patch from christopher taylor, closing bug #462536.
-
- * babl/Makefile.am:
- * extensions/Makefile.am:
-
-2007-03-21 Øyvind Kolås
-
- Reindented all of the code using uncrustify.
-
-2007-03-21 Øyvind Kolås
-
- * configure.ac: Make force the value of shrext to either .dll or .so
- (it seems like it wasn't defined for unixy systems after all).
-
-2007-03-13 Michael Schumacher
-
- * configure.ac: use PATHSEP (platform-dependent, defined to ';' on
- win32) for BABL_LIST_SEPERATOR
-
-2007-03-13 Michael Schumacher
-
- * configure.ac: AC_SUBST and AC_DEFINE $shrext into variables for
- Makefiles and source.
- * extension/Makefile.am: use $(SHREXT) instead of .$SOext.
- * babl/babl-extension.c: use SHREXT instead of a hardcoded ".so"
- and get rid of a dirent->d_ino > 0 check which has been there for
- reasons unknown.
-
-2007-03-12 Michael Schumacher
-
- * Makefile.am:
- * extensions/Makefile.am: applied patch by John Marshall to make
- babl extensions build on Windows. They do not work yet, though. Fixes
- bug #409957.
-
-2007-03-12 Øyvind Kolås
-
- * babl/babl-fish.c: (fishing_result_examine), (go_fishing),
- (babl_fish): go fishing for an existing fish for the
- source/destination combination before trying to create one.
-
-2007-02-22 Øyvind Kolås
-
- * babl/babl-classes.h: make _Babl be a typedef and not a union that
- gets included and defined for every single object generated.
- Fixes bug #409781.
-
-2007-02-18 Øyvind Kolås
-
- * configure.ac: post release increment to 0.0.15
-
-=========================== 0.0.14 released =============================
-
-2007-02-17 Øyvind Kolås
-
- * configure.ac: increased version to 0.0.14 for release.
-
-2007-02-17 Øyvind Kolås
-
- * docs/index-static.html.in: adds, reordering and trimming of
- information in webpage.
-
-2007-02-17 Øyvind Kolås
-
- * babl/base/model-gray.c: removed obsoleted FIXME.
-
-2007-02-17 Øyvind Kolås
-
- * docs/index-static.html.in: reincorporate NEWS, added link to
- extensions dir in subversion.
-
-2007-02-16 Øyvind Kolås
-
- * babl/babl-fish-path.c: (legal_error), (max_path_length): cache the
- values looked up from BABL_ERROR and BABL_PATH_LENGTH environment
- variables, changed default maximum conversion path length from 3 to 4.
-
-2007-02-16 Øyvind Kolås
-
- * babl/base/formats.c: (babl_formats_init): specify Y'CbCrA model
- instead of Y'CbCr for Y'CbCrA float.
-
-2007-02-15 Øyvind Kolås
-
- * extensions/gegl-fixups.c: (conv_rgbAF_rgb8): simplified logic
- of code to speed it up.
-
-2007-02-15 Øyvind Kolås
-
- * babl/base/model-rgb.c: (premultiplied_to_non_premultiplied),
- (rgba_gamma_2_2_premultiplied2rgba): avoid divisions by zero,
- thus making the reference conversions correct.
-
-2007-02-11 Øyvind Kolås
-
- * NEWS: updated news for many versions.
-
-2007-02-09 Kevin Cozens
-
- * autogen.sh: Changed CVS reference to SVN.
-
- * configure.ac: Set BABL_UNSTABLE to 1 for odd micro numbers
- when major and minor are both 0.
-
- * babl.pc.in
- * babl/Makefile.am
- * tests/Makefile.am: Use version number in library name.
-
-2007-02-09 Kevin Cozens
-
- * babl/Makefile.am
- * babl/base/Makefile.am
- * docs/graphics/Makefile.am: Removed references to .cvsignore.
-
- * docs/Makefile.am: Removed reference to .cvsignore. Removed
- ^M from end of lines.
-
-2007-01-31 Øyvind Kolås
-
- Removed .cvsignore files.
-
-2007-01-07 Øyvind Kolås
-
- * configure.ac: set version to 0.0.13
-
-=========================== 0.0.12 released =============================
-
-2007-01-07 Øyvind Kolås
-
- * configure.ac: set version to 0.0.12
-
-2007-01-28 Øyvind Kolås
-
- * docs/index-static.html.in: things are not in CVS but SVN now.
-
-2007-01-28 Øyvind Kolås
-
- * babl/babl-conversion.c: (babl_conversion_new): shut up compiler
- warning.
-
-2007-01-28 Øyvind Kolås