1. babl.c/babl_exit(): Remove fixme to enable babl cache writing on windows.
2. babl-cache.c/mk_ancestry(): pass the modified path to mk_ancestry_iter().
Øyvind Kolås [Wed, 16 Nov 2016 19:36:57 +0000 (20:36 +0100)]
change default BABL_TOLERANCE to 0.000006
This makes the cairo.so extensions fast path for RGBA float blitting to be
accepted. This makes conversions with internal quantization of roughly 16bit be
accepted.
Øyvind Kolås [Wed, 16 Nov 2016 18:27:28 +0000 (19:27 +0100)]
extensions/cairo: replace hard-coded LUT with runtime LUT
The LUT needed recomputation anyways, doing it at runtime permits easier
tweaking. This results in better precision for the fast path than the
existing table.
Øyvind Kolås [Sun, 13 Nov 2016 23:45:15 +0000 (00:45 +0100)]
babl: cache state between babl runs
Store the contents of discovered babl_paths between runs, for now in
/tmp/babl.db , should move to a per-user dir to make it survive reboots.
The code should also check a versioning string at the start and bail if there
is any mismatch... since the data should be reconstructable; and more reliable
when reconstructed than a possibly old version.
Direct leak of 540276 byte(s) in 1 object(s) allocated from:
0 0x4cf190 in calloc (/home/lebedevri/src/_GIMP/babl/tests/.libs/nop+0x4cf190)
1 0x7f9cdd208cbb (<unknown module>)
2 0x7f9cdd207cca (<unknown module>)
3 0x7f9ce06820d8 in babl_extension_load /home/lebedevri/src/_GIMP/babl/babl/babl-extension.c:221:7
4 0x7f9ce06819d6 in babl_extension_load_dir /home/lebedevri/src/_GIMP/babl/babl/babl-extension.c:263:19
5 0x7f9ce06813fa in babl_extension_load_dir_list /home/lebedevri/src/_GIMP/babl/babl/babl-extension.c:333:17
6 0x7f9ce0678c84 in babl_init /home/lebedevri/src/_GIMP/babl/babl/babl.c:151:7
7 0x50504a in main /home/lebedevri/src/_GIMP/babl/tests/nop.c:26:3
8 0x7f9cdf64e72f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2072f)
Direct leak of 540276 byte(s) in 1 object(s) allocated from:
0 0x4cf190 in calloc (/home/lebedevri/src/_GIMP/babl/tests/.libs/nop+0x4cf190)
1 0x7f9cdd208cbb (<unknown module>)
2 0x7f9cdd207cf6 (<unknown module>)
3 0x7f9ce06820d8 in babl_extension_load /home/lebedevri/src/_GIMP/babl/babl/babl-extension.c:221:7
4 0x7f9ce06819d6 in babl_extension_load_dir /home/lebedevri/src/_GIMP/babl/babl/babl-extension.c:263:19
5 0x7f9ce06813fa in babl_extension_load_dir_list /home/lebedevri/src/_GIMP/babl/babl/babl-extension.c:333:17
6 0x7f9ce0678c84 in babl_init /home/lebedevri/src/_GIMP/babl/babl/babl.c:151:7
#7 0x50504a in main /home/lebedevri/src/_GIMP/babl/tests/nop.c:26:3
8 0x7f9cdf64e72f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2072f)
SUMMARY: AddressSanitizer: 1080552 byte(s) leaked in 2 allocation(s).
Gcc-4.9 warns:
babl-gen-test-pixels.c: In function ‘main’:
babl-gen-test-pixels.c:170:1: error: control reaches end of non-void function [-Werror=return-type]
Roman Lebedev [Fri, 19 Aug 2016 17:04:59 +0000 (20:04 +0300)]
extensions: fast-float: babl_lookup(): use 1UL, not just 1
Fixes:
fast-float.c:81:35: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
and
fast-float.c:91:34: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
Using __thread keyword.
Although, it is probably not universally avaliable, so this
is just conditional fastpath, if it is detected as unsupported
at compile time, the dumb implementation using malloc() is used.
Roman Lebedev [Thu, 18 Aug 2016 11:01:51 +0000 (14:01 +0300)]
Add .kateconfig with modelines for Kate
Directly follows GIMP HACKING Hackordnung:
- 2 characters indentation level
- no tabs. TAB should not put TAB characters in the file.
- tab stops at 8 column intervals.
Øyvind Kolås [Fri, 12 Feb 2016 11:05:33 +0000 (12:05 +0100)]
extensions: re-add table based conversions inherited from gggl
This code was replaces with the exact code paths in gggl and gggl-lies,
adding these new extensions re-enables the ability to use these
slightly less exact conversions - that possibly also could be fixed
to be exact.
Debarshi Ray [Sat, 9 Jan 2016 18:41:29 +0000 (19:41 +0100)]
CIE: Add conversion from "RGB float" to "CIE Lab float" and vice versa
Conversions from "RGB float" to "CIE Lab float" are 10 times slower
without this. One use case is passing a "RGB float" buffer to a
saturation operation that works in the "CIE Lab" colour space.
Michael Henning [Sun, 3 Jan 2016 22:02:38 +0000 (17:02 -0500)]
configure.ac: Fix the test for compiling half-floating point code.
_mm_cvtph_ps is implicitly defined if the compiler does not support
it. So, we need to store its return value in a variable so that
the test fails to type check when the function is implicitly defined
to return an int.