babl.git
2 years agoLUT: initialize LUTs from 4bpp with full alpha
Øyvind Kolås [Thu, 23 Mar 2023 09:34:46 +0000 (10:34 +0100)]
LUT: initialize LUTs from 4bpp with full alpha

Use alpha=255 in seeding of premultiplied - this might not be enough
we might also have to disassociate and reassociate alpha during conversion.

2 years agobuild: post release version bump
Øyvind Kolås [Sat, 25 Feb 2023 19:03:40 +0000 (20:03 +0100)]
build: post release version bump

2 years agobuild: release 0.1.102
Øyvind Kolås [Sat, 25 Feb 2023 19:01:55 +0000 (20:01 +0100)]
build: release 0.1.102

2 years agoNEWS: update
Øyvind Kolås [Sat, 25 Feb 2023 19:01:42 +0000 (20:01 +0100)]
NEWS: update

2 years agoLUT: do not use LUTs by default
Øyvind Kolås [Sat, 25 Feb 2023 18:46:35 +0000 (19:46 +0100)]
LUT: do not use LUTs by default

The code marking LUTs as available for fishes is now protected behind an
environment variable BABL_LUT if it is set, the LUT code is re-enabled.

2 years agomeson: post release version bump
Øyvind Kolås [Mon, 20 Feb 2023 17:07:14 +0000 (18:07 +0100)]
meson: post release version bump

2 years agorelease 0.1.100
Øyvind Kolås [Mon, 20 Feb 2023 16:54:32 +0000 (17:54 +0100)]
release 0.1.100

2 years agoNEWS: update
Øyvind Kolås [Mon, 20 Feb 2023 16:54:25 +0000 (17:54 +0100)]
NEWS: update

2 years agobabl: limit LUT creation for 4→8 and 4→16 bpp further.
Jehan [Fri, 17 Feb 2023 22:27:32 +0000 (23:27 +0100)]
babl: limit LUT creation for 4→8 and 4→16 bpp further.

Looking at LUT conversion code, we are clearly only supporting
converting from "u8" (to "u16" or "float" respectively).

Conversions such as "YA half" to "R'G'B'A float" for instance would be
completely broken (it was trying to use only one byte of the "YA half",
assumed it was "u8" and transform it to "float"). This is why the sample
image in #85 was appearing on display as more transparent than it should
when converted to 16-bit floating point grayscale image.

2 years agobabl: make LUT from 2bpp to 4bpp totally generic.
Jehan [Fri, 17 Feb 2023 21:45:11 +0000 (22:45 +0100)]
babl: make LUT from 2bpp to 4bpp totally generic.

The deleting of the first byte when creating the LUT, then copying the
first byte from source to destination, worked for cases such as "YA u8" to
"RGBA u8" but it would not work for say:

* "Y half" to anything: in such a case, deleting the first byte in LUT's
  content, when creating it, we are basically deleting source's color
  information!
* "YA u8" to "Y float": in such a case, when copying the first byte, at
  conversion time, we are destroying the result color (which didn't need
  any copying of alpha channel as there is no alpha channel in the
  result).
* And so on.

In such cases, it's just better to include everything in the LUT, in a
totally model-agnostic way. In some cases, the alpha channel will be
stored in the LUT, in others, not. But it's not really a problem. It
doesn't even make the LUT bigger; if anything, it makes the LUT creation
and the conversion calculus simpler, hence faster.

2 years agobabl: LUT, only exclude associated alpha when copied
Øyvind Kolås [Wed, 15 Feb 2023 16:21:56 +0000 (17:21 +0100)]
babl: LUT, only exclude associated alpha when copied

2 years agoNEWS: update
Øyvind Kolås [Wed, 15 Feb 2023 15:27:37 +0000 (16:27 +0100)]
NEWS: update

2 years agobabl: narrow conditions for doing LUT conversion
Øyvind Kolås [Tue, 14 Feb 2023 22:13:33 +0000 (23:13 +0100)]
babl: narrow conditions for doing LUT conversion

