Merge branch 'dev' into multiframe-handling
This commit is contained in:
commit
97afbdc5c5
@ -450,7 +450,17 @@ include(CheckCXXSourceCompiles)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${LENSFUN_INCLUDE_DIRS})
|
||||
set(CMAKE_REQUIRED_LIBRARIES)
|
||||
foreach(l ${LENSFUN_LIBRARIES})
|
||||
find_library(_l ${l} PATHS ${LENSFUN_LIBRARY_DIRS} NO_DEFAULT_PATH)
|
||||
if(LENSFUN_LIBRARY_DIRS)
|
||||
# the NO_DEFAULT_PATH is to make sure we find the lensfun version we
|
||||
# want, and not the system's one (e.g. if we have a custom version
|
||||
# installed in a non-standard location)
|
||||
find_library(_l ${l} PATHS ${LENSFUN_LIBRARY_DIRS} NO_DEFAULT_PATH)
|
||||
else()
|
||||
# LENSFUN_LIBRARY_DIRS can be empty if lensfun is installed in the
|
||||
# default path. In this case, adding NO_DEFAULT_PATH would make
|
||||
# find_library fail...
|
||||
find_library(_l ${l})
|
||||
endif()
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${_l})
|
||||
endforeach()
|
||||
check_cxx_source_compiles(
|
||||
|
@ -203,7 +203,7 @@ public:
|
||||
ImProcFunctions (const ProcParams* iparams, bool imultiThread = true)
|
||||
: monitorTransform (nullptr), lab2outputTransform (nullptr), output2monitorTransform (nullptr), params (iparams), scale (1), multiThread (imultiThread), lumimul{} {}
|
||||
~ImProcFunctions ();
|
||||
|
||||
bool needsLuminanceOnly() { return !(needsCA() || needsDistortion() || needsRotation() || needsPerspective() || needsLCP() || needsLensfun()) && (needsVignetting() || needsPCVignetting() || needsGradient());}
|
||||
void setScale (double iscale);
|
||||
|
||||
bool needsTransform ();
|
||||
|
@ -52,7 +52,7 @@ const int br = (int) options.rtSettings.bot_right;
|
||||
const int tl = (int) options.rtSettings.top_left;
|
||||
const int bl = (int) options.rtSettings.bot_left;
|
||||
|
||||
const char *LensProfParams::methodstring[static_cast<size_t>(LensProfParams::eLcMode::LC_LCP) + 1u] = {"none", "lfauto", "lfmanual", "lcp"};
|
||||
const char *LensProfParams::methodstring[static_cast<size_t>(LensProfParams::LcMode::LCP) + 1u] = {"none", "lfauto", "lfmanual", "lcp"};
|
||||
const char *RAWParams::BayerSensor::methodstring[RAWParams::BayerSensor::numMethods] = {"amaze", "igv", "lmmse", "eahd", "hphd", "vng4", "dcb", "ahd", "fast", "mono", "none", "pixelshift" };
|
||||
const char *RAWParams::XTransSensor::methodstring[RAWParams::XTransSensor::numMethods] = {"3-pass (best)", "1-pass (medium)", "fast", "mono", "none" };
|
||||
|
||||
@ -920,7 +920,7 @@ void ToneCurveParams::setDefaults()
|
||||
|
||||
void LensProfParams::setDefaults()
|
||||
{
|
||||
lcMode = eLcMode::LC_NOCORRECTION;
|
||||
lcMode = LcMode::NONE;
|
||||
lcpFile = "";
|
||||
useDist = useVign = true;
|
||||
useCA = false;
|
||||
@ -5836,7 +5836,7 @@ int ProcParams::load (const Glib::ustring &fname, ParamsEdited* pedited)
|
||||
}
|
||||
|
||||
if(ppVersion < 327 && !lensProf.lcpFile.empty()) {
|
||||
lensProf.lcMode = LensProfParams::eLcMode::LC_LCP;
|
||||
lensProf.lcMode = LensProfParams::LcMode::LCP;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -829,15 +829,15 @@ class LensProfParams
|
||||
{
|
||||
|
||||
public:
|
||||
enum class eLcMode {
|
||||
LC_NOCORRECTION, // No lens correction
|
||||
LC_LENSFUNAUTOMATCH, // Lens correction using auto matched lensfun database entry
|
||||
LC_LENSFUNMANUAL, // Lens correction using manually selected lensfun database entry
|
||||
LC_LCP // Lens correction using lcp file
|
||||
enum class LcMode {
|
||||
NONE, // No lens correction
|
||||
LENSFUNAUTOMATCH, // Lens correction using auto matched lensfun database entry
|
||||
LENSFUNMANUAL, // Lens correction using manually selected lensfun database entry
|
||||
LCP // Lens correction using lcp file
|
||||
};
|
||||
|
||||
static const char *methodstring[static_cast<size_t>(eLcMode::LC_LCP) + 1u];
|
||||
eLcMode lcMode;
|
||||
static const char *methodstring[static_cast<size_t>(LcMode::LCP) + 1u];
|
||||
LcMode lcMode;
|
||||
Glib::ustring lcpFile;
|
||||
bool useDist, useVign, useCA;
|
||||
Glib::ustring lfCameraMake;
|
||||
@ -852,37 +852,37 @@ public:
|
||||
|
||||
bool useLensfun() const
|
||||
{
|
||||
return lcMode == eLcMode::LC_LENSFUNAUTOMATCH || lcMode == eLcMode::LC_LENSFUNMANUAL;
|
||||
return lcMode == LcMode::LENSFUNAUTOMATCH || lcMode == LcMode::LENSFUNMANUAL;
|
||||
}
|
||||
|
||||
bool lfAutoMatch() const
|
||||
{
|
||||
return lcMode == eLcMode::LC_LENSFUNAUTOMATCH;
|
||||
return lcMode == LcMode::LENSFUNAUTOMATCH;
|
||||
}
|
||||
|
||||
bool useLcp() const
|
||||
{
|
||||
return lcMode == eLcMode::LC_LCP && lcpFile.length() > 0;
|
||||
return lcMode == LcMode::LCP && lcpFile.length() > 0;
|
||||
}
|
||||
|
||||
bool lfManual() const
|
||||
{
|
||||
return lcMode == eLcMode::LC_LENSFUNMANUAL;
|
||||
return lcMode == LcMode::LENSFUNMANUAL;
|
||||
}
|
||||
|
||||
Glib::ustring getMethodString(eLcMode mode) const
|
||||
Glib::ustring getMethodString(LcMode mode) const
|
||||
{
|
||||
return methodstring[static_cast<size_t>(mode)];
|
||||
}
|
||||
|
||||
eLcMode getMethodNumber(const Glib::ustring &mode) const
|
||||
LcMode getMethodNumber(const Glib::ustring &mode) const
|
||||
{
|
||||
for(size_t i = 0; i < static_cast<size_t>(eLcMode::LC_LCP); ++i) {
|
||||
for(size_t i = 0; i <= static_cast<size_t>(LcMode::LCP); ++i) {
|
||||
if(methodstring[i] == mode) {
|
||||
return static_cast<eLcMode>(i);
|
||||
return static_cast<LcMode>(i);
|
||||
}
|
||||
}
|
||||
return eLcMode::LC_NOCORRECTION;
|
||||
return LcMode::NONE;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -812,11 +812,17 @@ private:
|
||||
|
||||
// perform transform (excepted resizing)
|
||||
if (ipf.needsTransform()) {
|
||||
Imagefloat* trImg = new Imagefloat (fw, fh);
|
||||
ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh,
|
||||
Imagefloat* trImg = nullptr;
|
||||
if (ipf.needsLuminanceOnly()) {
|
||||
trImg = baseImg;
|
||||
} else {
|
||||
trImg = new Imagefloat (fw, fh);
|
||||
} ipf.transform (baseImg, trImg, 0, 0, 0, 0, fw, fh, fw, fh,
|
||||
imgsrc->getMetaData(), imgsrc->getRotateDegree(), true);
|
||||
delete baseImg;
|
||||
baseImg = trImg;
|
||||
if(trImg != baseImg) {
|
||||
delete baseImg;
|
||||
baseImg = trImg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,16 +161,16 @@ void LensProfilePanel::read(const rtengine::procparams::ProcParams* pp, const Pa
|
||||
corrLensfunAuto->set_sensitive(true);
|
||||
|
||||
switch(pp->lensProf.lcMode) {
|
||||
case procparams::LensProfParams::eLcMode::LC_LCP :
|
||||
case procparams::LensProfParams::LcMode::LCP :
|
||||
corrLcpFile->set_active(true);
|
||||
break;
|
||||
case procparams::LensProfParams::eLcMode::LC_LENSFUNAUTOMATCH :
|
||||
case procparams::LensProfParams::LcMode::LENSFUNAUTOMATCH :
|
||||
corrLensfunAuto->set_active(true);
|
||||
break;
|
||||
case procparams::LensProfParams::eLcMode::LC_LENSFUNMANUAL :
|
||||
case procparams::LensProfParams::LcMode::LENSFUNMANUAL :
|
||||
corrLensfunManual->set_active(true);
|
||||
break;
|
||||
case procparams::LensProfParams::eLcMode::LC_NOCORRECTION :
|
||||
case procparams::LensProfParams::LcMode::NONE :
|
||||
corrOff->set_active(true);
|
||||
}
|
||||
|
||||
@ -274,13 +274,13 @@ void LensProfilePanel::setRawMeta(bool raw, const rtengine::FramesMetaData* pMet
|
||||
void LensProfilePanel::write( rtengine::procparams::ProcParams* pp, ParamsEdited* pedited)
|
||||
{
|
||||
if (corrLcpFile->get_active()) {
|
||||
pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::LC_LCP;
|
||||
pp->lensProf.lcMode = procparams::LensProfParams::LcMode::LCP;
|
||||
} else if(corrLensfunManual->get_active()) {
|
||||
pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::LC_LENSFUNMANUAL;
|
||||
pp->lensProf.lcMode = procparams::LensProfParams::LcMode::LENSFUNMANUAL;
|
||||
} else if(corrLensfunAuto->get_active()) {
|
||||
pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::LC_LENSFUNAUTOMATCH;
|
||||
pp->lensProf.lcMode = procparams::LensProfParams::LcMode::LENSFUNAUTOMATCH;
|
||||
} else if(corrOff->get_active()) {
|
||||
pp->lensProf.lcMode = procparams::LensProfParams::eLcMode::LC_NOCORRECTION;
|
||||
pp->lensProf.lcMode = procparams::LensProfParams::LcMode::NONE;
|
||||
}
|
||||
|
||||
if (LCPStore::getInstance()->isValidLCPFileName(fcbLCPFile->get_filename())) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user