Øyvind Kolås [Sun, 18 Mar 2012 14:17:04 +0000 (14:17 +0000)]
carry around user data in BablConversion
Having the user data for relevant conversions directly in BablConversion
permits avoiding branches in the dispatch code. Branches in dispatch code
is evil, thus desinging the rest around avoiding that.
Øyvind Kolås [Sat, 17 Mar 2012 12:18:54 +0000 (12:18 +0000)]
babl: add ability to register user data with BablModel
The user data is available in the callback functions, no ABI change only
processing functions interested in this data needs to define the arguments,..
keeping ABI compatibility.
Jon Nordby [Wed, 3 Aug 2011 22:45:04 +0000 (00:45 +0200)]
Fix install of babl vapi file
The pkg-config package refered no longer exists,
and currently only libvala provides a vapidir in pkg-config,
and this package is versioned and changes all the time.
Other projects just use $(datadir)/vala/vapi, so we do the same
Permit registering multiple conversions between the same formats from the same
extension. Babl was rejecting subsequent conversions/variations in the same
module; this is desired for most other types of babl objects but not
conversions.
stats: remove false negatives from HTML stats output
too many of the conversions are flagged as bad in the matrix change code so
that only conversions that contribute to more than 0.1% of the overall pixels
converted by babl are shown in the stats written when BABL_STATS environment
variable is set.
added babl_init(), fish can't be const, Babl* can't be dereferenced,
one variable name changed during example, added sizeof to make it
a little more obvious.
Rupert Weber [Fri, 1 Oct 2010 00:18:53 +0000 (02:18 +0200)]
allow reregistering but check for differences
babl_model_new() emitted a warning when reregistering a model,
babl_format_new(), babl_type_new(), and babl_component_new()
quietly returned a preexisting object.
Changed so that all four functions return the preexisting object
if the new registration doesn't conflict, otherwise make the
error fatal.
(Fixed some conflicting and redundant registrations for
"Y'CbCr u8" along the way)
Martin Nordholts [Mon, 27 Dec 2010 20:34:00 +0000 (21:34 +0100)]
Add BABL_IS_BEING_COMPILED #define support
Sometimes it is ok that babl includes are included directly and not
through babl.h, like when we generate GObject introspection files.
The important thing is just that users of the babl API don't begin to
include headers we don't guarantee to always exist, and
BABL_IS_BEING_COMPILED doesn't obstruct this goal.
Philipp Sadleder [Thu, 22 Jul 2010 07:21:25 +0000 (09:21 +0200)]
introspection: fix girdir and typelibsdir
Build girdir/typelibsdir by using datadir/libdir like in gtk+.
Using INTROSPECTION_GIRDIR/INTROSPECTION_TYPELIBDIR leads to absolute system
paths (make distcheck fails).
The gobject introspection additions expected autoreconf to be used in
autogen.sh, perhaps we should do that instead? This commit should fix
building on systems that do not have introspection.m4 in system dirs.
Øyvind Kolås [Sun, 27 Jun 2010 23:42:02 +0000 (00:42 +0100)]
Add code to handle N-components
Added a new API call, babl_format_n (). This allows constructing a babl
format with an arbitrary number of components all of the same type. At
the moment. The model used for such formats is "Y", at the moment
conversions are only well defined for such formats to other n-component
formats with the same number of components.
Øyvind Kolås [Sat, 26 Jun 2010 02:54:53 +0000 (03:54 +0100)]
Add a babl_set_destructor
Keep a callback function for each allocation instance, that allows an
allocation specific callback to be called when the memory segment is
freed. This makes a valgrind warning go away, most of the time no extra
memory should be needed since this is likely to fit within the padding.
Øyvind Kolås [Sun, 29 Nov 2009 15:42:05 +0000 (15:42 +0000)]
Only initialize test buffers once
Also made the test buffer static inline for individual conversions like
it already was for fish paths.
Note, this relies on none of the tested conversions by accident
being buggy enough to modify their source data, adding a sanity
function that compares the buffers with the correct values could
perhaps be useful.
Øyvind Kolås [Tue, 24 Nov 2009 01:04:38 +0000 (01:04 +0000)]
Removed two function calls in common path
Re-arranged code making babl_process and babl_fish_process reside
in babl-path-fish.c, where babl_fish_process and babl_fish_path_process
can be inlined with babl_process().