We can do LUTs where the LUT depends only on the 24first bit - for some
formats this ends up including half of the alpha, which is OK when
3->4bpp conversions copy the last 8bits.

2 years agobabl: LUT from 3bpp to 4bpp must add a fully opaque alpha.
Jehan [Tue, 14 Feb 2023 10:21:18 +0000 (11:21 +0100)]
babl: LUT from 3bpp to 4bpp must add a fully opaque alpha.

For instance, conversion from "RGB u8" to "RGBA u8". With previous code,
the resulting color was right but the pixel was fully transparent.

2 years agoIssue #85: Troubles opening 16-bit floating point grayscale files.
Jehan [Tue, 14 Feb 2023 09:50:20 +0000 (10:50 +0100)]
Issue #85: Troubles opening 16-bit floating point grayscale files.

All current LUT conversion and creation clearly assume that we are
operating on 1 byte per channel (the flag we use right now to determine
if we may have a LUT is even called `is_u8_color_conv`). So let's
enforce this.

Otherwise we might end up with problems such as in issue #85, where we
convert from or to "YA u16", which is still under 4bpp but not 1bpc. As
a consequence, the first byte of the alpha only was copied and the rest
(including the second alpha byte) was used as belonging to the color
components.

Of course, we can update this code later to also support such cases
(taking into account the source and target alpha size), but for now,
let's simply exclude these.

2 years agobabl: fix LUT from grayscale to RGBA images.
Jehan [Mon, 13 Feb 2023 22:34:48 +0000 (23:34 +0100)]
babl: fix LUT from grayscale to RGBA images.

Images from "Y'A" to "R'G'B'A" for instance would end up completely
transparent because we were not reporting the alpha channel from the
source to destination buffer.

2 years agobabl: don't create LUT for destination formats with premultiplied colors.
Jehan [Sun, 12 Feb 2023 12:05:14 +0000 (13:05 +0100)]
babl: don't create LUT for destination formats with premultiplied colors.

This is a different issue than previous commit, but was revealed by
fixing the bug. So in a way, it's a followup.

When the destination format uses premultiplied colors, we would end up
with a LUT where all colors in the table are (0, 0, 0) since we store
them with alpha = 0. We could also generate them with alpha = 1, but
then we'd have to special-case the conversion step, re-multiplying each
pre-multiplied value with the real alpha, etc. So instead, I just bypass
these conversion cases and don't create LUT for these.

