Skip to content

Instantly share code, notes, and snippets.

@pedrocr
pedrocr / gist:57cfe2127e6a5a4c2864
Created January 3, 2015 22:16
darktable crash with new rawspeed
Program received signal SIGSEGV, Segmentation fault.
memset () at ../sysdeps/x86_64/memset.S:78
78 ../sysdeps/x86_64/memset.S: No such file or directory.
(gdb) bt
#0 memset () at ../sysdeps/x86_64/memset.S:78
#1 0x00007ffff7a51b27 in memset (__len=<optimized out>, __ch=0, __dest=<optimized out>) at /usr/include/x86_64-linux-gnu/bits/string3.h:84
#2 dt_dev_pixelpipe_process_rec (pipe=pipe@entry=0x7ffffffe9180, dev=dev@entry=0x7ffffffe95a0, output=output@entry=0x7ffffffdf540, cl_mem_output=cl_mem_output@entry=0x7ffffffdf560,
out_bpp=out_bpp@entry=0x7ffffffdf520, roi_out=roi_out@entry=0x7ffffffdf5c0, modules=0x0, pieces=0x0, pos=pos@entry=0) at /home/pedrocr/Projects/darktable/src/develop/pixelpipe_hb.c:766
#3 0x00007ffff7a4ff02 in dt_dev_pixelpipe_process_rec (pipe=pipe@entry=0x7ffffffe9180, dev=dev@entry=0x7ffffffe95a0, output=output@entry=0x7ffffffdfa40,
cl_mem_output=cl_mem_output@entry=0x7ffffffdfa60, out_bpp=out_bpp@entry=0x7ffffffdfa20, roi_out=roi_out@entry=0x7ffffffdf840, modules=0x6c3f40,
@pedrocr
pedrocr / gist:32677cc544b168af48e4
Created January 3, 2015 22:21
valgrind of dakrtable-cli with rawspeed-sync branch
$ valgrind /opt/darktable/bin/darktable-cli RAW_SONY_A100.ARW RAW_SONY_A100.ARW.jpg
==7956== Memcheck, a memory error detector
==7956== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==7956== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==7956== Command: /opt/darktable/bin/darktable-cli RAW_SONY_A100.ARW RAW_SONY_A100.ARW.jpg
==7956==
output file already exists, it will get renamed
[exiv2] Directory SubImage1 with 6496 entries considered invalid; not read.
==7956== Conditional jump or move depends on uninitialised value(s)
@pedrocr
pedrocr / gist:1a61182eb6aaa146a7fd
Created January 3, 2015 22:25
valgrind of dakrtable-cli with master branch
$ valgrind /opt/darktable/bin/darktable-cli RAW_SONY_A100.ARW RAW_SONY_A100.ARW.jpg
==11141== Memcheck, a memory error detector
==11141== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==11141== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==11141== Command: /opt/darktable/bin/darktable-cli RAW_SONY_A100.ARW RAW_SONY_A100.ARW.jpg
==11141==
output file already exists, it will get renamed
[exiv2] Directory SubImage1 with 6496 entries considered invalid; not read.
==11141== Conditional jump or move depends on uninitialised value(s)
@pedrocr
pedrocr / gist:d77a6960a6e34fb4aeec
Created January 4, 2015 19:29
valgrind run of darktable-cli
$ valgrind /opt/darktable/bin/darktable-cli YDSCF8313.RAF YDSCF8313.RAF.jpg
==12519== Memcheck, a memory error detector
==12519== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==12519== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info
==12519== Command: /opt/darktable/bin/darktable-cli YDSCF8313.RAF YDSCF8313.RAF.jpg
==12519==
output file already exists, it will get renamed
==12519== Conditional jump or move depends on uninitialised value(s)
==12519== at 0x1E388CEB: commit_params (denoiseprofile.c:1528)
==12519== by 0x4F17752: dt_iop_init_pipe (imageop.c:455)
@pedrocr
pedrocr / gist:0223c2fac36061186ab6
Created January 19, 2015 20:18
darktable git crash
this is darktable 1.7.0+616~ga1c6608 reporting a segfault:
#0 __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1 0x00007fd95657968d in _L_lock_1082 () from /lib/x86_64-linux-gnu/libpthread.so.0
#2 0x00007fd956579607 in __GI___pthread_mutex_lock (mutex=0x1c69810) at ../nptl/pthread_mutex_lock.c:134
#3 0x00007fd953fe9981 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4 0x00007fd95583ecb2 in ?? () from /usr/lib/x86_64-linux-gnu/libgdk-3.so.0
#5 0x00007fd953fa768d in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#6 0x00007fd953fa7f03 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#7 0x00007fd953fa830a in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
@pedrocr
pedrocr / gist:a4991c3673476e2bf38a
Created February 26, 2015 13:25
darktable-cli crash
Reading symbols from /opt/darktable/bin/darktable-cli...done.
(gdb) run
Starting program: /opt/darktable/bin/darktable-cli Panasonic_LX100_aspect_ratio_1to1.RW2 Panasonic_LX100_aspect_ratio_1to1.jpg
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe822a700 (LWP 20284)]
[New Thread 0x7fffe7a29700 (LWP 20285)]
[New Thread 0x7fffcdb0c700 (LWP 20286)]
[New Thread 0x7fffcd30b700 (LWP 20287)]
[New Thread 0x7fffccb0a700 (LWP 20288)]
diff -ur RawSpeed/CiffTag.h ../darktable/src/external/rawspeed/RawSpeed/CiffTag.h
--- RawSpeed/CiffTag.h 2015-02-28 13:43:08.905570721 +0000
+++ ../darktable/src/external/rawspeed/RawSpeed/CiffTag.h 2015-02-22 18:08:24.751081341 +0000
@@ -29,6 +29,8 @@
typedef enum {
CIFF_NULL = 0x0000,
CIFF_MAKEMODEL = 0x080a,
+ CIFF_SHOTINFO = 0x102a,
+ CIFF_WHITEBALANCE = 0x10a9,
CIFF_SENSORINFO = 0x1031,
@pedrocr
pedrocr / gist:9a3e44e7022e2fc75b3b
Created May 1, 2015 13:22
Current mess of matching color matrices in darktable
Found 691 cameras in cameras.xml and 521 in adobe_coeffs
Found 112 cameras without adobe_coeff and 117 adobe_coeffs with no camera
Unmatched Cameras
CANON EOS REBEL SL1
CANON EOS KISS X7
CANON EOS DIGITAL REBEL XT
CANON EOS KISS DIGITAL N
CANON EOS 350D
CANON EOS DIGITAL REBEL XSI
@pedrocr
pedrocr / gist:427dd6bf045f646b2c6a
Created May 1, 2015 13:46
Script to check correspondence between cameras.xml and adobe_coeffs.c
#!/usr/bin/env ruby
require 'nokogiri'
if ARGV.size != 2
$stderr.puts "Usage: check-cameras <path/to/cameras.xml> <path/to/adobe_coeff.c>"
exit 2
end
def munge_make_model(make, model)
@pedrocr
pedrocr / gist:d8d1284fd2fa83162c4d
Created May 9, 2015 16:01
interpolation warning fix
diff --git a/src/common/interpolation.c b/src/common/interpolation.c
index 78b837e..ca24008 100644
--- a/src/common/interpolation.c
+++ b/src/common/interpolation.c
@@ -786,9 +786,9 @@ float dt_interpolation_compute_sample(const struct dt_interpolation *itor, const
{
int clip_x = clip(ix + j, 0, width - 1, bordermode);
const float *ipixel = in + clip_y * linestride + clip_x * samplestride;
- h += kernelh[j] * ipixel[0];
+ h += kernelh[j%8] * ipixel[0];