Because I just copied the code from RT, where it currently is the way it is . Of course we can (should) change that now.
Imho we should do that, but not atm, because he mainly contributes to rawspeed (decoding of raw files), while librtprocess currently is only after decoding. Inviting him now would be too early. Though I’m definitely not against inviting him when the post-decoding part is ready for a 1.0.0 release of librtprocess.
Btw: Imho we should also invite Franco @fcomida from Luminance Hdr, as Lhdr also demosaics and ca corrects raw files (currently using libraw)
I committed error handling in demosaicers. In case memory allocation failes, demosaicers now return an error code (RP_MEMORY_ERROR) instead of accessing the not allocated memory (and crashing by doing this).
I would like to get this merged before I continue wit dual demosaic
I’ll try to get to it tonight.
Great. Thank you
Just to let you know the next points on my personal todo list regarding librtprocess:
-
error handling for memory allocation in raw ca correction
-
dual demosaic
-
do the next step for a simpler interface (which is to replace std::function by someting else)
For 3) I need advice (maybe from @hanatos) as for RawTherapee we need to call back to a c++ member function from librtprocess and I absolutely don’t know how to do that
I fixed one compilation error and merged it.
Thanks for the heads up to these updates @heckflosse & @CarVac. I’ve made a PR for the installation prefix on mac.
Compilation is fine, I just had to add -DCMAKE_CXX_FLAGS=-I/opt/local/include
to my cmake command to get it to see omp.h
On macOS 10.12 my command was
sudo cmake -DCMAKE_BUILD_TYPE="release" -DPROC_TARGET_NUMBER="1" -DCMAKE_C_COMPILER="clang-mp-3.9" -DCMAKE_CXX_COMPILER="clang++-mp-3.9" -DCMAKE_CXX_FLAGS=-I/opt/local/include -DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.9" -DOpenMP_C_FLAGS=-fopenmp="libiomp5" -DOpenMP_CXX_FLAGS=-fopenmp="libiomp5" -DOpenMP_C_LIB_NAMES="libiomp5" -DOpenMP_CXX_LIB_NAMES="libiomp5" -DOpenMP_libiomp5_LIBRARY="/opt/local" -DCMAKE_INSTALL_PREFIX=/opt/local ..
Thanks @HIRAM
Can you include your cmake command in your pr? Maybe an own section for mac build instructions?
So, please give me write access to CarVac/librtprocess! Branching instead of forking would really save some of my time…
Write access granted
The pixel value scaling that you included in Amaze didn’t make it into the other demosaic methods, it seems.
Good catch. I will do that today.