For the record, we had this case on GIMP when rendering u8 images to
display, since it would require for instance a LUT from R'G'B'A u8 to
cairo-ARGB32 (Cairo's ARGB32 being pre-multiplied with alpha). So the
whole image would render black (even though, when color-picking colors,
we'd see pixels' colors are not black).

Note that this bug existed before, but was simply hidden by the bug
fixed in the previous commit (since conversion was done twice: first
with LUT, then through usual conversion paths, the second conversion was
hiding the broken LUT conversion).

2 years agoIssue #84: do not process color conversion twice.
Jehan [Sun, 12 Feb 2023 11:58:19 +0000 (12:58 +0100)]
Issue #84: do not process color conversion twice.

Until now babl_fish_lut_process_maybe() was always returning 0, even
when a LUT existed, hence a LUT-based conversion happened.

This was bad, first because it was inefficient (the point of the LUT is
that we didn't have to process through usual conversion code paths). But
worse: when the source and destination buffers were the same, we would
end up getting wrong result (since we'd have the source converted
in-place, then re-converted, hence double conversion!).

This was the reason for issue #84 (see screenshot showing very wrong
colors because of double conversion).

2 years agobin: fix size of dest memory.
Jehan [Sat, 11 Feb 2023 15:53:42 +0000 (16:53 +0100)]
bin: fix size of dest memory.

I guess I was lucky I never got a crash for out-of-bound memory access.

2 years agoRework _babl_mkdir ()
Luca Bacci [Mon, 2 Jan 2023 13:16:47 +0000 (14:16 +0100)]
Rework _babl_mkdir ()

2 years agoUse babl utility to iterate over directory contents
Luca Bacci [Thu, 29 Dec 2022 17:37:44 +0000 (18:37 +0100)]
Use babl utility to iterate over directory contents

2 years agoUse LoadLibraryW
Luca Bacci [Thu, 29 Dec 2022 17:32:57 +0000 (18:32 +0100)]
Use LoadLibraryW

This makes it possible to load modules in path names having characters
outside of the ANSI codepage

2 years agoUse the newer SHGetKnownFolderPath instead of the deprecated SHGetFolderPathA
Luca Bacci [Thu, 29 Dec 2022 17:22:06 +0000 (18:22 +0100)]
Use the newer SHGetKnownFolderPath instead of the deprecated SHGetFolderPathA

SHGetKnownFolderPath is available since Vista

2 years agoUnify variables for Windows and non-Windows in fish_cache_path ()
Luca Bacci [Thu, 29 Dec 2022 17:18:35 +0000 (18:18 +0100)]
Unify variables for Windows and non-Windows in fish_cache_path ()

2 years agoMake mk_ancestry () / mk_ancestry_iter () work without fixed-size buffers
Luca Bacci [Thu, 29 Dec 2022 17:02:19 +0000 (18:02 +0100)]
Make mk_ancestry () / mk_ancestry_iter () work without fixed-size buffers

2 years agoMake fish_cache_path () return a string allocated on the heap
Luca Bacci [Thu, 29 Dec 2022 16:57:34 +0000 (17:57 +0100)]
Make fish_cache_path () return a string allocated on the heap

2 years agoAdd overflow check helpers
Luca Bacci [Thu, 29 Dec 2022 14:37:22 +0000 (15:37 +0100)]
Add overflow check helpers

2 years agoMake use of the libc wrappers
Luca Bacci [Thu, 29 Dec 2022 14:24:34 +0000 (15:24 +0100)]
Make use of the libc wrappers

2 years agoAdd a few babl libc wrappers
Luca Bacci [Thu, 29 Dec 2022 14:14:38 +0000 (15:14 +0100)]
Add a few babl libc wrappers

Add the following wrappers:

* babl_fopen
* babl_rename
* babl_remove
* babl_mkdir
* babl_stat

And the following util:

* babl_dir_list

On Windows, the wrappers internally convert from UTF8 to UTF16 and
call the wide char routines, that way the string need not be limited
to the ANSI character set. Outside of Windows the wrappers are no-op.
babl_dir_list is implemented using opendir / readdir on non-Windows
and _wfindfirst64 / _wfindnext64 on Windows.

2 years agoAdd two functions for converting between UTF-16 and UTF-8 on Windows
Luca Bacci [Thu, 29 Dec 2022 13:58:49 +0000 (14:58 +0100)]
Add two functions for converting between UTF-16 and UTF-8 on Windows

2 years agoSimpler way to get the module HANDLE
Luca Bacci [Thu, 29 Dec 2022 13:51:43 +0000 (14:51 +0100)]
Simpler way to get the module HANDLE

Also works in case of static compilation

2 years agoupdate -dependency for wrap builds babl.pc -> babl-0.1.pc
Ulf Prill [Sat, 3 Dec 2022 16:41:46 +0000 (17:41 +0100)]
update -dependency for wrap builds babl.pc -> babl-0.1.pc

3 years agoIssue #83: improve babl_space_get_rgb_luminance() docs.
Jehan [Tue, 6 Dec 2022 20:00:54 +0000 (21:00 +0100)]
Issue #83: improve babl_space_get_rgb_luminance() docs.

One of GIMP layer modes was using wrongfully these coefficients on
non-linear data (see gimp#3471). It was not clear from babl docs whether
babl was returning wrong coefficients for non-linear spaces, or whether
we were supposed to only ever use these coefficients on linear data.
This is the second case. So let's make the in-code docs clearer.

3 years agoUpdate meson.build
Ulf Prill [Fri, 18 Nov 2022 04:00:44 +0000 (05:00 +0100)]
Update meson.build

Fix Issue #80

3 years agopost-release version bump
Øyvind Kolås [Sun, 13 Nov 2022 15:08:54 +0000 (16:08 +0100)]
post-release version bump

3 years agomeson, NEWS: release 0.1.98
Øyvind Kolås [Sun, 13 Nov 2022 14:45:36 +0000 (15:45 +0100)]
meson, NEWS: release 0.1.98

3 years agobabl: add babl_gc
Øyvind Kolås [Sat, 12 Nov 2022 22:36:09 +0000 (23:36 +0100)]
babl: add babl_gc

The LUT garbage collection was running ad-hoc as a side effect of processing,
this is problematic since it could trigger during processing of other threads
that might be using or freeing the same fish leading to races. The new babl_gc
function is to be called from the main thread, at times when processing is not
occuring, calling babl_gc is not neccesary in short lived commandline tools
and similar.

3 years agoicc: make bounds protection more robust
Øyvind Kolås [Wed, 24 Aug 2022 11:30:18 +0000 (13:30 +0200)]
icc: make bounds protection more robust

Further improvements to issue #78

3 years agoICC: verify validity of data-ranges for ICC tags
Øyvind Kolås [Wed, 24 Aug 2022 11:23:15 +0000 (13:23 +0200)]
ICC: verify validity of data-ranges for ICC tags

Fixing issue #78

3 years agopost release version bump
Øyvind Kolås [Tue, 23 Aug 2022 13:14:18 +0000 (15:14 +0200)]
post release version bump

3 years agorelease 0.1.96
Øyvind Kolås [Tue, 23 Aug 2022 12:52:30 +0000 (14:52 +0200)]
release 0.1.96

3 years agomeson: remove unneded check: true
Øyvind Kolås [Tue, 23 Aug 2022 10:18:32 +0000 (12:18 +0200)]
meson: remove unneded check: true

This check meant to check if we are in a git checkout or a tarball
caused failures when building from tarballs. Hopefully fixing issue #77.

3 years agopost-release version bump
Øyvind Kolås [Sun, 21 Aug 2022 13:28:33 +0000 (15:28 +0200)]
post-release version bump

3 years agorelease 0.1.94
Øyvind Kolås [Sun, 21 Aug 2022 13:25:25 +0000 (15:25 +0200)]
release 0.1.94

3 years agoNEWS: update
Øyvind Kolås [Sun, 21 Aug 2022 10:24:34 +0000 (12:24 +0200)]
NEWS: update

3 years agomeson: fix export_packages for generate_gir
Lukas Oberhuber [Tue, 5 Jul 2022 15:07:34 +0000 (15:07 +0000)]
meson: fix export_packages for generate_gir

This is required in order for babl to link properly in vapigen.

C.f. https://gitlab.gnome.org/Infrastructure/gimp-macos-build/-/commit/22fc8dafa3e5edc065c035b12024bb7ebb35801a
last file

3 years ago-Wimplicit-fallthrough add commit according to gcc doc.
Axel Viala [Fri, 25 Mar 2022 15:51:22 +0000 (16:51 +0100)]
-Wimplicit-fallthrough add commit according to gcc doc.

3 years agomain args not used.
Axel Viala [Fri, 25 Mar 2022 14:25:00 +0000 (15:25 +0100)]
main args not used.

3 years agoFix warn in CHECK_CONV_FLOAT
Axel Viala [Fri, 25 Mar 2022 14:18:08 +0000 (15:18 +0100)]
Fix warn in CHECK_CONV_FLOAT

3 years ago-Wsign-compare babl-memory
Axel Viala [Fri, 25 Mar 2022 15:08:22 +0000 (16:08 +0100)]
-Wsign-compare babl-memory

3 years ago-Wold-style-declaration
Axel Viala [Fri, 25 Mar 2022 14:59:28 +0000 (15:59 +0100)]
-Wold-style-declaration

3 years ago-Wsign-compare conversions.c
Axel Viala [Fri, 25 Mar 2022 14:42:56 +0000 (15:42 +0100)]
-Wsign-compare conversions.c

3 years agoFix warning: -Wsign-compare babl-fish-path
Axel Viala [Fri, 25 Mar 2022 14:36:16 +0000 (15:36 +0100)]
Fix warning: -Wsign-compare babl-fish-path

3 years agobabl-lut-verify: warning: comparison of integer expressions of different signedness...
Axel Viala [Thu, 24 Mar 2022 16:14:40 +0000 (17:14 +0100)]
babl-lut-verify: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]

3 years agobabl_fish_path: comparison of integer expressions of different signedness
Axel Viala [Thu, 24 Mar 2022 16:12:15 +0000 (17:12 +0100)]
babl_fish_path: comparison of integer expressions of different signedness

3 years agoFix warning: comparison of integer expressions of different signedness: ‘int’ and...
Axel Viala [Thu, 24 Mar 2022 16:01:01 +0000 (17:01 +0100)]
Fix warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]

