Øyvind Kolås [Mon, 12 Nov 2018 22:35:31 +0000 (23:35 +0100)]
babl: implement CMYK color model in reference and base
This commit adds support to the reference fishes of babl to deal
with CMYK based pixel format encodings, backed by babl spaces with
ICC CMYK ICC profiles.
Øyvind Kolås [Mon, 12 Nov 2018 22:30:07 +0000 (23:30 +0100)]
build: check for and link against lcms2
Øyvind Kolås [Mon, 12 Nov 2018 22:36:42 +0000 (23:36 +0100)]
babl: comment out unused model_is_rgba
Øyvind Kolås [Fri, 16 Nov 2018 00:50:22 +0000 (01:50 +0100)]
babl-fish: print error message instead of blowing stack
Øyvind Kolås [Fri, 16 Nov 2018 21:32:10 +0000 (22:32 +0100)]
tests: make srgb-to-lab-u8 also compile stand-alone
Øyvind Kolås [Fri, 16 Nov 2018 17:27:32 +0000 (18:27 +0100)]
babl: properly cache runtime inserted conversions
The old behavior of avoiding colliding names used in the conversion database
is still used during loading of extension permitting multiple conversions
to be registered for runtime profiling.
Øyvind Kolås [Fri, 16 Nov 2018 01:50:15 +0000 (02:50 +0100)]
babl: avoid re-creating some existing conversions
Øyvind Kolås [Fri, 9 Nov 2018 22:58:56 +0000 (23:58 +0100)]
post-release version bump
Øyvind Kolås [Fri, 9 Nov 2018 22:56:38 +0000 (23:56 +0100)]
release 0.1.60
Øyvind Kolås [Fri, 9 Nov 2018 01:00:35 +0000 (02:00 +0100)]
docs: fix typo
Øyvind Kolås [Tue, 6 Nov 2018 13:18:20 +0000 (14:18 +0100)]
babl: permit registering model conversions for non-rgb models
Øyvind Kolås [Sat, 3 Nov 2018 12:44:42 +0000 (13:44 +0100)]
babl-image: thread-proof single item cache of babl-images
Fixes issue #26, in the end spotted by massimo - for now fixed using gcc
extensions rather than also generically with a mutex.
Øyvind Kolås [Fri, 2 Nov 2018 15:34:58 +0000 (16:34 +0100)]
babl_space_get_icc: permit passing NULL for return length
Øyvind Kolås [Sun, 28 Oct 2018 02:08:30 +0000 (03:08 +0100)]
babl: make babl_model_is deal with NULL input
Øyvind Kolås [Mon, 22 Oct 2018 19:41:46 +0000 (21:41 +0200)]
babl: palette, improve assert in pala_to_rgba
Ell [Sun, 21 Oct 2018 09:18:36 +0000 (05:18 -0400)]
cairo: accelerate R'G'B'A u8 -> cairo-ARGB32 conversion
Accelerate the R'G'B'A u8 -> cairo-ARGB32 conversion by processing
the entire RGBA tuple in parallel (or, on 32-bit machines, in two
parts), instead of component-by-component, using wide integer
arithmetic/logic. This speeds the conversion up by ~25%.
Øyvind Kolås [Fri, 5 Oct 2018 14:21:19 +0000 (16:21 +0200)]
post-release version bump
Øyvind Kolås [Fri, 5 Oct 2018 14:19:38 +0000 (16:19 +0200)]
release 0.1.58
Øyvind Kolås [Wed, 3 Oct 2018 10:35:59 +0000 (12:35 +0200)]
NEWS: update
Øyvind Kolås [Wed, 3 Oct 2018 11:20:40 +0000 (13:20 +0200)]
CIE: replace tabs in indentation with spaces
Massimo Valentini [Wed, 3 Oct 2018 10:38:28 +0000 (12:38 +0200)]
CIE: fix some wrong src/dst increments, issue #22
Elle Stone [Fri, 21 Sep 2018 12:40:33 +0000 (08:40 -0400)]
CIE: Add xyY color space conversions
Issue #22
Ell [Sat, 22 Sep 2018 00:15:14 +0000 (20:15 -0400)]
sse2-float: don't modify input data during rgba -> rgbA conversion
Øyvind Kolås [Wed, 19 Sep 2018 10:01:55 +0000 (12:01 +0200)]
NEWS: update news for 0.1.58 release
Øyvind Kolås [Tue, 11 Sep 2018 15:06:14 +0000 (17:06 +0200)]
docs: add section about premultiplied alpha
Øyvind Kolås [Tue, 4 Sep 2018 17:09:07 +0000 (19:09 +0200)]
babl-fish-reference: add lock to part of float reference
This fixes problems that occur during GEGLs documentation gallery build
when multiple threads are in use (the default). The critical section has
experimentally been made as short as possible to avoid babl memory
inconsistencies - without identifing the core race.
Øyvind Kolås [Fri, 31 Aug 2018 12:34:04 +0000 (14:34 +0200)]
babl: babl_free now complains and bail instead of aborting on unknown memory
Øyvind Kolås [Fri, 31 Aug 2018 10:54:10 +0000 (12:54 +0200)]
babl: remove more missing fast path warnings
We no longer want to warn, since warnings are also triggered when the
fast path is better than the best path found, something that happens
when we-re finding long paths and the reference is better.
Maybe we should still print warnings according to better heuristics to be able
to warn and encourage complete fast path coverage, fast paths should still be
able to beat the reference in a few steps.
Øyvind Kolås [Fri, 31 Aug 2018 09:18:30 +0000 (11:18 +0200)]
babl-fish-reference: factor out separate function for float/double
babl_fish_reference_process now only contains the dispatch tree that
tries various fast paths first before ending up in the float or double
synthetic references.
Øyvind Kolås [Fri, 31 Aug 2018 09:18:05 +0000 (11:18 +0200)]
base: model-gray: remove special case for black transparent premul
Øyvind Kolås [Thu, 30 Aug 2018 11:21:02 +0000 (13:21 +0200)]
babl: switch behavior of reference precision enum
It is now called BABL_REFERENCE_NOFLOAT and if set babl is not using the
generic mechanism to synthesize many possible float<->float conversions.
Øyvind Kolås [Thu, 30 Aug 2018 12:26:37 +0000 (14:26 +0200)]
Revert "special case all 0 to map to all 0 in nonpremul"
This reverts commit
18dea5104f3de79af5e9641a0ef47435b112d44b.
We want to be able to do component by component average/weighting of
remultiplied values, by breaking the floor for black alpha zero we
break the consistency of such arithmetic.
Øyvind Kolås [Thu, 30 Aug 2018 00:50:38 +0000 (02:50 +0200)]
tools: fix utf8 mode of diagram, change gradient unit in html
The gradient in the html mode is now pixels per time, not bytes
read+written per time, which seem to be more fair in assessing
the reference conversions of
different pixel sizes.
Øyvind Kolås [Thu, 30 Aug 2018 00:03:32 +0000 (02:03 +0200)]
babl-fish-reference: escape to double when single is too hard
If we do not have the conversions for to/from RGBA float - bail as early as
possible to the double code path instead.
Øyvind Kolås [Thu, 30 Aug 2018 00:01:18 +0000 (02:01 +0200)]
babl-fish: handle case of no from_list in source
Øyvind Kolås [Wed, 29 Aug 2018 23:41:49 +0000 (01:41 +0200)]
base: fix misregistred Y float to RGBA float conversion
Øyvind Kolås [Wed, 29 Aug 2018 23:39:26 +0000 (01:39 +0200)]
base: use f suffix on float literals
Øyvind Kolås [Wed, 29 Aug 2018 22:17:20 +0000 (00:17 +0200)]
base: more single precision code paths for model-rgb
Øyvind Kolås [Wed, 29 Aug 2018 21:51:50 +0000 (23:51 +0200)]
babl-fish-reference: disable a fast-code path that sometimes is invalid
Øyvind Kolås [Wed, 29 Aug 2018 21:50:56 +0000 (23:50 +0200)]
base: register a RGBA to RGBA float conversion for completeness
Øyvind Kolås [Wed, 29 Aug 2018 19:01:20 +0000 (21:01 +0200)]
extensions: implement Labf_to_rgbaf
Øyvind Kolås [Wed, 29 Aug 2018 15:35:33 +0000 (17:35 +0200)]
base: add single precision versions of all gray reference code
Øyvind Kolås [Wed, 29 Aug 2018 14:53:43 +0000 (16:53 +0200)]
base: model-rgb add float version of conversions for RaGaBaA
Øyvind Kolås [Wed, 29 Aug 2018 13:32:15 +0000 (15:32 +0200)]
base: model-rgb implement float versions of some conversions
Øyvind Kolås [Wed, 29 Aug 2018 13:28:41 +0000 (15:28 +0200)]
babl-fish-reference: implement floating point version of reference path
This relies on conversions, linear or planar, being registered to and from
RGBA float, similar to the already existing reference conversions in double.
To enable use of it set the environment variable BABL_REFERENCE_FLOAT to any
value, babl will crash if the above requirement is not met for a requested
conversion - permitting adding it - fallback code could be added that implements
it using the double versions when missing - but not having a full coverage at
least for the commonly used formats defeats the purpose.
Øyvind Kolås [Wed, 29 Aug 2018 13:27:08 +0000 (15:27 +0200)]
babl: skip initial profiling for planar conversions
Øyvind Kolås [Tue, 28 Aug 2018 14:49:33 +0000 (16:49 +0200)]
babl-fish-reference: avoid converting model if it already is RGBA
Øyvind Kolås [Tue, 28 Aug 2018 14:44:19 +0000 (16:44 +0200)]
babl-matrix: add babl_matrix_mul_matrixf
Øyvind Kolås [Tue, 28 Aug 2018 00:18:18 +0000 (02:18 +0200)]
babl-fish-reference: also do non-component matching same model in single precision
Øyvind Kolås [Mon, 27 Aug 2018 23:52:54 +0000 (01:52 +0200)]
babl-fish-reference: reintroduce single precision processing
only for matching components for now
Øyvind Kolås [Mon, 27 Aug 2018 23:37:07 +0000 (01:37 +0200)]
babl: silence missing path warning
Øyvind Kolås [Mon, 27 Aug 2018 23:23:56 +0000 (01:23 +0200)]
babl-fish-reference: improve component match checking for same-model
Øyvind Kolås [Mon, 27 Aug 2018 22:54:42 +0000 (00:54 +0200)]
revert parts of
fd2f96c53d9
Some of it was a bit too immature to commit, a reworked version will be
repushed.
Øyvind Kolås [Mon, 27 Aug 2018 22:32:47 +0000 (00:32 +0200)]
special case all 0 to map to all 0 in nonpremul
A test in GEGL relies on this, and keeping zeroed memory zeroed is good
for compression and some other heuristics that might run on a buffer.
Øyvind Kolås [Mon, 27 Aug 2018 20:57:54 +0000 (22:57 +0200)]
babl-fish-reference: do some conversions in single precision float
This permits these conversions to go through floating point instead of double
precision when non of the involved format have more than 32bit precision,
this might be determinetal to u32 but is right for u8 and u16 which we rely
most on.
We also disable the missing fast path messages, since now many references;
through internal shortcuts are faster than some long chains, perhaps some
of these reference fast paths should be split out as new categories of fishes.
Øyvind Kolås [Mon, 27 Aug 2018 19:44:32 +0000 (21:44 +0200)]
base: register single precision conversions for types
We're already registering double versions, having single precision and
in practice possibly sufficient precision for commonly used conversions.
Øyvind Kolås [Mon, 27 Aug 2018 19:42:43 +0000 (21:42 +0200)]
tools/babl_fish_path_fitness: fix text only version
Øyvind Kolås [Sun, 26 Aug 2018 23:38:15 +0000 (01:38 +0200)]
tools: improve html output of babl_fish_path_fitness
Illustrate memory throughput as read+writte/time, providing a metric that
works for comparing conversions against each other on a single machine.
Øyvind Kolås [Sun, 26 Aug 2018 21:19:35 +0000 (23:19 +0200)]
babl: move BABL_ALPHA_FLOOR to public babl header
Øyvind Kolås [Sun, 26 Aug 2018 21:18:32 +0000 (23:18 +0200)]
extensions: handle negative premultiplied alpha
Øyvind Kolås [Sun, 26 Aug 2018 19:56:14 +0000 (21:56 +0200)]
babl: model-rgb handle negative alpha in premultiplied
Øyvind Kolås [Sun, 26 Aug 2018 19:52:01 +0000 (21:52 +0200)]
babl: model-rgb, handle negative alpha in premultiplied
Øyvind Kolås [Fri, 24 Aug 2018 23:09:49 +0000 (01:09 +0200)]
extensions: adapt to keep color in premultiplied alpha
Øyvind Kolås [Fri, 24 Aug 2018 17:16:34 +0000 (19:16 +0200)]
base: preserve color in premutiplied alpha
Alpha values below BABL_ALPHA_FLOOR gets stored in the components
as BABL_ALPHA_FLOOR with alpha also set to BABL_ALPHA_FLOOR,
recovery from pre-multiplied to non-premultiplied is done as normal.
BABL_FLOOR is set to be 1/65536.0 with a hope that this gives us
approximately 8bit of color data preserved when using half-float.
Upon encountering exactly BABL_ALPHA_FLOOR in premultiplied conversion
to non-premultiplied interprets this as 0.0, making pure 0.0 values
round trip correctly from RGBA to RaGaBaA back to RGBA.
This makes a lot of extensions invalid - as expected but it already
allows testing the behavior of GEGL and GIMP with this additional
feature from babl.
Øyvind Kolås [Tue, 21 Aug 2018 16:08:47 +0000 (18:08 +0200)]
babl: add performance flag to intent, issue #21
Add BABL_ICC_INTENT_PERFORMANCE which can be ored into the intente
num when requesting that babl constructs a space using
babl_space_from_icc, when PERFORMANCE is requested babl will permit
matrix+trc over cLUT, and when it is an intent without a performance
modifier this does not apply.
Øyvind Kolås [Tue, 21 Aug 2018 12:18:00 +0000 (14:18 +0200)]
icc: detect inconsistent Argyll ICC cLUT profiles, issue #21
The default behavior for Agryll when creating cLUT profiles seem to be
embedding an obviously incorrect XYZ matrix, meaning that for now we cannot use
the matrix for our relative colorimetric transform, and in the future the
profile will be incapable of doing dynamic trade-offs between performance and
accuracy by using matrix over cLUT during interactive operations.
We detect the swapped primaries in combination with presence of cLUTs and then
bail on constructing a valid babl space, as well as provide debug information
about why the profile cannot be used by babl.
Øyvind Kolås [Tue, 14 Aug 2018 16:30:51 +0000 (18:30 +0200)]
post release version bump
Øyvind Kolås [Tue, 14 Aug 2018 16:28:03 +0000 (18:28 +0200)]
release 0.1.56
Ell [Sat, 4 Aug 2018 06:18:37 +0000 (02:18 -0400)]
babl-cache: store reference fishes in the cache
When we only have a reference fish for a given conversion, and not
a path fish, store a corresponding entry in the cache, marked by a
"[reference]" tag in the fish's attributes line, and containing no
conversion list. When reloading the cache, make sure a reference
fish is created for the conversion without trying to construct a
path fish, so that we don't waste time trying to search for a
conversion path.
Note that we still show a "missing fast path" warning, even for
cached reference fishes.
Ell [Sat, 4 Aug 2018 06:14:29 +0000 (02:14 -0400)]
babl-cache: skip fishes with nonexistent conversions, instead of bailing
When encountering a nonexistent conversion while loading the fish
cache, skip the current fish, instead of stopping processing the
cache entirely.
Øyvind Kolås [Mon, 23 Jul 2018 02:18:08 +0000 (04:18 +0200)]
post release version bump
Øyvind Kolås [Mon, 23 Jul 2018 01:59:25 +0000 (03:59 +0200)]
release 0.1.54
Øyvind Kolås [Fri, 20 Jul 2018 16:08:15 +0000 (18:08 +0200)]
NEWS: update
Øyvind Kolås [Fri, 20 Jul 2018 15:34:42 +0000 (17:34 +0200)]
babl.h: tidy and update documentation
Jan Vesely [Fri, 20 Jul 2018 05:55:54 +0000 (01:55 -0400)]
meson: Generate babl.map based on export_symbols file
Fixing issue #20
Signed-off-by: Jan Vesely <jano.vesely@gmail.com>
Øyvind Kolås [Fri, 20 Jul 2018 14:27:55 +0000 (16:27 +0200)]
babl: use an existing const char ptr for encoding in format
Øyvind Kolås [Fri, 20 Jul 2018 14:14:18 +0000 (16:14 +0200)]
babl: add a new symbol babl_format_get_encoding
This returns the string passed in to babl_format_new - without the space
suffix that babl_get_name does for non-sRGB formats.
Øyvind Kolås [Wed, 18 Jul 2018 20:05:27 +0000 (22:05 +0200)]
babl: add babl_space_with_trc
Permitting to create variants of a space that shared the primaries
but use a different TRC function.
Debarshi Ray [Tue, 17 Jul 2018 12:09:31 +0000 (12:09 +0000)]
Add SSE2 versions of "Y float" and "YA float" to "CIE L float"
Øyvind Kolås [Mon, 16 Jul 2018 21:37:45 +0000 (23:37 +0200)]
babl: simplify babl_format_with_space
Rely on any format string containing the substring "-space" that this
substring is the marker for the end of the encoding part of the format
name - which is what we want replicated in our new format with a different
color space.
Øyvind Kolås [Mon, 16 Jul 2018 20:04:40 +0000 (22:04 +0200)]
babl: permit Babl * as first argument of babl_format_with_space
Øyvind Kolås [Mon, 16 Jul 2018 16:15:56 +0000 (18:15 +0200)]
babl: harmonize naming of space constructors
babl_icc_make_space remains for compatibility so older versions of gimp
do not get upset, the gimp-2.10 release depends on this symbol.
Øyvind Kolås [Thu, 12 Jul 2018 14:47:10 +0000 (16:47 +0200)]
babl: look deeper, and longer for path fishes
We now do two iterations of +1 and +2 path lengths that take much longer than
the configured path lengths - and now complain with a debug output listing the
set of conversions taken to satisfy the request - giving hints on what parts
could possibly be shortened to fewer steps.
With this commit the first level of searching deeper also gets a debug message
which would cause GIMP to print a message in some places where it earlier
wouldnt have warned about missing fast paths.
Øyvind Kolås [Thu, 12 Jul 2018 09:59:46 +0000 (11:59 +0200)]
babl: allow querying chromaticities for spaces made with matrix
Do this by computing the chromaticities coordinates of the colors
.. #ff0000 #00ff00 and #0000ff, this also harmonizes the serialized
name to always be chromaticities, white point and trcs.
Øyvind Kolås [Wed, 11 Jul 2018 23:24:42 +0000 (01:24 +0200)]
extensions/u32: add ~ model/format support
Øyvind Kolås [Wed, 11 Jul 2018 23:24:26 +0000 (01:24 +0200)]
extensions/u16; add ~ model/format support
Øyvind Kolås [Wed, 11 Jul 2018 23:22:35 +0000 (01:22 +0200)]
extensions/float: add ~ variants of conversions
Michael Natterer [Wed, 11 Jul 2018 21:57:40 +0000 (23:57 +0200)]
Change the license URL from gnu.org/licenses/ to https://
Øyvind Kolås [Wed, 11 Jul 2018 21:35:59 +0000 (23:35 +0200)]
babl: add babl_model_is, utility function for checking model equivalence
This creates an on the fly model with the same space as the one compared with
and does pointer equivalence. Using it makes for less verbose code.
Øyvind Kolås [Wed, 11 Jul 2018 21:23:08 +0000 (23:23 +0200)]
babl: make babl_model_with_space able to take format/model for space
Øyvind Kolås [Wed, 11 Jul 2018 20:57:59 +0000 (22:57 +0200)]
babl.h: add documentation
Øyvind Kolås [Wed, 11 Jul 2018 20:47:30 +0000 (22:47 +0200)]
babl: make equalize_matrix argument an enum
Øyvind Kolås [Wed, 11 Jul 2018 19:48:10 +0000 (21:48 +0200)]
babl: make babl_space_to_icc symbol internal
Øyvind Kolås [Wed, 11 Jul 2018 19:11:17 +0000 (21:11 +0200)]
babl-space: add comments, do not use a static temp struct
Øyvind Kolås [Wed, 11 Jul 2018 18:35:40 +0000 (20:35 +0200)]
babl: add babl_space_get_icc
Øyvind Kolås [Wed, 11 Jul 2018 18:35:37 +0000 (20:35 +0200)]
babl: simplify the singleton logic in babl_format_with_space
Øyvind Kolås [Wed, 11 Jul 2018 15:07:52 +0000 (17:07 +0200)]
babl: export symbol model_with_space
Øyvind Kolås [Mon, 9 Jul 2018 20:58:55 +0000 (22:58 +0200)]
babl: add babl_space_get
An accessor for getting back out the chromaticities of whitepoint and primaries
as well as trcs.
Øyvind Kolås [Mon, 9 Jul 2018 14:48:05 +0000 (16:48 +0200)]
babl: add separate LUTs for rTRC,gTRC and bTRC in generic fast paths
Øyvind Kolås [Mon, 9 Jul 2018 14:29:42 +0000 (16:29 +0200)]
babl: fix bug in icc tag alignment