Merge branch 'dev' into denoise_speedup

This commit is contained in:
heckflosse
2019-03-19 20:25:41 +01:00
978 changed files with 5096 additions and 2097 deletions

View File

@@ -10,6 +10,7 @@ include_directories(${EXTRA_INCDIR}
${IPTCDATA_INCLUDE_DIRS}
${LCMS_INCLUDE_DIRS}
${LENSFUN_INCLUDE_DIRS}
${RSVG_INCLUDE_DIRS}
)
link_directories("${PROJECT_SOURCE_DIR}/rtexif"
@@ -23,6 +24,7 @@ link_directories("${PROJECT_SOURCE_DIR}/rtexif"
${IPTCDATA_LIBRARY_DIRS}
${LCMS_LIBRARY_DIRS}
${LENSFUN_LIBRARY_DIRS}
${RSVG_LIBRARY_DIRS}
)
set(CAMCONSTSFILE "camconst.json")
@@ -65,7 +67,6 @@ set(RTENGINESOURCEFILES
hphd_demosaic_RT.cc
iccjpeg.cc
iccstore.cc
icons.cc
iimage.cc
image16.cc
image8.cc
@@ -184,6 +185,7 @@ target_link_libraries(rtengine rtexif
${TIFF_LIBRARIES}
${ZLIB_LIBRARIES}
${LENSFUN_LIBRARIES}
${RSVG_LIBRARIES}
)
install(FILES ${CAMCONSTSFILE} DESTINATION "${DATADIR}" PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)

View File

@@ -289,7 +289,10 @@ void RawImageSource::getAutoMatchedToneCurve(const ColorManagementParams &cp, st
histMatchingCache = outCurve;
*histMatchingParams = cp;
return;
} else if (w * 10 < fw) {
} else if (w * 33 < fw || w * h < 19200) {
// Some cameras have extremely small thumbs, for example Canon PowerShot A3100 IS has 128x96 thumbs.
// For them we skip histogram matching.
// With 160x120 thumbs from RICOH GR DIGITAL 2 it works fine, so we use 19200 as limit.
if (settings->verbose) {
std::cout << "histogram matching: the embedded thumbnail is too small: " << w << "x" << h << std::endl;
}

View File

@@ -1,117 +0,0 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
* Copyright (c) 2011 Jean-Christophe FRISCH <natureh@free.fr>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#include "icons.h"
#include <iostream>
namespace rtengine
{
std::vector<Glib::ustring> imagePaths;
bool loadIconSet(const Glib::ustring& iconSet)
{
try {
Glib::KeyFile keyFile;
keyFile.load_from_file (iconSet);
auto iconSetDir = keyFile.get_string ("General", "Iconset");
if (!iconSetDir.empty ()) {
imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "actions"));
imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir));
imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "devices"));
imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "places"));
}
iconSetDir = keyFile.get_string ("General", "FallbackIconset");
if (!iconSetDir.empty ()) {
imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "actions"));
imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir));
imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "devices"));
imagePaths.push_back (Glib::build_filename (argv0, "images", iconSetDir, "places"));
}
return true;
} catch (const Glib::Exception& exception) {
if (options.rtSettings.verbose) {
std::cerr << "Failed to load icon set \"" << iconSet << "\": " << exception.what() << std::endl;
}
return false;
}
}
Glib::ustring findIconAbsolutePath (const Glib::ustring& iconName)
{
try {
for (const auto& imagePath : imagePaths) {
const auto iconPath = Glib::build_filename(imagePath, iconName);
if (Glib::file_test(iconPath, Glib::FILE_TEST_IS_REGULAR)) {
return iconPath;
}
}
} catch(const Glib::Exception&) {}
if (options.rtSettings.verbose) {
std::cerr << "Icon \"" << iconName << "\" could not be found!" << std::endl;
}
return Glib::ustring();
}
void setPaths ()
{
// TODO: Forcing the Dark theme, so reading the icon set files is useless for now...
/*Glib::ustring iconSet;
// Either use the system icon set or the one specified in the options.
if (options.useSystemTheme) {
iconSet = Glib::build_filename (argv0, "themes", "system.iconset");
} else {
iconSet = Glib::build_filename (argv0, "themes", options.theme + ".iconset");
}
imagePaths.clear ();
if (!loadIconSet (iconSet)) {
// If the preferred icon set is unavailable, fall back to the default icon set.
loadIconSet (Glib::build_filename (argv0, "themes", "Default.iconset"));
}*/
imagePaths.clear ();
imagePaths.push_back (Glib::build_filename(argv0, "images", "dark"));
// The images folder is the second fallback solution.
imagePaths.push_back (Glib::build_filename(argv0, "images"));
}
}

View File

@@ -1,33 +0,0 @@
/*
* This file is part of RawTherapee.
*
* Copyright (c) 2004-2010 Gabor Horvath <hgabor@rawtherapee.com>
*
* RawTherapee is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RawTherapee is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RawTherapee. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _ICONS_
#define _ICONS_
#include <glibmm.h>
#include "../rtgui/options.h"
namespace rtengine
{
Glib::ustring findIconAbsolutePath (const Glib::ustring& iconName);
void setPaths ();
}
#endif

View File

@@ -113,6 +113,7 @@ void cleanup ()
ProcParams::cleanup ();
Color::cleanup ();
RawImageSource::cleanup ();
#ifdef RT_FFTW3F_OMP
fftwf_cleanup_threads();
#else