3 years agobin: profile-aware babl format defaults.
Jehan [Wed, 17 Aug 2022 13:53:25 +0000 (15:53 +0200)]
bin: profile-aware babl format defaults.

Instead of always defaulting to "R'G'B' float", if a input/output
profile was set, check if it's CMYK, grayscale or RGB.

The defaults are:
* For a CMYK profile: "CMYK float"
* For a grayscale profile: "Y' float"
* For anything else (or no profile): "R'G'B' float"

3 years agobabl: fix typos in error strings.
Jehan [Wed, 17 Aug 2022 13:18:04 +0000 (15:18 +0200)]
babl: fix typos in error strings.

3 years agobin: add -r/--intent for setting the rendering intent on the CLI tool.
Jehan [Wed, 17 Aug 2022 13:16:12 +0000 (15:16 +0200)]
bin: add -r/--intent for setting the rendering intent on the CLI tool.

3 years agobin: show source format in verbose/default output
Øyvind Kolås [Fri, 29 Jul 2022 20:26:56 +0000 (22:26 +0200)]
bin: show source format in verbose/default output

3 years agobin: add a --brief/-b option.
Jehan [Fri, 22 Jul 2022 09:35:58 +0000 (11:35 +0200)]
bin: add a --brief/-b option.

This will output the result as int or float values (depending on output
format), separated by space.
It would allow to use the output of this script for testing conversion
(with expected output), and can also be used for chaining calls, making
this a re-entrant CLI tool.

