diff -Nru babl-0.1.6/aclocal.m4 babl-0.1.11/aclocal.m4 --- babl-0.1.6/aclocal.m4 2011-11-20 07:26:48.000000000 +0000 +++ babl-0.1.11/aclocal.m4 2012-04-25 20:24:21.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-class.h babl-0.1.11/babl/babl-class.h --- babl-0.1.6/babl/babl-class.h 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-class.h 2012-04-25 20:22:33.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.11/babl/babl-component.c --- babl-0.1.6/babl/babl-component.c 2011-05-29 07:23:42.000000000 +0000 +++ babl-0.1.11/babl/babl-component.c 2012-04-25 20:22:33.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.11/babl/babl-conversion.c --- babl-0.1.6/babl/babl-conversion.c 2011-05-29 07:23:42.000000000 +0000 +++ babl-0.1.11/babl/babl-conversion.c 2012-04-25 20:22:33.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.11/babl/babl-conversion.h --- babl-0.1.6/babl/babl-conversion.h 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-conversion.h 2012-04-25 20:22:33.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.11/babl/babl-extension.h --- babl-0.1.6/babl/babl-extension.h 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-extension.h 2012-04-25 20:22:33.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.11/babl/babl-fish.c --- babl-0.1.6/babl/babl-fish.c 2011-05-29 07:23:42.000000000 +0000 +++ babl-0.1.11/babl/babl-fish.c 2012-04-25 20:22:33.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.11/babl/babl-fish-path.c --- babl-0.1.6/babl/babl-fish-path.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-fish-path.c 2012-04-25 20:22:33.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); @@ -404,11 +410,21 @@ return -1; } +#include + +#define BABL_ALIGN 16 +static void inline *align_16 (unsigned char *ret) +{ + int offset = BABL_ALIGN - ((uintptr_t) ret) % BABL_ALIGN; + ret = ret + offset; + return ret; +} + 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); @@ -421,7 +437,7 @@ } else { - void *aux1_buffer = babl_malloc (n * sizeof (double) * 5); + void *aux1_buffer = align_16 (alloca (n * sizeof (double) * 5 + 16)); void *aux2_buffer = NULL; void *swap_buffer = NULL; int i; @@ -429,7 +445,7 @@ if (conversions > 2) { /* We'll need one more auxiliary buffer */ - aux2_buffer = babl_malloc (n * sizeof (double) * 5); + aux2_buffer = align_16 (alloca ((n * sizeof (double) * 5 + 16))); } /* The first conversion goes from source_buffer to aux1_buffer */ @@ -457,12 +473,6 @@ aux1_buffer, destination_buffer, n); - - /* Free auxiliary buffers */ - if (aux1_buffer) - babl_free (aux1_buffer); - if (aux2_buffer) - babl_free (aux2_buffer); } return n; diff -Nru babl-0.1.6/babl/babl-fish-reference.c babl-0.1.11/babl/babl-fish-reference.c --- babl-0.1.6/babl/babl-fish-reference.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-fish-reference.c 2012-04-25 20:22:33.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.11/babl/babl-fish-stats.c --- babl-0.1.6/babl/babl-fish-stats.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-fish-stats.c 2012-04-25 20:22:33.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.11/babl/babl-format.c --- babl-0.1.6/babl/babl-format.c 2011-09-08 05:15:41.000000000 +0000 +++ babl-0.1.11/babl/babl-format.c 2012-04-25 20:22:33.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.11/babl/babl-format.h --- babl-0.1.6/babl/babl-format.h 2011-09-08 05:15:41.000000000 +0000 +++ babl-0.1.11/babl/babl-format.h 2012-04-25 20:22:33.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.11/babl/babl.h --- babl-0.1.6/babl/babl.h 2011-09-08 05:15:41.000000000 +0000 +++ babl-0.1.11/babl/babl.h 2012-04-25 20:22:33.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-ids.h babl-0.1.11/babl/babl-ids.h --- babl-0.1.6/babl/babl-ids.h 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-ids.h 2012-04-25 20:22:33.000000000 +0000 @@ -25,6 +25,7 @@ BABL_U8, BABL_U16, BABL_U32, + BABL_HALF, BABL_FLOAT, BABL_DOUBLE, BABL_HALF_FLOAT, diff -Nru babl-0.1.6/babl/babl-image.c babl-0.1.11/babl/babl-image.c --- babl-0.1.6/babl/babl-image.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-image.c 2012-04-25 20:22:33.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.11/babl/babl-image.h --- babl-0.1.6/babl/babl-image.h 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-image.h 2012-04-25 20:22:33.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.11/babl/babl-internal.h --- babl-0.1.6/babl/babl-internal.h 2011-05-29 07:23:42.000000000 +0000 +++ babl-0.1.11/babl/babl-internal.h 2012-04-25 20:22:33.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.11/babl/babl-model.c --- babl-0.1.6/babl/babl-model.c 2011-05-29 07:23:42.000000000 +0000 +++ babl-0.1.11/babl/babl-model.c 2012-04-25 20:22:33.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.11/babl/babl-model.h --- babl-0.1.6/babl/babl-model.h 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-model.h 2012-04-25 20:22:33.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.11/babl/babl-palette.c --- babl-0.1.6/babl/babl-palette.c 1970-01-01 00:00:00.000000000 +0000 +++ babl-0.1.11/babl/babl-palette.c 2012-04-25 20:22:33.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.11/babl/babl-sampling.c --- babl-0.1.6/babl/babl-sampling.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-sampling.c 2012-04-25 20:22:33.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.11/babl/babl-type.c --- babl-0.1.6/babl/babl-type.c 2011-05-29 07:23:42.000000000 +0000 +++ babl-0.1.11/babl/babl-type.c 2012-04-25 20:22:33.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.11/babl/babl-types.h --- babl-0.1.6/babl/babl-types.h 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/babl-types.h 2012-04-25 20:22:33.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/base/babl-base.c babl-0.1.11/babl/base/babl-base.c --- babl-0.1.6/babl/base/babl-base.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/base/babl-base.c 2012-04-25 20:22:33.000000000 +0000 @@ -50,6 +50,7 @@ static void types (void) { + babl_base_type_half (); babl_base_type_float (); babl_base_type_u8 (); babl_base_type_u16 (); diff -Nru babl-0.1.6/babl/base/babl-base.h babl-0.1.11/babl/base/babl-base.h --- babl-0.1.6/babl/base/babl-base.h 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/base/babl-base.h 2012-04-25 20:22:33.000000000 +0000 @@ -23,11 +23,13 @@ void babl_base_destroy (void); void babl_formats_init (void); +void babl_base_type_half (void); void babl_base_type_float (void); void babl_base_type_u8 (void); 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.am babl-0.1.11/babl/base/Makefile.am --- babl-0.1.6/babl/base/Makefile.am 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/base/Makefile.am 2012-04-25 20:22:33.000000000 +0000 @@ -6,6 +6,7 @@ babl-base.c \ formats.c \ type-float.c \ + type-half.c \ type-u8.c \ type-u16.c \ type-u32.c \ diff -Nru babl-0.1.6/babl/base/Makefile.in babl-0.1.11/babl/base/Makefile.in --- babl-0.1.6/babl/base/Makefile.in 2011-11-20 07:26:53.000000000 +0000 +++ babl-0.1.11/babl/base/Makefile.in 2012-04-25 20:24:26.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. @@ -52,13 +52,13 @@ am__DEPENDENCIES_1 = libbase_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = -am__objects_2 = babl-base.lo formats.lo type-float.lo type-u8.lo \ - type-u16.lo type-u32.lo model-rgb.lo model-gray.lo \ +am__objects_2 = babl-base.lo formats.lo type-float.lo type-half.lo \ + type-u8.lo type-u16.lo type-u32.lo model-rgb.lo model-gray.lo \ 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) @@ -249,6 +249,7 @@ babl-base.c \ formats.c \ type-float.c \ + type-half.c \ type-u8.c \ type-u16.c \ type-u32.c \ @@ -307,7 +308,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: @@ -322,6 +323,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model-rgb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model-ycbcr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/type-float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/type-half.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/type-u16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/type-u32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/type-u8.Plo@am__quote@ @@ -329,26 +331,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 +451,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.11/babl/base/model-rgb.c --- babl-0.1.6/babl/base/model-rgb.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/base/model-rgb.c 2012-04-25 20:22:33.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/type-half.c babl-0.1.11/babl/base/type-half.c --- babl-0.1.6/babl/base/type-half.c 1970-01-01 00:00:00.000000000 +0000 +++ babl-0.1.11/babl/base/type-half.c 2012-04-25 20:22:33.000000000 +0000 @@ -0,0 +1,351 @@ +/* babl - dynamically extendable universal pixel conversion library. + * Copyright (C) 2012, Øyvind Kolås. + * + * MATLAB (R) is a trademark of The Mathworks (R) Corporation + * + * Function: halfprecision + * Filename: halfprecision.c + * Programmer: James Tursa + * Version: 1.0 + * Date: March 3, 2009 + * Copyright: (c) 2009 by James Tursa, All Rights Reserved + * + * This code uses the BSD License: + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the distribution + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + * halfprecision converts the input argument to/from a half precision floating + * point bit pattern corresponding to IEEE 754r. The bit pattern is stored in a + * uint16 class variable. Please note that halfprecision is *not* a class. That + * is, you cannot do any arithmetic with the half precision bit patterns. + * halfprecision is simply a function that converts the IEEE 754r half precision + * bit pattern to/from other numeric MATLAB variables. You can, however, take + * the half precision bit patterns, convert them to single or double, do the + * operation, and then convert the result back manually. + * + * 1 bit sign bit + * 5 bits exponent, biased by 15 + * 10 bits mantissa, hidden leading bit, normalized to 1.0 + * + * Special floating point bit patterns recognized and supported: + * + * All exponent bits zero: + * - If all mantissa bits are zero, then number is zero (possibly signed) + * - Otherwise, number is a denormalized bit pattern + * + * All exponent bits set to 1: + * - If all mantissa bits are zero, then number is +Infinity or -Infinity + * - Otherwise, number is NaN (Not a Number) + */ + +#include "config.h" +#include +#include + +#include "babl.h" +#include "babl-classes.h" +#include "babl-ids.h" +#include "babl-base.h" + + +#define mwSize int +#define INT16_TYPE short +#define UINT16_TYPE unsigned short +#define INT32_TYPE long +#define UINT32_TYPE unsigned long + +static int next = 1; /* should be 0 for big endian */ + +//----------------------------------------------------------------------------- + +static void doubles2halfp(void *target, void *source, mwSize numel) +{ + UINT16_TYPE *hp = (UINT16_TYPE *) target; // Type pun output as an unsigned 16-bit int + UINT32_TYPE *xp = (UINT32_TYPE *) source; // Type pun input as an unsigned 32-bit int + UINT16_TYPE hs, he, hm; + UINT32_TYPE x, xs, xe, xm; + int hes; + + xp += next; // Little Endian adjustment if necessary + + if( source == NULL || target == NULL ) { // Nothing to convert (e.g., imag part of pure real) + return; + } + while( numel-- ) { + x = *xp++; xp++; // The extra xp++ is to skip over the remaining 32 bits of the mantissa + if( (x & 0x7FFFFFFFu) == 0 ) { // Signed zero + *hp++ = (UINT16_TYPE) (x >> 16); // Return the signed zero + } else { // Not zero + xs = x & 0x80000000u; // Pick off sign bit + xe = x & 0x7FF00000u; // Pick off exponent bits + xm = x & 0x000FFFFFu; // Pick off mantissa bits + if( xe == 0 ) { // Denormal will underflow, return a signed zero + *hp++ = (UINT16_TYPE) (xs >> 16); + } else if( xe == 0x7FF00000u ) { // Inf or NaN (all the exponent bits are set) + if( xm == 0 ) { // If mantissa is zero ... + *hp++ = (UINT16_TYPE) ((xs >> 16) | 0x7C00u); // Signed Inf + } else { + *hp++ = (UINT16_TYPE) 0xFE00u; // NaN, only 1st mantissa bit set + } + } else { // Normalized number + hs = (UINT16_TYPE) (xs >> 16); // Sign bit + hes = ((int)(xe >> 20)) - 1023 + 15; // Exponent unbias the double, then bias the halfp + if( hes >= 0x1F ) { // Overflow + *hp++ = (UINT16_TYPE) ((xs >> 16) | 0x7C00u); // Signed Inf + } else if( hes <= 0 ) { // Underflow + if( (10 - hes) > 21 ) { // Mantissa shifted all the way off & no rounding possibility + hm = (UINT16_TYPE) 0u; // Set mantissa to zero + } else { + xm |= 0x00100000u; // Add the hidden leading bit + hm = (UINT16_TYPE) (xm >> (11 - hes)); // Mantissa + if( (xm >> (10 - hes)) & 0x00000001u ) // Check for rounding + hm += (UINT16_TYPE) 1u; // Round, might overflow into exp bit, but this is OK + } + *hp++ = (hs | hm); // Combine sign bit and mantissa bits, biased exponent is zero + } else { + he = (UINT16_TYPE) (hes << 10); // Exponent + hm = (UINT16_TYPE) (xm >> 10); // Mantissa + if( xm & 0x00000200u ) // Check for rounding + *hp++ = (hs | he | hm) + (UINT16_TYPE) 1u; // Round, might overflow to inf, this is OK + else + *hp++ = (hs | he | hm); // No rounding + } + } + } + } +} + +#if 0 +//----------------------------------------------------------------------------- + +static void halfp2singles(void *target, void *source, mwSize numel) +{ + UINT16_TYPE *hp = (UINT16_TYPE *) source; // Type pun input as an unsigned 16-bit int + UINT32_TYPE *xp = (UINT32_TYPE *) target; // Type pun output as an unsigned 32-bit int + UINT16_TYPE h, hs, he, hm; + UINT32_TYPE xs, xe, xm; + INT32_TYPE xes; + int e; + + if( source == NULL || target == NULL ) // Nothing to convert (e.g., imag part of pure real) + return; + while( numel-- ) { + h = *hp++; + if( (h & 0x7FFFu) == 0 ) { // Signed zero + *xp++ = ((UINT32_TYPE) h) << 16; // Return the signed zero + } else { // Not zero + hs = h & 0x8000u; // Pick off sign bit + he = h & 0x7C00u; // Pick off exponent bits + hm = h & 0x03FFu; // Pick off mantissa bits + if( he == 0 ) { // Denormal will convert to normalized + e = -1; // The following loop figures out how much extra to adjust the exponent + do { + e++; + hm <<= 1; + } while( (hm & 0x0400u) == 0 ); // Shift until leading bit overflows into exponent bit + xs = ((UINT32_TYPE) hs) << 16; // Sign bit + xes = ((INT32_TYPE) (he >> 10)) - 15 + 127 - e; // Exponent unbias the halfp, then bias the single + xe = (UINT32_TYPE) (xes << 23); // Exponent + xm = ((UINT32_TYPE) (hm & 0x03FFu)) << 13; // Mantissa + *xp++ = (xs | xe | xm); // Combine sign bit, exponent bits, and mantissa bits + } else if( he == 0x7C00u ) { // Inf or NaN (all the exponent bits are set) + if( hm == 0 ) { // If mantissa is zero ... + *xp++ = (((UINT32_TYPE) hs) << 16) | ((UINT32_TYPE) 0x7F800000u); // Signed Inf + } else { + *xp++ = (UINT32_TYPE) 0xFFC00000u; // NaN, only 1st mantissa bit set + } + } else { // Normalized number + xs = ((UINT32_TYPE) hs) << 16; // Sign bit + xes = ((INT32_TYPE) (he >> 10)) - 15 + 127; // Exponent unbias the halfp, then bias the single + xe = (UINT32_TYPE) (xes << 23); // Exponent + xm = ((UINT32_TYPE) hm) << 13; // Mantissa + *xp++ = (xs | xe | xm); // Combine sign bit, exponent bits, and mantissa bits + } + } + } +} + +static void singles2halfp(void *target, void *source, mwSize numel) +{ + UINT16_TYPE *hp = (UINT16_TYPE *) target; // Type pun output as an unsigned 16-bit int + UINT32_TYPE *xp = (UINT32_TYPE *) source; // Type pun input as an unsigned 32-bit int + UINT16_TYPE hs, he, hm; + UINT32_TYPE x, xs, xe, xm; + int hes; + + if( source == NULL || target == NULL ) { // Nothing to convert (e.g., imag part of pure real) + return; + } + while( numel-- ) { + x = *xp++; + if( (x & 0x7FFFFFFFu) == 0 ) { // Signed zero + *hp++ = (UINT16_TYPE) (x >> 16); // Return the signed zero + } else { // Not zero + xs = x & 0x80000000u; // Pick off sign bit + xe = x & 0x7F800000u; // Pick off exponent bits + xm = x & 0x007FFFFFu; // Pick off mantissa bits + if( xe == 0 ) { // Denormal will underflow, return a signed zero + *hp++ = (UINT16_TYPE) (xs >> 16); + } else if( xe == 0x7F800000u ) { // Inf or NaN (all the exponent bits are set) + if( xm == 0 ) { // If mantissa is zero ... + *hp++ = (UINT16_TYPE) ((xs >> 16) | 0x7C00u); // Signed Inf + } else { + *hp++ = (UINT16_TYPE) 0xFE00u; // NaN, only 1st mantissa bit set + } + } else { // Normalized number + hs = (UINT16_TYPE) (xs >> 16); // Sign bit + hes = ((int)(xe >> 23)) - 127 + 15; // Exponent unbias the single, then bias the halfp + if( hes >= 0x1F ) { // Overflow + *hp++ = (UINT16_TYPE) ((xs >> 16) | 0x7C00u); // Signed Inf + } else if( hes <= 0 ) { // Underflow + if( (14 - hes) > 24 ) { // Mantissa shifted all the way off & no rounding possibility + hm = (UINT16_TYPE) 0u; // Set mantissa to zero + } else { + xm |= 0x00800000u; // Add the hidden leading bit + hm = (UINT16_TYPE) (xm >> (14 - hes)); // Mantissa + if( (xm >> (13 - hes)) & 0x00000001u ) // Check for rounding + hm += (UINT16_TYPE) 1u; // Round, might overflow into exp bit, but this is OK + } + *hp++ = (hs | hm); // Combine sign bit and mantissa bits, biased exponent is zero + } else { + he = (UINT16_TYPE) (hes << 10); // Exponent + hm = (UINT16_TYPE) (xm >> 13); // Mantissa + if( xm & 0x00001000u ) // Check for rounding + *hp++ = (hs | he | hm) + (UINT16_TYPE) 1u; // Round, might overflow to inf, this is OK + else + *hp++ = (hs | he | hm); // No rounding + } + } + } + } +} +#endif + + +//----------------------------------------------------------------------------- + +static void halfp2doubles(void *target, void *source, mwSize numel) +{ + UINT16_TYPE *hp = (UINT16_TYPE *) source; // Type pun input as an unsigned 16-bit int + UINT32_TYPE *xp = (UINT32_TYPE *) target; // Type pun output as an unsigned 32-bit int + UINT16_TYPE h, hs, he, hm; + UINT32_TYPE xs, xe, xm; + INT32_TYPE xes; + int e; + + xp += next; // Little Endian adjustment if necessary + + if( source == NULL || target == NULL ) // Nothing to convert (e.g., imag part of pure real) + return; + while( numel-- ) { + h = *hp++; + if( (h & 0x7FFFu) == 0 ) { // Signed zero + *xp++ = ((UINT32_TYPE) h) << 16; // Return the signed zero + } else { // Not zero + hs = h & 0x8000u; // Pick off sign bit + he = h & 0x7C00u; // Pick off exponent bits + hm = h & 0x03FFu; // Pick off mantissa bits + if( he == 0 ) { // Denormal will convert to normalized + e = -1; // The following loop figures out how much extra to adjust the exponent + do { + e++; + hm <<= 1; + } while( (hm & 0x0400u) == 0 ); // Shift until leading bit overflows into exponent bit + xs = ((UINT32_TYPE) hs) << 16; // Sign bit + xes = ((INT32_TYPE) (he >> 10)) - 15 + 1023 - e; // Exponent unbias the halfp, then bias the double + xe = (UINT32_TYPE) (xes << 20); // Exponent + xm = ((UINT32_TYPE) (hm & 0x03FFu)) << 10; // Mantissa + *xp++ = (xs | xe | xm); // Combine sign bit, exponent bits, and mantissa bits + } else if( he == 0x7C00u ) { // Inf or NaN (all the exponent bits are set) + if( hm == 0 ) { // If mantissa is zero ... + *xp++ = (((UINT32_TYPE) hs) << 16) | ((UINT32_TYPE) 0x7FF00000u); // Signed Inf + } else { + *xp++ = (UINT32_TYPE) 0xFFF80000u; // NaN, only the 1st mantissa bit set + } + } else { + xs = ((UINT32_TYPE) hs) << 16; // Sign bit + xes = ((INT32_TYPE) (he >> 10)) - 15 + 1023; // Exponent unbias the halfp, then bias the double + xe = (UINT32_TYPE) (xes << 20); // Exponent + xm = ((UINT32_TYPE) hm) << 10; // Mantissa + *xp++ = (xs | xe | xm); // Combine sign bit, exponent bits, and mantissa bits + } + } + xp++; // Skip over the remaining 32 bits of the mantissa + } +} + +static long +convert_double_half (char *src, + char *dst, + int src_pitch, + int dst_pitch, + long n) +{ + while (n--) + { + doubles2halfp (dst, src, 1); + dst += dst_pitch; + src += src_pitch; + } + return n; +} + +static long +convert_half_double (char *src, + char *dst, + int src_pitch, + int dst_pitch, + long n) +{ + while (n--) + { + halfp2doubles (dst, src, 1); + dst += dst_pitch; + src += src_pitch; + } + return n; +} + +void +babl_base_type_half (void) +{ + babl_type_new ( + "half", + "id", BABL_HALF, + "bits", 16, + NULL); + + babl_conversion_new ( + babl_type_from_id (BABL_HALF), + babl_type_from_id (BABL_DOUBLE), + "plane", convert_half_double, + NULL + ); + + babl_conversion_new ( + babl_type_from_id (BABL_DOUBLE), + babl_type_from_id (BABL_HALF), + "plane", convert_double_half, + NULL + ); +} diff -Nru babl-0.1.6/babl/base/util.h babl-0.1.11/babl/base/util.h --- babl-0.1.6/babl/base/util.h 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/babl/base/util.h 2012-04-25 20:22:33.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.11/babl/Makefile.am --- babl-0.1.6/babl/Makefile.am 2011-11-20 07:24:31.000000000 +0000 +++ babl-0.1.11/babl/Makefile.am 2012-04-25 20:22:33.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 \ @@ -92,10 +93,10 @@ INTROSPECTION_COMPILER_ARGS = --includedir=$(srcdir) if HAVE_INTROSPECTION -Babl-$(BABL_API_VERSION).gir: $(G_IR_SCANNER) $(library_include_HEADERS) $(c_sources) $(srcdir)/Makefile.am +Babl-$(BABL_API_VERSION).gir: $(G_IR_SCANNER) $(library_include_HEADERS) $(c_sources) $(srcdir)/Makefile.am libbabl-@BABL_API_VERSION@.la $(INTROSPECTION_SCANNER) -v --namespace Babl --nsversion=$(BABL_API_VERSION) \ --add-include-path=$(srcdir) --add-include-path=. \ - --library=babl-$(BABL_API_VERSION) \ + --library=$(builddir)/libbabl-$(BABL_API_VERSION).la \ --libtool="$(LIBTOOL)" \ --output $@ \ -DBABL_IS_BEING_COMPILED \ diff -Nru babl-0.1.6/babl/Makefile.in babl-0.1.11/babl/Makefile.in --- babl-0.1.6/babl/Makefile.in 2011-11-20 07:26:53.000000000 +0000 +++ babl-0.1.11/babl/Makefile.in 2012-04-25 20:24:26.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: @@ -956,10 +958,10 @@ # GObject Introspection -include $(INTROSPECTION_MAKEFILE) -@HAVE_INTROSPECTION_TRUE@Babl-$(BABL_API_VERSION).gir: $(G_IR_SCANNER) $(library_include_HEADERS) $(c_sources) $(srcdir)/Makefile.am +@HAVE_INTROSPECTION_TRUE@Babl-$(BABL_API_VERSION).gir: $(G_IR_SCANNER) $(library_include_HEADERS) $(c_sources) $(srcdir)/Makefile.am libbabl-@BABL_API_VERSION@.la @HAVE_INTROSPECTION_TRUE@ $(INTROSPECTION_SCANNER) -v --namespace Babl --nsversion=$(BABL_API_VERSION) \ @HAVE_INTROSPECTION_TRUE@ --add-include-path=$(srcdir) --add-include-path=. \ -@HAVE_INTROSPECTION_TRUE@ --library=babl-$(BABL_API_VERSION) \ +@HAVE_INTROSPECTION_TRUE@ --library=$(builddir)/libbabl-$(BABL_API_VERSION).la \ @HAVE_INTROSPECTION_TRUE@ --libtool="$(LIBTOOL)" \ @HAVE_INTROSPECTION_TRUE@ --output $@ \ @HAVE_INTROSPECTION_TRUE@ -DBABL_IS_BEING_COMPILED \ diff -Nru babl-0.1.6/ChangeLog.pre-0-1 babl-0.1.11/ChangeLog.pre-0-1 --- babl-0.1.6/ChangeLog.pre-0-1 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/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 - - * extensions/gegl-fixups.c: (init): give names to the custom formats. - -2007-01-28 Øyvind Kolås - - * AUTHORS: added Michael Natterer as janitor. - -2007-01-28 Øyvind Kolås - - * AUTHORS: added Tim Mooney - -2007-01-28 Øyvind Kolås - - * extensions/gegl-fixups.c: (conv_bgrA8_rgba8), (init): added - optimized permutator for going from cairo's buffer format to RGBA byte - order, as well as unpremultiplying. - -2007-01-28 Øyvind Kolås - - * extensions/gegl-fixups.c: fixed gamma conversion. - -2007-01-22 Michael Schumacher - - * docs/Makefile.am: declare the test programs used during doc - creating as variables to keep the commands in targets readable. - -2007-01-22 Øyvind Kolås - - Applied patch from Tim Mooney fixing bug #392916 - - * extensions/Makefile.am: $(prefix)/lib/babl-0.0 for its extensions - dir, which is incorrect for many 64 bit platforms. It should instead - use $(libdir)/babl-0.0. - -2007-01-22 Øyvind Kolås - - * babl/babl-internal.h: applied patch from Tim Mooney fixing bug - #392843, replacing _FUNCTION_ with _func_ which is the C99 equivalent - of the gcc extension. - -2007-01-16 Michael Schumacher - - * configure.ac: remove the check for dlopen again - didn't work as - intended - * babl/babl-extension.c: for #idfef WIN32, #define dl* functions - to their Windows equivalents (LoadLibrary, GetProcAddress, - FreeLibrary). - -2007-01-08 Øyvind Kolås - - * babl/babl-extension.c: define HAVE_DLOPEN if HAVE_DLFCN is set. - -2007-01-07 Øyvind Kolås - - * configure.ac: set version to 0.0.11 - -=========================== 0.0.10 released ============================= - -2007-01-07 Øyvind Kolås - - * configure.ac: set version to 0.0.10 - * docs/index-static.html.in: reworded things due to the subversion - switch. - -2007-01-06 Michael Schumacher - - This change makes babl buildable on Windows. - - * configure.ac: Add a check for function dlopen and disabled - static libs by default. Check for gettimeofday by using - AC_REPLACE_FUNCS. - - * babl/babl-internal.h: Add definitions for srandom and radnom to - srand and rand for the windows platform. - * babl/babl-conversion.c - * babl-model.c: Include babl-internal.h after math.h - - * babl/babl-extension.c: Use #ifdef HAVE_DLOPEN to hide dl* if it - is not available. - - * babl/Makefile.am: Removed win32_libs and added @LTLIBOBJS@ to - LIBADD to get the replacement for gettimeofday linked in if - needed. - - * babl/gettimeofday.c: New file to provide a replacement for - gettimeofday, only used on Windows yet. - -2007-01-06 Michael Schumacher - - * Makefile.am: don't go into the extensions subdirectory on - Windows - * extensions/Makefile.am: removed the win32_libs definition, using - libgw32c does more harm than good, apparently - -2007-01-06 Michael Schumacher - - * docs/Makefile.am: added EXEEXT to the tools used in some - commands - - * docs/tools/changelog2rss: remove unused SET_TITLE and - LISTING_TYPE; the former did cause an error on Windows - -2007-01-01 Kevin Cozens - - * docs/index-static.html.in: Fixes for various punctuation, grammar, - and typographical errors. - -2007-01-01 Kevin Cozens - - * configure.ac: Changes to properly (or at least better) version the - babl library. - - * babl.pc.in: It is too soon to include version information in the - name of the babl library at link time. - -2007-01-01 Kevin Cozens - - Some changes to fix build problems in FreeBSD and Windows. - - * configure.ac: Added missing m4 defines specifying version numbers, - and tests for libdl and libm (sets DL_LIB and MATH_LIB respectively). - - * babl.pc.in: Replaced several hard-coded items with ones defined - when configure is run. - - * babl/base/Makefile.am: - * extensions/Makefile.am: - * tests/Makefile.am: Use $(DL_LIB) and $(MATH_LIB) instead of - hard-coded options. - -2006-12-29 Øyvind Kolås - - * configure.ac: set the version of babl to 0.0.9 - -=========================== 0.0.8 released ============================= - -2006-12-29 Øyvind Kolås - - * configure.ac: set the version of babl to 0.0.8 - -2006-12-29 Øyvind Kolås - - * docs/Makefile.am: include changelog2rss script. - -2006-11-17 Øyvind Kolås - - Make babl compile with stricter compiler warnings, mostly related to - changing pointer arith from void* to char*. - - * babl/babl-classes.h: - * babl/babl-component.c: (component_new): - * babl/babl-conversion.c: (conversion_new), - (babl_conversion_planar_process), (babl_conversion_process): - * babl/babl-core.c: (convert_double_double), (rgba_to_rgba): - * babl/babl-extension.c: (extension_new): - * babl/babl-fish-path.c: (babl_fish_path): - * babl/babl-fish-reference.c: (babl_fish_reference), - (convert_to_double), (convert_from_double), (process_same_model), - (babl_fish_reference_process): - * babl/babl-fish-simple.c: (babl_fish_simple): - * babl/babl-fish.c: (babl_fish_process): - * babl/babl-format.c: (format_new): - * babl/babl-image.c: (image_new), (babl_image_from_linear), - (babl_image): - * babl/babl-internal.h: - * babl/babl-memory.c: (babl_malloc): - * babl/babl-model.c: (model_new): - * babl/babl-type.c: (type_new), (r_interval), (test_init): - * babl/base/babl-base.c: - * babl/base/babl-base.h: - * babl/base/formats.c: - * babl/base/model-gray.c: (rgba_to_graya), (rgba_to_gray), - (rgb_to_gray_2_2), (gray_2_2_to_rgb), (graya_to_rgba), - (gray_to_rgba), (gray_alpha_premultiplied_to_rgba), - (rgba_to_gray_alpha_premultiplied), - (non_premultiplied_to_premultiplied), - (premultiplied_to_non_premultiplied), - (rgba2gray_gamma_2_2_premultiplied), - (gray_gamma_2_2_premultiplied2rgba): - * babl/base/model-rgb.c: (copy_strip_1), (g3_gamma_2_2), - (g3_inv_gamma_2_2), (non_premultiplied_to_premultiplied), - (premultiplied_to_non_premultiplied), - (rgba2rgba_gamma_2_2_premultiplied), - (rgba_gamma_2_2_premultiplied2rgba), (rgba2rgba_gamma_2_2), - (rgba_gamma_2_22rgba): - * babl/base/model-ycbcr.c: (rgba_to_ycbcra), (rgba_to_ycbcr), - (ycbcra_to_rgba), (ycbcr_to_rgba): - * babl/base/type-float.c: (convert_double_float), - (convert_float_double): - * babl/base/type-u16.c: (convert_double_u16_scaled), - (convert_u16_double_scaled): - * babl/base/type-u32.c: (convert_double_u32_scaled), - (convert_u32_double_scaled): - * babl/base/type-u8.c: (convert_double_u8_scaled), - (convert_u8_double_scaled): - * extensions/CIE-Lab.c: (rgba_to_lab), (lab_to_rgba), - (rgba_to_laba), (laba_to_rgba), (convert_double_u8_scaled), - (convert_u8_double_scaled), (convert_double_u16_scaled), - (convert_u16_double_scaled): - * extensions/gegl-fixups.c: (conv_F_8), (conv_8_F): - * extensions/gggl-lies.c: (conv_F_8), (conv_F_16), (conv_8_F), - (conv_16_F): - * extensions/gggl.c: (conv_F_8), (conv_F_16), (conv_8_F), - (conv_16_F): - * extensions/naive-CMYK.c: (rgba_to_cmyk), (cmyk_to_rgba): - * tests/babl-html-dump.c: (normalize): - * tests/babl_class_name.c: - * tests/formats.c: (format_check): - * tests/grayscale_to_rgb.c: - * tests/models.c: (model_check): - * tests/rgb_to_bgr.c: - * tests/rgb_to_ycbcr.c: - * tests/srgb_to_lab_u8.c: - * tests/types.c: (type_check): - -2006-11-15 Øyvind Kolås - - Set the default BABL_PATH based on the prefix babl is compiled for. - - * babl/Makefile.am: - * babl/babl-extension.c: - -2006-11-07 Øyvind Kolås - - * extensions/CIE-Lab.c: (formats): added "CIE Lab alpha float" as - a default format. - -2006-08-31 Øyvind Kolås - - * configure.ac: set the version of babl to 0.0.7 - -=========================== 0.0.6 released ============================= - -2006-08-31 Øyvind Kolås - - * configure.ac: set the version of babl to 0.0.6 - -2006-10-09 Øyvind Kolås - - Cleaned up the typedef for Babl, fixes issues with g++. - - * babl/babl-classes.h: - * babl/babl-conversion.c: (conversion_new): - * babl/babl-fish-path.c: (babl_fish_path): - * babl/babl-fish-reference.c: (babl_fish_reference): - * babl/babl-fish-simple.c: (babl_fish_simple): - -2006-09-26 Dominik Ernst - - * babl/babl-classes.h: fixed an issue with g++ - -2006-09-23 Øyvind Kolås - - * docs/Makefile.am: output the conversion grid when building on - crucible. - -2006-09-14 Øyvind Kolås - - * babl/babl-internal.c: (babl_process): added global babl_total_usecs, - not exported through headers, but useful to be able to substract the - babl conversion time from other algorithms using babl. - -2006-09-12 Øyvind Kolås - - * autogen.sh: decreased required automake version to 1.7.9. (It - could probably be decreased even further, but this is at least - known to work.) - -2006-09-12 Michael Schumacher - - * autogen.sh: use the autogen.sh of GIMP as a base for babl's - autogen.sh. Among other things, this enables maintainer mode by - default. - -2006-09-10 Kevin Cozens - - * babl/babl-classes.h - * babl/babl-conversion.c - * babl/babl-fish-path.c - * babl/babl-fish-stats.c - * babl/babl-internal.c: Tick times are in usecs not msecs. Use longs - to hold tick values. - - * babl/babl-util.h: - * babl/babl-util.c (babl_ticks): Fixed calculation of time (usecs - not msecs). Changed declaration to return a long not unsigned int. - -2006-09-09 Øyvind Kolås - - * extensions/Makefile.am: moved -fPIC from LD_FLAGS to CFLAGS. - -2006-09-08 Øyvind Kolås - - * extensions/Makefile.am: added -fPIC to LD_FLAGS, thus making it - compile on 64bit archs as well. - -2006-09-04 Michael Schumacher - - * extensions/Makefile.am: have to link with libbabl.a, at least on - the Windows platforms - -2006-08-31 Øyvind Kolås - - * extensions/.cvsignore: added Makefile.in - -2006-08-31 Øyvind Kolås - - * configure.ac: set the version of babl to 0.0.5 (odd micro indicating - that it is a CVS version). - -=========================== 0.0.4 released ============================= - -2006-08-31 Øyvind Kolås - - * configure.ac: set the version of babl to 0.0.4 - * docs/index-static.html.in: added downloading location for tarballs - of babl. - * AUTHORS: Added Kevin Cozens - -2006-08-31 Øyvind Kolås - - * Makefile.am: added a dependency on all for README, making it - possible to do ./autogen.sh && make distcheck #from a clean CVS - checkout. - -2006-08-28 Kevin Cozens - - * configure.ac: Added AM_MAINTAINER_MODE. - - * docs/Makefile.am: Moved BablFishPath.txt to BUILT_EXTRA_DIST. - - * tests/Makefile.am: Removed .cvsignore from EXTRA_DIST. - -2006-08-28 Kevin Cozens - - Changes to get 'make distcheck' working properly. - - * docs/Makefile.am: Added BablFishPath.txt to DISTCLEANFILES. - - * extensions/Makefile.am: Added. - - * extensions/Makefile.in: Removed (replaced by Makefile.am). - -2006-08-25 Michael Schumacher - - * configure.ac: added AC_LIBTOOL_WIN32_DLL as a preparation for - proper builds of shared libs on win32 & there's no need to define - OS_WIN32 here... - * babl/babl-extension.c: ...if the only place where it is needed - can be handled by HAVE_DLFCN_H - -2006-08-24 Øyvind Kolås - - * extensions/Makefile.in: do not add libbabl.a into plug-ins - -2006-07-06 Øyvind Kolås - - * babl.pc.in: Added -lm to the list of libraries that need to be - linked along with babl. - -2006-06-24 Øyvind Kolås - - * babl.pc.in: stripped trailing /babl from CFLAGS include path. - -2006-06-12 Øyvind Kolås - - Do not expect the user to pass in BablImages (existance of babl - pointer decorations should not be allowed to be used to implement type - checking for provided buffers/bablimages) - - * babl/babl-fish.c: (babl_fish_process): - * babl/babl-fish-reference.c: (babl_fish_reference_process): - * docs/index-static.html.in: removed section about planar BablImages - since the API is now disabled. - -2006-06-06 Øyvind Kolås - - Register all the formats that the gggl based conversions use in - babl-base. This allows a string based short hand vocabulary of format - names that can be expected to exist. - - * babl/base/Makefile.am: added formats.c - * babl/base/babl-base.c: (babl_base_init): initialize formats. - -2006-06-06 Øyvind Kolås - - Added conversions based on gggl that assume no gamma in their - conversions. - * extensions/gggl-lies.c: Added. - -2006-06-06 Øyvind Kolås - - * docs/Makefile.am: redirect the check for tempfile to /dev/null - * docs/tools/xml_insert.sh: Add tempfile workaround here as well. - -2006-06-06 Øyvind Kolås - - * docs/Makefile.am: Do not rely that a command calle tempfile exists. - -2006-06-05 Øyvind Kolås - - * extensions/gegl-fixups.c: A babl extension to make the testing of - gegl faster. - -2006-06-02 Øyvind Kolås - - * extensions/gggl.c: (table_init): Fix some compile warnings. - -2006-06-02 Øyvind Kolås - - I'm not entirely sure about installing babl-classes.h like this, it - might make more sense to create setters/getters to be used. Thus - making it possible to extend the structs at a later stage without - breaking binary compatibility. - - * babl/Makefile.am: Added babl-classes.h to the installed headers - * babl/babl-classes.h: Made the magic number fit in 32bit int. - * babl/babl.h: include babl-classes.h - -2006-02-22 Øyvind Kolås - - * docs/index-static.html.in: added a link to the DHTML version of the - coverage map. - -2006-02-22 Øyvind Kolås - - * extensions/gggl.c: (conv_rgbaF_rgb8), (conv_rgbAF_rgbF), (init): - added two more conversions for gggl usage. - -2005-12-17 Michael Schumacher - - * extensions/Makefile.in: add libgw32 and its dependencies to - LDADD for the win32 platform - -2005-11-10 Øyvind Kolås - - * docs/index-static.html.in: Minor reformulations and spelling fixes. - -2005-11-08 Sven Neumann - - * configure.ac: use AM_CONFIG_HEADER instead of AC_CONFIG_HEADERS. - -2005-11-04 Øyvind Kolås - - * babl/babl-format.c: (create_name): fixed an invalid memory access in - comparision of component order (and now also length.) - -2005-10-08 Øyvind Kolås - - * docs/index-static.html.in: Fixed the second processing example. ( - added missing pixel_count) - -2005-09-27 Øyvind Kolås - - * babl/babl-classes.h: Added time consumption instrumentation to - BablFish. - * babl/babl-fish-path.c: (babl_fish_path), (babl_fish_path_process): - intialization of instrumentation data. - * babl/babl-fish-stats.c: (table_destination_each), (each_conv), - (conversions), (babl_fish_stats): Output timing data, as well as a - list of all conversions with the obviously bad ones marked in red. - * babl/babl-internal.c: (babl_process): update instrumentation. - * babl/babl-introspect.c: (conversion_introspect): only query error - from conversions where that is legal. - * babl/babl-util.c: changed from msecs to nsecs (might be some more - places in the code to change names of variables.) - * extensions/gggl.c: (conv_gF_gaF), (conv_gF_rgbF), (conv_rgbF_gF), - (conv_rgbaF_rgb8): Changes to increase sanity. - -2005-09-27 Øyvind Kolås - - * tests/srgb_to_lab_u8.c: (test): renamed format (srgb -> R'G'B' u8) - -2005-09-27 Øyvind Kolås - - Updates done due to improvements gotten from BablFishStat feedback. - - * babl/base/model-gray.c: (components), (models), - (rgba2gray_gamma_2_2_premultiplied), - (gray_gamma_2_2_premultiplied2rgba), (conversions): - * babl/base/model-rgb.c: (components), (models), (copy_strip_1), - (g3_gamma_2_2), (g3_inv_gamma_2_2), - (non_premultiplied_to_premultiplied), - (premultiplied_to_non_premultiplied), - (rgba2rgba_gamma_2_2_premultiplied), - (rgba_gamma_2_2_premultiplied2rgba), (rgba2rgba_gamma_2_2), - (rgba_gamma_2_22rgba), (conversions), (formats): - * babl/base/model-ycbcr.c: (models), (formats): - * docs/index-static.html.in: - * extensions/gggl.c: (conv_F_8), (conv_8_F), (conv_F_D), - (conv_D_F), (conv_rgba8_rgbaF), (conv_rgb8_rgbF), (conv_ga8_gaF), - (conv_rgbaF_rgbaD), (conv_rgbaD_rgbaF), (conv_rgbAF_rgbaF), - (conv_rgbaF_rgbAF), (conv_rgbaF_rgbF), (conv_rgbF_rgbaF), - (conv_rgbaF_gaF), (conv_rgbaF_rgb8), (conv_rgbA16_rgbaF), - (conv_rgb8_rgba8), (conv_rgbA8_rgb8), (init): - -2005-09-27 Øyvind Kolås - - Upgrade of BablFishPath. - - * babl/babl-fish-path.c: (legal_error), (max_path_length), - (get_conversion_chain), (chain_contains_fmt), (chain_gen_each), - (babl_fish_path), (chain_process), (babl_fish_path_process), - (test_create), (chain_error): Various updates, needed instrumentation - and error data is now calculated and cached. - * babl/babl-fish-reference.c: (babl_fish_reference): do not update - instrumentation for internal calls. - * babl/babl-fish-simple.c: (babl_fish_simple): do not update - instrumentation for internal calls. - * babl/babl-introspect.c: (conversion_introspect): some more - information. - * babl/babl-model.c: (test_create), (babl_model_is_symmetric): use - comparion function from babl-util - * babl/babl-conversion.c: (test_create), (babl_conversion_cost), - (babl_conversion_error): use comparion function from babl-util. - * babl/babl.c: (babl_init): no need to do post extension tricks - anymore. - * babl/babl-core.c: (babl_core_init): added PAD component. - -2005-09-27 Øyvind Kolås - - * babl/babl-util.h, - * babl/babl-util.c: (babl_rel_avg_error): moved buffer comparison - function to one place. - * babl/babl-classes.h: Added error field to fishes, made path length - dynamic. - * babl/babl-internal.h: added misc global constants. - * babl/babl-internal.c: created caching accessors in classes, to avoid - very large bootstrapping time. - * babl/babl-conversion.c: (test_create), (babl_conversion_cost), - (babl_conversion_error): - * babl/babl-format.c: (test_create), (babl_format_loss): - * babl/babl-type.c: (babl_type_is_symmetric): - -2005-09-27 Øyvind Kolås - - Moved html generator stats code into a seperate source fil in core, - babl now creates /tmp/babl-stats.txt when the BABL_STATS enviroment - variable is set. - - * babl/Makefile.am: - * babl/babl.c: - * tests/babl_fish_path_dhtml.c: (main): - * babl/babl-fish-stats.c: (table_destination_each). - -2005-09-19 Øyvind Kolås - - * docs/index-static.html.in: s/DHTML/interactive/ - -2005-09-19 Øyvind Kolås - - BablFishPath touchups. - - * babl/babl-conversion.c: cost = cost * 10 + 1, makes the overhead - of actually running a conversion 1. Removed stupid long pats from - created conversions. - * babl/babl-fish-path.c: (chain_gen_each): Ensure the chain doesn't - take us through larger loss than allowed. - * babl/babl-internal.c: (babl_extension_post_load): do not - autogenerate formats. - * docs/index-static.html.in: updating documentation. - * tests/babl_fish_path_dhtml.c: (table_destination_each), - (table_source_each), (main): recoded to use CSS tricks instead of - javascript, reduced generated file size by 50%; - * extensions/gggl.c: (conv_labF_xyzF), (conv_xyzF_labF): added missing - return value. - -2005-09-19 Øyvind Kolås - - * extensions/gggl.c: Added the bulk of gggl based conversions as an - extension. Many of these don't live up to the quality requirements of - babl, but some do, and provide a good base for further BablFishPath - coverage. - -2005-09-18 Øyvind Kolås - - * docs/tools/changelog2rss: tool to create RSS feed of ChangeLog. - -2005-09-18 Øyvind Kolås - - * docs/Makefile.am: Included BablFishPath.[html|txt] - * docs/index-static.html.in: included some ramblings about the - background and purpose of babl. - -2005-09-18 Øyvind Kolås - - * tests/Makefile.am: - * tests/babl_fish_path_dhtml.c, - * tests/babl_fish_path_fitness.c: new introspection outputters, that - report on the conversion matrix of BablFishPath. - * tests/babl-html-dump.c: (main): removed conversions, since it is - now used as "Vocabulary" in the documentation,. - * tests/conversions.c: (each_conversion), (main): - * tests/formats.c: (format_check), (main): - * tests/models.c: (model_check), (main): - * tests/types.c: (type_check), (main): Moved the logic into BablCore - in previous commit. - -2005-09-18 Øyvind Kolås - - - Updating test suite, conversion and format quality testing - code folded into babl-core in previous commit. - -2005-09-18 Øyvind Kolås - - * babl/base/model-cmyk.c: (rgb_to_cmyk), (cmyk_to_rgb), - (conversions), (formats): - * babl/base/model-gray.c: (rgba_to_graya), (rgba_to_gray), - (graya_to_rgba), (gray_to_rgba), (conversions): - * babl/base/model-rgb.c: (formats): - * babl/base/model-ycbcr.c: (rgba_to_ycbcra), (rgba_to_ycbcr), - (ycbcra_to_rgba), (ycbcr_to_rgba), (conversions), (formats): - * extensions/CIE-Lab.c: (rgba_to_lab), (lab_to_rgba), - (rgba_to_laba), (laba_to_rgba), (conversions): - * extensions/naive-CMYK.c: (init), (rgba_to_cmyk), (cmyk_to_rgba): - - register linear reference conversions instead, since they can be used - in BablFishPath chains. - -2005-09-18 Øyvind Kolås - - Adding BablFishPath, as well as splittin out Simple and Reference - from babl-fish.c. (lazy commit of large changes :d ) - - * babl/babl-internal.h: - * babl/babl-core.c: (rgba_to_rgba), (babl_core_init): - * babl/babl-db.c: (babl_db_count): - * babl/babl-db.h: - * babl/babl-fish.c: (match_conversion), (babl_conversion_find), - (babl_fish_db), (babl_fish), (babl_fish_process), - (each_babl_fish_destroy): - * babl/babl-format.c: (babl_format_new), (babl_formats_count), - (babl_format_with_model_as_type), (test_create), - (babl_format_loss): - * babl/babl-internal.c: (babl_process), (each_conversion), - (each_format), (gen_type_format_for_model), - (gen_formats_for_model), (babl_extension_post_load): - * babl/babl-introspect.c: (conversion_introspect): - * babl/babl-model.c: (babl_model_new), (test_create), - (reference_format), (construct_double_format), - (babl_model_is_symmetric): - * babl/babl-sanity.c: (id_sanity): - * babl/babl-type.c: (babl_type_new), (r_interval), (test_init), - (double_vector_format), (babl_type_is_symmetric): - -2005-09-18 Øyvind Kolås - - * babl/babl-classes.h: added BablFishPath - * babl/babl-util.c: (babl_list_each), (init_ticks), (babl_ticks): - * babl/babl-util.h: - -2005-09-18 Øyvind Kolås - - * babl/babl.c: (babl_init), - * babl/babl.h: made babl_fish variadic. - -2005-09-18 Øyvind Kolås - - * babl/babl-memory.[ch]: (babl_free), (babl_realloc): made babl_free - variadic, and added the potential for a clearing realloc. - -2005-09-12 Øyvind Kolås - - * tests/conversions.c: (test_init): code simplification. - -2005-09-12 Øyvind Kolås - - * babl/babl-classes.h: add loss field to format class. - * babl/babl-format.c: (format_new): set loss field to -1 as initial - value. - * tests/conversions.c: (reference_format): simplify - * tests/formats.c: (test_init), (format_check), (main): code - simplification. - -2005-09-11 Øyvind Kolås - - * babl/babl.h: use gcc 4.x attribute for NULL sentinel. - * babl/babl-format.c: (babl_format_new): added missing enumeration - values to switch. - * babl/babl-model.c: (babl_model_new): added missing enumeration - values to switch. - -2005-09-11 Øyvind Kolås - - * tests/formats.c: new test (that might form the basis of loss - calculations done for ranking of formats). - * tests/Makefile.am: added new test - -2005-09-11 Øyvind Kolås - - * extensions/CIE-Lab.c: (formats): s/cie-lab-u16/CIE Lab u16/ - -2005-09-11 Øyvind Kolås - - * babl/babl-classes.h: Removed unused list of conversions to - types/models/formats. - - * babl/babl-conversion.c: (conversion_new): - * babl/babl-format.c: (each_babl_format_destroy), (format_new): - * babl/babl-image.c: (babl_image_from_linear): - * babl/babl-introspect.c: (item_conversions_introspect): - * babl/babl-memory.c: (babl_realloc): - * babl/babl-model.c: (each_babl_model_destroy), (model_new): - * babl/babl-sampling.c: (each_babl_sampling_destroy): - * babl/babl-sanity.c: (type_sanity), (model_sanity), (babl_sanity): - * babl/babl-type.c: (each_babl_type_destroy), (type_new): - -2005-09-09 Øyvind Kolås - - * docs/Makefile.am: set BABL_PATH to builddir for creating the - documentation - * docs/index-static.html.in: various updates. - -2005-09-09 Øyvind Kolås - - * babl/base/type-u16.c: (convert_double_u16_scaled): - * babl/base/type-u32.c: (convert_double_u32_scaled): - * babl/base/type-u8.c: (convert_double_u8_scaled), - (babl_base_type_u8): - * extensions/CIE-Lab.c: (convert_double_u8_scaled), - (convert_double_u16_scaled): uintval = rint (dval * MAXINT) - -2005-09-09 Øyvind Kolås - - * tests/conversions.c: (validate_conversion): do relative average - error calculations. - * tests/srgb_to_lab_u8.c: update values. - * tests/types.c: set a very low tolerance. - -2005-09-09 Øyvind Kolås - - * babl/babl-format.c: (create_name): Create shorter names when - the format uses a single datatype and the components are listed in - model order. - * babl/base/model-lab.c: removed. - * babl/base/model-rgb.c: (formats), - * babl/base/model-ycbcr.c: (formats): Use automatic names for formats. - -2005-09-09 Øyvind Kolås - - * babl/babl-classes.h: added error to BablConversion. - * babl/babl-conversion.c: (conversion_new), (babl_conversion_new): - track changes to fields in constructors. - -2005-09-08 Øyvind Kolås - - * Makefile.am: build extensions before tests. - * extensions/Makefile.in: build extensions when check is done. - * tests/Makefile.am: removed erroniously added foo test. - -2005-09-08 Øyvind Kolås - - * babl/base/type-float.c: - * babl/base/type-u16.c: - * babl/base/type-u8.c: s/"linear"/"plane"/ - * babl/base/Makefile.am, - * babl/base/babl-base.c, - * babl/base/type-u32.c: new type. - * extensions/CIE-Lab.c: - * extensions/Makefile.in: changes needed (for not yet added) lcms - extension. - * tests/Makefile.am: added new test. - * tests/conversions.c: new test to check fast paths against reference - fish. - -2005-09-08 Øyvind Kolås - - Made simple fishes work in the core. - - * babl/babl-classes.h: reduced number of conversion classes. - removed unused from and to members in struct. - * babl/babl-conversion.c: (conversion_new), (babl_conversion_new), - (babl_conversion_linear_process), (babl_conversion_plane_process), - (babl_conversion_planar_process), (babl_conversion_process): - * babl/babl-component.c: (each_babl_component_destroy), - (component_new): removed unused from and to members. - * babl/babl-fish.c: (babl_conversion_find2), - (babl_conversion_find), (babl_fish_reference), (babl_fish_simple), - (babl_fish), (convert_to_double), (convert_from_double), - (babl_fish_reference_process): use fast path if found directly in a - simple fishes. - * babl/babl-format.c: (babl_format_new): - * babl/babl-internal.c: (babl_process): - * babl/babl-internal.h: - * babl/babl-introspect.c: (each_introspect): - * babl/babl-model.c: (babl_model_new): - * babl/babl-core.c: (babl_core_init): s/linear/plane/ - * tests/babl_class_name.c: update according to class changes. - -2005-09-08 Øyvind Kolås - - * AUTHORS: Added Micahel Schumacher, and email addresses. - * docs/index-static.html.in: - * docs/babl.css: - * tests/babl-html-dump.c: (main), (normalize), (show_item), - (hide_item), (each_item), (model_html), (type_html), - (conversion_html), (format_html): Use DHTML for expandable display of - registered data structures. - * docs/graphics/Makefile.am: added web target, and .SILENT option. - * docs/Makefile.am: added .SILENT option. - * configure.ac: added website location. - -2005-09-01 Michael Schumacher - - * configure.ac: added a check for OS_WIN32 - * babl/Makefile.am: link with libgw32c to provide dl* functions on - win32 - * babl/babl-extension.c: added definitions of dl* function forwin32 - * tests/Makefile.am: removed -ldl for win32 - -2005-09-01 Sven Neumann - - * Makefile.am: don't dist the generated babl.pc file. - -2005-09-01 Sven Neumann - - * tests/Makefile.am (TESTS_ENVIRONMENT): set BABL_PATH to include - extension from the builddir. - -2005-09-01 Øyvind Kolås - - * babl/babl-internal.h: HACK statically define BablDb *db, - for all internal translation units. - -2005-09-01 Øyvind Kolås - - Added a 128 item hashtable to each object list. - - * babl/Makefile.am: added new file 'babl-db.c' - * babl/babl-db.h: moved static function ... - * babl/babl-db.c: ... here in a new file, also implemented a hashing - optimization based on the strings of names. - * babl/babl-internal.h: changed API in base class templates. - * babl/babl-component.c, - * babl/babl-extension.c, - * babl/babl-fish.c, - * babl/babl-format.c, - * babl/babl-image.c, - * babl/babl-model.c, - * babl/babl-sampling.c, - * babl/babl-type.c: changed db_insert(..) to babl_db_insert(db, ...) - - * babl/babl.c: added babl_fish_init () - -2005-08-31 Øyvind Kolås - - * docs/index-static.html.in: Changed ChangeLog link in NEWS section. - -2005-08-31 Øyvind Kolås - - * babl/babl-component.h, - * babl/babl-core.h, - * babl/babl-conversion.h, - * babl/babl-extension.h, - * babl/babl-format.h, - * babl/babl-instance.h, - * babl/babl-introspect.h, - * babl/babl-image.h, - * babl/babl-fish.h, - * babl/babl-model.h, - * babl/babl-sampling.h, - * babl/babl-sanity.h, - * babl/babl-type.h: DELETED - * babl/babl.h: defines moved from deleted headers. Added - documentation. - * babl/babl-internal.h: defines moved from deleted headers. - - * babl/Makefile.am: Reflect above changes. - * babl/babl-classes.h: redefined conversion functions to return long, - and take number of pixels as long. - * babl/babl-component.c, - * babl/babl-conversion.c, - * babl/babl-core.c, - * babl/babl-db.h, - * babl/babl-extension.c, - * babl/babl-fish.c, - * babl/babl-format.c, - * babl/babl-image.c, - * babl/babl-instance.h, - * babl/babl-internal.c, - * babl/babl-internal.h, - * babl/babl-introspect.c, - * babl/babl-memory.c, - * babl/babl-model.c, - * babl/babl-sampling.c, - * babl/babl-sanity.c, - * babl/babl-type.c, - * babl/babl.c, - * babl/base/model-cmyk.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-u8.c, - * docs/index-static.html.in, - * extensions/CIE-Lab.c, - * extensions/naive-CMYK.c, - * tests/babl-html-dump.c, - * tests/babl_class_name.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: reflect changes in headers. - -2005-08-31 Øyvind Kolås - - * Makefile.am, - * babl.pc.in, - * configure.ac, - * extensions/Makefile.in: Fixed build of extensions. (awaiting - fix of babl/babl-extension.c to use new #defines) - -2005-08-30 Øyvind Kolås - - * babl/base/model-gray.c: - (rgba_to_gray_alpha_premultiplied): fixed array index error. - * extensions/Makefile.in: Added -I../babl to include path. - * extensions/naive-CMYK.c: (init), (rgb_to_cmyk), (cmyk_to_rgb): - reordered the code, fixed a component swapping issue - discovered by tests/model.c - -2005-08-30 Øyvind Kolås - - * tests/srgb_to_lab_u8.c: updated values. - * tests/types.c: rewritten. - * tests/models.c: added, a test to test that reference conversions - registered for a BablModel are symmetrical. - * tests/float_to_u8.c, - * tests/u8_to_float.c, - * tests/rgb_to_lab_to_rgb.c, - * tests/rgb_to_ycbcr_to_rgb.c: removed. - * tests/Makefile.am: updated. - -2005-08-30 Øyvind Kolås - - * babl/babl-introspect.c: - (model_introspect), - (format_introspect), - (each_introspect): use double quotes for strings. - (conversion_introspect): new, show instrumentation data. - (fish_introspect): new, show instrumentation data. - -2005-08-30 Øyvind Kolås - - * babl/babl-classes.h: Added instrumentation variables to - BablConversion and BablFish. - * babl/babl-conversion.c: - (babl_conversion_new): Handle re-registration. - (conversion_new), - (babl_conversion_process): instrumentation variables - * babl/babl-component.c: - (babl_component_new): Handle re-registration. - * babl/babl-extension.c: Code cleanup. - (babl_extension_base): Handle re-registration. - (babl_extension_load_dir): close dir handle when done. - * babl/babl-fish.c: - (create_name) - (babl_fish_new): instrumentation variables, autogenerated - name. - (babl_fish_reference_new): instrumentation variables, - autogenerated name. - (babl_process): instrumentation variables. - (babl_conversion_find): use the lists of the source type for - the search (speed improvement). - (babl_fish): - (process_same_model): reference process with fewer steps. - (babl_fish_reference_process): use fast path when models are - the same. - * babl/babl-format.c: (babl_format_new): Handle re-registration. - * babl/babl-model.c: (babl_model_new): handle re-registration. - * babl/babl-type.c: (babl_type_new): handle re-registration. - -2005-08-30 Øyvind Kolås - - * babl/babl-memory.c: (babl_free): freeing of non babl allocated - memory is fatal. - -2005-08-29 Øyvind Kolås - - * tests/types.c: added test that tests the symmetry of reference - conversions for registered types. - -2005-08-29 Øyvind Kolås - - * babl/babl-format.c: (each_babl_format_destroy), (format_new), - (create_name), (babl_format_new): New API, name is now a key/value - pair, and if not set the name will be autogenerated. - * babl/base/model-rgb.c, - * babl/base/model-ycbcr.c, - * extensions/CIE-Lab.c, - * extensions/naive-CMYK.c, - * tests/Makefile.am, - * tests/float_to_u8.c, - * tests/grayscale_to_rgb.c, - * tests/rgb_to_bgr.c, - * tests/rgb_to_lab_to_rgb.c, - * tests/rgb_to_ycbcr.c, - * tests/rgb_to_ycbcr_to_rgb.c, - * tests/u8_to_float.c: update to new API. - -2005-08-29 Øyvind Kolås - - * babl/babl-db.h: Do nor warn about collision during db_insert - * babl/babl-extension.[ch]: Implemented fs traversal based on BABL_PATH. - added babl_set_extender to API. - * babl/babl-instance.h: Changed signature of type_name##_new. - * babl/babl-introspect.c: (babl_introspect): use new babl_extender - -2005-08-29 Øyvind Kolås - - * babl/babl-internal.c: (babl_internal_init): set memory functions. - * babl/babl-memory.c: (babl_set_malloc), (babl_set_free), - (functions_sanity), (babl_malloc), (babl_free), (babl_realloc), - (babl_calloc), (babl_sizeof), (babl_strdup), (babl_strcat), - (babl_memory_sanity), - * babl/babl-memory.h: Added babl_str* functions, that behave slightly - different from the standard ones. - * babl/babl-util.c: (babl_add_ptr_to_list): made error fatal. - * babl/babl.c: (babl_init), (babl_destroy): added babl_internal - -2005-08-28 Øyvind Kolås - - * babl/babl-internal.[ch]: (babl_die): A function to call from - babl_fatal (...), invokes commands resulting in a backtrace, thus - giving context to where things broke. - * babl/babl-component.c: (babl_component_new): - * babl/babl-conversion.c: (babl_conversion_new): - * babl/babl-fish.c: (babl_conversion_find): - * babl/babl-format.c: (format_new), (babl_format_new): - * babl/babl-model.c: (babl_model_new): - * babl/babl-type.c: (babl_type_new): use babl_fatal() instead of - babl_log () on API mistakes. - -2005-08-28 Øyvind Kolås - - * babl/babl-pixel-format.c: removed - * babl/babl-format.c: readded under new name. - - * babl/babl-pixel-format.h: removed - * babl/babl-format.h: readded under new name. - - * babl/babl-classes.c: removed - * babl/babl-internal.c: readded under new name. - - * babl/babl.h, - * babl/Makefile.am, - * babl/babl-fish.c: Accomodate changes. - -2005-08-28 Øyvind Kolås - - - * babl/babl-component.c: (babl_component_new): s/parameter/argument/ - - * babl/babl-extension.[ch]: the extension class. - * babl/babl-model.c: (create_name), (babl_model_new): generate - automatic name, allow override with key/value pair. - s/parameter/argument/ - * babl/babl-pixel-format.c: (babl_format_new): s/parameter/argument/ - * babl/babl-sampling.c: (babl_sampling): s/parameter/argument/ - * babl/babl-type.c: (babl_type_new): s/paramter/argument/ - * babl/babl-conversion.c, (create_name), (babl_conversion_new): - * babl/babl-conversion.h: Changed API, first two parameters are now - source and destination. - * babl/babl-instance.h: Added _NO_NEW variation of declarative name. - * babl/babl-internal.h: exit (-1) when a name lookup fails. - - * babl/babl.h: do not export babl-ids.h - - * babl/base/Makefile.am: Files removed - * babl/base/babl-base.c: (models): removed model-lab - * babl/base/cpercep.[ch], - * babl/base/models.c, - * babl/base/model-lab.c, - * babl/base/types.c: removed - - * babl/base/model-gray.c, - * babl/base/model-rgb.c, - * babl/base/model-ycbcr.c: - (models), (conversions): changed to new model_new and - conversion_new api. - - * babl/base/type-float.c, - * babl/base/type-u16.c, - * babl/base/type-u8.c: new conversion API - - - * configure.ac, - * Makefile.am: added extensions subdir - * extensions/Makefile.in: NB: hard-coded installpath to - /home/pippin/.babl/ - * extensions/CIE-Lab.c: moved here from BablBase, contains cpercep.c - and cpercep.h - * extensions/naive-CMYK.c: moved here from BablBase. - * extensions/util.h: convenience functions for babl extensions. - - * babl/babl-core.[ch]: double and RGBA originating from BablBase. - - * docs/index-static.html.in: updated TODO list. - - * tests/float_to_u8.c, - * tests/grayscale_to_rgb.c, - * tests/rgb_to_bgr.c, - * tests/rgb_to_lab_to_rgb.c, - * tests/rgb_to_ycbcr.c, - * tests/rgb_to_ycbcr_to_rgb.c, - * tests/srgb_to_lab_u8.c, - * tests/u8_to_float.c: follow naming changed. - -2005-08-27 Øyvind Kolås - - * Makefile.am: - * babl.pc.in: added -dl - * babl/babl-classes.c: Added BablExtension to string list of types. - * babl/babl-classes.h: Added BablExtension, some reordering in union. - * babl/babl-conversion.c: - (create_name), (babl_conversion_new): compute the name of the - conversion instead of explicitly having to provide it. - * babl/babl-core.c: - (convert_double_double), (copy_strip_1), - (babl_core_init): Moved double datatype and RGBA model from - base into core. - * babl/babl-core.h: new file - * babl/babl-db.h: improved logging, print current extender as well. - * babl/babl-ids.h: removed some non central ids. - * babl/babl-internal.h: new varargs based logger. - * babl/babl-introspect.c: (babl_introspect): use quiet "fake" - extender. Allow introspection of single objects. - * babl/babl-introspect.h: Allow introspection of single objects. - * babl/babl-memory.c: (babl_memory_sanity): use babl_log instead of - fprintf. - * babl/babl-sanity.c: (id_sanity): only complain about id==0 in - BablBase / BablCore. - * babl/babl.c: (babl_init), (babl_destroy): added core and extension - to build up/tear down lists. - * babl/babl.h: removed babl_introspect which doesn't belong here - anymore. - * babl/base/Makefile.am: Removed type-double.c - * babl/base/babl-base.c: (types), (models): removed - babl_base_type_double () - * babl/base/model-rgb.c: (components), (models): removed RGBA model. - * babl/base/type-double.c: removed - - * docs/index-static.html.in: - * tests/Makefile.am: LDADD += -ldl - * tests/introspect.c: (main): pass NULL as argument to - babl_introspect () to do full objectspace traversal. - - * babl/babl-fish.h: - * babl/babl-model.h: - * babl/babl-pixel-format.h: - * babl/babl-sampling.h: - * babl/babl-conversion.h: - * babl/babl-component.h: cosmetic rearrangement of lines. - -2005-08-27 Øyvind Kolås - - * babl/babl-component.c: (babl_component_new): - * babl/babl-conversion.c: (conversion_new), (babl_conversion_new), - (babl_conversion_process): - * babl/babl-db.h: - * babl/babl-fish.c: (babl_conversion_find), (babl_fish), - (babl_fish_reference_process), (babl_fish_process), (babl_process): - * babl/babl-image.c: (babl_image_from_linear), (babl_image): - * babl/babl-internal.h: - * babl/babl-introspect.c: (babl_introspect), (model_introspect): - * babl/babl-memory.c: (babl_malloc), (babl_strdup), (babl_realloc), - (babl_calloc): - * babl/babl-model.c: (babl_model_new): - * babl/babl-pixel-format.c: (format_new), (babl_format_new): - * babl/babl-type.c: (babl_type_new): - * babl/babl-util.c: (babl_add_ptr_to_list): - * babl/base/type-u8.c: - * tests/babl_class_name.c: (test): - - Made babl_log(...) print the file, line and function by itself. - -2005-08-27 Øyvind Kolås - - * docs/graphics/Makefile.am: s/INSCAPE/INKSCAPE/ - -2005-08-27 Sven Neumann - - * configure.ac - * Makefile.am - * docs/Makefile.am - * docs/graphics/Makefile.am: check for inkscape and w3m which are - needed to build the documentation. Compile without them but bail - out on 'make dist'. - -2005-08-26 Øyvind Kolås - - * tests/rgb_to_bgr.c: added component shuffling test - * tests/Makefile.am: added rgb_to_bgr to TESTS - -2005-08-25 Øyvind Kolås - - * docs/index-static.html.in: removed done things from TODO list. - -2005-08-25 Øyvind Kolås - - * babl/babl-fish.c: - (babl_to_double),(babl_from_double): new functions. - (babl_fish_reference_process): made type a component - shuffling work for linear buffers - * tests/rgb_to_lab_u8.c: filled in calculated values. - -2005-08-25 Øyvind Kolås - - * tests/rgb_to_ycbcr.c, - * tests/rgb_to_ycbcr_to_rgb.c: fix Y' component name - -2005-08-25 Øyvind Kolås - - * babl/babl-classes.h: - BablFormat: added .bytes_per_pixel - BablImage: s/bands/components/ - * babl/babl-conversion.c: s/bands/components/ - * babl/babl-image.c: s/bands/components/ - * babl/babl-pixel-format.c: (format_new) check if provided pixel - format matches model. Calculate .bytes_per_pixel. - * tests/babl-html-dump.c: use format.bytes_per_pixel - -2005-08-25 Øyvind Kolås - - * babl/babl-classes.h: - BablModel: added .type - BablFormat: reordered - BablImage: added .format, .model, .sampling and .type - BablFishReference: removed implementation details - * babl/babl-component.c: (component_new): use malloc instead of calloc - * babl/babl-conversion.c: - (conversion_new): use malloc instead of calloc - (babl_conversion_linear_process) - (babl_conversion_process): pass pitch to functions. - (babl_conversion_planar_process): duplicate data pointers in - image before passing them on. - * babl/babl-db.h: - (db_each): indentation fix. - * babl/babl-fish.c: - (babl_fish_reference_new), - (babl_fish_reference_process), - (babl_fish_process), (babl_process): restructuring of the - reference bablfish, approaching data and component shuffling - functionality. - * babl/babl-image.c: - (image_new): use malloc instead of calloc - (babl_image_from_linear), (babl_image): Added more information - to structure. - * babl/babl-image.h: s/_new// - * babl/babl-internal.h: #define BABL_MAX_COMPONENTS 32 - * babl/babl-introspect.c: - (format_introspect): s/bands/components/ - * babl/babl-model.c: - (model_new): use malloc instead of calloc - * babl/babl-pixel-format.c: - (format_new): use malloc instead of calloc - (babl_format_new): s/bands/components/ - * babl/babl-type.c: - (type_new): use malloc instead of calloc - - - * babl/base/type-double.c, - * babl/base/type-float.c, - * babl/base/type-u16.c, - * babl/base/type-u8.c: more parameters to conversion functions, added - a codewriting macro for different scale / min/max factors. - - * docs/index-static.html.in: reindent. - * tests/babl-html-dump.c: (format_html): s/bands/components/ - * tests/srgb_to_lab_u8.c: (test): use absolute error in check. - -2005-08-24 Øyvind Kolås - - * tests/sanity.c: Added a test that fails if the internal sanity - checks are failing. - -2005-08-24 Øyvind Kolås - - * babl/babl-classes.c, - * babl/babl-classes.h, - * babl/babl-component.c, - * babl/babl-conversion.c, - * babl/babl-db.h, - * babl/babl-fish.c, - * babl/babl-fish.h, - * babl/babl-image.c, - * babl/babl-image.h, - * babl/babl-internal.h, - * babl/babl-introspect.c, - * babl/babl-model.c, - * babl/babl-model.h, - * babl/babl-pixel-format.c, - * babl/babl-pixel-format.h, - * babl/babl-sanity.c, - * babl/babl-sanity.h, - * babl/babl-type.c, - * babl/babl.c, - * babl/babl.h, - * babl/base/model-cmyk.c, - * babl/base/model-gray.c, - * babl/base/model-lab.c, - * babl/base/model-rgb.c, - * babl/base/model-ycbcr.c, - * tests/Makefile.am, - * tests/babl-html-dump.c, - * tests/babl_class_name.c, - * tests/float_to_u8.c, - * tests/grayscale_to_rgb.c, - * tests/rgb_to_lab_to_rgb.c, - * tests/rgb_to_ycbcr.c, - * tests/rgb_to_ycbcr_to_rgb.c, - * tests/u8_to_float.c: s/PixelFormat/Format/ (etc in other cases), - Made BablFish be more polymorphic (accept - format names as well as BablFormats). - * babl/babl-ids.h: reorganized, some renames. - - * tests/srgb_to_lab_u8.c: new test for 8bit CIE Lab format (reference - data not correct yet). - - * babl/base/type-u16.c, - * babl/base/type-u8.c: Added CIE fixed point data types. - - -2005-08-24 Øyvind Kolås - - * docs/babl.css: Added code highlighting classes. - -2005-08-24 Øyvind Kolås - - * NEWS: remove draft for news release, at initial release everything - will be new. - -2005-08-23 Øyvind Kolås - - * docs/Makefile.am: use `tempfile` to create name of temporary file - * docs/tools/xml_insert.sh: use `tempfile` to create name of temporary - file. - -2005-08-23 Øyvind Kolås - - * babl/babl-classes.c, - * babl/babl-classes.h, - * babl/babl-conversion.c, - * babl/babl-fish.h, - * babl/babl-image.c, - * babl/babl-image.h, - * babl/babl-instance.h: Indentation, comments and other cleanup. - -2005-08-23 Øyvind Kolås - - * docs/index-static.html.in: update webdocs. - -2005-08-23 Øyvind Kolås - - * babl/babl-instance.h: babl_class_name is moved to babl-classes.h - * babl/babl-conversion.h: add a method to the conversion class for the - processing with registered functions. - * babl/babl-fish.c: Use above functions. - -2005-08-23 Øyvind Kolås - - * babl/babl-memory.[ch]: added additonal sanity checking (only - handling babl-memory allocated memory in free and realloc.) And added - new function babl_dup (void*), which duplicates an allocation. - * babl/babl-db.h: have an initial database size. - -2005-08-23 Øyvind Kolås - - * babl/babl-classes.c: Update class names to be in sync with enum in - babl-classes.h - -2005-08-23 Øyvind Kolås - - * babl/babl.c: implement ref counting to avoid unneccesary destruction - of static data when multiple instances of babl is used in an - adressspace. - -2005-08-23 Øyvind Kolås - - * tests/Makefile.am: - * tests/babl_class_name.c: new test. - -2005-08-22 Øyvind Kolås - - * babl/babl-classes.h: (BabPixelFormat): only a single BablModel. - * babl/babl-pixel-format.h, - * tests/babl-html-dump.c: accomodate change. - -2005-08-21 Øyvind Kolås - - * docs/.cvsignore: added Makefile and Makefile.in - * docs/graphics/.cvsignore: added Makefile and Makefile.in - * tests/.cvsignore: added babl_html_dump - -2005-08-21 Øyvind Kolås - - * babl/base/Makefile.am: Typo, s/babl-grays/babl-gray/ - -2005-08-21 Øyvind Kolås - - * docs/Makefile.am: Changed which html file is piped through w3m to - generate README. - -2005-08-21 Øyvind Kolås - - * babl/base/model-grayscale.c: removed - * babl/base/model-gray.c: added - * babl/base/Makefile.am: - * docs/graphics/index.html: fixed spelling. - -2005-08-21 Øyvind Kolås - - * docs/LGPL: added (hopefully as a link to ../COPYING) - -2005-08-21 Øyvind Kolås - - * Makefile.am, - * NEWS, - * autogen.sh, - * babl/Makefile.am, - * configure.ac, - * docs/.cvsignore, - * docs/Makefile.am, - * docs/babl.css, - * docs/graphics/.cvsignore, - * docs/graphics/Makefile.am, - * docs/graphics/babl-16x16.svg, - * docs/graphics/babl-48x48.svg, - * docs/graphics/babl-a4poster.svg, - * docs/graphics/index.html, - * README.in, - * docs/index-static.html.in, - * docs/tools/xml_insert.sh, - * tests/babl-html-dump.c, - * tests/Makefile.am: Added HTML based documentation as part of build - process. - -2005-08-21 Øyvind Kolås - - * babl/babl-classes.h: reindent, some documentation. - * babl/babl-fish.c: (babl_fish_reference_new): assertions for - arguments. - * babl/babl-ids.h: cleanup. - * babl/base/babl-base.c: (models): grayscale->gray - * babl/base/model-grayscale.c: (babl_base_model_gray), - (components), (models), (rgb_to_gray), (rgb_to_gray_2_2), - (gray_2_2_to_rgb), (gray_to_rgb), - (gray_alpha_premultiplied_to_rgba), - (rgba_to_gray_alpha_premultiplied), (conversions): grayscale->gray, - added gamma-2.2 with alpha. - * babl/base/model-lab.c: - * babl/base/model-rgb.c: - * babl/base/model-ycbcr.c: Name normalizations - * tests/float_to_u8.c: (test_float_to_rgb_u8): - * tests/grayscale_to_rgb.c: (test): - * tests/rgb_to_lab_to_rgb.c: (test): - * tests/rgb_to_ycbcr.c: (test): - * tests/rgb_to_ycbcr_to_rgb.c: (test): - * tests/u8_to_float.c: (test): Name synchronization. - -2005-08-18 Øyvind Kolås - - * babl/base/util.h: added new and hopefully correct gamma correction - and uncorrection functions. - * babl/base/model-grayscale.c: (components), - (rgb_to_grayscale_2_2), (grayscale_2_2_to_rgb): register - "luminance-gamma2.2" component, and use new gamma functions. - * babl/base/model-rgb.c: (g3_gamma_2_2), (g3_inv_gamma_2_2): use new - gamma functions. - * babl/base/model-ycbcr.c: (components), (models), (rgb_to_ycbcr), - (ycbcr_to_rgb): use gamma corrected luminance, and correct gamma. (pixel_formats): - uncomment until a new data type exist with headroom/footrom in 8bit - for proper rescaling of 0..255 to 16..235 for luma and +/-112 range - with offset of 128 for chroma (16 thorugh 240 inclusive). - * babl/base/rgb-constants.h: more digits as well as some #if 0' dead - code for reference. - * tests/rgb_to_lab_to_rgb.c: add more colors to the test buffer. - * tests/rgb_to_ycbcr.c: set TOLERANCE to a more meaningful value, - updated the ycbcr version of 50% gray. - -2005-08-17 Øyvind Kolås - - * babl/babl-internal.h: (type_name##_id) babl_log upon failed - lookups. - -2005-08-17 Øyvind Kolås - - * Makefile-mini - * babl/Makefile-mini: removed - -2005-08-17 Øyvind Kolås - - * configure.ac: added babl/Makefile to AC_CONFIG_FILES(). - -2005-08-17 Sven Neumann - - * README.in: spelling. - -2005-08-16 Øyvind Kolås - - * babl/base/pixel-formats.c: removed - -2005-08-16 Øyvind Kolås - - * babl/babl-model.c: (model_new) - * babl/babl-pixel-format.c: (pixel_format_new): reordered allocation - to place string (to avoid placing pointers in non aligned adresses). - -2005-08-16 Øyvind Kolås - - * babl/babl-component.c: (component_new, each_babl_component_destroy) allocate - larger chunk, (babl_component_new) removed Babl* switch, - * babl/babl-conversion.c: (conversion_new): removed superflous runtime - warnings. - * babl/babl-fish.c: (babl_fish_process): reindent, added assert for - instance. - * babl/babl-image.c: (image_new, babl_image_new): reindent, - , (babl_image_new_from_linear): added asserts for parameters. - * babl/babl-model.c: (each_babl_model_destroy, model_new): allocate - larger chunk. - * babl/babl-pixel-format.c: (each_babl_pixel_format_destroy, - pixel_format_new): allocate larger chunk. - * babl/babl-sanity.c: (babl_conversion_source): removed FIXME comment - used for helper function just used to make code more readable. - * babl/babl-type.c: (each_babl_type_destroy, type_new): allocate - larger chunk. - -2005-08-16 Øyvind Kolås - - * babl/babl-classes.h: (BablSampling) added static name. - * babl/babl-sampling.c: (babl_sampling_init): initialize names - * babl/babl-introspect.c: (pixel_format_introspect): display sampling - name as well. - -2005-08-16 Øyvind Kolås - - * babl/babl-component.[ch] - * babl/babl-conversion.[ch] - * babl/babl-fish.[ch] - * babl/babl-image.[ch] - * babl/babl-instance.h - * babl/babl-internal.h - * babl/babl-introspect.c - * babl/babl-model.[ch] - * babl/babl-pixel-format.[ch] - * babl/babl-sampling.[ch] - * babl/babl-sanity.c - * babl/babl-type.[ch] - * tests/float_to_u8.c - * tests/grayscale_to_rgb.c - * tests/rgb_to_lab_to_rgb.c - * tests/rgb_to_ycbcr.c - * tests/rgb_to_ycbcr_to_rgb.c - * tests/u8_to_float.c: Changed to use polymorph Babl * union's instead - of class specific structs in most cases, and in all cases for the - public API. - -2005-08-16 Øyvind Kolås - - * AUTHORS: Fixed spelling of Sven Neumann. - -2005-08-16 Øyvind Kolås - - * tests/.cvsignore: added the test binaries. - * .cvsignore: added *.tar.gz and *.tar.bz2 - -2005-08-16 Øyvind Kolås - - * AUTHORS: added Sven Neuman. - -2005-08-16 Sven Neumann - - * configure.ac: add -Wall to CFLAGS if gcc is being used. Use - AC_CONFIG_FILES() to define the files that need to be generated. - -2005-08-16 Øyvind Kolås - - * babl/base/mode-ycbcr.c: use coefficients from Charles Poyntons color - FAQ. - * tests/rgb_to_ycbcr_to_rgb.c: changed TOLERANCE to 0.00000000000001 - * tests/rgb_to_ycbcr.c: changed TOLERANCE as well as reference values. - -2005-08-16 Øyvind Kolås - - * babl/babl-fish.c: reindentation, no naming of fishes. - * babl/babl-ids.h: reordering, added YCBCRA, LAB and LAB_ALPHA - * babl/base/Makefile.am: added cpercep.[ch] model-lab.c and - model-ycbcr.c - * babl/base/cpercep.[ch]: *NEW* - * babl/base/model-lab.c: *NEW* CIE Lab color model, backed by a slightly - modified version of cpercep from gimp sources (no gamma correction and - normalized RGB values) - * babl/base/model-ycbcr: made ycbcr work, numbers still need to be - verified. - * babl/base/babl-base.c: initialize CIE Lab and YCbCr - * babl/base/model-cmyk.c: slight changes, it still doesn't pass - rgb->cmyk->rgb testing so not included yet. - * babl/base/model-rgb.c: make rgba-double use BABL_DOUBLE instead of - BABL_FLOAT - * babl/base/type-u16: fix conversion to double. - * tests/Makefile.am: added rgb_to_lab_to_rgb , rgb_to_ycbcr_to_rgb and - rgb_to_ycbcr - * tests/rgb_to_lab_to_rgb.c - * tests/rgb_to_ycbcr_to_rgb.c - * tests/rgb_to_ycbcr.c: *NEW* tests - -2005-08-15 Øyvind Kolås - - * babl/base/model-cmyk.c - * babl/base/model-ycbcr.c: added stubs - -2005-08-15 Øyvind Kolås - - * configure.ac: add rule to generate babl/base/Makefile - * babl/base: new directory - * babl/base/Makefile.am - * babl/base/babl-base.[ch] - * babl/base/type-double.c - * babl/base/type-float.c - * babl/base/type-u8.c - * babl/base/type-u16.c - * babl/base/model-rgb.c - * babl/base/model-grayscale.c - * babl/base/.cvsignore: added code removed in previous commit, in - a more oragnised manner. - - -2005-08-15 Øyvind Kolås - - * babl/babl-base/babl-base.[ch] - * babl/babl-base/babl-base-components.c - * babl/babl-base/babl-base-conversions.c - * babl/babl-base/babl-base-conversions-model.c - * babl/babl-base/babl-base-conversions-type.c - * babl/babl-base/babl-base-models.c - * babl/babl-base/babl-base-pixel-formats.c - * babl/babl-base/babl-base-types.c - * babl/babl-base/Makefile.am - * babl/babl-base/: removed - -2005-08-15 Øyvind Kolås - - * babl/babl-classes.h: BablPixelFormat: changed order of attributes to - match BablModel. BablFish: removed **from and **to lists, since they - were added at a wrong offset from the instance start anyways. - * babl/babl-fish.c: Made the reference fish work for linear buffers - with constant datatype - * babl/babl-ids.h: added BABL_RGBA_DOUBLE - * babl/babl-image.[ch]: made BablImage be allocated in a single chunk, - added babl_image_new_from_linear() - * babl/babl-type.c: added assertion about bits%8==0 - * babl/babl-base/babl-base-conversions-model.c: made BABL_PLANAR_SANITY accept - single band buffers. added conversions for premultiplied grayscale. - * babl/babl-base/babl-base-pixel-formats.c: added "rgba-double" - -2005-08-15 Øyvind Kolås - - * Makefile-mini: compile both the nop and introspect programs by - default. - * babl/Makefile-mini: link with standard math library - -2005-08-14 Øyvind Kolås - - * tests/float_to_u8.c - * tests/u8_to_float.c - * tests/grayscale_to_rgb.c: new files - * tests/Makefile.am: including preceding tests - -2005-08-14 Øyvind Kolås - - * babl/Makefile.am: added babl-instance.h, removed wilcard from - EXTRA_DIST - * babl/babl-classes.h: added BablModel **model to BablPixelFormat, - renamed BablReferenceFish to BablFishReference. Moved some logic out - to babl-instance.h. - * babl/babl-instance.h: new file. - * babl/babl-db.h: include babl-instance instead of babl-classes to - reduce amount of headers included by headers. - * babl/babl-fish.c: Added code to make it work for type conversions - * babl/babl-fish.h: Added babl_fish (source, destination) prototype - * babl/babl-internal.h: reindentation, include babl-conversion.h - * babl/babl-pixel-format.c: add model for each band - * babl/babl.c: destroy all fishes at finish - -2005-08-14 Øyvind Kolås - - * babl/babl-base/Makefile.am: LDADD = -lm - * babl/babl-base/babl-base-conversions-model.c: reindentation, added - gamma functions. - * babl/babl-base/babl-base-conversions-type.c: corrected reference - versions of u8, u16 and float. - * babl/babl-base/babl-base-models.c: ifdef'ed out some of the more - arcane models. - * babl/babl-base/babl-base-pixel-formats.c: added the corresponding - model used to all pixel formats. - -2005-08-09 Øyvind Kolås - - * babl/Makefile-mini: CFLAGS = -Werror -Wall .... - * babl/babl-classes.[ch]: BablPixelFormat removed unused pointers - to lists of conversions. Added BablReferenceFish. Renamed kind/ - instance.type to class_type/instance.class_type. Removed mostly - unused macro's and expanded them in source - - * babl/babl-component.c - * babl/babl-conversion.c - * babl/babl-db.h - * babl/babl-fish.c - * babl/babl-image.c - * babl/babl-introspect.c - * babl/babl-model.c - * babl/babl-pixel-format.c - * babl/babl-sampling.c - - * babl/babl-type.c: removed switch statement since all enums are - handled equally. - - * babl/tests/Makefile.am: added nop and introspect to TESTS, not - actual tests yet, but at least a segfault will cause make check to - fail. - -2005-08-09 Øyvind Kolås - - * autogen.sh: make autogen also run make - * babl/babl-classes.h: added define macro usable for sampling and - fish. - * babl/babl-fish.[ch]: cleanup of stub class - * babl/babl-sampling.h: simplification of header using a define. - -2005-08-09 Øyvind Kolås - - * babl/babl-conversion.c: indentation cleanup. - -2005-08-09 Øyvind Kolås - - * babl/babl-ids: added BABL_LUMINANCE_GAMMA_2_2, - BABL_LUMINANCE_MUL_ALPHA, BABL_GRAYSCALE_GAMMA_2_2, - BABL_GRAYSCALE_ALPHA_PREMULTIPLIED. - * babl/babl-base/babl-base-components: added "luminance*alpha" - * babl/babl-base/babl-base-components.conversions-model.c: Sprinked - asserts, added generic premultiplification operation. - * babl/babl-base-models.c: added gamma corrected and premultiplied - variations of grayscale. - -2005-08-09 Øyvind Kolås - - * babl/babl-internal.h: issue a babl_log when the named object is not - found during string based lookup. - * babl/babl-pixel-format.c: added BABL_IMAGE to var_args switch. - * babl/babl-classes.c: set babl_hmpf_on_name_lookups initial value to - 0, to make it hmpf only in babl-base. - -2005-08-09 Øyvind Kolås - - * babl/Makefile-mini: added babl-image.o. - -2005-08-09 Øyvind Kolås - - * babl/babl-sampling.h: removed reference to non existant function - babl_sampling_introspect (). - -2005-08-09 Øyvind Kolås - - * babl/Makefile.am - * babl/babl-image.c - * babl/babl-image.h - * babl/babl-classes.h: Added BablImage class. - - * babl/babl-component.c - * babl/babl-conversion.c - * babl/babl-model.c: Handle BABL_IMAGE in switches. - - -2005-08-09 Øyvind Kolås - - * .cvsignore: added INSTALL and README. - -2005-08-09 Øyvind Kolås - - * depcomp - * install-sh - * missing: erroniously included in first import. - -2005-08-09 Øyvind Kolås - - Imported into GNOME CVS. - -2005-08-09 Øyvind Kolås - - - seperate babl-base into separate subdir. - -2005-08-09 Øyvind Kolås - - - Renamed class to model. - - Auto toolification - -2005-08-08 Øyvind Kolås - - - Completed data model - - Added sanity checker - -2005-08-07 Øyvind Kolås - - - Introspection - -2005-08-05 Øyvind Kolås - - - Initial ChangeLog - -2005-07-31 Øyvind Kolås - - - Type system - -2005-07-29 Øyvind Kolås - - - Babl's inception in the 'Chaos Village' at WhatTheHack. - diff -Nru babl-0.1.6/config.guess babl-0.1.11/config.guess --- babl-0.1.6/config.guess 2011-11-20 07:26:53.000000000 +0000 +++ babl-0.1.11/config.guess 2012-04-25 20:24:25.000000000 +0000 @@ -2,9 +2,9 @@ # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-05-11' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -57,8 +55,8 @@ Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +143,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -792,13 +790,12 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -807,6 +804,9 @@ *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -861,6 +861,13 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -895,13 +902,16 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -943,7 +953,7 @@ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -978,13 +988,13 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -1315,6 +1325,9 @@ i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff -Nru babl-0.1.6/config.sub babl-0.1.11/config.sub --- babl-0.1.6/config.sub 2011-11-20 07:26:53.000000000 +0000 +++ babl-0.1.11/config.sub 2012-04-25 20:24:25.000000000 +0000 @@ -2,9 +2,9 @@ # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-03-23' +timestamp='2012-02-10' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -76,8 +74,8 @@ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -132,6 +130,10 @@ os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -247,17 +249,22 @@ # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -291,7 +298,7 @@ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -300,7 +307,7 @@ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -315,8 +322,7 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -329,7 +335,10 @@ strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -352,11 +361,13 @@ # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ @@ -365,8 +376,10 @@ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ @@ -400,7 +413,7 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -408,10 +421,11 @@ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -711,7 +725,6 @@ i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -808,10 +821,18 @@ ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -1120,13 +1141,8 @@ basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1336,7 +1352,7 @@ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ @@ -1548,9 +1564,6 @@ ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout diff -Nru babl-0.1.6/configure babl-0.1.11/configure --- babl-0.1.6/configure 2011-11-20 07:26:50.000000000 +0000 +++ babl-0.1.11/configure 2012-04-25 20:24:23.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for babl 0.1.7. +# Generated by GNU Autoconf 2.68 for babl 0.1.11. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ # Identity of this package. PACKAGE_NAME='babl' PACKAGE_TARNAME='babl' -PACKAGE_VERSION='0.1.7' -PACKAGE_STRING='babl 0.1.7' +PACKAGE_VERSION='0.1.11' +PACKAGE_STRING='babl 0.1.11' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -671,6 +671,7 @@ am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -686,6 +687,8 @@ CC AM_BACKSLASH AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -1350,7 +1353,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures babl 0.1.7 to adapt to many kinds of systems. +\`configure' configures babl 0.1.11 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1420,7 +1423,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of babl 0.1.7:";; + short | recursive ) echo "Configuration of babl 0.1.11:";; esac cat <<\_ACEOF @@ -1449,7 +1452,7 @@ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-vala build without Vala support - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR @@ -1536,7 +1539,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -babl configure 0.1.7 +babl configure 0.1.11 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1901,7 +1904,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by babl $as_me 0.1.7, which was +It was created by babl $as_me 0.1.11, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2257,11 +2260,11 @@ BABL_MAJOR_VERSION=0 BABL_MINOR_VERSION=1 -BABL_MICRO_VERSION=7 +BABL_MICRO_VERSION=11 BABL_INTERFACE_AGE=1 -BABL_BINARY_AGE=107 -BABL_VERSION=0.1.7 -BABL_REAL_VERSION=0.1.7 +BABL_BINARY_AGE=111 +BABL_VERSION=0.1.11 +BABL_REAL_VERSION=0.1.11 BABL_API_VERSION=0.1 @@ -2403,7 +2406,7 @@ if test "${enable_introspection+set}" = set; then : enableval=$enable_introspection; else - enable_introspection=auto + enable_introspection=no fi @@ -2582,7 +2585,7 @@ -BABL_LIBRARY_VERSION="106:1:106" +BABL_LIBRARY_VERSION="110:1:110" BABL_CURRENT_MINUS_AGE=0 @@ -3055,7 +3058,7 @@ # Define the identity of the package. PACKAGE='babl' - VERSION='0.1.7' + VERSION='0.1.11' # Some tools Automake needs. @@ -3076,11 +3079,11 @@ # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -3100,6 +3103,33 @@ no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + 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 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi AM_BACKSLASH='\' @@ -3155,6 +3185,7 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -3968,6 +3999,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. @@ -4027,7 +4059,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. @@ -4865,6 +4897,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. @@ -4924,7 +4957,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. @@ -4990,8 +5023,8 @@ -macro_version='2.4' -macro_revision='1.3293' +macro_version='2.4.2' +macro_revision='1.3337' @@ -5836,6 +5869,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -5875,7 +5913,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -6301,7 +6339,7 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -6938,13 +6976,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -7091,6 +7129,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -7479,7 +7518,7 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -7490,7 +7529,20 @@ case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -8130,7 +8182,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -8141,6 +8199,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -8173,6 +8232,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : @@ -8194,7 +8254,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -8759,7 +8821,22 @@ # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -8837,6 +8914,10 @@ + + + + test -z "$LN_S" && LN_S="ln -s" @@ -9296,7 +9377,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -9387,18 +9470,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; esac ;; esac @@ -9760,7 +9858,6 @@ hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -10013,8 +10110,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ @@ -10394,6 +10490,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' @@ -10439,6 +10536,7 @@ hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -10467,10 +10565,6 @@ hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -10483,7 +10577,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -10522,7 +10616,6 @@ fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -11146,11 +11239,6 @@ - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -11240,7 +11328,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -11249,7 +11337,7 @@ ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -11314,7 +11402,7 @@ ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -11453,7 +11541,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -11461,10 +11549,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -11472,7 +11556,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -11490,7 +11574,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -11510,7 +11594,7 @@ ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' @@ -11521,7 +11605,7 @@ ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -11582,7 +11666,7 @@ ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -11598,7 +11682,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -11635,9 +11719,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11731,7 +11815,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -11800,7 +11884,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11825,7 +11909,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -11849,7 +11933,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -11880,7 +11964,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11890,7 +11974,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -12672,6 +12756,8 @@ + + ac_config_commands="$ac_config_commands libtool" @@ -12682,8 +12768,8 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to disable maintainer-specific portions of Makefiles" >&5 -$as_echo_n "checking whether to disable maintainer-specific portions of Makefiles... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval @@ -14399,7 +14485,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by babl $as_me 0.1.7, which was +This file was extended by babl $as_me 0.1.11, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14465,7 +14551,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -babl config.status 0.1.7 +babl config.status 0.1.11 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -14605,6 +14691,7 @@ enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -14685,7 +14772,6 @@ allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -14744,6 +14830,7 @@ OBJDUMP \ SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -14792,7 +14879,6 @@ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -15598,8 +15684,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -15662,6 +15748,9 @@ # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -15957,10 +16046,6 @@ # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator diff -Nru babl-0.1.6/configure.ac babl-0.1.11/configure.ac --- babl-0.1.6/configure.ac 2011-11-20 07:24:31.000000000 +0000 +++ babl-0.1.11/configure.ac 2012-04-25 20:22:33.000000000 +0000 @@ -14,7 +14,7 @@ m4_define([babl_major_version], [0]) m4_define([babl_minor_version], [1]) -m4_define([babl_micro_version], [7]) +m4_define([babl_micro_version], [11]) m4_define([babl_real_version], [babl_major_version.babl_minor_version.babl_micro_version]) m4_define([babl_version], [babl_real_version]) diff -Nru babl-0.1.6/debian/changelog babl-0.1.11/debian/changelog --- babl-0.1.6/debian/changelog 2012-02-07 21:57:52.000000000 +0000 +++ babl-0.1.11/debian/changelog 2012-04-25 20:23:54.000000000 +0000 @@ -1,3 +1,9 @@ +babl (0.1.11-1~oo) oneiric; urgency=low + + * Git Sync. + + -- Matthew Walker Wed, 25 Apr 2012 19:35:22 -0800 + babl (0.1.6-2012020701~oo) oneiric; urgency=low * Git Sync. diff -Nru babl-0.1.6/depcomp babl-0.1.11/depcomp --- babl-0.1.6/depcomp 2011-11-20 07:26:54.000000000 +0000 +++ babl-0.1.11/depcomp 2012-04-25 20:24:26.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-12-04.11; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -90,10 +90,18 @@ # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" + cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -158,10 +166,12 @@ ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -405,6 +415,52 @@ rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/ \1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/ / + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -503,7 +559,9 @@ touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation diff -Nru babl-0.1.6/docs/graphics/Makefile.in babl-0.1.11/docs/graphics/Makefile.in --- babl-0.1.6/docs/graphics/Makefile.in 2011-11-20 07:26:53.000000000 +0000 +++ babl-0.1.11/docs/graphics/Makefile.in 2012-04-25 20:24:26.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. @@ -47,11 +47,11 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -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 " $@; -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 = @ SOURCES = DIST_SOURCES = @@ -324,10 +324,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/docs/Makefile.in babl-0.1.11/docs/Makefile.in --- babl-0.1.6/docs/Makefile.in 2011-11-20 07:26:53.000000000 +0000 +++ babl-0.1.11/docs/Makefile.in 2012-04-25 20:24:26.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. @@ -48,11 +48,11 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = index-static.html CONFIG_CLEAN_VPATH_FILES = -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 " $@; -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 = @ SOURCES = DIST_SOURCES = @@ -525,10 +525,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/extensions/cairo.c babl-0.1.11/extensions/cairo.c --- babl-0.1.6/extensions/cairo.c 1970-01-01 00:00:00.000000000 +0000 +++ babl-0.1.11/extensions/cairo.c 2012-04-25 20:22:33.000000000 +0000 @@ -0,0 +1,86 @@ +/* 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 "babl.h" + +int init (void); + +int +init (void) +{ + int testint = 23; + char *testchar = (char*) &testint; + int littleendian = (testchar[0] == 23); + + if (littleendian) + { + babl_format_new ( + "name", "cairo-ARGB32", + babl_model ("R'aG'aB'aA"), + babl_type ("u8"), + babl_component ("B'a"), + babl_component ("G'a"), + babl_component ("R'a"), + babl_component ("A"), + NULL + ); + + babl_format_new ( + "name", "cairo-RGB24", + babl_model ("R'G'B'"), + babl_type ("u8"), + babl_component ("B'"), + babl_component ("G'"), + babl_component ("R'"), + babl_component ("PAD"), + NULL + ); + } + else + { + babl_format_new ( + "name", "cairo-ARGB32", + babl_model ("R'G'B'A"), + babl_type ("u8"), + babl_component ("A"), + babl_component ("R'a"), + babl_component ("G'a"), + babl_component ("B'a"), + NULL + ); + babl_format_new ( + "name", "cairo-RGB24", + babl_model ("R'G'B'"), + babl_type ("u8"), + babl_component ("PAD"), + babl_component ("R'"), + babl_component ("G'"), + babl_component ("B'"), + NULL + ); + } + babl_format_new ( + "name", "cairo-A8", + babl_model ("YA"), + babl_type ("u8"), + babl_component ("A"), + NULL + ); + return 0; +} diff -Nru babl-0.1.6/extensions/fast-float.c babl-0.1.11/extensions/fast-float.c --- babl-0.1.6/extensions/fast-float.c 1970-01-01 00:00:00.000000000 +0000 +++ babl-0.1.11/extensions/fast-float.c 2012-04-25 20:22:33.000000000 +0000 @@ -0,0 +1,471 @@ +/* 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 "config.h" + +#include +#include + +#include "babl.h" +#include "babl-cpuaccel.h" +#include "extensions/util.h" +#include "base/util.h" + +#define INLINE inline + +#define LSHIFT 2 + +typedef float (* BablLookupFunction) (float value, + void *data); +#define babl_LOOKUP_MAX_ENTRIES (819200) + +typedef struct BablLookup +{ + BablLookupFunction function; + void *data; + int shift; + uint32_t positive_min, positive_max, negative_min, negative_max; + uint32_t bitmask[babl_LOOKUP_MAX_ENTRIES/32]; + float table[]; +} BablLookup; + + +static BablLookup *babl_lookup_new (BablLookupFunction function, + void * data, + float start, + float end, + float precision); +#if 0 +static void babl_lookup_free (BablLookup *lookup); +#endif + + +static inline float +babl_lookup (BablLookup *lookup, + float number) +{ + union + { + float f; + uint32_t i; + } u; + uint32_t i; + + u.f = number; + i = (u.i << LSHIFT )>> lookup->shift; + + if (i > lookup->positive_min && + i < lookup->positive_max) + i = i - lookup->positive_min; + else if (i > lookup->negative_min && + i < lookup->negative_max) + i = i - lookup->negative_min + (lookup->positive_max - lookup->positive_min); + else + return lookup->function (number, lookup->data); + + if (!(lookup->bitmask[i/32] & (1<<(i & 31)))) + { + /* XXX: should look up the value in the middle of the range + * that yields a given value, + * + * potentially even do linear interpolation between + * the two neighbour values to get away with a tiny + * lookup table.. + */ + lookup->table[i]= lookup->function (number, lookup->data); + lookup->bitmask[i/32] |= (1<<(i & 31)); + } + + return lookup->table[i]; +} + +static BablLookup * +babl_lookup_new (BablLookupFunction function, + void * data, + float start, + float end, + float precision) +{ + BablLookup *lookup; + union + { + float f; + uint32_t i; + } u; + int positive_min, positive_max, negative_min, negative_max; + int shift; + + /* normalize input parameters */ + if (start > end) + { /* swap */ + u.f = start; + start = end; + end = u.f; + } + + if (precision <= 0.000005) shift = 0; /* checked for later */ + else if (precision <= 0.000010) shift = 8; + else if (precision <= 0.000020) shift = 9; + else if (precision <= 0.000040) shift = 10; + else if (precision <= 0.000081) shift = 11; + else if (precision <= 0.000161) shift = 12; + else if (precision <= 0.000324) shift = 14; + else if (precision <= 0.000649) shift = 15; + else shift = 16; /* a bit better than 8bit sRGB quality */ + + /* Adjust slightly away from 0.0, saving many entries close to 0, this + * causes lookups very close to zero to be passed directly to the + * function instead. + */ + if (start == 0.0) + start = precision; + if (end == 0.0) + end = -precision; + + /* Compute start and */ + + if (start < 0.0 || end < 0.0) + { + if (end < 0.0) + { + u.f = start; + positive_max = (u.i << LSHIFT) >> shift; + u.f = end; + positive_min = (u.i << LSHIFT) >> shift; + negative_min = positive_max; + negative_max = positive_max; + } + else + { + u.f = 0 - precision; + positive_min = (u.i << LSHIFT) >> shift; + u.f = start; + positive_max = (u.i << LSHIFT) >> shift; + + u.f = 0 + precision; + negative_min = (u.i << LSHIFT) >> shift; + u.f = end; + negative_max = (u.i << LSHIFT) >> shift; + } + } + else + { + u.f = start; + positive_min = (u.i << LSHIFT) >> shift; + u.f = end; + positive_max = (u.i << LSHIFT) >> shift; + negative_min = positive_max; + negative_max = positive_max; + } + + if (shift == 0) /* short circuit, do not use ranges */ + { + positive_min = positive_max = negative_min = negative_max = 0; + } + + if ((positive_max-positive_min) + (negative_max-negative_min) > babl_LOOKUP_MAX_ENTRIES) + { + /* Reduce the size of the cache tables to fit within the bittable + * budget (the maximum allocation is around 2.18mb of memory + */ + + int diff = (positive_max-positive_min) + (negative_max-negative_min) - babl_LOOKUP_MAX_ENTRIES; + + if (negative_max - negative_min > 0) + { + if (negative_max - negative_min >= diff) + { + negative_max -= diff; + diff = 0; + } + else + { + diff -= negative_max - negative_min; + negative_max = negative_min; + } + } + if (diff) + positive_max-=diff; + } + + lookup = calloc (sizeof (BablLookup) + sizeof (float) * + ((positive_max-positive_min)+ + (negative_max-negative_min)), 1); + + lookup->positive_min = positive_min; + lookup->positive_max = positive_max; + lookup->negative_min = negative_min; + lookup->negative_max = negative_max; + lookup->shift = shift; + lookup->function = function; + lookup->data = data; + + return lookup; +} + +static BablLookup *fast_pow = NULL; + +static inline float core_lookup (float val, void *userdata) +{ + return linear_to_gamma_2_2 (val); +} + +static float +linear_to_gamma_2_2_lut (float val) +{ + return babl_lookup (fast_pow, val); +} + + +static BablLookup *fast_rpow = NULL; + +static inline float core_rlookup (float val, void *userdata) +{ + return gamma_2_2_to_linear (val); +} + +static float +gamma_2_2_to_linear_lut (float val) +{ + return babl_lookup (fast_rpow, val); +} + +#if 0 +static void +babl_lookup_free (BablLookup *lookup) +{ + free (lookup); +} +#endif + +static INLINE long +conv_rgbaF_linear_rgbAF_gamma (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + float alpha = fsrc[3]; + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++) * alpha; + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++) * alpha; + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++) * alpha; + *fdst++ = *fsrc++; + } + return samples; +} + +static INLINE long +conv_rgbAF_linear_rgbAF_gamma (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + float alpha = fsrc[3]; + if (alpha < BABL_ALPHA_THRESHOLD) + { + *fdst++ = 0.0; + *fdst++ = 0.0; + *fdst++ = 0.0; + *fdst++ = 0.0; + fsrc+=4; + } + else if (alpha >= 1.0) + { + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++); + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++); + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++); + *fdst++ = *fsrc++; + } + else + { + float alpha_recip = 1.0 / alpha; + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++ * alpha_recip) * alpha; + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++ * alpha_recip) * alpha; + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++ * alpha_recip) * alpha; + *fdst++ = *fsrc++; + } + } + return samples; +} + +static INLINE long +conv_rgbaF_linear_rgbaF_gamma (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++); + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++); + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++); + *fdst++ = *fsrc++; + } + return samples; +} + +static INLINE long +conv_rgbF_linear_rgbF_gamma (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++); + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++); + *fdst++ = linear_to_gamma_2_2_lut (*fsrc++); + } + return samples; +} + + +static INLINE long +conv_rgbaF_gamma_rgbaF_linear (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + *fdst++ = gamma_2_2_to_linear_lut (*fsrc++); + *fdst++ = gamma_2_2_to_linear_lut (*fsrc++); + *fdst++ = gamma_2_2_to_linear_lut (*fsrc++); + *fdst++ = *fsrc++; + } + return samples; +} + +static INLINE long +conv_rgbF_gamma_rgbF_linear (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + *fdst++ = gamma_2_2_to_linear_lut (*fsrc++); + *fdst++ = gamma_2_2_to_linear_lut (*fsrc++); + *fdst++ = gamma_2_2_to_linear_lut (*fsrc++); + } + return samples; +} + +#define o(src, dst) \ + babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, NULL) + +int init (void); + +int +init (void) +{ + const Babl *rgbaF_linear = babl_format_new ( + babl_model ("RGBA"), + babl_type ("float"), + babl_component ("R"), + babl_component ("G"), + babl_component ("B"), + babl_component ("A"), + NULL); + const Babl *rgbAF_linear = babl_format_new ( + babl_model ("RaGaBaA"), + babl_type ("float"), + babl_component ("Ra"), + babl_component ("Ga"), + babl_component ("Ba"), + babl_component ("A"), + NULL); + const Babl *rgbaF_gamma = babl_format_new ( + babl_model ("R'G'B'A"), + babl_type ("float"), + babl_component ("R'"), + babl_component ("G'"), + babl_component ("B'"), + babl_component ("A"), + NULL); + const Babl *rgbAF_gamma = babl_format_new ( + babl_model ("R'aG'aB'aA"), + babl_type ("float"), + babl_component ("R'a"), + babl_component ("G'a"), + babl_component ("B'a"), + babl_component ("A"), + NULL); + const Babl *rgbF_linear = babl_format_new ( + babl_model ("RGB"), + babl_type ("float"), + babl_component ("R"), + babl_component ("G"), + babl_component ("B"), + NULL); + const Babl *rgbF_gamma = babl_format_new ( + babl_model ("R'G'B'"), + babl_type ("float"), + babl_component ("R'"), + babl_component ("G'"), + babl_component ("B'"), + NULL); + + { + float f; + float a; + + fast_pow = babl_lookup_new (core_lookup, NULL, 0.0, 1.0, 0.0001); + fast_rpow = babl_lookup_new (core_rlookup, NULL, 0.0, 1.0, 0.0001); + + for (f = 0.0; f < 1.0; f+= 0.00001) + { + a = linear_to_gamma_2_2_lut (f); + a = gamma_2_2_to_linear_lut (f); + } + if (a < -10) + f = 2; + + } + + o (rgbAF_linear, rgbAF_gamma); + o (rgbaF_linear, rgbAF_gamma); + o (rgbaF_linear, rgbaF_gamma); + o (rgbaF_gamma, rgbaF_linear); + o (rgbF_linear, rgbF_gamma); + o (rgbF_gamma, rgbF_linear); + + return 0; +} + diff -Nru babl-0.1.6/extensions/float.c babl-0.1.11/extensions/float.c --- babl-0.1.6/extensions/float.c 1970-01-01 00:00:00.000000000 +0000 +++ babl-0.1.11/extensions/float.c 2012-04-25 20:22:33.000000000 +0000 @@ -0,0 +1,230 @@ +/* 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 "config.h" + +#include +#include + +#include "babl.h" +#include "babl-cpuaccel.h" +#include "extensions/util.h" +#include "base/util.h" + +#define INLINE inline + + +static INLINE long +conv_rgbaF_linear_rgbAF_gamma (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + float alpha = fsrc[3]; + *fdst++ = linear_to_gamma_2_2 (*fsrc++) * alpha; + *fdst++ = linear_to_gamma_2_2 (*fsrc++) * alpha; + *fdst++ = linear_to_gamma_2_2 (*fsrc++) * alpha; + *fdst++ = *fsrc++; + } + return samples; +} + +static INLINE long +conv_rgbAF_linear_rgbAF_gamma (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + float alpha = fsrc[3]; + if (alpha < BABL_ALPHA_THRESHOLD) + { + *fdst++ = 0.0; + *fdst++ = 0.0; + *fdst++ = 0.0; + *fdst++ = 0.0; + fsrc+=4; + } + else if (alpha >= 1.0) + { + *fdst++ = linear_to_gamma_2_2 (*fsrc++); + *fdst++ = linear_to_gamma_2_2 (*fsrc++); + *fdst++ = linear_to_gamma_2_2 (*fsrc++); + *fdst++ = *fsrc++; + } + else + { + float alpha_recip = 1.0 / alpha; + *fdst++ = linear_to_gamma_2_2 (*fsrc++ * alpha_recip) * alpha; + *fdst++ = linear_to_gamma_2_2 (*fsrc++ * alpha_recip) * alpha; + *fdst++ = linear_to_gamma_2_2 (*fsrc++ * alpha_recip) * alpha; + *fdst++ = *fsrc++; + } + } + return samples; +} + +static INLINE long +conv_rgbaF_linear_rgbaF_gamma (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + *fdst++ = linear_to_gamma_2_2 (*fsrc++); + *fdst++ = linear_to_gamma_2_2 (*fsrc++); + *fdst++ = linear_to_gamma_2_2 (*fsrc++); + *fdst++ = *fsrc++; + } + return samples; +} + +static INLINE long +conv_rgbF_linear_rgbF_gamma (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + *fdst++ = linear_to_gamma_2_2 (*fsrc++); + *fdst++ = linear_to_gamma_2_2 (*fsrc++); + *fdst++ = linear_to_gamma_2_2 (*fsrc++); + } + return samples; +} + + +static INLINE long +conv_rgbaF_gamma_rgbaF_linear (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + *fdst++ = gamma_2_2_to_linear (*fsrc++); + *fdst++ = gamma_2_2_to_linear (*fsrc++); + *fdst++ = gamma_2_2_to_linear (*fsrc++); + *fdst++ = *fsrc++; + } + return samples; +} + +static INLINE long +conv_rgbF_gamma_rgbF_linear (unsigned char *src, + unsigned char *dst, + long samples) +{ + float *fsrc = (float *) src; + float *fdst = (float *) dst; + int n = samples; + + while (n--) + { + *fdst++ = gamma_2_2_to_linear (*fsrc++); + *fdst++ = gamma_2_2_to_linear (*fsrc++); + *fdst++ = gamma_2_2_to_linear (*fsrc++); + } + return samples; +} + +#define o(src, dst) \ + babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, NULL) + +int init (void); + +int +init (void) +{ + const Babl *rgbaF_linear = babl_format_new ( + babl_model ("RGBA"), + babl_type ("float"), + babl_component ("R"), + babl_component ("G"), + babl_component ("B"), + babl_component ("A"), + NULL); + const Babl *rgbAF_linear = babl_format_new ( + babl_model ("RaGaBaA"), + babl_type ("float"), + babl_component ("Ra"), + babl_component ("Ga"), + babl_component ("Ba"), + babl_component ("A"), + NULL); + const Babl *rgbaF_gamma = babl_format_new ( + babl_model ("R'G'B'A"), + babl_type ("float"), + babl_component ("R'"), + babl_component ("G'"), + babl_component ("B'"), + babl_component ("A"), + NULL); + const Babl *rgbAF_gamma = babl_format_new ( + babl_model ("R'aG'aB'aA"), + babl_type ("float"), + babl_component ("R'a"), + babl_component ("G'a"), + babl_component ("B'a"), + babl_component ("A"), + NULL); + const Babl *rgbF_linear = babl_format_new ( + babl_model ("RGB"), + babl_type ("float"), + babl_component ("R"), + babl_component ("G"), + babl_component ("B"), + NULL); + const Babl *rgbF_gamma = babl_format_new ( + babl_model ("R'G'B'"), + babl_type ("float"), + babl_component ("R'"), + babl_component ("G'"), + babl_component ("B'"), + NULL); + + o (rgbAF_linear, rgbAF_gamma); + o (rgbaF_linear, rgbAF_gamma); + o (rgbaF_linear, rgbaF_gamma); + o (rgbaF_gamma, rgbaF_linear); + o (rgbF_linear, rgbF_gamma); + o (rgbF_gamma, rgbF_linear); + + return 0; +} + diff -Nru babl-0.1.6/extensions/gegl-fixups.c babl-0.1.11/extensions/gegl-fixups.c --- babl-0.1.6/extensions/gegl-fixups.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/extensions/gegl-fixups.c 2012-04-25 20:22:33.000000000 +0000 @@ -324,67 +324,6 @@ } static long -conv_rgbAF_sdl32 (unsigned char *srcc, - unsigned char *dstc, - long samples) -{ - float *src = (void *) srcc; - unsigned char *dst = (void *) dstc; - long n = samples; - - while (n--) - { - int i; - float alpha = src[3]; - for (i = 0; i < 3; i++) - { - float ca = src[i]; - int ret; - if (alpha < BABL_ALPHA_THRESHOLD) - ret = 0; - else - ret = table_F_8g[gggl_float_to_index16 (ca / alpha)]; - if (ret <= 0) - dst[i] = 0; - else if (ret > 255) - dst[i] = 255; - else - dst[i] = ret; - } - { - int t = dst[0]; - dst[0] = dst[2]; - dst[2] = t; - dst[3] = 255; - } - src += 4; - dst += 4; - } - return samples; -} - - -static long -conv_rgbaF_sdl32 (unsigned char *srcc, - unsigned char *dstc, - long samples) -{ - float *src = (void *) srcc; - unsigned char *dst = (void *) dstc; - long n = samples; - - while (n--) - { - dst[0] = table_F_8g[gggl_float_to_index16 (src[2])]; - dst[1] = table_F_8g[gggl_float_to_index16 (src[1])]; - dst[2] = table_F_8g[gggl_float_to_index16 (src[0])]; - src += 4; - dst += 4; - } - return samples; -} - -static long conv_rgbAF_rgb8 (unsigned char *srcc, unsigned char *dstc, long samples) @@ -473,9 +412,11 @@ while (n--) { float alpha = src[3]; - float recip = 1.0/alpha; + float recip; if (alpha < BABL_ALPHA_THRESHOLD) recip = 0.0; + else + recip = 1.0/alpha; dst[0] = src[0] * recip; dst[1] = src[1] * recip; dst[2] = src[2] * recip; @@ -518,8 +459,6 @@ return samples; } - - #define conv_rgb8_rgbAF conv_rgb8_rgbaF int init (void); @@ -527,7 +466,7 @@ int init (void) { - Babl *rgbaF = babl_format_new ( + const Babl *rgbaF = babl_format_new ( babl_model ("RGBA"), babl_type ("float"), babl_component ("R"), @@ -535,7 +474,7 @@ babl_component ("B"), babl_component ("A"), NULL); - Babl *rgbAF = babl_format_new ( + const Babl *rgbAF = babl_format_new ( babl_model ("RaGaBaA"), babl_type ("float"), babl_component ("Ra"), @@ -544,7 +483,7 @@ babl_component ("A"), NULL); - Babl *lrgba8 = babl_format_new ( + const Babl *lrgba8 = babl_format_new ( babl_model ("RGBA"), babl_type ("u8"), babl_component ("R"), @@ -553,7 +492,7 @@ babl_component ("A"), NULL); - Babl *rgba8 = babl_format_new ( + const Babl *rgba8 = babl_format_new ( babl_model ("R'G'B'A"), babl_type ("u8"), babl_component ("R'"), @@ -561,7 +500,7 @@ babl_component ("B'"), babl_component ("A"), NULL); - Babl *bgrA8 = babl_format_new ( + const Babl *bgrA8 = babl_format_new ( "name", "B'aG'aR'aA u8", babl_model ("R'aG'aB'aA"), babl_type ("u8"), @@ -570,22 +509,13 @@ babl_component ("R'a"), babl_component ("A"), NULL); - Babl *rgb8 = babl_format_new ( + const Babl *rgb8 = babl_format_new ( babl_model ("R'G'B'"), babl_type ("u8"), babl_component ("R'"), babl_component ("G'"), babl_component ("B'"), NULL); - Babl *sdl32 = babl_format_new ( - "name", "B'aG'aR'aPAD u8", - babl_model ("R'G'B'"), - babl_type ("u8"), - babl_component ("B'"), - babl_component ("G'"), - babl_component ("R'"), - babl_component ("PAD"), - NULL); table_init (); @@ -598,10 +528,8 @@ o (rgb8, rgbaF); o (rgb8, rgbAF); o (rgba8, rgbaF); - o (rgbaF, sdl32); o (rgbaF, rgb8); o (rgbAF, rgb8); - o (rgbAF, sdl32); o (bgrA8, rgba8); return 0; diff -Nru babl-0.1.6/extensions/gggl.c babl-0.1.11/extensions/gggl.c --- babl-0.1.6/extensions/gggl.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/extensions/gggl.c 2012-04-25 20:22:33.000000000 +0000 @@ -610,9 +610,10 @@ } else { + float alpha_recip = 1.0 / alpha; for (c = 0; c < 3; c++) { - *(float *) dst = ((*(float *) src) / alpha); + *(float *) dst = ((*(float *) src) * alpha_recip); dst += 4; src += 4; } @@ -1630,7 +1631,7 @@ int init (void) { - Babl *rgbaD = babl_format_new ( + const Babl *rgbaD = babl_format_new ( babl_model ("R'G'B'A"), babl_type ("double"), babl_component ("R'"), @@ -1638,7 +1639,7 @@ babl_component ("B'"), babl_component ("A"), NULL); - Babl *rgbaF = babl_format_new ( + const Babl *rgbaF = babl_format_new ( babl_model ("R'G'B'A"), babl_type ("float"), babl_component ("R'"), @@ -1646,7 +1647,7 @@ babl_component ("B'"), babl_component ("A"), NULL); - Babl *rgba16 = babl_format_new ( + const Babl *rgba16 = babl_format_new ( babl_model ("R'G'B'A"), babl_type ("u16"), babl_component ("R'"), @@ -1654,7 +1655,7 @@ babl_component ("B'"), babl_component ("A"), NULL); - Babl *rgba8 = babl_format_new ( + const Babl *rgba8 = babl_format_new ( babl_model ("R'G'B'A"), babl_type ("u8"), babl_component ("R'"), @@ -1662,7 +1663,7 @@ babl_component ("B'"), babl_component ("A"), NULL); - Babl *rgbAF = babl_format_new ( + const Babl *rgbAF = babl_format_new ( babl_model ("R'aG'aB'aA"), babl_type ("float"), babl_component ("R'a"), @@ -1670,7 +1671,7 @@ babl_component ("B'a"), babl_component ("A"), NULL); - Babl *rgbA16 = babl_format_new ( + const Babl *rgbA16 = babl_format_new ( babl_model ("R'aG'aB'aA"), babl_type ("u16"), babl_component ("R'a"), @@ -1678,7 +1679,7 @@ babl_component ("B'a"), babl_component ("A"), NULL); - Babl *rgbA8 = babl_format_new ( + const Babl *rgbA8 = babl_format_new ( babl_model ("R'aG'aB'aA"), babl_type ("u8"), babl_component ("R'a"), @@ -1686,79 +1687,79 @@ babl_component ("B'a"), babl_component ("A"), NULL); - Babl *rgbF = babl_format_new ( + const Babl *rgbF = babl_format_new ( babl_model ("R'G'B'"), babl_type ("float"), babl_component ("R'"), babl_component ("G'"), babl_component ("B'"), NULL); - Babl *rgb16 = babl_format_new ( + const Babl *rgb16 = babl_format_new ( babl_model ("R'G'B'"), babl_type ("u16"), babl_component ("R'"), babl_component ("G'"), babl_component ("B'"), NULL); - Babl *rgb8 = babl_format_new ( + const Babl *rgb8 = babl_format_new ( babl_model ("R'G'B'"), babl_type ("u8"), babl_component ("R'"), babl_component ("G'"), babl_component ("B'"), NULL); - Babl *gaF = babl_format_new ( + const Babl *gaF = babl_format_new ( babl_model ("Y'A"), babl_type ("float"), babl_component ("Y'"), babl_component ("A"), NULL); - Babl *gAF = babl_format_new ( + const Babl *gAF = babl_format_new ( babl_model ("Y'aA"), babl_type ("float"), babl_component ("Y'a"), babl_component ("A"), NULL); - Babl *gF = babl_format_new ( + const Babl *gF = babl_format_new ( babl_model ("Y'"), babl_type ("float"), babl_component ("Y'"), NULL); - Babl *ga16 = babl_format_new ( + const Babl *ga16 = babl_format_new ( babl_model ("Y'A"), babl_type ("u16"), babl_component ("Y'"), babl_component ("A"), NULL); - Babl *gA16 = babl_format_new ( + const Babl *gA16 = babl_format_new ( babl_model ("Y'aA"), babl_type ("u16"), babl_component ("Y'a"), babl_component ("A"), NULL); - Babl *g16 = babl_format_new ( + const Babl *g16 = babl_format_new ( babl_model ("Y'"), babl_type ("u16"), babl_component ("Y'"), NULL); - Babl *ga8 = babl_format_new ( + const Babl *ga8 = babl_format_new ( babl_model ("Y'A"), babl_type ("u8"), babl_component ("Y'"), babl_component ("A"), NULL); - Babl *gA8 = babl_format_new ( + const Babl *gA8 = babl_format_new ( babl_model ("Y'aA"), babl_type ("u8"), babl_component ("Y'a"), babl_component ("A"), NULL); - Babl *g8 = babl_format_new ( + const Babl *g8 = babl_format_new ( babl_model ("Y'"), babl_type ("u8"), babl_component ("Y'"), NULL); - Babl *yuvF = babl_format_new ( + const Babl *yuvF = babl_format_new ( babl_model ("Y'CbCr"), babl_type ("float"), babl_component ("Y'"), @@ -1766,7 +1767,7 @@ babl_component ("Cb"), babl_component ("Cr"), NULL); - Babl *yuvaF = babl_format_new ( + const Babl *yuvaF = babl_format_new ( babl_model ("Y'CbCrA"), babl_type ("float"), babl_component ("Y'"), diff -Nru babl-0.1.6/extensions/gggl-lies.c babl-0.1.11/extensions/gggl-lies.c --- babl-0.1.6/extensions/gggl-lies.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/extensions/gggl-lies.c 2012-04-25 20:22:33.000000000 +0000 @@ -735,10 +735,8 @@ return samples; } -#define conv_gAF_gF conv_gaF_gF #define conv_gF_gAF conv_gF_gaF -#define conv_rgbAF_rgbF conv_rgbaF_rgbF #define conv_rgbF_rgbAF conv_rgbF_rgbaF /* colorchannel dropping and adding */ @@ -836,29 +834,6 @@ /* other conversions coded for some optimisation reason or sumthin */ static INLINE long -conv_rgbA8_rgbaF (unsigned char *src, unsigned char *dst, long samples) -{ - long n = samples; - - while (n--) - { - float alpha = (*(unsigned char *) src + (3)) / 255.0; - int c; - - for (c = 0; c < 3; c++) - { - (*(float *) dst) = (*(unsigned char *) src / 255.0) / alpha; - dst += 4; - src += 1; - } - *(float *) dst = alpha; - dst += 4; - src += 1; - } - return samples; -} - -static INLINE long conv_rgbaF_rgbA8 (unsigned char *src, unsigned char *dst, long samples) { long n = samples; @@ -882,29 +857,6 @@ } static INLINE long -conv_rgbaF_rgbA16 (unsigned char *src, unsigned char *dst, long samples) -{ - long n = samples; - - while (n--) - { - float alpha = (*(float *) src + (4 * 3)); - int c; - - for (c = 0; c < 3; c++) - { - *(unsigned short *) dst = ((*(float *) src) * alpha) * 65535.0; - dst += 2; - src += 4; - } - *(unsigned short *) dst = alpha * 65535.0; - dst += 2; - src += 4; - } - return samples; -} - -static INLINE long conv_rgbaF_rgb8 (unsigned char *src, unsigned char *dst, long samples) { long n = samples; @@ -1291,29 +1243,6 @@ } static INLINE long -conv_rgbA16_rgba16 (unsigned char *src, unsigned char *dst, long samples) -{ - long n = samples; - - while (n--) - { - if (src[3]) - { - ((unsigned short *) dst)[0] = - (((unsigned short *) src)[0] * 65535) / src[3]; - ((unsigned short *) dst)[1] = - (((unsigned short *) src)[1] * 65535) / src[3]; - ((unsigned short *) dst)[2] = - (((unsigned short *) src)[2] * 65535) / src[3]; - } - ((unsigned short *) dst)[3] = ((unsigned short *) src)[3]; - dst += 8; - src += 8; - } - return samples; -} - -static INLINE long conv_rgb8_rgbP8 (unsigned char *src, unsigned char *dst, long samples) { long n = samples; @@ -1407,8 +1336,6 @@ return samples; } -#define conv_rgbA8_rgb8 conv_rgbP8_rgb8 - #ifndef byteclamp #define byteclamp(j) do { if (j < 0) j = 0;else if (j > 255) j = 255; } while (0) #endif @@ -1431,169 +1358,6 @@ byteclamp (V); \ } while (0) -static INLINE long -conv_yuv8_rgb8 (unsigned char *src, unsigned char *dst, long samples) -{ - long n = samples; - - while (n--) - { - int R, G, B; - - YUV82RGB8 (src[0], src[1], src[2], R, G, B); - dst[0] = R; - dst[1] = G; - dst[2] = B; - src += 3; - dst += 3; - } - return samples; -} - -static INLINE long -conv_rgb8_yuv8 (unsigned char *src, unsigned char *dst, long samples) -{ - long n = samples; - - while (n--) - { - int Y, U, V; - - YUV82RGB8 (src[0], src[1], src[2], Y, U, V); - dst[0] = Y; - dst[1] = U; - dst[2] = V; - src += 3; - dst += 3; - } - return samples; -} - -static INLINE long -conv_rgbaF_yuvaF (unsigned char *src, unsigned char *dst, long samples) -{ - float *src_f = (float *) src; - float *dst_f = (float *) dst; - long n = samples; - - while (n--) - { - float R, G, B; - float Y, U, V; - - R = src_f[0]; - G = src_f[1]; - B = src_f[2]; - - Y = 0.299 * R + 0.587 * B + 0.114 * B; - U = (-0.1687) * R - 0.3313 * G + 0.5 * B /* +0.5 */; - V = 0.5 * R - 0.4187 * G - 0.0813 * B /* +0.5 */; - - dst_f[0] = Y; - dst_f[1] = U; - dst_f[2] = V; - dst_f[3] = src_f[3]; - - dst_f += 4; - src_f += 4; - } - return samples; -} - -static INLINE long -conv_yuvaF_rgbaF (unsigned char *src, unsigned char *dst, long samples) -{ - float *src_f = (float *) src; - float *dst_f = (float *) dst; - long n = samples; - - while (n--) - { - float Y, U, V; - float R, G, B; - - Y = src_f[0]; - U = src_f[1]; - V = src_f[2]; - - R = Y + 1.40200 * (V /*-0.5*/); - G = Y - 0.34414 * (U /*-0.5*/) -0.71414 * (V /*-0.5*/); - B = Y + 1.77200 * (U /*-0.5*/); - - dst_f[0] = R; - dst_f[1] = G; - dst_f[2] = B; - dst_f[3] = src_f[3]; - - dst_f += 4; - src_f += 4; - } - return samples; -} - - - -static INLINE long -conv_rgbF_yuvF (unsigned char *src, unsigned char *dst, long samples) -{ - float *src_f = (float *) src; - float *dst_f = (float *) dst; - long n = samples; - - while (n--) - { - float R, G, B; - float Y, U, V; - - R = src_f[0]; - G = src_f[1]; - B = src_f[2]; - - Y = 0.299 * R + 0.587 * B + 0.114 * B; - U = (-0.1687) * R - 0.3313 * G + 0.5 * B /* +0.5 */; - V = 0.5 * R - 0.4187 * G - 0.0813 * B /* +0.5 */; - - dst_f[0] = Y; - dst_f[1] = U; - dst_f[2] = V; - - dst_f += 3; - src_f += 3; - } - return samples; -} - -static INLINE long -conv_yuvF_rgbF (unsigned char *src, unsigned char *dst, long samples) -{ - float *src_f = (float *) src; - float *dst_f = (float *) dst; - long n = samples; - - while (n--) - { - float Y, U, V; - float R, G, B; - - Y = src_f[0]; - U = src_f[1]; - V = src_f[2]; - - R = Y + 1.40200 * (V /*-0.5*/); - G = Y - 0.34414 * (U /*-0.5*/) -0.71414 * (V /*-0.5*/); - B = Y + 1.77200 * (U /*-0.5*/); - - dst_f[0] = R; - dst_f[1] = G; - dst_f[2] = B; - - dst_f += 3; - src_f += 3; - } - return samples; -} - - /******* lab, xyz and rgb interaction, lifted from cpercep by adam d. moss */ /* @@ -1796,7 +1560,7 @@ int init (void) { - Babl *rgbaF = babl_format_new ( + const Babl *rgbaF = babl_format_new ( babl_model ("RGBA"), babl_type ("float"), babl_component ("R"), @@ -1804,7 +1568,7 @@ babl_component ("B"), babl_component ("A"), NULL); - Babl *rgba16 = babl_format_new ( + const Babl *rgba16 = babl_format_new ( babl_model ("RGBA"), babl_type ("u16"), babl_component ("R"), @@ -1812,7 +1576,7 @@ babl_component ("B"), babl_component ("A"), NULL); - Babl *rgbaD = babl_format_new ( + const Babl *rgbaD = babl_format_new ( babl_model ("RGBA"), babl_type ("double"), babl_component ("R"), @@ -1820,7 +1584,7 @@ babl_component ("B"), babl_component ("A"), NULL); - Babl *rgba8 = babl_format_new ( + const Babl *rgba8 = babl_format_new ( babl_model ("RGBA"), babl_type ("u8"), babl_component ("R"), @@ -1828,7 +1592,7 @@ babl_component ("B"), babl_component ("A"), NULL); - Babl *rgbAF = babl_format_new ( + const Babl *rgbAF = babl_format_new ( babl_model ("RaGaBaA"), babl_type ("float"), babl_component ("Ra"), @@ -1836,7 +1600,7 @@ babl_component ("Ba"), babl_component ("A"), NULL); - Babl *rgbA16 = babl_format_new ( + const Babl *rgbA16 = babl_format_new ( babl_model ("RaGaBaA"), babl_type ("u16"), babl_component ("Ra"), @@ -1844,7 +1608,7 @@ babl_component ("Ba"), babl_component ("A"), NULL); - Babl *rgbA8 = babl_format_new ( + const Babl *rgbA8 = babl_format_new ( babl_model ("RaGaBaA"), babl_type ("u8"), babl_component ("Ra"), @@ -1852,107 +1616,78 @@ babl_component ("Ba"), babl_component ("A"), NULL); - Babl *rgbF = babl_format_new ( + const Babl *rgbF = babl_format_new ( babl_model ("RGB"), babl_type ("float"), babl_component ("R"), babl_component ("G"), babl_component ("B"), NULL); - Babl *rgb16 = babl_format_new ( + const Babl *rgb16 = babl_format_new ( babl_model ("RGB"), babl_type ("u16"), babl_component ("R"), babl_component ("G"), babl_component ("B"), NULL); - Babl *rgb8 = babl_format_new ( + const Babl *rgb8 = babl_format_new ( babl_model ("RGB"), babl_type ("u8"), babl_component ("R"), babl_component ("G"), babl_component ("B"), NULL); - Babl *gaF = babl_format_new ( + const Babl *gaF = babl_format_new ( babl_model ("YA"), babl_type ("float"), babl_component ("Y"), babl_component ("A"), NULL); - Babl *gAF = babl_format_new ( + const Babl *gAF = babl_format_new ( babl_model ("YaA"), babl_type ("float"), babl_component ("Ya"), babl_component ("A"), NULL); - Babl *gF = babl_format_new ( + const Babl *gF = babl_format_new ( babl_model ("Y"), babl_type ("float"), babl_component ("Y"), NULL); - Babl *ga16 = babl_format_new ( + const Babl *ga16 = babl_format_new ( babl_model ("YA"), babl_type ("u16"), babl_component ("Y"), babl_component ("A"), NULL); - Babl *gA16 = babl_format_new ( + const Babl *gA16 = babl_format_new ( babl_model ("YaA"), babl_type ("u16"), babl_component ("Ya"), babl_component ("A"), NULL); - Babl *g16 = babl_format_new ( + const Babl *g16 = babl_format_new ( babl_model ("Y"), babl_type ("u16"), babl_component ("Y"), NULL); - Babl *ga8 = babl_format_new ( + const Babl *ga8 = babl_format_new ( babl_model ("YA"), babl_type ("u8"), babl_component ("Y"), babl_component ("A"), NULL); - Babl *gA8 = babl_format_new ( + const Babl *gA8 = babl_format_new ( babl_model ("YaA"), babl_type ("u8"), babl_component ("Ya"), babl_component ("A"), NULL); - Babl *g8 = babl_format_new ( + const Babl *g8 = babl_format_new ( babl_model ("Y"), babl_type ("u8"), babl_component ("Y"), NULL); - Babl *yuv8 = babl_format_new ( - "name", "Y'CbCr u8", - "planar", - babl_model ("Y'CbCr"), - babl_type ("u8-luma"), - babl_sampling (1, 1), - babl_component ("Y'"), - babl_type ("u8-chroma"), - babl_sampling (2, 2), - babl_component ("Cb"), - babl_component ("Cr"), - NULL); - Babl *yuvF = babl_format_new ( - babl_model ("Y'CbCr"), - babl_type ("float"), - babl_component ("Y'"), - babl_type ("float"), - babl_component ("Cb"), - babl_component ("Cr"), - NULL); - Babl *yuvaF = babl_format_new ( - babl_model ("Y'CbCrA"), - babl_type ("float"), - babl_component ("Y'"), - babl_type ("float"), - babl_component ("Cb"), - babl_component ("Cr"), - babl_component ("A"), - NULL); #define o(src, dst) \ babl_conversion_new (src, dst, "linear", conv_ ## src ## _ ## dst, NULL) @@ -1993,11 +1728,6 @@ o (g16, g8); o (rgbaF, rgbAF); o (rgbAF, rgbaF); - o (yuv8, rgb8); - o (rgb8, yuv8); - o (yuvF, rgbF); - o (rgbF, yuvF); - o (yuvaF, rgbaF); o (rgbA8, rgbA16); o (rgb8, rgb16); o (ga8, ga16); @@ -2020,9 +1750,7 @@ o (gaF, gAF); o (gAF, gaF); o (rgbaF, rgbF); - o (rgbAF, rgbF); o (gaF, gF); - o (gAF, gF); o (rgbF, rgbaF); o (rgbF, rgbAF); o (gF, gaF); @@ -2034,29 +1762,18 @@ o (rgbAF, gAF); o (gAF, rgbAF); o (rgbaF, rgb8); - o (rgbA8, rgbaF); o (rgbA8, rgbAF); o (ga8, gaF); o (gA8, gAF); o (rgbA8, rgba8); o (rgba8, rgbA8); - o (rgbA16, rgba16); o (gAF, rgbAF); o (rgbaF, g8); o (rgbaF, rgb16); o (rgb8, rgba8); o (rgb8, rgbA8); - o (rgbA8, rgb8); o (rgba8, rgb8); o (rgbaF, rgbA8); - o (rgbaF, rgbA16); - o (rgbA16, rgbaF); - o (yuv8, rgb8); - o (rgb8, yuv8); - o (yuvF, rgbF); - o (rgbF, yuvF); - o (yuvaF, rgbaF); - o (rgbaF, yuvaF); #if 0 o (rgbF, xyzF); o (xyzF, rgbF); diff -Nru babl-0.1.6/extensions/gimp-8bit.c babl-0.1.11/extensions/gimp-8bit.c --- babl-0.1.6/extensions/gimp-8bit.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/extensions/gimp-8bit.c 2012-04-25 20:22:33.000000000 +0000 @@ -389,7 +389,7 @@ int init (void) { - Babl *ragabaaF_linear = babl_format_new ( + const Babl *ragabaaF_linear = babl_format_new ( babl_model ("RaGaBaA"), babl_type ("float"), babl_component ("Ra"), @@ -397,7 +397,7 @@ babl_component ("Ba"), babl_component ("A"), NULL); - Babl *rgbaF_linear = babl_format_new ( + const Babl *rgbaF_linear = babl_format_new ( babl_model ("RGBA"), babl_type ("float"), babl_component ("R"), @@ -405,7 +405,7 @@ babl_component ("B"), babl_component ("A"), NULL); - Babl *rgba8_linear = babl_format_new ( + const Babl *rgba8_linear = babl_format_new ( babl_model ("RGBA"), babl_type ("u8"), babl_component ("R"), @@ -413,7 +413,7 @@ babl_component ("B"), babl_component ("A"), NULL); - Babl *rgba8_gamma_2_2 = babl_format_new ( + const Babl *rgba8_gamma_2_2 = babl_format_new ( babl_model ("R'G'B'A"), babl_type ("u8"), babl_component ("R'"), @@ -421,56 +421,56 @@ babl_component ("B'"), babl_component ("A"), NULL); - Babl *rgbF_linear = babl_format_new ( + const Babl *rgbF_linear = babl_format_new ( babl_model ("RGB"), babl_type ("float"), babl_component ("R"), babl_component ("G"), babl_component ("B"), NULL); - Babl *rgb8_linear = babl_format_new ( + const Babl *rgb8_linear = babl_format_new ( babl_model ("RGB"), babl_type ("u8"), babl_component ("R"), babl_component ("G"), babl_component ("B"), NULL); - Babl *rgb8_gamma_2_2 = babl_format_new ( + const Babl *rgb8_gamma_2_2 = babl_format_new ( babl_model ("R'G'B'"), babl_type ("u8"), babl_component ("R'"), babl_component ("G'"), babl_component ("B'"), NULL); - Babl *gaF_linear = babl_format_new ( + const Babl *gaF_linear = babl_format_new ( babl_model ("YA"), babl_type ("float"), babl_component ("Y"), babl_component ("A"), NULL); - Babl *ga8_linear = babl_format_new ( + const Babl *ga8_linear = babl_format_new ( babl_model ("YA"), babl_type ("u8"), babl_component ("Y"), babl_component ("A"), NULL); - Babl *ga8_gamma_2_2 = babl_format_new ( + const Babl *ga8_gamma_2_2 = babl_format_new ( babl_model ("Y'A"), babl_type ("u8"), babl_component ("Y'"), babl_component ("A"), NULL); - Babl *gF_linear = babl_format_new ( + const Babl *gF_linear = babl_format_new ( babl_model ("Y"), babl_type ("float"), babl_component ("Y"), NULL); - Babl *g8_linear = babl_format_new ( + const Babl *g8_linear = babl_format_new ( babl_model ("Y"), babl_type ("u8"), babl_component ("Y"), NULL); - Babl *g8_gamma_2_2 = babl_format_new ( + const Babl *g8_gamma_2_2 = babl_format_new ( babl_model ("Y'"), babl_type ("u8"), babl_component ("Y'"), diff -Nru babl-0.1.6/extensions/Makefile.am babl-0.1.11/extensions/Makefile.am --- babl-0.1.6/extensions/Makefile.am 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/extensions/Makefile.am 2012-04-25 20:22:33.000000000 +0000 @@ -6,6 +6,7 @@ noinst_HEADERS = util.h + AM_CPPFLAGS = \ -I$(top_builddir) \ -I$(top_srcdir) \ @@ -14,14 +15,18 @@ extdir = $(libdir)/babl-@BABL_API_VERSION@ ext_LTLIBRARIES = \ + cairo.la \ CIE.la \ gegl-fixups.la \ gggl-lies.la \ gggl.la \ gimp-8bit.la \ + float.la \ + fast-float.la \ naive-CMYK.la \ sse-fixups.la +cairo_la_SOURCES = cairo.c CIE_la_SOURCES = CIE.c gegl_fixups_la_SOURCES = gegl-fixups.c gggl_lies_la_SOURCES = gggl-lies.c @@ -29,6 +34,8 @@ gimp_8bit_la_SOURCES = gimp-8bit.c naive_CMYK_la_SOURCES = naive-CMYK.c sse_fixups_la_SOURCES = sse-fixups.c +float_la_SOURCES = float.c +fast_float_la_SOURCES = fast-float.c LIBS = $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la $(MATH_LIB) diff -Nru babl-0.1.6/extensions/Makefile.in babl-0.1.11/extensions/Makefile.in --- babl-0.1.6/extensions/Makefile.in 2011-11-20 07:26:54.000000000 +0000 +++ babl-0.1.11/extensions/Makefile.in 2012-04-25 20:24:26.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. @@ -71,14 +71,29 @@ 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)$(extdir)" LTLIBRARIES = $(ext_LTLIBRARIES) CIE_la_LIBADD = am_CIE_la_OBJECTS = CIE.lo CIE_la_OBJECTS = $(am_CIE_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 +cairo_la_LIBADD = +am_cairo_la_OBJECTS = cairo.lo +cairo_la_OBJECTS = $(am_cairo_la_OBJECTS) +fast_float_la_LIBADD = +am_fast_float_la_OBJECTS = fast-float.lo +fast_float_la_OBJECTS = $(am_fast_float_la_OBJECTS) +float_la_LIBADD = +am_float_la_OBJECTS = float.lo +float_la_OBJECTS = $(am_float_la_OBJECTS) gegl_fixups_la_LIBADD = am_gegl_fixups_la_OBJECTS = gegl-fixups.lo gegl_fixups_la_OBJECTS = $(am_gegl_fixups_la_OBJECTS) @@ -110,30 +125,32 @@ $(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 = $(CIE_la_SOURCES) $(gegl_fixups_la_SOURCES) \ - $(gggl_lies_la_SOURCES) $(gggl_la_SOURCES) \ - $(gimp_8bit_la_SOURCES) $(naive_CMYK_la_SOURCES) \ - $(sse_fixups_la_SOURCES) -DIST_SOURCES = $(CIE_la_SOURCES) $(gegl_fixups_la_SOURCES) \ - $(gggl_lies_la_SOURCES) $(gggl_la_SOURCES) \ - $(gimp_8bit_la_SOURCES) $(naive_CMYK_la_SOURCES) \ - $(sse_fixups_la_SOURCES) +SOURCES = $(CIE_la_SOURCES) $(cairo_la_SOURCES) \ + $(fast_float_la_SOURCES) $(float_la_SOURCES) \ + $(gegl_fixups_la_SOURCES) $(gggl_lies_la_SOURCES) \ + $(gggl_la_SOURCES) $(gimp_8bit_la_SOURCES) \ + $(naive_CMYK_la_SOURCES) $(sse_fixups_la_SOURCES) +DIST_SOURCES = $(CIE_la_SOURCES) $(cairo_la_SOURCES) \ + $(fast_float_la_SOURCES) $(float_la_SOURCES) \ + $(gegl_fixups_la_SOURCES) $(gggl_lies_la_SOURCES) \ + $(gggl_la_SOURCES) $(gimp_8bit_la_SOURCES) \ + $(naive_CMYK_la_SOURCES) $(sse_fixups_la_SOURCES) HEADERS = $(noinst_HEADERS) ETAGS = etags CTAGS = ctags @@ -300,14 +317,18 @@ extdir = $(libdir)/babl-@BABL_API_VERSION@ ext_LTLIBRARIES = \ + cairo.la \ CIE.la \ gegl-fixups.la \ gggl-lies.la \ gggl.la \ gimp-8bit.la \ + float.la \ + fast-float.la \ naive-CMYK.la \ sse-fixups.la +cairo_la_SOURCES = cairo.c CIE_la_SOURCES = CIE.c gegl_fixups_la_SOURCES = gegl-fixups.c gggl_lies_la_SOURCES = gggl-lies.c @@ -315,6 +336,8 @@ gimp_8bit_la_SOURCES = gimp-8bit.c naive_CMYK_la_SOURCES = naive-CMYK.c sse_fixups_la_SOURCES = sse-fixups.c +float_la_SOURCES = float.c +fast_float_la_SOURCES = fast-float.c sse_fixups_la_CFLAGS = $(MMX_EXTRA_CFLAGS) $(SSE_EXTRA_CFLAGS) all: all-am @@ -381,19 +404,25 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -CIE.la: $(CIE_la_OBJECTS) $(CIE_la_DEPENDENCIES) +CIE.la: $(CIE_la_OBJECTS) $(CIE_la_DEPENDENCIES) $(EXTRA_CIE_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(CIE_la_OBJECTS) $(CIE_la_LIBADD) $(LIBS) -gegl-fixups.la: $(gegl_fixups_la_OBJECTS) $(gegl_fixups_la_DEPENDENCIES) +cairo.la: $(cairo_la_OBJECTS) $(cairo_la_DEPENDENCIES) $(EXTRA_cairo_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(cairo_la_OBJECTS) $(cairo_la_LIBADD) $(LIBS) +fast-float.la: $(fast_float_la_OBJECTS) $(fast_float_la_DEPENDENCIES) $(EXTRA_fast_float_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(fast_float_la_OBJECTS) $(fast_float_la_LIBADD) $(LIBS) +float.la: $(float_la_OBJECTS) $(float_la_DEPENDENCIES) $(EXTRA_float_la_DEPENDENCIES) + $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(float_la_OBJECTS) $(float_la_LIBADD) $(LIBS) +gegl-fixups.la: $(gegl_fixups_la_OBJECTS) $(gegl_fixups_la_DEPENDENCIES) $(EXTRA_gegl_fixups_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(gegl_fixups_la_OBJECTS) $(gegl_fixups_la_LIBADD) $(LIBS) -gggl-lies.la: $(gggl_lies_la_OBJECTS) $(gggl_lies_la_DEPENDENCIES) +gggl-lies.la: $(gggl_lies_la_OBJECTS) $(gggl_lies_la_DEPENDENCIES) $(EXTRA_gggl_lies_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(gggl_lies_la_OBJECTS) $(gggl_lies_la_LIBADD) $(LIBS) -gggl.la: $(gggl_la_OBJECTS) $(gggl_la_DEPENDENCIES) +gggl.la: $(gggl_la_OBJECTS) $(gggl_la_DEPENDENCIES) $(EXTRA_gggl_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(gggl_la_OBJECTS) $(gggl_la_LIBADD) $(LIBS) -gimp-8bit.la: $(gimp_8bit_la_OBJECTS) $(gimp_8bit_la_DEPENDENCIES) +gimp-8bit.la: $(gimp_8bit_la_OBJECTS) $(gimp_8bit_la_DEPENDENCIES) $(EXTRA_gimp_8bit_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(gimp_8bit_la_OBJECTS) $(gimp_8bit_la_LIBADD) $(LIBS) -naive-CMYK.la: $(naive_CMYK_la_OBJECTS) $(naive_CMYK_la_DEPENDENCIES) +naive-CMYK.la: $(naive_CMYK_la_OBJECTS) $(naive_CMYK_la_DEPENDENCIES) $(EXTRA_naive_CMYK_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) -rpath $(extdir) $(naive_CMYK_la_OBJECTS) $(naive_CMYK_la_LIBADD) $(LIBS) -sse-fixups.la: $(sse_fixups_la_OBJECTS) $(sse_fixups_la_DEPENDENCIES) +sse-fixups.la: $(sse_fixups_la_OBJECTS) $(sse_fixups_la_DEPENDENCIES) $(EXTRA_sse_fixups_la_DEPENDENCIES) $(AM_V_CCLD)$(sse_fixups_la_LINK) -rpath $(extdir) $(sse_fixups_la_OBJECTS) $(sse_fixups_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -403,6 +432,9 @@ -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CIE.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cairo.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fast-float.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gegl-fixups.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gggl-lies.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gggl.Plo@am__quote@ @@ -413,34 +445,30 @@ .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 $@ $< sse_fixups_la-sse-fixups.lo: sse-fixups.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sse_fixups_la_CFLAGS) $(CFLAGS) -MT sse_fixups_la-sse-fixups.lo -MD -MP -MF $(DEPDIR)/sse_fixups_la-sse-fixups.Tpo -c -o sse_fixups_la-sse-fixups.lo `test -f 'sse-fixups.c' || echo '$(srcdir)/'`sse-fixups.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/sse_fixups_la-sse-fixups.Tpo $(DEPDIR)/sse_fixups_la-sse-fixups.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sse-fixups.c' object='sse_fixups_la-sse-fixups.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sse-fixups.c' object='sse_fixups_la-sse-fixups.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sse_fixups_la_CFLAGS) $(CFLAGS) -c -o sse_fixups_la-sse-fixups.lo `test -f 'sse-fixups.c' || echo '$(srcdir)/'`sse-fixups.c +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sse_fixups_la_CFLAGS) $(CFLAGS) -c -o sse_fixups_la-sse-fixups.lo `test -f 'sse-fixups.c' || echo '$(srcdir)/'`sse-fixups.c mostlyclean-libtool: -rm -f *.lo @@ -547,10 +575,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/extensions/sse-fixups.c babl-0.1.11/extensions/sse-fixups.c --- babl-0.1.6/extensions/sse-fixups.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/extensions/sse-fixups.c 2012-04-25 20:22:33.000000000 +0000 @@ -163,6 +163,10 @@ return samples; } +#define conv_rgbaF_gamma_rgba8_gamma conv_rgbaF_linear_rgba8_linear +#define conv_rgbaF_gamma_rgb8_gamma conv_rgbaF_linear_rgb8_linear + + #endif #define o(src, dst) \ @@ -175,7 +179,7 @@ { #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(USE_SSE) && defined(USE_MMX) - Babl *rgbaF_linear = babl_format_new ( + const Babl *rgbaF_linear = babl_format_new ( babl_model ("RGBA"), babl_type ("float"), babl_component ("R"), @@ -183,7 +187,7 @@ babl_component ("B"), babl_component ("A"), NULL); - Babl *rgba8_linear = babl_format_new ( + const Babl *rgba8_linear = babl_format_new ( babl_model ("RGBA"), babl_type ("u8"), babl_component ("R"), @@ -191,7 +195,7 @@ babl_component ("B"), babl_component ("A"), NULL); - Babl *rgb8_linear = babl_format_new ( + const Babl *rgb8_linear = babl_format_new ( babl_model ("RGB"), babl_type ("u8"), babl_component ("R"), @@ -199,11 +203,37 @@ babl_component ("B"), NULL); + const Babl *rgbaF_gamma = babl_format_new ( + babl_model ("R'G'B'A"), + babl_type ("float"), + babl_component ("R'"), + babl_component ("G'"), + babl_component ("B'"), + babl_component ("A"), + NULL); + const Babl *rgba8_gamma = babl_format_new ( + babl_model ("R'G'B'A"), + babl_type ("u8"), + babl_component ("R'"), + babl_component ("G'"), + babl_component ("B'"), + babl_component ("A"), + NULL); + const Babl *rgb8_gamma = babl_format_new ( + babl_model ("R'G'B'"), + babl_type ("u8"), + babl_component ("R'"), + babl_component ("G'"), + babl_component ("B'"), + NULL); + if ((babl_cpu_accel_get_support () & BABL_CPU_ACCEL_X86_MMX) && (babl_cpu_accel_get_support () & BABL_CPU_ACCEL_X86_SSE)) { o (rgbaF_linear, rgb8_linear); o (rgbaF_linear, rgba8_linear); + o (rgbaF_gamma, rgb8_gamma); + o (rgbaF_gamma, rgba8_gamma); } #endif diff -Nru babl-0.1.6/install-sh babl-0.1.11/install-sh --- babl-0.1.6/install-sh 2011-11-20 07:26:53.000000000 +0000 +++ babl-0.1.11/install-sh 2012-04-25 20:24:25.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ fi shift # arg dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -200,7 +208,11 @@ fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ for src do - # Protect names starting with `-'. + # Protect names problematic for `test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -385,7 +392,7 @@ case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff -Nru babl-0.1.6/ltmain.sh babl-0.1.11/ltmain.sh --- babl-0.1.6/ltmain.sh 2011-11-20 07:26:39.000000000 +0000 +++ babl-0.1.11/ltmain.sh 2012-04-25 20:24:14.000000000 +0000 @@ -1,9 +1,9 @@ -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -41,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -69,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 Debian-2.4-2ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -79,9 +80,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4 Debian-2.4-2ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1ubuntu1" TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -136,15 +137,10 @@ : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -387,7 +383,7 @@ ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -771,8 +767,8 @@ s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1052,6 +1048,7 @@ opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1120,6 +1117,10 @@ opt_silent=false func_append preserve_args " $opt" ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" @@ -2059,7 +2060,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3201,11 +3202,13 @@ # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3470,7 +3473,7 @@ # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -3982,14 +3985,17 @@ # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5057,9 +5063,15 @@ { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5643,7 +5655,8 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6150,7 +6163,8 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -6834,7 +6848,7 @@ test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7319,6 +7333,7 @@ # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7438,7 +7453,7 @@ versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8026,6 +8041,11 @@ # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8056,7 +8076,7 @@ elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -8064,11 +8084,7 @@ if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9158,6 +9174,8 @@ esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9267,7 +9285,8 @@ *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" diff -Nru babl-0.1.6/m4/introspection.m4 babl-0.1.11/m4/introspection.m4 --- babl-0.1.6/m4/introspection.m4 2011-10-23 02:12:34.000000000 +0000 +++ babl-0.1.11/m4/introspection.m4 2012-04-25 20:22:33.000000000 +0000 @@ -22,7 +22,7 @@ AC_ARG_ENABLE(introspection, AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], [Enable introspection for this build]),, - [enable_introspection=auto]) + [enable_introspection=no]) ])dnl AC_MSG_CHECKING([for gobject-introspection]) diff -Nru babl-0.1.6/m4/libtool.m4 babl-0.1.11/m4/libtool.m4 --- babl-0.1.6/m4/libtool.m4 2011-11-20 07:26:39.000000000 +0000 +++ babl-0.1.11/m4/libtool.m4 2012-04-25 20:24:14.000000000 +0000 @@ -1,8 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -11,8 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -146,6 +146,8 @@ AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -801,6 +803,7 @@ m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -822,6 +825,31 @@ ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -852,6 +880,10 @@ m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -954,7 +986,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -962,6 +1000,7 @@ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -973,6 +1012,7 @@ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -990,7 +1030,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1035,8 +1077,8 @@ ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1047,6 +1089,8 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1330,14 +1374,27 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1414,13 +1471,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1600,6 +1657,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1639,7 +1701,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2185,7 +2247,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2194,7 +2256,7 @@ ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2259,7 +2321,7 @@ ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2398,7 +2460,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2406,10 +2468,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2417,7 +2475,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2435,7 +2493,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2455,7 +2513,7 @@ ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' @@ -2466,7 +2524,7 @@ ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2527,7 +2585,7 @@ ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2543,7 +2601,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2580,9 +2638,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2657,7 +2715,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2726,7 +2784,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2751,7 +2809,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -2775,7 +2833,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2806,7 +2864,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2816,7 +2874,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -3238,7 +3296,7 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3658,6 +3716,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -4242,7 +4301,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4334,18 +4395,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4505,7 +4581,9 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4533,7 +4611,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4787,8 +4864,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5084,6 +5160,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5130,10 +5207,6 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5146,7 +5219,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5185,7 +5258,6 @@ fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5627,9 +5699,6 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5787,7 +5856,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6157,7 +6225,7 @@ esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6918,12 +6986,18 @@ } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7120,7 +7194,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7253,7 +7326,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7440,6 +7512,77 @@ ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7509,6 +7652,13 @@ dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], diff -Nru babl-0.1.6/m4/ltoptions.m4 babl-0.1.11/m4/ltoptions.m4 --- babl-0.1.6/m4/ltoptions.m4 2011-11-20 07:26:39.000000000 +0000 +++ babl-0.1.11/m4/ltoptions.m4 2012-04-25 20:24:14.000000000 +0000 @@ -326,9 +326,24 @@ # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) diff -Nru babl-0.1.6/m4/ltversion.m4 babl-0.1.11/m4/ltversion.m4 --- babl-0.1.6/m4/ltversion.m4 2011-11-20 07:26:40.000000000 +0000 +++ babl-0.1.11/m4/ltversion.m4 2012-04-25 20:24:15.000000000 +0000 @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru babl-0.1.6/Makefile.am babl-0.1.11/Makefile.am --- babl-0.1.6/Makefile.am 2011-10-23 02:12:34.000000000 +0000 +++ babl-0.1.11/Makefile.am 2012-04-25 20:22:33.000000000 +0000 @@ -1,5 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -DISTCHECK_CONFIGURE_FLAGS = --enable-introspection +#DISTCHECK_CONFIGURE_FLAGS = --enable-introspection SUBDIRS = \ babl \ @@ -14,13 +14,11 @@ EXTRA_DIST = \ $(built_dist_files) \ - ChangeLog.pre-0-1 \ AUTHORS \ COPYING \ INSTALL \ NEWS \ TODO \ - ChangeLog \ autogen.sh \ m4/introspection.m4 \ babl.pc.in @@ -51,25 +49,3 @@ rm -f $(BUILT_EXTRA_DIST); \ fi - - -### ChangeLog generation - -CHANGELOG_START = BABL_0_1_0 - -ChangeLog: $(srcdir)/ChangeLog -$(srcdir)/ChangeLog: - @echo Creating $@ - @if test -d "$(srcdir)/.git"; then \ - (GIT_DIR=$(top_srcdir)/.git ./missing --run \ - git log $(CHANGELOG_START)^.. --stat) | fmt --split-only > $@.tmp \ - && mv -f $@.tmp $@ \ - || ($(RM) $@.tmp; \ - echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \ - (test -f $@ || echo git-log is required to generate this file >> $@)); \ - else \ - test -f $@ || \ - (echo A git checkout and git-log is required to generate ChangeLog >&2 && \ - echo A git checkout and git-log is required to generate this file >> $@); \ - fi -.PHONY: $(srcdir)/ChangeLog diff -Nru babl-0.1.6/Makefile.in babl-0.1.11/Makefile.in --- babl-0.1.6/Makefile.in 2011-11-20 07:26:54.000000000 +0000 +++ babl-0.1.11/Makefile.in 2012-04-25 20:24:27.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. @@ -38,8 +38,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/INSTALL.in \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/babl.pc.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog NEWS TODO \ - config.guess config.sub depcomp install-sh ltmain.sh missing + $(top_srcdir)/configure AUTHORS COPYING NEWS TODO config.guess \ + config.sub depcomp install-sh ltmain.sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/introspection.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -54,11 +54,11 @@ CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = babl.pc INSTALL CONFIG_CLEAN_VPATH_FILES = -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 " $@; -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 = @ SOURCES = DIST_SOURCES = @@ -90,6 +90,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)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ @@ -104,9 +110,11 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -135,6 +143,8 @@ GZIP_ENV = --best DIST_ARCHIVES = $(distdir).tar.bz2 distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALTIVEC_EXTRA_CFLAGS = @ALTIVEC_EXTRA_CFLAGS@ @@ -288,7 +298,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -DISTCHECK_CONFIGURE_FLAGS = --enable-introspection +#DISTCHECK_CONFIGURE_FLAGS = --enable-introspection SUBDIRS = \ babl \ extensions \ @@ -300,13 +310,11 @@ built_dist_files = README EXTRA_DIST = \ $(built_dist_files) \ - ChangeLog.pre-0-1 \ AUTHORS \ COPYING \ INSTALL \ NEWS \ TODO \ - ChangeLog \ autogen.sh \ m4/introspection.m4 \ babl.pc.in @@ -315,14 +323,11 @@ $(built_dist_files) \ babl.pc - -### ChangeLog generation -CHANGELOG_START = BABL_0_1_0 all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -358,10 +363,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -403,9 +406,7 @@ @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + dir='$(DESTDIR)$(pkgconfigdir)'; $(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. @@ -613,7 +614,11 @@ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir @@ -621,7 +626,7 @@ $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -638,7 +643,7 @@ $(am__remove_distdir) dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then @@ -652,6 +657,8 @@ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -671,6 +678,7 @@ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -699,8 +707,16 @@ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -734,10 +750,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: @@ -826,8 +847,8 @@ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ + dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-local distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ @@ -860,23 +881,6 @@ rm -f $(BUILT_EXTRA_DIST); \ fi -ChangeLog: $(srcdir)/ChangeLog -$(srcdir)/ChangeLog: - @echo Creating $@ - @if test -d "$(srcdir)/.git"; then \ - (GIT_DIR=$(top_srcdir)/.git ./missing --run \ - git log $(CHANGELOG_START)^.. --stat) | fmt --split-only > $@.tmp \ - && mv -f $@.tmp $@ \ - || ($(RM) $@.tmp; \ - echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \ - (test -f $@ || echo git-log is required to generate this file >> $@)); \ - else \ - test -f $@ || \ - (echo A git checkout and git-log is required to generate ChangeLog >&2 && \ - echo A git checkout and git-log is required to generate this file >> $@); \ - fi -.PHONY: $(srcdir)/ChangeLog - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru babl-0.1.6/missing babl-0.1.11/missing --- babl-0.1.6/missing 2011-11-20 07:26:53.000000000 +0000 +++ babl-0.1.11/missing 2012-04-25 20:24:25.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ # Not GNU programs, they don't have --version. ;; - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -226,7 +216,7 @@ \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ touch $file ;; - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. diff -Nru babl-0.1.6/NEWS babl-0.1.11/NEWS --- babl-0.1.6/NEWS 2011-11-20 07:24:31.000000000 +0000 +++ babl-0.1.11/NEWS 2012-04-25 20:22:33.000000000 +0000 @@ -5,6 +5,12 @@ --> +2012-03-30 babl-0.1.8
+LUT based speedups for gamma correction / uncorrection. +
+2012-03-30 babl-0.1.8
+Added support for indexed/pallette based formats, constified API. +
2011-11-18 babl-0.1.6
Build improvements, remove blatantly wrong conversions from extensions, made it possible to distinguish format_n formats from others, improvements diff -Nru babl-0.1.6/tests/concurrency-stress-test.c babl-0.1.11/tests/concurrency-stress-test.c --- babl-0.1.6/tests/concurrency-stress-test.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/tests/concurrency-stress-test.c 2012-04-25 20:22:33.000000000 +0000 @@ -39,7 +39,7 @@ /* Try to get a fish with an as complex conversion path as * possible */ - Babl *fish = babl_fish ("R'G'B'A u16", "YA double"); + const Babl *fish = babl_fish ("R'G'B'A u16", "YA double"); /* Just do something random with the fish */ babl_get_name (fish); diff -Nru babl-0.1.6/tests/extract.c babl-0.1.11/tests/extract.c --- babl-0.1.6/tests/extract.c 1970-01-01 00:00:00.000000000 +0000 +++ babl-0.1.11/tests/extract.c 2012-04-25 20:22:33.000000000 +0000 @@ -0,0 +1,74 @@ +/* babl - dynamically extendable universal pixel conversion library. + * Copyright (C) 2005, Ø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 "config.h" +#include +#include +#include +#include "babl.h" + + +#define CHECK_CONV(test_name, componenttype, src_fmt, dst_fmt, src_pix, expected_pix) \ + { \ + const Babl *fish; \ + int i; \ + fish = babl_fish (src_fmt, dst_fmt); \ + if (!fish) \ + { \ + printf (" %s failed to make fish\n", test_name); \ + OK = 0; \ + } \ + for (i = 0; i < sizeof(src_pix)/sizeof(src_pix[0]); i ++) \ + { \ + int c;\ + componenttype result[10]; \ + babl_process (fish, src_pix[i], result, 1); \ + for (c = 0; c < sizeof(expected_pix[i])/sizeof(expected_pix[i][0]); c++) \ + if (result[c] != expected_pix[i][c]) \ + { \ + printf (" %s failed #%i[%i] got %i expected %i\n", test_name, i, c, result[c], expected_pix[i][c]); \ + OK = 0; \ + } \ + } \ + } + +#include + +int +main (int argc, + char **argv) +{ + int OK = 1; + babl_init (); + { + unsigned char in[][4] = {{0,1,2,3 },{4,5,6,7 },{8,9,10,11 }}; + unsigned char out[][1] = { {2 }, {6} , {10} }; + + CHECK_CONV("extract B'", unsigned char, + babl_format("R'G'B'A u8"), + babl_format_new ("name", "B' u8", + babl_model ("R'G'B'A"), + babl_type ("u8"), + babl_component ("B'"), + NULL), + in, out); + } + + babl_exit (); + return !OK; +} diff -Nru babl-0.1.6/tests/grayscale_to_rgb.c babl-0.1.11/tests/grayscale_to_rgb.c --- babl-0.1.6/tests/grayscale_to_rgb.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/tests/grayscale_to_rgb.c 2012-04-25 20:22:33.000000000 +0000 @@ -31,7 +31,7 @@ static int test (void) { - Babl *fish; + const Babl *fish; int i; int OK = 1; diff -Nru babl-0.1.6/tests/Makefile.am babl-0.1.11/tests/Makefile.am --- babl-0.1.6/tests/Makefile.am 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/tests/Makefile.am 2012-04-25 20:22:33.000000000 +0000 @@ -9,7 +9,11 @@ srgb_to_lab_u8 \ sanity \ babl_class_name \ + extract \ types \ + palette \ + extract \ + nop \ n_components \ models \ $(CONCURRENCY_STRESS_TEST) @@ -31,5 +35,4 @@ babl-html-dump \ conversions \ formats \ - nop \ $(TESTS) diff -Nru babl-0.1.6/tests/Makefile.in babl-0.1.11/tests/Makefile.in --- babl-0.1.6/tests/Makefile.in 2011-11-20 07:26:54.000000000 +0000 +++ babl-0.1.11/tests/Makefile.in 2012-04-25 20:24:26.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. @@ -36,12 +36,12 @@ host_triplet = @host@ TESTS = grayscale_to_rgb$(EXEEXT) rgb_to_bgr$(EXEEXT) \ rgb_to_ycbcr$(EXEEXT) srgb_to_lab_u8$(EXEEXT) sanity$(EXEEXT) \ - babl_class_name$(EXEEXT) types$(EXEEXT) n_components$(EXEEXT) \ - models$(EXEEXT) $(am__EXEEXT_1) + babl_class_name$(EXEEXT) extract$(EXEEXT) types$(EXEEXT) \ + palette$(EXEEXT) extract$(EXEEXT) nop$(EXEEXT) \ + n_components$(EXEEXT) models$(EXEEXT) $(am__EXEEXT_1) noinst_PROGRAMS = introspect$(EXEEXT) babl_fish_path_fitness$(EXEEXT) \ babl_fish_path_dhtml$(EXEEXT) babl-html-dump$(EXEEXT) \ - conversions$(EXEEXT) formats$(EXEEXT) nop$(EXEEXT) \ - $(am__EXEEXT_2) + conversions$(EXEEXT) formats$(EXEEXT) $(am__EXEEXT_2) subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -59,8 +59,9 @@ @OS_UNIX_TRUE@am__EXEEXT_1 = concurrency-stress-test$(EXEEXT) am__EXEEXT_2 = grayscale_to_rgb$(EXEEXT) rgb_to_bgr$(EXEEXT) \ rgb_to_ycbcr$(EXEEXT) srgb_to_lab_u8$(EXEEXT) sanity$(EXEEXT) \ - babl_class_name$(EXEEXT) types$(EXEEXT) n_components$(EXEEXT) \ - models$(EXEEXT) $(am__EXEEXT_1) + babl_class_name$(EXEEXT) extract$(EXEEXT) types$(EXEEXT) \ + palette$(EXEEXT) extract$(EXEEXT) nop$(EXEEXT) \ + n_components$(EXEEXT) models$(EXEEXT) $(am__EXEEXT_1) PROGRAMS = $(noinst_PROGRAMS) babl_html_dump_SOURCES = babl-html-dump.c babl_html_dump_OBJECTS = babl-html-dump.$(OBJEXT) @@ -69,8 +70,8 @@ babl_html_dump_DEPENDENCIES = \ $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \ $(am__DEPENDENCIES_1) -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 babl_class_name_SOURCES = babl_class_name.c babl_class_name_OBJECTS = babl_class_name.$(OBJEXT) @@ -102,6 +103,12 @@ conversions_DEPENDENCIES = \ $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \ $(am__DEPENDENCIES_1) +extract_SOURCES = extract.c +extract_OBJECTS = extract.$(OBJEXT) +extract_LDADD = $(LDADD) +extract_DEPENDENCIES = \ + $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \ + $(am__DEPENDENCIES_1) formats_SOURCES = formats.c formats_OBJECTS = formats.$(OBJEXT) formats_LDADD = $(LDADD) @@ -137,6 +144,12 @@ nop_LDADD = $(LDADD) nop_DEPENDENCIES = $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \ $(am__DEPENDENCIES_1) +palette_SOURCES = palette.c +palette_OBJECTS = palette.$(OBJEXT) +palette_LDADD = $(LDADD) +palette_DEPENDENCIES = \ + $(top_builddir)/babl/libbabl-@BABL_API_VERSION@.la \ + $(am__DEPENDENCIES_1) rgb_to_bgr_SOURCES = rgb_to_bgr.c rgb_to_bgr_OBJECTS = rgb_to_bgr.$(OBJEXT) rgb_to_bgr_LDADD = $(LDADD) @@ -177,32 +190,33 @@ $(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 = babl-html-dump.c babl_class_name.c babl_fish_path_dhtml.c \ babl_fish_path_fitness.c concurrency-stress-test.c \ - conversions.c formats.c grayscale_to_rgb.c introspect.c \ - models.c n_components.c nop.c rgb_to_bgr.c rgb_to_ycbcr.c \ - sanity.c srgb_to_lab_u8.c types.c + conversions.c extract.c formats.c grayscale_to_rgb.c \ + introspect.c models.c n_components.c nop.c palette.c \ + rgb_to_bgr.c rgb_to_ycbcr.c sanity.c srgb_to_lab_u8.c types.c DIST_SOURCES = babl-html-dump.c babl_class_name.c \ babl_fish_path_dhtml.c babl_fish_path_fitness.c \ - concurrency-stress-test.c conversions.c formats.c \ + concurrency-stress-test.c conversions.c extract.c formats.c \ grayscale_to_rgb.c introspect.c models.c n_components.c nop.c \ - rgb_to_bgr.c rgb_to_ycbcr.c sanity.c srgb_to_lab_u8.c types.c + palette.c rgb_to_bgr.c rgb_to_ycbcr.c sanity.c \ + srgb_to_lab_u8.c types.c ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -409,55 +423,61 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -babl-html-dump$(EXEEXT): $(babl_html_dump_OBJECTS) $(babl_html_dump_DEPENDENCIES) +babl-html-dump$(EXEEXT): $(babl_html_dump_OBJECTS) $(babl_html_dump_DEPENDENCIES) $(EXTRA_babl_html_dump_DEPENDENCIES) @rm -f babl-html-dump$(EXEEXT) $(AM_V_CCLD)$(LINK) $(babl_html_dump_OBJECTS) $(babl_html_dump_LDADD) $(LIBS) -babl_class_name$(EXEEXT): $(babl_class_name_OBJECTS) $(babl_class_name_DEPENDENCIES) +babl_class_name$(EXEEXT): $(babl_class_name_OBJECTS) $(babl_class_name_DEPENDENCIES) $(EXTRA_babl_class_name_DEPENDENCIES) @rm -f babl_class_name$(EXEEXT) $(AM_V_CCLD)$(LINK) $(babl_class_name_OBJECTS) $(babl_class_name_LDADD) $(LIBS) -babl_fish_path_dhtml$(EXEEXT): $(babl_fish_path_dhtml_OBJECTS) $(babl_fish_path_dhtml_DEPENDENCIES) +babl_fish_path_dhtml$(EXEEXT): $(babl_fish_path_dhtml_OBJECTS) $(babl_fish_path_dhtml_DEPENDENCIES) $(EXTRA_babl_fish_path_dhtml_DEPENDENCIES) @rm -f babl_fish_path_dhtml$(EXEEXT) $(AM_V_CCLD)$(LINK) $(babl_fish_path_dhtml_OBJECTS) $(babl_fish_path_dhtml_LDADD) $(LIBS) -babl_fish_path_fitness$(EXEEXT): $(babl_fish_path_fitness_OBJECTS) $(babl_fish_path_fitness_DEPENDENCIES) +babl_fish_path_fitness$(EXEEXT): $(babl_fish_path_fitness_OBJECTS) $(babl_fish_path_fitness_DEPENDENCIES) $(EXTRA_babl_fish_path_fitness_DEPENDENCIES) @rm -f babl_fish_path_fitness$(EXEEXT) $(AM_V_CCLD)$(LINK) $(babl_fish_path_fitness_OBJECTS) $(babl_fish_path_fitness_LDADD) $(LIBS) -concurrency-stress-test$(EXEEXT): $(concurrency_stress_test_OBJECTS) $(concurrency_stress_test_DEPENDENCIES) +concurrency-stress-test$(EXEEXT): $(concurrency_stress_test_OBJECTS) $(concurrency_stress_test_DEPENDENCIES) $(EXTRA_concurrency_stress_test_DEPENDENCIES) @rm -f concurrency-stress-test$(EXEEXT) $(AM_V_CCLD)$(LINK) $(concurrency_stress_test_OBJECTS) $(concurrency_stress_test_LDADD) $(LIBS) -conversions$(EXEEXT): $(conversions_OBJECTS) $(conversions_DEPENDENCIES) +conversions$(EXEEXT): $(conversions_OBJECTS) $(conversions_DEPENDENCIES) $(EXTRA_conversions_DEPENDENCIES) @rm -f conversions$(EXEEXT) $(AM_V_CCLD)$(LINK) $(conversions_OBJECTS) $(conversions_LDADD) $(LIBS) -formats$(EXEEXT): $(formats_OBJECTS) $(formats_DEPENDENCIES) +extract$(EXEEXT): $(extract_OBJECTS) $(extract_DEPENDENCIES) $(EXTRA_extract_DEPENDENCIES) + @rm -f extract$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(extract_OBJECTS) $(extract_LDADD) $(LIBS) +formats$(EXEEXT): $(formats_OBJECTS) $(formats_DEPENDENCIES) $(EXTRA_formats_DEPENDENCIES) @rm -f formats$(EXEEXT) $(AM_V_CCLD)$(LINK) $(formats_OBJECTS) $(formats_LDADD) $(LIBS) -grayscale_to_rgb$(EXEEXT): $(grayscale_to_rgb_OBJECTS) $(grayscale_to_rgb_DEPENDENCIES) +grayscale_to_rgb$(EXEEXT): $(grayscale_to_rgb_OBJECTS) $(grayscale_to_rgb_DEPENDENCIES) $(EXTRA_grayscale_to_rgb_DEPENDENCIES) @rm -f grayscale_to_rgb$(EXEEXT) $(AM_V_CCLD)$(LINK) $(grayscale_to_rgb_OBJECTS) $(grayscale_to_rgb_LDADD) $(LIBS) -introspect$(EXEEXT): $(introspect_OBJECTS) $(introspect_DEPENDENCIES) +introspect$(EXEEXT): $(introspect_OBJECTS) $(introspect_DEPENDENCIES) $(EXTRA_introspect_DEPENDENCIES) @rm -f introspect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(introspect_OBJECTS) $(introspect_LDADD) $(LIBS) -models$(EXEEXT): $(models_OBJECTS) $(models_DEPENDENCIES) +models$(EXEEXT): $(models_OBJECTS) $(models_DEPENDENCIES) $(EXTRA_models_DEPENDENCIES) @rm -f models$(EXEEXT) $(AM_V_CCLD)$(LINK) $(models_OBJECTS) $(models_LDADD) $(LIBS) -n_components$(EXEEXT): $(n_components_OBJECTS) $(n_components_DEPENDENCIES) +n_components$(EXEEXT): $(n_components_OBJECTS) $(n_components_DEPENDENCIES) $(EXTRA_n_components_DEPENDENCIES) @rm -f n_components$(EXEEXT) $(AM_V_CCLD)$(LINK) $(n_components_OBJECTS) $(n_components_LDADD) $(LIBS) -nop$(EXEEXT): $(nop_OBJECTS) $(nop_DEPENDENCIES) +nop$(EXEEXT): $(nop_OBJECTS) $(nop_DEPENDENCIES) $(EXTRA_nop_DEPENDENCIES) @rm -f nop$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nop_OBJECTS) $(nop_LDADD) $(LIBS) -rgb_to_bgr$(EXEEXT): $(rgb_to_bgr_OBJECTS) $(rgb_to_bgr_DEPENDENCIES) +palette$(EXEEXT): $(palette_OBJECTS) $(palette_DEPENDENCIES) $(EXTRA_palette_DEPENDENCIES) + @rm -f palette$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(palette_OBJECTS) $(palette_LDADD) $(LIBS) +rgb_to_bgr$(EXEEXT): $(rgb_to_bgr_OBJECTS) $(rgb_to_bgr_DEPENDENCIES) $(EXTRA_rgb_to_bgr_DEPENDENCIES) @rm -f rgb_to_bgr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rgb_to_bgr_OBJECTS) $(rgb_to_bgr_LDADD) $(LIBS) -rgb_to_ycbcr$(EXEEXT): $(rgb_to_ycbcr_OBJECTS) $(rgb_to_ycbcr_DEPENDENCIES) +rgb_to_ycbcr$(EXEEXT): $(rgb_to_ycbcr_OBJECTS) $(rgb_to_ycbcr_DEPENDENCIES) $(EXTRA_rgb_to_ycbcr_DEPENDENCIES) @rm -f rgb_to_ycbcr$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rgb_to_ycbcr_OBJECTS) $(rgb_to_ycbcr_LDADD) $(LIBS) -sanity$(EXEEXT): $(sanity_OBJECTS) $(sanity_DEPENDENCIES) +sanity$(EXEEXT): $(sanity_OBJECTS) $(sanity_DEPENDENCIES) $(EXTRA_sanity_DEPENDENCIES) @rm -f sanity$(EXEEXT) $(AM_V_CCLD)$(LINK) $(sanity_OBJECTS) $(sanity_LDADD) $(LIBS) -srgb_to_lab_u8$(EXEEXT): $(srgb_to_lab_u8_OBJECTS) $(srgb_to_lab_u8_DEPENDENCIES) +srgb_to_lab_u8$(EXEEXT): $(srgb_to_lab_u8_OBJECTS) $(srgb_to_lab_u8_DEPENDENCIES) $(EXTRA_srgb_to_lab_u8_DEPENDENCIES) @rm -f srgb_to_lab_u8$(EXEEXT) $(AM_V_CCLD)$(LINK) $(srgb_to_lab_u8_OBJECTS) $(srgb_to_lab_u8_LDADD) $(LIBS) -types$(EXEEXT): $(types_OBJECTS) $(types_DEPENDENCIES) +types$(EXEEXT): $(types_OBJECTS) $(types_DEPENDENCIES) $(EXTRA_types_DEPENDENCIES) @rm -f types$(EXEEXT) $(AM_V_CCLD)$(LINK) $(types_OBJECTS) $(types_LDADD) $(LIBS) @@ -473,12 +493,14 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/babl_fish_path_fitness.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/concurrency-stress-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conversions.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/extract.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/formats.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grayscale_to_rgb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/introspect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/models.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/n_components.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nop.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/palette.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb_to_bgr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb_to_ycbcr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sanity.Po@am__quote@ @@ -488,26 +510,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 @@ -648,14 +667,15 @@ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -704,10 +724,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/tests/n_components.c babl-0.1.11/tests/n_components.c --- babl-0.1.6/tests/n_components.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/tests/n_components.c 2012-04-25 20:22:33.000000000 +0000 @@ -77,9 +77,9 @@ for (components = 1; components < 2048; components ++) { - Babl *fish; - Babl *src_fmt; - Babl *dst_fmt; + const Babl *fish; + const Babl *src_fmt; + const Babl *dst_fmt; int i; src_fmt = babl_format_n (babl_type ("float"), components); diff -Nru babl-0.1.6/tests/palette.c babl-0.1.11/tests/palette.c --- babl-0.1.6/tests/palette.c 1970-01-01 00:00:00.000000000 +0000 +++ babl-0.1.11/tests/palette.c 2012-04-25 20:22:33.000000000 +0000 @@ -0,0 +1,177 @@ +/* babl - dynamically extendable universal pixel conversion library. + * Copyright (C) 2005, Ø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 "config.h" +#include +#include +#include +#include "babl.h" + + +#define CHECK_CONV(test_name, componenttype, src_fmt, dst_fmt, src_pix, expected_pix) \ + { \ + const Babl *fish; \ + int i; \ + fish = babl_fish (src_fmt, dst_fmt); \ + if (!fish) \ + { \ + printf (" %s failed to make fish\n", test_name); \ + OK = 0; \ + } \ + for (i = 0; i < sizeof(src_pix)/sizeof(src_pix[0]); i ++) \ + { \ + int c;\ + componenttype result[10]; \ + babl_process (fish, src_pix[i], result, 1); \ + for (c = 0; c < sizeof(expected_pix[i])/sizeof(expected_pix[i][0]); c++) \ + if (result[c] != expected_pix[i][c]) \ + { \ + printf (" %s failed #%i[%i] got %i expected %i\n", test_name, i, c, result[c], expected_pix[i][c]); \ + OK = 0; \ + } \ + } \ + } + +#include + +int +main (int argc, + char **argv) +{ + int OK = 1; + babl_init (); + if(1){ + unsigned char in[][1] = {{ 0},{ 1},{ 2},{15}}; + unsigned char out[][4] = {{0,0,0,255},{127,0,0,255},{0,127,0,255},{255,255,255,255}}; + const Babl *palA;// = babl_new_palette (NULL, 0); + //Babl *palB = babl_new_palette (NULL, 0); + // + babl_new_palette (NULL, &palA, NULL); + assert (palA); + + CHECK_CONV("pal to rgba", unsigned char, + palA, babl_format("RGBA u8"), + in, out); + } + if(0){ + unsigned char in[][2] = {{ 0,255},{ 1,255},{ 2,255},{15,200}}; + unsigned char out[][4] = {{0,0,0,255},{127,0,0,255},{0,127,0,255},{255,255,255,255}}; + const Babl *palA;// = babl_new_palette (NULL, 0); + //Babl *palB = babl_new_palette (NULL, 0); + // + babl_new_palette (NULL, NULL, &palA); + assert (palA); + + CHECK_CONV("pal to rgba", unsigned char, + palA, babl_format("RGBA u8"), + in, out); + +#if 0 + CHECK_CONV("pal to rgba", unsigned char, + palB, babl_format("RGBA u8"), + in, out); + + CHECK_CONV("pal to rgba", unsigned char, + palA, babl_format("RGBA u8"), + in, out); +#endif + } +#if 0 + { + unsigned char in[][4] = {{0,0,0,255},{140,0,0,255},{0,127,0,255}}; + unsigned char out[][1] = {{ 0},{ 1},{ 2}}; + + CHECK_CONV("rgba to pal", unsigned char, + babl_format("RGBA u8"), babl_new_palette ("palC", 0), + in, out); + } + + { + unsigned char in[][4] = {{0,0,0,255},{140,0,0,255},{0,127,0,127}}; + unsigned char out[][2] = {{ 0,255},{ 1,255},{ 2,127}}; + + CHECK_CONV("rgba to pal+alpha", unsigned char, + babl_format("RGBA u8"), babl_new_palette ("palD", 1), + in, out); + } + + /* check with a custom floating point palette, _and_ alpha component */ + { + float palette[] = { + 0.5, 1.0, + 0.23, 0.42, + 1.0, 0.2 + }; + + unsigned char in[][2] = {{ 0,255},{0,127},{ 1,255},{ 2,255}}; + unsigned char out[][4] = {{128,128,128,255},{128,128,128,127},{59,59,59,107},{255,255,255,51}}; + + Babl *pal = babl_new_palette (NULL, 1); + + babl_palette_set_palette (pal, babl_format ("YA float"), palette, 3); + + CHECK_CONV("rgba to YA float pal+alpha", unsigned char, + pal, babl_format("RGBA u8"), + in, out); + } + + + /* check with a custom floating point palette, _and_ alpha component */ + { + float palette[] = { + 0.5, 1.0, + 0.23, 0.42, + 1.0, 0.2 + }; + + unsigned char in[][2] = {{ 0,255},{0,127},{ 1,255},{ 2,255}}; + unsigned char out[][4] = {{128,128,128,255},{128,128,128,127},{59,59,59,107},{255,255,255,51}}; + + Babl *pal = babl_new_palette (NULL, 1); + + babl_palette_set_palette (pal, babl_format ("YA float"), palette, 3); + + CHECK_CONV("rgba to YA float pal+alpha", unsigned char, + pal, babl_format("RGBA u8"), + in, out); + } + + /* check with a custom floating point palette */ + { + float palette[] = { + 0.5, 1.0, + 0.23, 0.42, + 1.0, 0.2 + }; + + unsigned char in[][1] = {{ 0},{ 1},{ 2}}; + unsigned char out[][4] = {{128,128,128,255},{59,59,59,107},{255,255,255,51}}; + + Babl *pal = babl_new_palette (NULL, 0); + + babl_palette_set_palette (pal, babl_format ("YA float"), palette, 3); + + CHECK_CONV("rgba to float pal", unsigned char, + pal, babl_format("RGBA u8"), + in, out); + } +#endif + + babl_exit (); + return !OK; +} diff -Nru babl-0.1.6/tests/rgb_to_bgr.c babl-0.1.11/tests/rgb_to_bgr.c --- babl-0.1.6/tests/rgb_to_bgr.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/tests/rgb_to_bgr.c 2012-04-25 20:22:33.000000000 +0000 @@ -39,7 +39,7 @@ static int test (void) { - Babl *fish; + const Babl *fish; int i; int OK = 1; diff -Nru babl-0.1.6/tests/rgb_to_ycbcr.c babl-0.1.11/tests/rgb_to_ycbcr.c --- babl-0.1.6/tests/rgb_to_ycbcr.c 2011-05-06 20:34:28.000000000 +0000 +++ babl-0.1.11/tests/rgb_to_ycbcr.c 2012-04-25 20:22:33.000000000 +0000 @@ -46,7 +46,7 @@ static int test (void) { - Babl *fish; + const Babl *fish; int i; int OK = 1;