Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
support X-Trans sensor raw files #588
X-Trans specific changes:
None of these changes should alter performance for users of Bayer sensors. The changes have been tested on Bayer and X-Trans matrix raws as well LDR files.
The code in this pull request doesn't:
There is generally one commit for each major change. For the VNG/Markesteijn demosaic code, one commit imports/wraps code from dcraw, then another modifies this code to use floats/OpenMP and otherwise make it more specific to darktable.
This pull request closes #9951 and fixes #9388.
If it becomes necessary to update to the latest LibRaw, see separate branch libraw-0.16 (https://github.com/dtorop/darktable/tree/libraw-0.16). This pull request for the "xtrans2" branch keeps the extant LibRaw 0.14.7 (with the addition of a small patch to not break the temperature iop for the X-Pro1) so as not to add another LibRaw dependency.
Things should be pretty sound with this. Though a rawtherapee developer reports (https://code.google.com/p/rawtherapee/issues/detail?id=2415#c51) export of X-Trans images in darktable causing a segfault. Not something which I have observed, though. If anyone can document a segfault (and backtrace!) it would be much appreciated. Regardless, it looks like the rawtherapee people are doing some great work on X-Trans sensors, and it would be interesting to cross-pollinate more.
Note also that https://github.com/dtorop/darktable/tree/xtrans2-dev has some more changes. This is to keep the xtrans2 branch frozen for review.
The tiling commit (a075735) fixes a potential segfault for small values of host_memory_limit. With luck that is the segfault reported by the RawTherapee user.
Note that changes on xtrans2-dev not currently in this PR are:
Am keeping these out of this PR in the name of a feature freeze.
Just made some (final?) changes to the PR. It seems important to note that X-Trans CFA alignment currently behaves slightly differently from Bayer CFAs. Once #584 happens, it would be easier to make X-Trans and Bayer CFAs not diverge in shift handling.
Also, it seems important to hide linear demosaic in the GUI now, as it really is so inferior to other options and it would be a pity to have anyone trying this code have their history depend upon its presence.
added a commit
this pull request
Jul 14, 2014
@LebedevRI Thank you and that would be great about merging bayer/x-trans codepaths. I was conservative about keeping them separate for the sake of a cleaner patch, but there's definitely overlap & it could happen in a way not to slow the Bayer path.
There are a bunch of speed-ups & memory reductions for Markesteijn demosaic which I'll package into a separate PR. Also there is a modification to VNG demosaic which lets it act as VNG4 for Bayer images, which could likewise be a separate PR. Only other pending code on my part is profiled denoise for Fujifilm X100S, again for a separate PR.