3 years agobin: improve usage of the CLI tool.
Jehan [Wed, 20 Jul 2022 21:18:32 +0000 (23:18 +0200)]
bin: improve usage of the CLI tool.

- Add a --help/-h option.
- Detect invalid options (argument starting with '-').
- Support '--' option to indicate end of options. This can be
  particularly useful to set negative component values in floating point
  formats.
- Print usage in various error types (when they are of wrong
  syntax/option types), additionally to printing it when --help is
  called.

3 years agobin: convert from Babl formats with space.
Jehan [Wed, 20 Jul 2022 20:41:50 +0000 (22:41 +0200)]
bin: convert from Babl formats with space.

3 years agobin: new "babl" tool to convert pixel values in command line.
Jehan [Wed, 20 Jul 2022 19:43:29 +0000 (21:43 +0200)]
bin: new "babl" tool to convert pixel values in command line.

This is a CLI tool to quickly make conversions of raw pixel values from
one known format to another.

This is a first basic version, which supports input and output in float,
u8, u16 and u32 (no "half" type yet in particular).

Also it doesn't support profiles yet, or rendering intents, but soon
will.

Finally it doesn't have a "help" output yet to help usage.

3 years agobabl/base/babl-rgb-converter.c: Fix universal_nonlinear_rgb_u8_converter_sse2
Sergey Torokhov [Fri, 15 Jul 2022 22:15:20 +0000 (01:15 +0300)]
babl/base/babl-rgb-converter.c: Fix universal_nonlinear_rgb_u8_converter_sse2

Fix alignment of vector of floats in babl-rgb-converter.c
Downstream Bug (Gentoo): https://bugs.gentoo.org/857708
Bug: https://gitlab.gnome.org/GNOME/babl/-/issues/76

Thanks-to: Alexander Bezrukov <phmagic@mail.ru>
Signed-off-by: Alexander Bezrukov <phmagic@mail.ru>
Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
3 years agomeson: Various fixes
Xavier Claessens [Sat, 23 Apr 2022 14:33:17 +0000 (10:33 -0400)]
meson: Various fixes

- Add missing lcms dependencies. That's needed when lcms is a subproject
  otherwise those targets does not find its headers.
- Add lcms2 wrap so meson can build it as subproject in case the
  dependency is not found on system.
- Fix couple meson warnings
- Use meson.override_dependency() so babl can be used as subproject
  without hardcoding "babl_dep" variable name in main project.

3 years agomeson: fix misspelled kwarg name
Eli Schwartz [Mon, 14 Mar 2022 00:26:05 +0000 (20:26 -0400)]
meson: fix misspelled kwarg name

set10 doesn't have a `Description` kwarg, it does have a `description`
kwarg though.

This caused the conf variable to not have a description when it should
have one, and newer versions of Meson with better argument validation
error out with:

meson.build:58:5: ERROR: configuration_data.set10 got unknown keyword arguments "Description"

3 years agopost-release version bump
Øyvind Kolås [Tue, 22 Mar 2022 16:19:11 +0000 (17:19 +0100)]
post-release version bump

3 years agorelease 0.1.92
Øyvind Kolås [Tue, 22 Mar 2022 16:12:57 +0000 (17:12 +0100)]
release 0.1.92

3 years agoextensions: build arm-neon variants of basic extensions
Øyvind Kolås [Tue, 22 Mar 2022 15:50:42 +0000 (16:50 +0100)]
extensions: build arm-neon variants of basic extensions

3 years agoextensions: simple avoid unneccesary double
Øyvind Kolås [Tue, 22 Mar 2022 15:44:18 +0000 (16:44 +0100)]
extensions: simple avoid unneccesary double

3 years agoCIE: full separation of single and double precision code
Øyvind Kolås [Tue, 15 Mar 2022 13:30:12 +0000 (14:30 +0100)]
CIE: full separation of single and double precision code

3 years agobabl: prevent loading extension modules with incorrect SIMD
Øyvind Kolås [Tue, 15 Mar 2022 11:56:16 +0000 (12:56 +0100)]
babl: prevent loading extension modules with incorrect SIMD

This now happens on top of bailing inside the individual modules -
which in some cases is insufficient. This is likely sufficient
to fix issue #69.

3 years agoavoid some avoidable implicit promotion to double
Øyvind Kolås [Sat, 26 Feb 2022 02:02:38 +0000 (03:02 +0100)]
avoid some avoidable implicit promotion to double

3 years agoci: disable to save the environment
Øyvind Kolås [Wed, 23 Feb 2022 16:34:59 +0000 (17:34 +0100)]
ci: disable to save the environment

Arch linux continue to be a bit incompatible with the buildfarm,
CI is already bad for the environment, cpu consuming expected
failures are even worse.

The CI might turn up again backed by debian, but it is better to
turn it off for now.

3 years agoci: attempt building with latest archlinux image
Øyvind Kolås [Wed, 23 Feb 2022 16:24:13 +0000 (17:24 +0100)]
ci: attempt building with latest archlinux image

3 years agotools: mark a function static inline, needed for -O0 builds with clang
Øyvind Kolås [Tue, 22 Feb 2022 00:56:48 +0000 (01:56 +0100)]
tools: mark a function static inline, needed for -O0 builds with clang

3 years agomeson: post release version bump
Øyvind Kolås [Mon, 21 Feb 2022 22:35:12 +0000 (23:35 +0100)]
meson: post release version bump

3 years agorelease babl 0.1.90
Øyvind Kolås [Mon, 21 Feb 2022 21:30:17 +0000 (22:30 +0100)]
release babl 0.1.90

3 years agoNEWS: update
Øyvind Kolås [Mon, 21 Feb 2022 21:29:56 +0000 (22:29 +0100)]
NEWS: update

3 years agobabl: drop a now deprecated const
Øyvind Kolås [Sat, 19 Feb 2022 17:04:31 +0000 (18:04 +0100)]
babl: drop a now deprecated const

3 years agobabl_format_new: also free doc to plug leak
Andrzej Hunt [Sat, 4 Sep 2021 11:43:29 +0000 (13:43 +0200)]
babl_format_new: also free doc to plug leak

doc and name are allocated via babl_strdup, hence if we don't use them
we need to free both of them - therefore add a free(doc) to match the
existing free(name).

format_new (called just below) transfers ownership of doc, hence it's
correct not to free doc in the case where we're instantiating a new
format - whereas name is copied within format_new, and therefore needs to be
free'd in either scenario.

Leak seen while running gimp+babl built with ASAN:

  Direct leak of 99 byte(s) in 1 object(s) allocated from:
    #0 0x5e87cd in malloc /home/abuild/rpmbuild/BUILD/llvm-12.0.0.src/build/../projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3
    #1 0x7f038605e2b8 in babl_malloc /home/ahunt/git/babl/_build/../babl/babl-memory.c:115:9
    #2 0x7f038605eec7 in babl_strdup /home/ahunt/git/babl/_build/../babl/babl-memory.c:296:9
    #3 0x7f038605110f in babl_format_new /home/ahunt/git/babl/_build/../babl/babl-format.c:376:17
    #4 0x7f037313a432 in init /home/ahunt/git/babl/_build/../extensions/cairo.c:569:25
    #5 0x7f03860412a1 in babl_extension_load /home/ahunt/git/babl/_build/../babl/babl-extension.c:226:7
    #6 0x7f0386040d1c in babl_extension_load_dir /home/ahunt/git/babl/_build/../babl/babl-extension.c:268:19
    #7 0x7f03860409a8 in babl_extension_load_dir_list /home/ahunt/git/babl/_build/../babl/babl-extension.c:338:17
    #8 0x7f038607d6cd in babl_init /home/ahunt/git/babl/_build/../babl/babl.c:154:7
    #9 0x7f0386bce5ab in gegl_post_parse_hook /home/ahunt/git/gegl/_build/../gegl/gegl-init.c:542:3
    #10 0x7f03844aad8a in g_option_context_parse /home/ahunt/git/glib/_build/../glib/goption.c:2228:12
    #11 0x7f0386bce381 in gegl_init /home/ahunt/git/gegl/_build/../gegl/gegl-init.c:189:8
    #12 0xef1f6b in gimp_init_for_testing /home/ahunt/git/gimp/app/tests.c:69:3
    [...]

SUMMARY: AddressSanitizer: 99 byte(s) leaked in 1 allocation(s).

3 years agoAdd CIE Lab alpha u16 format
Tomasz Golinski [Mon, 25 Oct 2021 19:58:08 +0000 (21:58 +0200)]
Add CIE Lab alpha u16 format

3 years agoAdd CIE Lab alpha u8 format
Tomasz Golinski [Fri, 8 Oct 2021 12:15:05 +0000 (14:15 +0200)]
Add CIE Lab alpha u8 format

3 years agobabl: fix mutex lock/unlocks symmetry in babl_fish()
Øyvind Kolås [Wed, 9 Feb 2022 19:03:46 +0000 (20:03 +0100)]
babl: fix mutex lock/unlocks symmetry in babl_fish()

In the case where the fish we are to look up is the memcpy fish we were
not locking the mutex. Whereas the common cleanup after the branches
assumes the lock is held. This is probably the cause of gimp#7632.

3 years agotools: include more conversions in babl-lut-verify
Øyvind Kolås [Thu, 27 Jan 2022 12:31:29 +0000 (13:31 +0100)]
tools: include more conversions in babl-lut-verify

3 years agotools: use _putenv_s() instead of setenv() on Windows.
Jehan [Thu, 27 Jan 2022 16:39:49 +0000 (17:39 +0100)]
tools: use _putenv_s() instead of setenv() on Windows.

setenv() does not exist on Windows API, hence babl tools fail to build.
Fixing the issue by using an alternative Windows API.

3 years agotools: rewrite babl-lut-verify to be more generic
Øyvind Kolås [Thu, 27 Jan 2022 08:25:07 +0000 (09:25 +0100)]
tools: rewrite babl-lut-verify to be more generic

3 years agotools: include CMYK encodings in babl-benchmark
Øyvind Kolås [Thu, 27 Jan 2022 07:29:44 +0000 (08:29 +0100)]
tools: include CMYK encodings in babl-benchmark

3 years agobabl: add 4:8 luts
Øyvind Kolås [Thu, 27 Jan 2022 07:18:53 +0000 (08:18 +0100)]
babl: add 4:8 luts

3 years agotools/babl-benchmark: print LUT/REF markers
Øyvind Kolås [Thu, 27 Jan 2022 04:52:53 +0000 (05:52 +0100)]
tools/babl-benchmark: print LUT/REF markers

3 years agobabl: do not load cache if BABL_INHIBIT_CACHE is set in environment
Øyvind Kolås [Thu, 27 Jan 2022 04:38:47 +0000 (05:38 +0100)]
babl: do not load cache if BABL_INHIBIT_CACHE is set in environment

3 years agotools: inhibit cache use in lut-verify and babl-benchmark
Øyvind Kolås [Thu, 27 Jan 2022 04:37:45 +0000 (05:37 +0100)]
tools: inhibit cache use in lut-verify and babl-benchmark

3 years agosse2-float: correctly handle associted alpha in remainder
Øyvind Kolås [Thu, 27 Jan 2022 03:33:04 +0000 (04:33 +0100)]
sse2-float: correctly handle associted alpha in remainder

3 years agobabl: fix fix bpp initialization when loaded from cache
Øyvind Kolås [Thu, 27 Jan 2022 01:29:15 +0000 (02:29 +0100)]
babl: fix fix bpp initialization when loaded from cache

3 years agobabl: clean up compiler warnings
Øyvind Kolås [Wed, 26 Jan 2022 14:07:56 +0000 (15:07 +0100)]
babl: clean up compiler warnings

3 years agobabl: do luts for 2->16 byte fishes
Øyvind Kolås [Wed, 26 Jan 2022 14:03:31 +0000 (15:03 +0100)]
babl: do luts for 2->16 byte fishes

3 years agobabl: initialize bpp after reading cost in fish cache
Øyvind Kolås [Wed, 26 Jan 2022 14:03:01 +0000 (15:03 +0100)]
babl: initialize bpp after reading cost in fish cache

3 years agobabl: make unified alpha conversion branchless
Øyvind Kolås [Wed, 26 Jan 2022 11:23:37 +0000 (12:23 +0100)]
babl: make unified alpha conversion branchless

3 years agobabl: improve LUT debug info
Øyvind Kolås [Wed, 26 Jan 2022 06:59:53 +0000 (07:59 +0100)]
babl: improve LUT debug info